0% encontró este documento útil (1 voto)
242 vistas11 páginas

Computers As Components - Principles of Embedded Computing Systems Design PDF

Cargado por

Sree Supraja
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd
0% encontró este documento útil (1 voto)
242 vistas11 páginas

Computers As Components - Principles of Embedded Computing Systems Design PDF

Cargado por

Sree Supraja
Derechos de autor
© © All Rights Reserved
Nos tomamos en serio los derechos de los contenidos. Si sospechas que se trata de tu contenido, reclámalo aquí.
Formatos disponibles
Descarga como PDF, TXT o lee en línea desde Scribd

Computers as Components

Principles of Embedded
Computing System Design
Technische Universiiaf Darmstadt
FACHBEREiCH INFORMATIK
Wayne Wolf
Princeton University JLL§LidLILLiiJLJ<
inverstar-Nr.: (007-000. ba
Sachgebiete: S
Standort: CM

AMSTERDAM • BOSTON • HEIDELBERG • LONDON


NEW YORK • OXFORD • PARIS • SAN DIEGO
SAN FRANCISCO • SINGAPORE • SYDNEY • TOKYO
ELSEVIER Morgan Kaufmann is an imprint of Elsevier MORGAN KAUFMANN PUBLISHERS
Contents

Foreword vii

List of Examples xix

Preface xxiii

Chapter 1 Embedded Computing 1

1.1 Introduction 1
1.2 Complex Systems and Microprocessors 2
1.2.1 Embedding Computers 2
1.2.2 Characteristics of Embedded Computing Applications 5
1.2.3 Why Use Microprocessors? 6
1.2.4 Challenges in Embedded Computing System Design 8
1.3 The Embedded System Design Process 10
1.3.1 Requirements 12
1.3.2 Specification 17
1.3.3 Architecture Design 18
1.3.4 Designing Hardware and Software Components 20
1.3.5 System Integration 20
1.4 Formalisms for System Design 21
1.4.1 Structural Description 22
1.4.2 Behavioral Description 29

IX
x Contents

1.5 Design Example: Model Train Controller 32


1.5.1 Requirements 34
1.5.2 Conceptual Specification 34
1.5.3 Detailed Specification 39
1.5.4 Lessons Learned 47
1.6 A Guided Tour of This Book 47
1.6.1 Chapter 2: Instruction Sets 48
1.6.2 Chapter 3: CPUs 48
1.6.3 Chapter 4: The Embedded Computing Platform 49
1.6.4 Chapter 5: Program Design and Analysis 50
1.6.5 Chapter 6: Processes and Operating Systems 51
1.6.6 Chapter 7: CPU Accelerators 52
1.6.7 Chapter 8: Networks 52
1.6.8 Chapter 9: System Design Techniques 53
1.7 Summary 54
What We Learned 54
Further Reading 54
Questions 54
Lab Exercises 56
Chapter 2 Instruction Sets 57

2.1 Introduction 57
2.2 Preliminaries 58
2.2.1 Computer Architecture Taxonomy 58
2.2.2 Assembly Language 60
2.3 ARM Processor 62
2.3.1 Processor and Memory Organization 63
2.3.2 Data Operations 63
2.3.3 Flow of Control 73
2.4 SHARC Processor 82
2.4.1 Memory Organization 83
2.4.2 Data Operations 83
2.4.3 Flow of Control 93
2.4.4 Parallelism within Instructions 99
2.5 Summary 99
What We Learned 100
Contents xi

Further Reading 100


Questions 100
Lab Exercises 104

Chapter 3 CPUs 105

3.1 Introduction 105


3.2 Programming Input and Output 106
3.2.1 Input and Output Devices 106
3.2.2 Input and Output Primitives 108
3.2.3 Busy-Wait I/O 110
3.2.4 Interrupts 112
3.3 Supervisor Mode, Exceptions, and Traps 128
3.3.1 Supervisor Mode 128
3.3.2 Exceptions 129
3.3.3 Traps 129
3.4 Co-Processors 130
3.5 ' Memory System Mechanisms 131
3.5.1 Caches 131
3.5.2 Memory Management Units and Address Translation 139
3.6 CPU Performance 144
3.6.1 Pipelining 145
3.6.2 Superscalar Execution 149
3.6.3 Caching 151
3.7 CPU Power Consumption 152
3.8 Design Example: Data Compressor 158
3.8.1 Requirements and Algorithm 158
3.8.2 Specification 161
3.8.3 Program Design 163
3.8.4 Testing 170
3.9 Summary 171
What We Learned 172
Further Reading 172
Questions 173
xii Contents

Lab Exercises 176

Chapter 4 The Embedded Computing Platform 177

4.1 Introduction 177


4.2 The CPU Bus 178
4.2.1 Bus Protocols 178
4.2.2 DMA 186
4.2.3 System Bus Configurations 187
4.2.4 ARM Bus 190
4.2.5 SHARC Bus 191
4.3 Memory Devices 193
4.3.1 Memory Device Organization 194
4.3.2 Random-Access Memories 195
4.3.3 Read-Only Memories 201
4.4 I/O Devices 202
4.4.1 Timers and Counters 202
,4.4.2 A/D and D/A Converters 203
4.4.3 Keyboards 204
4.4.4 LEDs 206
4.4.5 Displays 206
4.4.6 Touchscreens 208
4.5 Component Interfacing 209
4.5.1 Memory Interfacing 209
4.5.2 Device Interfacing 211
4.6 Designing with Microprocessors 212
4.6.1 System Architecture 213
4.6.2 Hardware Design 214
4.6.3 The PC as a Platform 216
4.7 Development and Debugging 220
4.7.1 Development Environments 220
4.7.2 Debugging Techniques 221
4.7.3 Debugging Challenges 227
4.8 Manufacturing Testing 228
4.9 Design Example: Alarm Clock 233
4.9.1 Requirements 233
Contents xiii

4.9.2 Specification 235


4.9.3 System Architecture 239
4.9.4 Component Design and Testing 240
4.9.5 System Integration and Testing 241
4.10 Summary 241
What We Learned 241
Further Reading 242
Questions 242
Lab Exercises 244

Chapter 5 Program Design and Analysis 245

5.1 Introduction 245


5.2 Program Design 246
5.2.1 Design Patterns 246
5.2.2 Design Patterns for Embedded Systems 248
5.3 Models of Programs 252
5.3.1 Data Flow Graphs 252
5.3.2 Control/Data Flow Graphs 254
5.4 Assembly and Linking 258
5.4.1 Assemblers 259
5.4.2 Linking 264
5.5 Basic Compilation Techniques 265
5.5.1 Statement Translation 267
5.5.2 Procedures 273
5.5.3 Data Structures 274
5.5.4 Expression Simplification 275
5.5.5 Dead Code Elimination 277
5.5.6 Procedure Mining 277
5.5.7 Loop Transformations 278
5.5.8 Register Allocation 280
5.5.9 Scheduling 285
5.5.10 Instruction Selection 287
5.5.11 Understanding and Using Your Compiler 288
5.5.12 Interpreters and JIT Compilers 289
5.6 Analysis and Optimization of Execution Time 290
5.6.1 Elements of Program Performance 292
xiv Contents

5.6.2 Trace-Driven Performance Analysis 296


5.6.3 Optimizing for Execution Speed 304
5.7 Analysis and Optimization of Energy and Power 305
5.7.1 Program Energy Consumption and Optimization 306
5.8 Analysis and Optimization of Program Size 310
5.9 Program Validation and Testing 312
5.9.1 Clear-Box Testing 313
5.9.2 Black-Box Testing 322
5.9.3 Evaluating Function Tests 323
5.9.4 Performance Testing 324
5.10 Design Example: Software Modem 325
5.10.1 Theory of Operation and Requirements 325
5.10.2 Specification 328
5.10.3 System Architecture 328
5.10.4 Component Design and Testing 329
5.10.5 System Integration and Testing 329
5.11 Summary 330
What We Learned 330
Further Reading 331
Questions 331
Lab Exercises 339

Chapter 6 Processes and Operating Systems 341

6.1 Introduction 341


6.2 Multiple Tasks and Multiple Processes 343
6.2.1 Multirate Systems 345
6.2.2 Early Multitasking Technology: The Co-Routine 346
6.3 Processes 347
6.4 Context Switching 351
6.4.1 Cooperative Multitasking 351
6.4.2 Preemptive Multitasking 356
6.4.3 Processes and Object-Oriented Design 357
6.5 Operating Systems 358
6.5.1 Process State and Scheduling 358
Contents xv

6.5.2 Operating System Structure 361


6.5.3 Timing Requirements on Processes 362
6.5.4 Interprocess Communication 365
6.5.5 Other Operating System Functions 371
6.6 Scheduling Policies 371
6.6.1 Rate-Monotonic Scheduling 372
6.6.2 Earliest-Deadline-First Scheduling 377
6.6.3 RMS versus EDF 382
6.6.4 A Closer Look at Our Modeling Assumptions 383
6.6.5 Other POSIX Scheduling Policies 386
6.7 Interprocess Communication Mechanisms 387
6.7.1 Signals 387
6.7.2 Signals in UML 389
6.7.3 Shared Memory Communication 389
6.7.4 Message-Based Communication 392
6.8 Evaluating Operating System Performance 393
6.9 Power Optimization Strategies for Processes 396
6.10 Design Example: Telephone Answering Machine 400
6.10.1 Theory of Operation and Requirements 400
6.10.2 Specification 404
6.10.3 System Architecture 406
6.10.4 Component Design and Testing 408
6.10.5 System Integration and Testing 409
6.11 Summary 409
What We Learned 410
Further Reading 410
Questions 410
Lab Exercises 417
Chapter 7 Hardware Accelerators 419

7.1 Introduction 419


7.2 CPUs and Accelerators 420
7.2.1 Why Accelerators? 421
7.2.2 Accelerator Design 423
7.3 Accelerated System Design 424
xvi Contents

7.3.1 Performance Analysis 424


7.3.2 System Architecture Framework 429
7.3.3 Partitioning 432
7.3.4 Scheduling and Allocation 434
7.3.5 System Integration and Debugging 437
7.4 Design Example: Video Accelerator 437
7.4.1 Algorithm and Requirements 437
7.4.2 Specification 441
7.4.3 Architecture 441
7.4.4 Component Design 443
7.4.5 System Testing 444
7.5 Summary 445
What We Learned 446
Further Reading 446
Questions 446
Lab Exercises 447

Chapter 8 I Networks 449

8.1 Introduction 449


8.2 Distributed Embedded Architectures 450
8.2.1 Why Distributed? 451
8.2.2 Network Abstractions 452
8.2.3 Hardware and Software Architectures 453
8.2.4 Message Passing Programming 457
8.3 Networks for Embedded Systems 458
8.3.1 TheI2CBus 459
8.3.2 The CAN Bus 464
8.3.3 SHARC Link Ports 467
8.3.4 Ethernet 470
8.3.5 Myrinet 472
8.3.6 Internet 473
8.4 Network-Based Design 475
8.4.1 Communication Analysis 475
8.4.2 System Performance Analysis 481
8.4.3 Hardware Platform Design, Allocation, and Scheduling 482
8.5 Internet-Enabled Systems 484
Contents xvii

8.6 Design Example: Elevator Controller 486


8.6.1 Theory of Operation and Requirements 487
8.6.2 Specification 489
8.6.3 Architecture 491
8.6.4 Testing 492
8.7 Summary 493
What We Learned 493
Further Reading 493
Questions 494
Lab Exercises 496
Chapter 9 System Design Techniques 497

9.1 Introduction 497


9.2 Design Methodologies 498
9.2.1 Why Design Methodologies? 498
9.2.2 Design Flows 500
9.3 Requirements Analysis 507
9.4 Specifications 509
9.4.1 Control-Oriented Specification Languages 509
9.4.2 Advanced Specifications 512
9.5 System Analysis and Architecture Design 515
9.5.1 CRC Cards 516
9.6 Quality Assurance 520
9.6.1 Quality Assurance Techniques 523
9.6.2 Verifying the Specification 525
9.6.3 Design Reviews 527
9.6.4 Measurement-Driven Quality Assurance 530
9.7 Design Example: Telephone PBX 534
9.7.1 Theory of Operation 535
9.7.2 System Architecture 537
9.8 Design Example: Ink Jet Printer 539
9.8.1 Hardware Design 542
9.8.2 Software Design 546
xviii Contents

9.9 Design Example: Personal Digital Assistants 548


9.10 Design Example: Set-Top Boxes 551
9.11 Systems-on-Silicon 555
9.12 Summary 557
What We Learned 557
Further Reading 558
Questions 558
Lab Exercises 559

Appendix A UML Notations 561

A.I Introduction 561


A.2 Primitive Elements 561
A.3 Diagram Types 562
A.3.1 Class Diagram 563
A.3.2 State Diagram 564
'A.3.3 Sequence and Collaboration Diagrams 565

Appendix B Notes on Hardware Design 567

B.I Introduction 567


B.2 Combinational Logic 567
B.3 Sequential Logic 571
B.3.1 Memory Elements 571
B.3.2 Synchronous Machines 573
B.3.3 Asynchronous Machines 576
B.4 Implementation Media 577
Glossary 579
References 601
Index 613
About the CDs 657

También podría gustarte