This Expert Guide gives you the techniques and technologies in software engineering to optimally design and implement your embedded system. Written by experts with a solutions focus, this encyclopedic reference gives you an indispensable aid to tackling the day-to-day problems when using software engineering methods to develop your embedded systems. With this book you will learn: * The principles of good architecture for an embedded system * Design practices to help make your embedded project successful * Details on principles that are often a part of embedded systems, including digital signal processing, safety-critical principles, and development processes * Techniques for setting up a performance engineering strategy for your embedded system software * How to develop user interfaces for embedded systems * Strategies for testing and deploying your embedded system, and ensuring quality development processes * Practical techniques for optimizing embedded software for performance, memory, and power * Advanced guidelines for developing multicore software for embedded systems * How to develop embedded software for networking, storage, and automotive segments * How to manage the embedded development process Includes contributions from: Frank Schirrmeister, Shelly Gretlein, Bruce Douglass, Erich Styger, Gary Stringham, Jean Labrosse, Jim Trudeau, Mike Brogioli, Mark Pitchford, Catalin Dan Udma, Markus Levy, Pete Wilson, Whit Waldo, Inga Harris, Xinxin Yang, Srinivasa Addepalli, Andrew McKay, Mark Kraeling and Robert Oshana. * Road map of key problems/issues and references to their solution in the text * Review of core methods in the context of how to apply them * Examples demonstrating timeless implementation details * Short and to- the- point case studies show how key ideas can be implemented, the rationale for choices made, and design guidelines and trade-offs
Software Engineering for Embedded Systems: A xxiii
Roadmap
Foreword to Software Engineering for Embedded xxxvii
Systems
Acknowledgments xxxix
About the Editors xli
About the Authors xliii
Chapter 1 Software Engineering of Embedded and 1 (32)
Real-Time Systems
Software engineering 1 (6)
Embedded systems 7 (5)
Embedded systems are reactive systems 9 (3)
Real-time systems 12 (6)
Types of real-time systems - soft and hard 12 (3)
Examples of hard real-time 15 (2)
Real-time event characteristics 17 (1)
Efficient execution and the execution 17 (1)
environment
Challenges in real-time system design 18 (5)
Response time 19 (1)
Recovering from failures 20 (1)
The embedded system software build process 21 (2)
Distributed and multi-processor architectures 23 (1)
Software for embedded systems 24 (3)
Super loop architecture 24 (3)
Hardware abstraction layers (HAL) for 27 (3)
embedded systems
Summary 30 (3)
Chapter 2 Embedded Systems Hardware/Software 33 (26)
Co-Development
Today's embedded systems - an example 33 (4)
HW/SW prototyping users 37 (1)
HW/SW prototyping options 38 (3)
Prototyping decision criteria 41 (2)
Choosing the right prototype 43 (1)
Industry design chain 44 (1)
The need to change the design flow 45 (1)
Different types of virtual prototypes 45 (1)
A brief history of virtual prototypes 46 (1)
The limits of proprietary offerings 47 (1)
What makes virtual prototypes fast 48 (1)
Standardization: the era of SystemC TLM-2.0 49 (2)
SystemC TLM-2 abstraction levels 50 (1)
Architecture virtual prototypes 51 (1)
Software virtual prototypes 52 (4)
Summary - the growing importance of 56 (3)
virtualization
Chapter 3 Software Modeling for Embedded Systems 59 (34)
When and why should you model your embedded 59 (1)
system?
Modeling 60 (5)
What is a modeling language? 65 (1)
Examples of modeling languages 66 (3)
The V diagram promise 69 (3)
So, why would you want to model your embedded 72 (1)
system?
When should you model your embedded system? 73 (5)
Mission- and safety-critical applications 73 (1)
Highly complex applications and systems 74 (4)
Operational complexity 78 (1)
Cost of defect versus when detected 79 (1)
Large development teams require modeling 80 (1)
Modeling is often the only choice 81 (2)
So - modeling is great, but aren't all models 83 (3)
wrong?
You have your prototype - now what? 86 (3)
Conclusion 89 (1)
Next steps - try it! 89 (2)
Closed-loop control with a DC motor 90 (1)
Learn more about prototyping with a 90 (1)
downloadable kit
Designing applications with the NI 90 (1)
Statechart Module
Design and simulate a brushed dc motor 90 (1)
h-bridge circuit
Multi-domain physical modeling with 91 (1)
open-source Modelica models
References 91 (2)
Chapter 4 Software Design Architecture and 93 (30)
Patterns for Embedded Systems
Overview of architecture and design 93 (3)
Architecture is about system-wide 94 (2)
optimization
Three levels of design 96 (1)
What are design patterns? 97 (10)
Must I use object-oriented techniques to 98 (2)
use design patterns?
An architectural example 100 (3)
Using patterns 103 (3)
Making trade-off decisions 106 (1)
Software architecture categories and views 107 (14)
Primary architectural views 107 (14)
Secondary viewpoints 121 (1)
Summary 121 (1)
References 122 (1)
Chapter 5 Real-Time Building Blocks: Events and 123 (32)
Triggers
Events and triggers 124 (1)
Room temperature unit 124 (2)
Event system 126 (1)
Event handle 127 (2)
Event methods 129 (1)
Event data structure 130 (1)
Reentrancy 131 (2)
Disable and enable interrupts 132 (1)
EnterCritical and ExitCritical 132 (1)
Semaphores 132 (1)
Implementation with Enter/ExitCritical 133 (1)
Event processing 133 (1)
Integration 134 (2)
Triggers 136 (1)
Blinking LED 136 (1)
Design idea 137 (1)
Tick timer 138 (1)
Trigger interface 139 (1)
Trigger descriptor 140 (1)
Data allocation 141 (1)
SetTrigger 142 (2)
IncTicks 144 (4)
Making it reentrant 148 (1)
Initialization 149 (1)
Blink! 150 (1)
Beep! 151 (2)
Real-time aspects 153 (1)
Summary and source code 154 (1)
Chapter 6 Hardware's Interface to Embedded 155 (28)
Software
Introduction 156 (1)
Collaborate with the hardware team 157 (4)
Proactive collaboration 157 (1)
Ambassadors 158 (1)
Register design tools 158 (2)
Co-development activities 160 (1)
System integration 160 (1)
Useful hardware design aspects 161 (6)
Notification of hardware events 161 (1)
Launching tasks in hardware 162 (1)
Bit field alignment 163 (1)
Fixed bit positions 164 (1)
Block version number 165 (1)
Debug hooks 165 (2)
Supporting multiple versions of hardware 167 (7)
Compile-time switches 167 (4)
Build-time switches 171 (3)
Run-time switches 174 (1)
Self-adapting switches 174 (2)
Difficult hardware interactions 176 (4)
Atomic register access 176 (2)
Mixed bit types in the same register 178 (2)
Edge vs. level interrupts 180 (1)
Testing and troubleshooting 180 (1)
Temporary hooks 180 (2)
Permanent hooks 181 (1)
Conclusion 182 (1)
Best practices 182 (1)
Chapter 7 Embedded Software Programming and 183 (22)
Implementation Guidelines
Introduction 184 (3)
Principles of high-quality programming 185 (2)
What sets embedded apart from general 187 (1)
programming
Starting the embedded software project 187 (8)
Hardware platform input 188 (1)
Project files/organization 189 (1)
Team programming guidelines 190 (2)
Syntax standard 192 (2)
Safety requirements in source code 194 (1)
Variable structure 195 (10)
Variable declarations 195 (4)
Data types 199 (2)
Definitions 201 (4)
Chapter 8 Embedded Operating Systems 205 (56)
Foreground/background systems 207 (1)
Real-time kernels 208 (11)
RTOS (real-time operating system) 210 (1)
Critical sections 210 (1)
Task management 211 (4)
Assigning task priorities 215 (1)
Determining the size of a stack 216 (3)
The idle task 219 (1)
Priority levels 219 (1)
The ready list 220 (1)
Preemptive scheduling 220 (1)
Scheduling points 221 (1)
Round-robin scheduling 222 (1)
Context switching 222 (3)
Interrupt management 225 (8)
Handling CPU interrupts 226 (3)
Non-kernel-aware interrupt service routine 229 (1)
(ISR)
Processors with multiple interrupt 230 (1)
priorities
All interrupts vector to a common location 231 (2)
Every interrupt vectors to a unique location 233 (1)
The clock tick (or system tick) 233 (1)
Wait lists 234 (1)
Time management 234 (2)
Resource management 236 (12)
Resource management, disable/enable 238 (1)
interrupts
Resource management, semaphores 239 (5)
Resource management, priority inversions 244 (1)
Resource management, mutual-exclusion 245 (2)
semaphores (mutex)
Resource management, deadlocks (or deadly 247 (1)
embrace)
Synchronization 248 (4)
Synchronization, semaphores 249 (1)
Synchronization, credit tracking 250 (1)
Bilateral rendez-vous 251 (1)
Message passing 252 (4)
Messages 253 (1)
Message queues 253 (1)
Flow control 254 (2)
Clients and servers 256 (1)
Memory management 256 (2)
Summary 258 (3)
Chapter 9 Software Reuse By Design in Embedded 261 (20)
Systems
Why does software reuse matter? 262 (2)
What limits software reuse? 264 (3)
Kinds of software reuse 267 (1)
Implementing reuse by layers 268 (2)
Going to the next level 270 (1)
Introducing the component factory 271 (1)
Factory hardware configuration 272 (1)
Factory software configuration 273 (2)
How the factory aids reusability 275 (1)
RTOS agnosticism 276 (2)
Arbitrary extensibility 278 (1)
Conclusion 278 (1)
References 279 (2)
Chapter 10 Software Performance Engineering for 281 (32)
Embedded Systems
Example: latency vs. throughput in an eNodeB 296 (8)
application
Performance patterns and anti-patterns 304 (7)
References 311 (2)
Chapter 11 Optimizing Embedded Software for 313 (30)
Performance
The code optimization process 314 (1)
Using the development tools 314 (3)
Compiler optimization 315 (1)
Basic compiler configuration 316 (1)
Enabling optimizations 316 (1)
Additional optimization configurations 317 (1)
Using the profiler 317 (1)
Background - understanding the embedded 317 (1)
architecture
Resources 317 (1)
Basic C optimization techniques 318 (9)
Choosing the right data types 318 (1)
Functions calling conventions 319 (2)
Pointers and memory access 321 (1)
Restrict and pointer aliasing 322 (2)
Loops 324 (2)
Additional tips and tricks 326 (1)
General loop transformations 327 (6)
Loop unrolling 327 (1)
Multisampling 328 (1)
Partial summation 329 (2)
Software pipelining 331 (2)
Example application of optimization 333 (10)
techniques: cross-correlation
Setup 334 (1)
Original implementation 334 (2)
Step 1: use intrinsics for fractional 336 (1)
operations and specify loop counts
Step 2: specify data alignment and modify 336 (2)
for multisampling algorithm
Step 3: assembly-language optimization 338 (5)
Chapter 12 Optimizing Embedded Software for 343 (24)
Memory
Introduction 343 (1)
Code size optimizations 344 (12)
Compiler flags and flag mining 344 (1)
Target ISA for size and performance 345 (2)
tradeoffs
Tuning the ABI for code size 347 (7)
Caveat emptor: compiler optimization 354 (2)
orthogonal to code size!
Memory layout optimization 356 (5)
Overview of memory optimization 357 (1)
Focusing optimization efforts 357 (1)
Vectorization and the dynamic code: compute 358 (2)
ratio
Pointer aliasing in C 360 (1)
Data structures, arrays of data structures, 361 (3)
and adding it all up!
Loop optimizations for memory performance 364 (3)
Data alignment's rippling effects 364 (1)
Selecting data types for big payoffs 365 (2)
Chapter 13 Optimizing Embedded Software for 367 (50)
Power
Introduction 368 (1)
Understanding power consumption 369 (3)
Basics of power consumption 369 (1)
Static vs. dynamic power consumption 370 (1)
Maximum, average, worst-case, and typical 371 (1)
power
Measuring power consumption 372 (5)
Measuring power using an ammeter 372 (1)
Measuring power using a hall sensor type IC 373 (1)
VRMs (voltage regulator module power supply 374 (1)
ICs)
Static power measurement 375 (1)
Dynamic power measurement 375 (1)
Profiling your application's power 376 (1)
consumption
Minimizing power consumption 377 (11)
Hardware support 378 (4)
Clock and voltage control 382 (1)
Low-power example 383 (5)
Optimizing data flow 388 (7)
Reducing power consumption for memory 388 (1)
accesses
DDR overview 389 (3)
DDR data flow optimization for power 392 (1)
Optimizing power by timing 393 (1)
Optimizing with interleaving 394 (1)
Optimizing memory software data organization 394 (1)
Optimizing general DDR configuration 394 (1)
Optimizing DDR burst accesses 394 (1)
SRAM and cache data flow optimization for 395 (8)
power
SRAM (all memory) and code size 396 (1)
SRAM power consumption and parallelization 397 (1)
Data transitions and power consumption 397 (1)
Cache utilization and SoC memory layout 397 (1)
Explanation of locality 398 (1)
Explanation of set-associativity 399 (2)
Memory layout for cache 401 (1)
Write-back vs. write-through caches 401 (1)
Cache coherency functions 402 (1)
Compiler cache optimizations 403 (1)
Peripheral/communication utilization 403 (5)
DMA of data vs. CPU 405 (1)
Coprocessors 406 (1)
System bus configuration 406 (1)
Peripheral speed grades and bus width 407 (1)
Peripheral to core communication 407 (1)
Algorithmic 408 (8)
Compiler optimization levels 408 (1)
Instruction packing 409 (1)
Loop unrolling revisited 409 (1)
Software pipelining 410 (2)
Eliminating recursion 412 (3)
Reducing accuracy 415 (1)
Low-power code sequences and data patterns 416 (1)
Summary and closing remarks 416 (1)
Chapter 14 Human Factors and User Interface 417 (24)
Design for Embedded Systems
Analysis phase of user interface design 422 (4)
First design iteration 422 (1)
Develop a second prototype (high-fidelity 423 (1)
tool-drawn mockup)
Essential use cases 424 (1)
Scenarios for user analysis 424 (1)
Hierarchal task analysis 424 (1)
Design approaches to overcome user 424 (1)
limitations of cognition, perception, and
learning
Error messages 425 (1)
Virtual windows 426 (1)
Data models using entity relationship 427 (2)
diagrams (ERD)
Analysis of virtual windows using a CREDO 429 (1)
matrix
Hueristic evaluation 430 (1)
Gestalts 431 (1)
Designing user interfaces with Model View 432 (2)
Controller (MVC) architecture
Context of the MVC software architecture 433 (1)
Problems and forces for the MVC software 433 (1)
architecture
Solution using the MVC 434 (1)
Safety-critical user interfaces 434 (6)
Process for designing a safer HMI 435 (3)
Guidelines for safe human-machine interface 438 (2)
design
References 440 (1)
Bibliography 440 (1)
Chapter 15 Embedded Software Quality, 441 (70)
Integration and Testing Techniques
What is software test? 442 (3)
Why should we test software? 443 (1)
How much testing is enough? 443 (1)
When should testing take place? 444 (1)
Who makes the decisions? 445 (1)
Available techniques 445 (30)
Static and dynamic analysis 445 (5)
Requirements traceability 450 (5)
Static analysis-adherence to a coding 455 (4)
standard
Essential knots & essential cyclomatic 459 (2)
complexity - case study
Understanding dynamic analysis 461 (4)
The legacy from high-integrity systems 465 (1)
Defining unit, module and integration tests 465 (1)
Defining structural coverage analysis 466 (1)
Achieving code coverage with unit test and 467 (4)
system test in tandem
Retaining the functionality through 471 (1)
regression test
Unit test and test-driven development 471 (2)
Automatically generating test cases 473 (2)
Setting the standard 475 (15)
The terminology of standards 475 (1)
The evolution of a recognized process 476 (5)
standard
Freedom to choose adequate standards 481 (9)
Dealing with the unusual 490 (16)
Working with auto-generated code 490 (1)
Working with legacy code 491 (4)
Tracing requirements through to object code 495 (11)
verification (OCV)
Implementing a test solution environment 506 (4)
Pragmatic considerations 506 (1)
Considering the alternatives 506 (4)
Summary and conclusions 510 (1)
Chapter 16 Software Development Tools for 511 (52)
Embedded Systems
Introduction to debugging tools 512 (2)
GDB debugging 514 (9)
Configure the GDB debugger 515 (1)
Starting GDB 515 (2)
Compiling the application 517 (1)
Debugging the application 518 (2)
Examining data 520 (1)
Using breakpoints 521 (1)
Stepping 521 (1)
Changing the program 522 (1)
Analyzing core dumps 523 (1)
Debug agent design 523 (17)
Use cases 524 (4)
Debug agent overview 528 (2)
Starting the application 530 (1)
Context switch 531 (2)
Position-independent executables 533 (2)
Debug event from the application 535 (3)
Multicore 538 (1)
Starting the debug agent 539 (1)
Debugging using JTAG 540 (5)
Benefits of using JTAG 541 (1)
Board bring-up using JTAG 542 (1)
Comparison with the debug agent 543 (1)
GDB and JTAG 544 (1)
Debugging tools using Eclipse and GDB 545 (3)
Linux application debug with GDB 546 (1)
Linux kernel debug with KGDB 547 (1)
Instrumented code 548 (5)
Practical example 550 (3)
Analysis tools 553 (5)
Strace 553 (1)
Mtrace 554 (3)
Vaigrind 557 (1)
Hardware capabilities 558 (2)
Hardware breakpoints 559 (1)
Hardware watchpoints 560 (1)
Debugging tips and tricks 560 (3)
Chapter 17 Multicore Software Development for 563 (50)
Embedded Systems
Part 1: Analysis and high-level design 565 (1)
Analysis 565 (12)
Improving serial performance 565 (7)
Understand the application 572 (5)
High-level design 577 (9)
Parallel decomposition 577 (3)
Data dependencies 580 (1)
Communication and synchronization 581 (2)
Load balancing 583 (1)
Choice of algorithm 584 (1)
Decomposition approaches 585 (1)
Summary of Part 1 586 (1)
Part 2: Implementation and low-level design 586 (1)
Thread-based implementations 587 (5)
Kernel scheduling 588 (1)
Pthreads 588 (1)
Using PPthreads 589 (1)
Dealing with thread safety 590 (1)
Implementing synchronizations and mutual 591 (1)
exclusion
Mutexes, locks, nested locks 592 (3)
Mutex 593 (1)
Condition variables 593 (2)
Granularity 595 (1)
Fine-grained 595 (1)
Coarse-grained 595 (1)
Approach 595 (1)
Implementing task parallelism 596 (8)
Creation and join 596 (1)
Parallel-pipeline computation 597 (2)
Divide-and-conquer scheme 599 (1)
Task scheduling considerations 599 (1)
Thread pooling 600 (1)
Affinity scheduling 600 (1)
Event-based parallel programs 601 (1)
Implementing loop parallelism 601 (1)
Aligning computation and locality 602 (2)
Message-passing implementations 604 (7)
MCAPI 605 (4)
MRAPI 609 (1)
MCAPI and MRAPI in multicore systems 609 (1)
Playing-card recognition and sorting example 610 (1)
Using a hybrid approach 611 (1)
References 612 (1)
Chapter 18 Say-Critical Software Development 613 (34)
Introduction 614 (1)
Which safety requirements? 615 (2)
Certification killers 616 (1)
Project planning strategies 617 (4)
Strategy 1: determine the project 617 (1)
certification scope early
Strategy 2: determine feasibility of 617 (1)
certification
Strategy 3: select an independent assessor 617 (1)
(if used)
Strategy 4: understand your assessor's role 617 (1)
(if used)
Strategy 5: assessment communication is key 618 (1)
Strategy 6: establish a basis of 618 (1)
certification
Strategy 7: establish a "fit and purpose" 618 (1)
for your product
Strategy 8: establish a certification block 618 (1)
diagram
Strategy 9: establish communication 619 (1)
integrity objectives
Strategy 10: identify all interfaces along 619 (1)
the certification boundary
Strategy 11: identify the key safety 619 (1)
defensive strategies
Strategy 12: define built in test (BIT) 619 (1)
capability
Strategy 13: define fault annunciation 619 (1)
coverage
Strategy 14: define reliance and 620 (1)
expectation of the operator/user
Strategy 15: define plan for developing 620 (1)
software to appropriate integrity level
Strategy 16: define artifacts to be used as 620 (1)
evidence of compliance
Strategy 17: plan for labor-intensive 620 (1)
analyses
Strategy 18: create user-level documentation 620 (1)
Strategy 19: plan on residual activity 621 (1)
Strategy 20: publish a well-defined 621 (1)
certification plan
Faults, failures, hazards, and risk analysis 621 (7)
Faults, errors, and failures 621 (1)
Availability and reliability 622 (1)
Fault handling 623 (1)
Hazard analysis 624 (2)
Risk analysis 626 (2)
Safety-critical architectures 628 (3)
"Do-er"/"Check-er" 628 (1)
Two processors 629 (1)
"Voter" 630 (1)
Software implementation strategies 631 (16)
Strategy 1: have a well-defined, repeatable 631 (1)
peer-review process
Strategy 2: consider using existing safety 632 (1)
coding standards
Strategy 3: handle all combinations of 633 (1)
input data
Strategy 4: specific variable value checking 634 (1)
Strategy 5: mark safety-critical code 635 (2)
sections
Strategy 6: timing execution checking 637 (1)
Strategy 7: stale data 637 (1)
Strategy 8: comparison of outputs 638 (1)
Strategy 9: initialize data to least 639 (1)
permissive state
Strategy 10: order of execution 640 (1)
Strategy 11: volatile data checking 641 (1)
Strategy 12: non-volatile data checking 642 (1)
Strategy 13: make sure the entire system 642 (2)
can run
Strategy 14: remove "dead" code 644 (1)
Strategy 15: fill unused memory 645 (1)
Strategy 16: static code analysis 645 (2)
Chapter 19 Intellectual Property 647 (24)
Background 647 (2)
Is that software yours? 649 (3)
Obtaining software 649 (1)
Copyright protection 650 (1)
Getting copyright 651 (1)
Patents 652 (11)
What is a patent? 652 (3)
Why do patents exist? 655 (1)
Deciding what to patent 655 (2)
Applying for a patent 657 (1)
What's in a patent? 657 (5)
Licensing patents 662 (1)
Problems 663 (8)
Open-source software 663 (1)
Licensing and selling software 664 (1)
Getting acquired 665 (1)
Discovering infringement 665 (2)
Avoiding copyright infringement 667 (2)
Avoiding patent infringement 669 (2)
Chapter 20 Managing Embedded Software 671 (60)
Development
Capability maturity model integration 674 (4)
The OSI model 678 (3)
Software development 681 (9)
V-model 681 (5)
Waterfall model 686 (3)
Agile model 689 (1)
Organization 690 (3)
Program charter 693 (1)
Stakeholders and the core team 694 (2)
Product life-cycle management 696 (2)
Portfolio management 698 (3)
Project management life-cycle 701 (10)
Project life-cycle 711 (13)
Problem-solving 724 (1)
Communications 725 (3)
Abbreviations, symbols, acronyms 728 (1)
Copyright acknowledgments 729 (1)
References 730 (1)
Chapter 21 Agile Development for Embedded 731 (36)
Systems
Introduction 732 (2)
What's special about embedded systems? 734 (5)
Fits into a system whose requirements are 735 (1)
allocated to different engineering
disciplines of which software is only one
Uses specialized hardware 736 (1)
Is often co-developed with the hardware 736 (1)
Constrains the selection of programming 736 (1)
languages and tools
Has a more challenging testing environment 737 (1)
Must often be highly predictable 737 (1)
Is often subject to tight timeliness 737 (1)
constraints
Often has severe resource constraints (such 737 (1)
as memory)
Must often be very highly reliable and 738 (1)
safety-critical
Is often subject to rigorous external 738 (1)
regulation
Is delivered in a shipped, stand-alone 739 (1)
product
Is often subject to fixed-price bids 739 (1)
Agile project planning for embedded software 739 (8)
Project vision 740 (1)
Initial safety/reliability risk assessment 741 (3)
Initial project risk assessment 744 (1)
Estimating 745 (1)
Scheduling 746 (1)
Project governance for embedded software 747 (4)
Stand up! (meetings) 748 (1)
Performance metrics 748 (2)
Iteration retrospective (party phase) 750 (1)
Agile development practices for embedded 751 (8)
Incremental development 751 (1)
High-fidelity modeling 752 (2)
Executable requirements 754 (1)
Test-driven development (TDD) 754 (2)
Continuous integration 756 (1)
Change management 756 (1)
Dynamic planning 757 (1)
Risk management 758 (1)
Scaling factors for agile 759 (1)
Can agile methods help you adhere to 760 (4)
standards?
Summary 764 (1)
References 765 (1)
Bibliography 766 (1)
Chapter 22 Embedded Software for Automotive 767 (50)
Applications
A bit of history to set the scene 769 (6)
Auto electronics: 1911-2000 769 (1)
Electronic content growth drivers 770 (2)
The resultant embedded SW growth 772 (2)
Automotive programming languages 774 (1)
Summary of implications 775 (1)
Automotive segments and how they differ 775 (7)
Body 776 (1)
Chassis and safety 777 (1)
Driver assistance 778 (1)
Powertrain and transmission 779 (1)
Infotainment and telematics 780 (2)
Automotive subsegment summary 782 (1)
Automotive quality 782 (6)
Planning for Murphy's law 782 (1)
Fault-tolerant communications 783 (1)
Fault-tolerant software 784 (1)
Zero-defect software 785 (1)
Risk management and failure modes 785 (1)
Failure modes and effects analysis 786 (2)
Development and test 788 (12)
Subsystem interoperability 788 (3)
Software specifications 791 (1)
Software architecture 791 (3)
Modeling 794 (1)
Autocoding and drivers 794 (1)
Bench testing 795 (1)
Trace and debug 796 (1)
Final-phase testing 797 (2)
Calibration 799 (1)
Maintenance/product lifetime support 800 (1)
Automotive diagnostics 800 (3)
MIL 800 (1)
Data logger 801 (1)
OBD II 802 (1)
Automotive standards 803 (5)
MISRA 803 (1)
AUTOSAR 803 (4)
AEC 807 (1)
Automotive safety 808 (2)
ISO 26262 808 (1)
ASIL 809 (1)
Automotive security 810 (2)
What it used to mean: car alarms etc 810 (1)
What it means today: hacking 811 (1)
What it will mean tomorrow: counterfeiting 811 (1)
The near future of the automotive market 812 (3)
Performance 812 (1)
The emergence of multicore 812 (1)
The connected vehicle 813 (1)
The automated vehicle 814 (1)
Conclusion 815 (2)
Chapter 23 Programming for I/O and Storage 817 (62)
I/O device and I/O controller 819 (10)
Category of I/O devices 819 (2)
I/O controller 821 (1)
Memory-mapped 1/0 and DMA 822 (3)
Flash, SD/SDHC and disk drive 825 (3)
Network-attached storage 828 (1)
I/O programming 829 (15)
I/O software goals 834 (1)
I/O software layer 835 (3)
Case study: device driver in Linux 838 (6)
Storage programming 844 (21)
I/O for block devices 845 (5)
Flash device programming 850 (14)
SATA device driver 864 (1)
Performance improvement of storage systems 865 (10)
Case study 1: performance optimization on 866 (2)
SDHC
Case study 2: performance optimization on 868 (7)
NAS
Summary 875 (2)
Bibliography 877 (2)
Chapter 24 Embedded Software for Networking 879 (42)
Applications
Introduction 880 (1)
System architecture of network devices 881 (3)
Data, control, service and management planes 882 (2)
Multicore SoCs for networking 884 (4)
Cores 884 (1)
Packet engine hardware (PEH) block 885 (3)
Network programming models 888 (3)
Pipeline programming model 889 (1)
Run-to-completion programming 890 (1)
Structure of packet-processing software 891 (4)
Data-plane infrastructure (DP-Infra) 893 (1)
Structure of the forwarding engine 893 (1)
Packet-processing application requirements 894 (1)
Network application programming techniques 895 (19)
Multicore performance techniques for 895 (1)
network application programmers
Avoid locks while looking for flow context 895 (6)
Avoid reference counting 901 (3)
Safe reference mechanism 904 (2)
Flow parallelization 906 (4)
Reducing cache thrashing associated with 910 (4)
updating statistics
Statistics acceleration 914 (1)
General performance techniques for network 914 (2)
application programmers
Use cache effectively 914 (1)
Software-directed prefetching 915 (1)
Use likely/unlikely compiler built-ins 915 (1)
Locking critical piece of code in caches 916 (1)
General coding guidelines 916 (1)
Linux operating system for embedded network 916 (3)
devices
Translation lookaside huller (TLB) misses 917 (1)
associated with user-space programming
Access to hardware peripherals and hardware 918 (1)
accelerators
Deterministic performance 918 (1)
Summary 919 (2)
Chapter 25 Linux for Embedded Systems 921 (40)
Introduction 921 (6)
Why Linux for embedded? 922 (1)
Linux distributions 923 (1)
Embedded platforms suitable for Linux 924 (2)
Licensing 926 (1)
Getting started with Embedded Linux 927 (26)
Memory management unit 927 (1)
Bootstrapper 927 (2)
Bootloader 929 (2)
Kernel 931 (19)
Applications 950 (3)
Running Linux on a reference board 953 (8)
Reference platforms 953 (1)
Starting with BeagleBone 953 (8)
Appendix 1: 'C' Syntax Coding Standard: Source 961 (58)
Code Development
Appendix 2: On the C ++ Programming Language 1019 (8)
for Embedded Software, Systems, and Platforms
Case Study 1: Software Performance Engineering 1027 (16)
Case Study 2: A User Interface: Police Command 1043 (46)
and Control System
Case Study 3: Transitioning to Multicore 1089 (12)
Case Study 4: Software Engineering for Embedded 1101 (24)
Systems Quality and Metrics Program
Index 1125