310 likes | 329 Views
Learn about the principles and practices of embedded systems, including hardware and software design considerations, processors, FPGAs, and software architecture. This book covers everything you need to know about embedded systems.
E N D
Embedded Systems: Principles and Practice Christopher Alix Prairie City Computing, Inc. ECE 420 April 9, 2007
Traditional Definition • A dedicated computer (a combination of hardware and software) that serves a specific purpose, and which is completely encapsulated within another device.
Traditional Definition • NOT general-purpose computers, which aren’t dedicated to a specific task. • NOT devices which don’t employ software at all (but which are becoming increasingly rare). Even something as simple as a digital clock is generally easier and cheaper to implement with a combination of hardware/software than as a hardware-only device.
Form factor (size, shape, weight) Power (battery life, heat dissipation) Environment (shock, vibration, temperature, moisture, RF) Reliability User Interface “Non-User” Interface $ (or even ¢) Design Considerations Common issues in many embedded system designs
Revised Definition • Handheld appliances like cellular phone handsets, MP3 players, PDAs, calculators, game consoles, DVD players, etc. aren’t “embedded” in anything, but most engineers lump them in with ES because they share so many of the hardware and software constraints, components, tools, techniques and engineering skills relevant to traditional ES design. • Given predictions that cellular handset sales will reach a billion units per year by 2009, the handheld device industry is essentially driving most of the innovation in the ES design world.
Software or Hardware?(Both!) • Software for simple or high-reliability systems is often read-only “firmware” • Most systems now use flash memory, enabling in-the-field software updates • No externally-visible difference between hardware and software, so designers “draw the line” based on the specifics of the features to be implemented.
Software or Hardware?In Practice... • Well-defined, fundamental, repetitive and/or performance-sensitive tasks are generally implemented in hardware. • Complex, non-performance-sensitive, and/or likely-to-change tasks are generally implemented in software.
Hardware ArchitectureProcessors • Wide range of processor choices4-, 8-, 16-, 32-, even 64-bit Floating-point or integer math • Specialized on-chip peripheralsGeneral Purpose Input/Output (GPIO) Comparators, amplifiers, LED drivers A/D and D/A conversion Digital Signal Processing Interfaces: I2C, USB, and in between
Hardware ArchitectureFPGAs and CPLDs • Field Programmable Gate Array • Complex Programmable Logic Device • “Grab Bag” of useful hardware on a single chip, often with flexible I/O • Reconfigures itself on power-up • Often used as a “front end” to reduce CPU processing demands or pin count Xilinx (www.xilinx.com), Altera (www.altera.com)
Hardware ArchitectureFPGAs (continued) • Powerful design tools generate FPGA “code” using software-like functional descriptions (VHDL, Verilog) • Designs can be extensively simulated • Programmable (FPGA) designs can be easily converted to “hard coded” ASIC (Application Specific Integrated Circuit) designs for lower cost at high volume
Hardware ArchitectureSoC • System-on-a-Chip: Use an FPGA/ASIC to implement the CPU, too • Many standard CPU architectures are available as “intellectual property”--ready-to-use VHDL or Verilog code • “Core IP” also available for complicated I/O tasks (IEEE1394, Ethernet, etc.) • True single-chip solution for some systems
Software ArchitectureOS or No-OS? • Very simple systems may run a single, “main loop” style program that does everything. • Most systems have at least a low-level “monitor” program (like the BIOS in a PC) that handles power-on initialization and common hardware-related tasks. • More complex systems may use an embedded OS like VxWorks or OS/9, or even an embedded variant of Linux or Windows.
Software Architecture“Realtime” • Most embedded systems have tasks that must be performed reliably at a specific rate. (e.g., capture a new audio sample every 22ms, or open a fuel injector within 10ms of a TDC indication). • Embedded OS’s and software use various techniques to satisfy this need for “realtime” performance. • Realtime only means “consistent”--it doesn’t mean “fast.” Many realtime systems are far slower than the average desktop PC, but you don’t want your engine to die when you stick a CD in your CD player.
Development Process(Not ES-specific) • Often done within the constraints of a structured design methodology as part of a Total Quality System (IEEE, ISO, 6σ, etc.) • Specification • Design • Development • Verification against Design • Validation against Specification
Specification • Defining essential requirements of the final product, regardless of implementation • Generally market-driven • “Look and feel” and external interfaces • Regulatory compliance requirements
Design • Determining a specific solution that meets the overall project requirements • Hardware and software considerations are closely related, so an understanding of both “worlds” is essential • Multitude of constraints put a high price tag on “overengineering”
Design (System) • Selection of hardware and software architectures • Allocation of feature set between hardware and software • Segmentation of system to enable parallel design (e.g., hardware, software, packaging)
Design (Hardware)Component Selection • Low Volume Products (C’s, K’s)Minimum availability issues Some parts out of contention Can utilize distributor stock “Parts finder” services • High Volume Products (M’s)Production limits/allocation Multiple sourcing requirements • All ProductsLong-term availability and upgrade paths Regulatory changes (RoHS)
Design (Hardware)Circuit Design • EDA (Electronic Design Automation) Tools • Schematic capture (OrCAD, EAGLE, etc.) • Circuit simulation where necessary (SPICE) • Prototyping of new concepts • Often incremental (borrowing circuits or portions of circuits from earlier products) • Reference designs are a key resource • Design-for-testability (DFT) and debugging tools
Design (Hardware)PCB Design • Most non-trivial ES use high-density surface-mount components on multilayer PC boards • 4-, 6-, 8-layer boards are common • Dedicated power and ground layers simplify layout and improve RF characteristics • More complicated than you might think! • Surface-mount technology (SMT) offers high density and facilitates automated assembly……but are difficult or impossible to “tweak” later, so require extra care during the design process.
Design (Hardware)Physical Design • Packaging • RF shielding (radiation and susceptibility) Metallized enclosures Bonding of PCB to enclosure Connector shielding Shape and placement of openings • Reliability “shake and bake” testing Drop testing
Design (Hardware)Regulatory Compliance • US: FCC (RF shielding), UL (safety) FDA, DOT, FAA, FRA, et al. • International: CSA (Canada), CE (Europe), GS, Europe: CE mark • Risk analysis (root-cause, fault-tree, etc.) is often required as a part of regulatory submissions • Less innovative products are generally easier to gain regulatory approval for, for better or for worse.
Design (Software) • Typically 10:1 (or higher) ratio of software engineers to hardware engineers on many ES projects • Selection of development and debugging tools, in concert with hardware debugging support • Software is key to debugging the hardware, and vice versa--groups must work closely together • User interface design is important to the quality and usability of the resulting product
Development • Hardware and software development is done in parallel, so agreement on standards and protocols is critical to keep the project moving forward • Development often involves multiple groups and vendors, both in- and out-of-house • A clear specification and design helps keep all the relevant parties moving in the same direction • An extra hour of design time saves many hours of development time in virtually every case
Development(Hardware) • PCB Fabrication and assembly generally outsourced • High level of automation • Most large-scale CM (Contract Manufacturing) is done overseas; good communication is key to success • Testability must be designed in (test coupons on PC boards, test jigs and fixtures, special provision for debugging very-high-speed signals, etc.)
Development(Software) • Software makes the hardware work (or not work) • Open-source tools common in ES world • Debugging environments vary widely based on the capabilities of the hardware • Software is easier to change than hardware, but quality is equally important
Verification • Does the implementation match the design? • Hardware and software test plans are essential • Automated testing is valuable • Regression testing is important as changes are made • Good development processes offer traceability
Validation • Does the product satisfy the requirements? • If the design process was done right, validation should be a formality • Product and Project Managers need to keep the fundamental requirements in mind during all phases of the project to ensure a positive outcome
Closing Comments • Embedded Systems development is a large and growing part of both the EE and software worlds • Managers and lead engineers in ES projects need a solid understanding of hardware and software • Outsourcing is prevalent in every aspect of ES work • Successful outcomes demand motivated, skilled and competent leaders with a broad set of skills
Embedded Systems: Principles and Practice Christopher Alix Prairie City Computing, Inc. ECE 420 April 9, 2007