Schweitzer Fachinformationen
Wenn es um professionelles Wissen geht, ist Schweitzer Fachinformationen wegweisend. Kunden aus Recht und Beratung sowie Unternehmen, öffentliche Verwaltungen und Bibliotheken erhalten komplette Lösungen zum Beschaffen, Verwalten und Nutzen von digitalen und gedruckten Medien.
Introduction 1
Cambridge 1
Cut to the Chase 3
The Knee in the Curve 4
Forward the Foundation 5
Chapter 1 The Shape of a Computer Phenomenon 7
Growing Delicious, Juicy Raspberries 7
System-on-a-Chip 10
An Exciting Credit Card-Sized Computer 12
What Does the Raspberry Pi Do? 14
Meeting and Greeting the Raspberry Pi Board 14
GPIO Pins 15
Status LEDs 16
USB Receptacles 18
Ethernet Connection 18
Audio Out 19
Composite Video 21
CSI Camera Module Connector 21
HDMI 22
Micro USB Power 22
Storage Card 23
DSI Display Connection 24
Mounting Holes 25
The Chips 25
The Future 25
Chapter 2 Recapping Computing 27
The Cook as Computer 28
Ingredients as Data 28
Basic Actions 30
The Box That Follows a Plan 31
Doing and Knowing 31
Programs are Data 32
Memory 33
Registers 34
The System Bus 36
Instruction Sets 36
Voltages, Numbers and Meaning 37
Binary: Counting in 1s and 0s 37
The Digit Shortage 40
Counting and Numbering and 0 40
Hexadecimal as a Shorthand for Binary 41
Doing Binary and Hexadecimal Arithmetic 43
Operating Systems: The Boss of the Box 44
What an Operating System Does 44
Saluting the Kernel 46
Multiple Cores 46
Chapter 3 Electronic Memory 47
There Was Memory Before There Were Computers 47
Rotating Magnetic Memory 48
Magnetic Core Memory 50
How Core Memory Works 50
Memory Access Time 52
Static Random Access Memory (SRAM) 53
Address Lines and Data Lines 54
Combining Memory Chips into Memory Systems 56
Dynamic Random Access Memory (DRAM) 59
How DRAM Works 60
Synchronous vs. Asynchronous DRAM 62
SDRAM Columns, Rows, Banks, Ranks and DIMMs 64
DDR, DDR2 DDR3 and DDR4 SDRAM 66
Error-Correcting Code (ECC) Memory 69
The Raspberry Pi Memory System 70
Power Reduction Features 70
Ball-Grid Array Packaging 71
Cache 72
Locality of Reference 72
Cache Hierarchy 72
Cache Lines and Cache Mapping 74
Direct Mapping 76
Associative Mapping 78
Set-Associative Cache 79
Writing Cache Back to Memory 81
Virtual Memory 81
The Virtual Memory Big Picture 82
Mapping Virtual to Physical 83
Memory Management Units: Going Deeper 84
Multi-Level Page Tables and the TLB 88
The Raspberry Pi Swap Problem 88
Watching Raspberry Pi Virtual Memory 90
Chapter 4 ARM Processors and Systems-on-a-Chip 93
The Incredible Shrinking CPU 93
Microprocessors 94
Transistor Budgets 95
Digital Logic Primer 95
Logic Gates 96
Flip-Flops and Sequential Logic 97
Inside the CPU 99
Branching and Flags 101
The System Stack 102
System Clocks and Execution Time 105
Pipelining 106
Pipelining in Detail 108
Deeper Pipelines and Pipeline Hazards 109
The ARM11 Pipeline 112
Superscalar Execution 113
More Parallelism with SIMD 115
Endianness 118
Rethinking the CPU: CISC vs. RISC 119
RISC's Legacy 121
Expanded Register Files 122
Load/Store Architecture 122
Orthogonal Machine Instructions 123
Separate Caches for Instructions and Data 123
ARMs from Little Acorns Grow 124
Microarchitectures, Cores and Families 125
Selling Licenses Rather Than Chips 125
ARM11 126
The ARM Instruction Set 126
Processor Modes 129
Modes and Registers 131
Fast Interrupts 137
Software Interrupts 137
Interrupt Priority 138
Conditional Instruction Execution 139
Coprocessors 142
The ARM Coprocessor Interface 143
The System Control Coprocessor 143
The Vector Floating Point (VFP) Coprocessor 144
Emulating Coprocessors 145
ARM Cortex 145
Multiple-Issue and Out-Of-Order Execution 146
Thumb 2 147
Thumb EE 147
big.LITTLE 147
The NEON Coprocessor for SIMD 148
ARMv8 and 64-Bit Computing 148
Systems on a Single Chip 150
The Broadcom BCM2835 SoC 150
Broadcom's Second- and Third-Generation SoC Devices 151
How VLSI Chips Happen 151
Processes, Geometries and Masks 152
IP: Cells, Macrocells and Cores 153
Hard and Soft IP 154
Floorplanning, Layout and Routing 154
Standards for On-Chip Communication: AMBA 155
Chapter 5 Programming 159
Programming from a Height 159
The Software Development Process 160
Waterfall vs. Spiral vs. Agile 162
Programming in Binary 165
Assembly Language and Mnemonics 166
High-Level Languages 167
Après BASIC, Le Deluge 170
Programming Terminology 171
How Native-Code Compilers Work 173
Preprocessing 174
Lexical Analysis 175
Semantic Analysis 175
Intermediate Code Generation 176
Optimisation 176
Target Code Generation 176
Compiling C: A Concrete Example 177
Linking Object Code Files to Executable Files 183
Pure Text Interpreters 184
Bytecode Interpreted Languages 186
P-Code 186
Java 187
Just-In-Time (JIT) Compilation 189
Bytecode and JIT Compilation Beyond Java 191
Android, Java and Dalvik 191
Data Building Blocks 192
Identifiers, Reserved Words, Symbols and Operators 192
Values, Literals and Named Constants 193
Variables, Expressions and Assignment 193
Types and Type Definitions 194
Static and Dynamic Typing 196
Two's Complement and IEEE 754 198
Code Building Blocks 200
Control Statements and Compound Statements 200
If/Then/Else 200
Switch and Case 202
Repeat Loops 205
While Loops 205
For Loops 207
The Break and Continue Statements 208
Functions 210
Locality and Scope 211
Object-Oriented Programming 214
Encapsulation 217
Inheritance 219
Polymorphism 221
OOP Wrapup 224
A Tour of the GNU Compiler Collection Toolset 224
gcc as Both Compiler and Builder 225
Using Linux Make 228
Chapter 6 Non-Volatile Storage 231
Punched Cards and Tape 232
Punched Cards 232
Tape Data Storage 232
The Dawn of Magnetic Storage 235
Magnetic Recording and Encoding Schemes 236
Flux Transitions 237
Perpendicular Recording 238
Magnetic Disk Storage 240
Cylinders, Tracks and Sectors 240
Low-Level Formatting 242
Interfaces and Controllers 244
Floppy Disk Drives 246
Partitions and File Systems 247
Primary Partitions and Extended Partitions 247
File Systems and High-Level Formatting 249
The Future: GUID Partition Tables (GPTs) 249
Partitions on the Raspberry Pi SD Card 250
Optical Discs 252
CD-Derived Formats 254
DVD-Derived Formats 254
Ramdisks 255
Flash Storage 257
ROMs, PROMs and EPROMs 257
Flash as EEPROM 258
Single-Level vs. Multi-Level Storage 260
NOR vs. NAND Flash 261
Wear Levelling and the Flash Translation Layer 265
Garbage Collection and TRIM 267
SD Cards 268
eMMC 270
The Future of Non-Volatile Storage 271
Chapter 7 Wired and Wireless Ethernet 273
The OSI Reference Model for Networking 274
The Application Layer 276
The Presentation Layer 276
The Session Layer 278
The Transport Layer 278
The Network Layer 279
The Data Link Layer 281
The Physical Layer 282
Ethernet 282
Thicknet and Thinnet 283
The Basic Ethernet Idea 283
Collision Detection and Avoidance 285
Ethernet Encoding Systems 286
PAM-5 Encoding 290
10BASE-T and Twisted-Pair Cabling 291
From Bus Topology to Star Topology 292
Switched Ethernet 293
Routers and the Internet 296
Names vs. Addresses 296
IP Addresses and TCP Ports 297
Local IP Addresses and DHCP 300
Network Address Translation 302
Wi-Fi 304
Standards within Standards 305
Facing the Real World 305
Wi-Fi Equipment in Use 309
Infrastructure Networks vs. Ad Hoc Networks 311
Wi-Fi Distributed Media Access 312
Carrier Sense and the Hidden Node Problem 314
Fragmentation 315
Amplitude Modulation, Phase Modulation and QAM 316
Spread-Spectrum Techniques 319
Wi-Fi Modulation and Coding in Detail 320
How Wi-Fi Connections Happen 323
Wi-Fi Security 325
Wi-Fi on the Raspberry Pi 326
Even More Networking 329
Chapter 8 Operating Systems 331
Introduction to Operating Systems 333
History of Operating Systems 333
The Basics of Operating Systems 336
The Kernel: The Basic Facilitator of Operating Systems 343
Operating System Control 344
Modes 345
Memory Management 346
Virtual Memory 347
Multitasking 347
Disk Access and File Systems 348
Device Drivers 349
Enablers and Assistants to the Operating System 349
Waking Up the OS 349
Firmware 353
Operating Systems for Raspberry Pi 354
NOOBS 354
Third-Party Operating Systems 356
Other Available Operating Systems 356
Chapter 9 Video Codecs and Video Compression 359
The First Video Codecs 360
Exploiting the Eye 361
Exploiting the Data 363
Understanding Frequency Transform 367
Using Lossless Encoding Techniques 371
Changing with the Times 373
The Latest Standards from MPEG 374
H.265 378
Motion Search 378
Video Quality 381
Processing Power 382
Chapter 10 3D Graphics 383
A Brief History of 3D Graphics 383
The Graphical User Interface (GUI) 384
3D Graphics in Video Games 386
Personal Computing and the Graphics Card 387
Two Competing Standards 390
The OpenGL Graphics Pipeline 391
Geometry Specification and Attributes 393
Geometry Transformation 396
Lighting and Materials 400
Primitive Assembly and Rasterisation 403
Pixel Processing (Fragment Shading) 405
Texturing 407
Modern Graphics Hardware 411
Tiled Rendering 411
Geometry Rejection 413
Shading 415
Caching 416
Raspberry Pi GPU 417
Open VG 421
General Purpose GPUs 423
Heterogeneous Architectures 423
OpenCL 425
Chapter 11 Audio 427
Can You Hear Me Now? 427
MIDI 428
Sound Cards 428
Analog vs. Digital 429
Sound and Signal Processing 430
Editing 431
Compression 431
Recording with Effects 432
Encoding and Decoding Information for Communication 433
1-Bit DAC 434
I2S 436
Raspberry Pi Sound Input/Output 437
Audio Output Jack 437
HDMI 438
Sound on the Raspberry Pi 438
Raspberry Pi Sound on Board 439
Manipulating Sound on the Raspberry Pi 439
Chapter 12 Input/Output 447
Introducing Input/Output 448
I/O Enablers 451
Universal Serial Bus 452
USB Powered Hubs 455
Ethernet 457
Universal Asynchronous Receiver/Transmitters 458
Small Computer Systems Interface 459
Parallel ATA 459
Serial Advanced Technology Attachment 460
RS-232 Serial 460
High Definition Media Interface 461
I2S 462
I2C 463
Raspberry Pi Display, Camera Interface and JTAG 464
Raspberry Pi GPIO 464
GPIO Overview and the Broadcom SoC 465
Meeting the GPIO 466
Programming GPIO 473
Alternative Modes 479
GPIO Experimentation the Easy Way 480
Index 481
WHEN I WAS 10 years old, one of my teachers sat me down in front of a computer at school. Now, this isn't what you think. I wasn't about to be inducted into the mysteries of computer programming, even though it was a BBC Micro (the most programmable and arguably the most architecturally sophisticated of the British 8-bit microcomputers, on which I would subsequently cut my teeth in BASIC and assembly language). Instead, I was faced with a half-hour barrage of multiple choice questions about my academic interests, hobbies and ambitions, after which the miraculous machine spat out a diagnosis of my ideal future career: microelectronic chip designer.
This was a bit of a puzzler, not least because what I really wanted to be was a computer game programmer (okay, okay, astronaut) and there was nobody in my immediate environment who had any idea what a 10-year-old should do to set him on the path to the sunlit uplands of microelectronic chip design. Over the next few years, I studied a lot of maths and science at school, learned to program (games) at home, first on the BBC Micro and then the Commodore Amiga, and made repeated, not particularly successful, forays into electronics. As it turned out, and more by luck than judgment, I'd happened on a plausible road to my destination, but it wasn't until I arrived at Cambridge at the age of 18 that I started to figure out where the gaps were in my understanding.
Cambridge occupies a special place in the history of computer science, and particularly in the history of practical or applied computing. In the late 1930s, the young Cambridge academic Alan Turing demonstrated that the halting problem (the question "Will this computer program ever terminate, or halt?") was not computable; in essence, you can't write a computer program that will analyse another arbitrary computer program and determine if it will halt. At the same time, working independently, Alonzo Church proved the same result, which now shares their names: the Church-Turing thesis. But it is telling that while Church took a purely mathematical approach to his proof, based on recursive functions, Turing's proof cast computation in terms of sequential operations performed by what we now know as Turing machines: simple gadgets that walk up and down an infinite tape, reading symbols, changing their internal state and direction of travel in response, and writing new symbols. While most such machines are specialised to a single purpose, Turing introduced the concept of the universal machine, which could be configured via commands written on the tape to emulate the action of any other special-purpose machine. This was the first appearance of a now commonplace idea: the general-purpose programmable computer.
After the outbreak of the Second World War, Turing would go on to play a central role in the Allied code-breaking effort at Bletchley Park, where he was involved (as a member of a team-don't believe everything you see at the movies) in the development of a number of pieces of special-purpose hardware, including the electromechanical bombe, which automated the process of breaking the German Enigma cipher. None of these machines used the specific "finite state automaton plus infinite tape" architecture of Turing's original thought experiment; this turned out to be better suited to mathematical analysis than to actual implementation. And not even the purely electronic Colossus-which did to the formidably sophisticated Lorentz stream cipher what the bombe had done to Enigma-crossed the line into general-purpose programmability. Nonetheless, the experience of developing large-scale electronic systems for code-breaking, radar and gunnery, and of implementing digital logic circuits using thermionic valves, would prove transformative for a generation of academic engineers as they returned to civilian life.
One group of these engineers, under Maurice Wilkes at the University of Cambridge's Mathematical Laboratory, set about building what would become the Electronic Delay Storage Automatic Calculator, or EDSAC. When it first became operational in 1949, it boasted a 500kHz clock speed, 32 mercury delay lines in two temperature-controlled water baths for a total of 2 kilobytes of volatile storage. Programs and data could be read from, and written to, paper tape. Many institutions in the U.S. and UK can advance narrow claims to having produced the first general-purpose digital computer, for a particular value of "first". Claims have been made that EDSAC was the first computer to see widespread use outside the team that developed it; academics in other disciplines could request time on the machine to run their own programs, introducing the concept of computing as a service. EDSAC was followed by EDSAC II, and then Titan. It was only in the mid-1960s that the University stopped building its own computers from scratch and started buying them from commercial vendors. This practical emphasis is even reflected in the current name of the computer department: Cambridge doesn't have a computer science faculty; it has a computer laboratory, the direct descendant of Wilkes' original mathematical laboratory.
This focus on the practical elements of computer engineering has made Cambridge fertile ground for high-technology startups, many of them spun out of the computer laboratory, the engineering department or the various maths and science faculties (even our mathematicians know how to hack), and has made it a magnet for multinational firms seeking engineering talent. Variously referred to as the Cambridge Cluster, the Cambridge Phenomenon or just Silicon Fen, the network of firms that has grown up around the University represents one of the few bona fide technology clusters outside of Silicon Valley. The BBC Microcomputer that told me I should become a chip designer was a Cambridge product, as was its perennial rival, the Sinclair Spectrum. Your cell phone (and your Raspberry Pi) contains several processors designed by the Cambridge-based chip firm ARM. Seventy years after EDSAC, Cambridge remains the home of high technology in the UK.
One of the biggest missing pieces from my haphazard computing education was an idea of how, underneath it all, my computer worked. While I'd graduated downwards from BASIC to assembly language, I'd become "stuck" at that level of abstraction. I could poke my Amiga's hardware registers to move sprites around the screen but I had no idea how I might go about building a computer of my own. It took me another decade, a couple of degrees and a move out of academia to work for Broadcom (a U.S. semiconductor company that came to Cambridge for the startups and stayed for the engineering talent) for me to get to the point where I woke up one morning with "microelectronic chip designer" (in fact the fancier equivalent, "ASIC architect") on my business card. During this time, I've had the privilege of working with, and learning from, a number of vastly more accomplished practitioners in the field, including Sophie Wilson, architect (with Steve Furber) of the BBC Micro and the original ARM processor, and Tim Mamtora of Broadcom's 3D graphics hardware engineering team, who has graciously provided the chapter on graphics processing units (GPUs) for this book.
To a great degree, my goal in writing this book was to produce the "how it works" title that I wish I'd had when I was 18. We've attempted to cover each major component of a modern computing system, from the CPU to volatile random-access storage, persistent storage, networking and interfacing, at a level that should be accessible to an interested secondary school student or first-year undergraduate. Alongside a discussion of the current state of the art, we've attempted to provide a little historical context; it's remarkable that most of the topics covered (though not, obviously, the fine technical details) would have been of relevance to Wilkes' EDSAC engineering team in 1949. You should reach the end with at least a little understanding of the principles that underpin the operation of your computer. I firmly believe that you will find this understanding valuable even if you're destined for a career as a software engineer and never plan to design a computer of your own. If you don't know what a cache is, you'll be surprised that your program's performance drops off a cliff when your working set ends up larger than your cache, or when you align your buffers so that they exhaust the cache's associativity. If you don't know a little about how Ethernet works, you'll struggle to build a performant network for your datacentre.
It's worth dwelling for a moment on what this book isn't, and what it won't tell you. It isn't a comprehensive technical reference for any of the topics covered. You could write (and people have written) whole volumes on the design of caches, CPU pipelines, compilers and network stacks. Instead, we try to provide a primer for each topic, and some suggestions for further study. It is concerned primarily with the architecture of conventional general-purpose computers (in essence, PCs). There is limited coverage of topics like digital signal processing (DSP) and field-programmable gate arrays (FPGAs), which are primarily of interest in special purpose, application-specific domains. Finally, there is little coverage of the quantitative decision-making process that is the heart of good computer...
Dateiformat: ePUBKopierschutz: Adobe-DRM (Digital Rights Management)
Systemvoraussetzungen:
Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet – also für „fließenden” Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein „harter” Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.Bitte beachten Sie: Wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!
Weitere Informationen finden Sie in unserer E-Book Hilfe.