Embedded Systems Computer Embeddedembedded Architecture Systemssystems
Total Page:16
File Type:pdf, Size:1020Kb
Embedded Systems Computer EmbeddedEmbedded Architecture SystemsSystems Jakob Engblom, PhD Uppsala University & Virtutech Inc. [email protected] [email protected] virtuvirtutechtech 14 Nov 2003 Embedded Computer Architecture 2 Embedded Systems Embedded Systems Now what is this elephant thing? You’re all wrong, it is a »“A computer that doesn’t fan! No, a look like a computer” It is a wall! snake! »Interacts with world »Primitive or no user interface »Part of other products No, it is a Part of other products treetrunk! No, a pillar! 14 Nov 2003 Embedded Computer Architecture 3 14 Nov 2003 Embedded Computer Architecture 4 Embedded Systems Processor Market »Single purpose products »Embedded = most processors! ¡Not general purpose like desktop PCs ¡200 million PC and server ¡Do one thing very efficiently ¡8000 million embedded »Software very important: ¡Gives character to product Used to differentiate inside a “platform” ¡Can be changed late "Embedded" 98% ¡Processor cheaper than special HW "Desktop" ¡Today, dominates dev cost 2% 14 Nov 2003 Embedded Computer Architecture 5 14 Nov 2003 Embedded Computer Architecture 6 Processor Market Real-Time System » Processors: 100% »Timing as important as result ¡ 50% of all DSP DSP semiconductor revenue 90% 4-bit 4-bit »Hard real-time: ¡ Explains why everyone 80% 8-bit wants to do processors 70% 16-bit ¡Hard deadlines » 32-bit dominant 60% ¡Dead if missed deadline ¡ 30% of total 50% 8-bit ¡Worst-case semiconductors 40% » PC processors: 30% 32-bit »Soft real-time: ¡ 50% of CPU revenue 20% 16-bit ¡Fuzzier deadlines ¡ 15% of total 10% 32-bit ¡ semiconductors 0% ¡Can miss some deadlines ¡ AMD and Intel share it Units Money ¡Average-case 14 Nov 2003 Embedded Computer Architecture 7 14 Nov 2003 Embedded Computer Architecture 8 Real-Time Systems Simple Embedded Systems »Embedded and Real-Time 8-bit Intel 8051, ¡Synonymous? standard microcontroller »Most embedded Behavior, talk, Most embedded embedded systems are IR communications real-time embedded real-time 8-bit Hitachi H8/300 »Most real-time 32 kB ROM, 32 kB RAM systems are systems are Standard microcontroller chip embedded real-time Byte-code machine, sensor drivers, … 14 Nov 2003 Embedded Computer Architecture 9 14 Nov 2003 Embedded Computer Architecture 10 Fun App: Smart Beer Glass No Upgrades Possible Capacitive sensor for »Once a product ships… fluid level » 8-bit, 8-pin »…it often cannot be serviced PIC processor ¡No download ability Contactless transmission of Inductive coil for ¡No writable persistent storage power and RF ID activation ¡No disks readings & power ¡No loader CPU and reading coil in the table. Reports the level of »Software is write-once fluid in the glass, alerts servers when close to empty »(There are exceptions) 14 Nov 2003 Embedded Computer Architecture 11 14 Nov 2003 Embedded Computer Architecture 12 Consumer Electronics Automotive » Multiple networks » Heterogeneous ¡ CAN for body multiprocessor electronics: 30+ nodes ¡ CAN for engine control: ¡ 8-bit Atmel AVR for UI, games, … few nodes ¡ 16-bit fixed-point TI C54 DSP for GSM coding, radio interface, … ¡ LIN for instruments ¡ 32-bit ARM7 in Bluetooth module » Many processors ¡ + maybe ARM7 in IRDA interface ¡ Up to 100 » All in custom chips » Large diversity in processor types: » Software is large: ¡ 8-bit CPUs (PIC, HC08) for door locks, lights, etc. ¡ 16 MB of code in control part ¡ 16-bit CPUs (C167, HC11, HC12) for most functions ¡ Plus signal processing code ¡ 32-bit CPUs (PPC,V850) for engine control, airbags » Total amount of code: 40-50 MB 14 Nov 2003 Embedded Computer Architecture 13 14 Nov 2003 Embedded Computer Architecture 14 Automotive Timing Aspects »Form follows function »Interrupt latency ¡Processing where the action is ¡Important criterion for embedded ¡Architecture given by application ¡A few clock cycles at most ¡Sensors and actuators distributed ¡Measure of RTOS performance »Heterogeneous systems »Real-Time = predictability ¡Many different makes of CPUs ¡In-order pipelines ¡Standardized at the network/bus ¡SRAM instead of caches ¡Lockable caches ¡Several small CPUs instead of one big 14 Nov 2003 Embedded Computer Architecture 15 14 Nov 2003 Embedded Computer Architecture 16 Military Shipboard Mobile Phone Base Station Standard multiprocessor » UltraSparc servers for »Handle signals radar, target tracking, ¡Data streams to and from combat control, … phones ¡Massively parallel system ¡Thousands of DSP tasks Many CPUs in missiles, ¡ gun controls, engines, … ¡Perfect parallel scalability »Custom or standard DSPs ¡Up to 8 DSPs on a single chip 14 Nov 2003 Embedded Computer Architecture 17 14 Nov 2003 Embedded Computer Architecture 18 Trends System-on-a-chip On-chip bus »Hardware to software »Integration extreme ¡ Increase flexibility, lower cost Data ¡ Software on fast processor can equal HW ¡ Thanks to modern DSP semiconductors mem »Software to hardware »Entire product Bluetooth ¡ Better power consumption & performance Better power consumption & performance on a chip GSM CPU ¡ Design custom hardware for application »One or more Radio »Hardware-software codesign processors, LCD Code memory ¡ Delay division HW/SW to late in project accelerators, … driver ¡ Obtain “optimal” HW/SW division 14 Nov 2003 Embedded Computer Architecture 19 14 Nov 2003 Embedded Computer Architecture 20 Microcontrollers »Classic embedded hardware Embedded »Standard parts Embedded ¡ Quite broad application domains Processing ¡ Sold in large series Processing ¡ Defined by hardware vendors ¡ As cheap as a single dollar »Single processor + devices »Huge number of variants »Usually intended for control plane Microcontrollers 14 Nov 2003 Embedded Computer Architecture 21 14 Nov 2003 Embedded Computer Architecture 22 Microcontroller Microcontroller »A single chip: RAM »CPU Bitness: 4 to 64 bits (small) ¡CPU Core ROM ¡Most common: 8 bit (4G units) CPU (big) ¡Integrated memory Core ¡32-bit growing fastest ¡Integrated peripherals ¡32/64-bit outnumbers desktop A/D Timer UART ¡Integrated services LCD D »Frequency: DC to 2 Ghz »Goal: Outside World »Memory on-chip: 0.5 kB to 5 MB ¡System on one chip ¡No external HW »Power: mW (and up) ¡Fit application “perfectly” »1/30 to 10 instructions per cycle 14 Nov 2003 Embedded Computer Architecture 23 14 Nov 2003 Embedded Computer Architecture 24 Example: PIC 12CE674 Example: AT91M42800A » Memory arch: Harvard » ARM7TDMI 32-bit core » Program memory: 2048 x 14 (OTP/Flash) ¡ Static design: 0 to 33 Mhz » EEPROM: 16 bytes » Memory ¡ 8 kB SRAM on chip » RAM: 128 bytes ¡ External memory interface, 8/16 bit interface » ADC channels: 4 (8 bits) » Devices » I/O ports: 6 ¡ 6 timers » Timers: One 8-bit, One WDT ¡ 2 serial ports » Clock: onchip crystal, 10MHz » JTAG debug interface » 144 Pin package » Package: 8 pins (Pentium 4:700 pins) » About 0.5 W power » One of 13 AT91 » Cost: <$1.00 (Pentium 4:>$200.00) » About 18 USD variants 14 Nov 2003 Embedded Computer Architecture 25 14 Nov 2003 Embedded Computer Architecture 26 Devices on the Chip Devices on the Chip »Interface with the world »Timers ¡Digital I/O ¡ Trigger interrupts ¡Analog/Digital conversion ¡ Watchdogs ¡Digital/Analog conversion »Graphics »Communications ¡ LCD drivers ¡CAN networks ¡ 2D/3D graphics acceleration ¡Ethernet networks »Buses ¡Radio ¡ On-chip: between devices: AMBA, … ¡Serial ports (UART, USART) ¡ Off-chip: PCI, HyperTransport, RapidIO … ¡USB, FireWire, ... 14 Nov 2003 Embedded Computer Architecture 27 14 Nov 2003 Embedded Computer Architecture 28 ASIPs / ASSPs Example: PowerQUICC III Features » Application-specific » Motorola Serial Communications Controller (SCC) 4 integrated/standard processor » Fast Communications Controller (FCC) 3 integrated/standard processor »Target market Multi-Channel Controller (MCC2) 2 ¡ Targeting a particular niche market ¡ Communications Serial Management Controller (SMC) 2 ¡ More targeted than microcontroller » Processing Serial Peripheral Interface (SPI) 1 I2C controller 1 ¡ Domain-specific accelerators ¡ PowerPC e500 DDR Memory controller 1 » Usually more upscale ¡ 666-1000 Mhz PCI-X/PCI controller 1 ¡ 256 kB L2 cache RapidIO controller 1 ¡ 32-bit processors » Networking Ethernet 10/100/1000 controller 2 ¡ Multiprocessors Networking Capabilities ¡ Expensive peripherals ¡ CPM module, RISC- Ethernet, 10 (from SCC) 4 based microcode ¡ External memory assumed Ethernet, 10/100 (from FCC) 3 Ethernet 10/100/1000 2 ¡ Higher performance, includes data-plane » About 160 USD Utopia II ATM (from FCC) 2 ASIP / ASSP Multichannel HDLC (from MCC2) 256 14 Nov 2003 Embedded Computer Architecture 29 14 Nov 2003 Embedded Computer Architecture 30 Example: C167CS Example: Cisco Toaster3 Devices 8 clusters of 2 Total capacity: » Infineon 8 clusters of 2 CAN 2.0b controllers 2 processors each about 5 GOps, at » Target Market General-Purpose Timers (GPT) 5 around 160 Mhz Watch-Dog Timer (WDT) 1 ¡ ¡ Automotive control Pulse-Width Modulator (PWM) 1 » Processing Analog-Digital Converter Channels 24+8 USART 1 ¡ 16-bit C16x core Synchronous Serial Comms (SSC) 1 ¡ 4-stage simple pipeline Capture/Compare Channels 2x16 Each TMC is a ¡ 40 Mhz operation Each TMC is a Two 32-bit External Ports VLIW machine ¡ 16 MB memory space, VLIW machine ALUs and three including ROM, RAM, CAN interfaces 2 with 74 bit control/data devices 8-bit ports from devices 8 instructions, 2k movement units 16-bit ports from devices 1 » 144 pin package instructions in per TMC Memory local memory ¡ Tolerates -40 C to +125 C ROM 32 kB » About 25 USD Fast General Internal RAM (IRAM) 3 kB Extension Internal