embedded architectures - ulisboa · embedded architectures ... – lcd drivers • analog...
TRANSCRIPT
Computer Organization Architectures for Embedded Computing
Computer Organization Architectures for Embedded Computing
Embedded Architectures
Tuesday 25 November 14
Computer Organization / Architectures for Embedded Computing 2
Summary
• Previous Class – Analog-Digital Interface
• Today: – Embedded Architectures
• Microcontrollers • DSP • Smartcards
Computer Organization / Architectures for Embedded Computing 3
Microprocessor Varieties • Processing unit particularly suited to the control of simple
procedures or devices in embedded systems
• Processor families: – General Purpose Processors (GPP)
• transfer and data manipulation operations (MOVs); conditional execution operations (IF ... ELSE ...)
– Digital Signal Processors (DSP) • microprocessor optimized for digital signal processing
– Mathematical computation (mainly, multiplications)
– Microcontrollers • includes on-board memory and I/O devices (peripherals) to
interface with the outside world
• Common applications – control, actuators, instrumentation, etc
Computer Organization / Architectures for Embedded Computing 4
Application Examples • Personal appliances
– Cellular phones – Watches – Calculators – PDAs
• Computer components – Mouse – Keyboards – Modem – Fax – Battery charger
• Home appliances – Alarms – Thermostats – Air conditioners – Remote controllers – Most domestic machines
Computer Organization / Architectures for Embedded Computing 5
Application Examples
• Car industry – On-board computer – Controllers of traction,
injection, transmission, break (ABS), etc
– Air bag – Air conditioning – Instrumentation
• Entertainment – Video games – Consoles – Toys
• Industrial applications – Industrial robots
(manipulators) – Belt conveyor systems – Lifts – Automatic control – Instrumentation
Computer Organization / Architectures for Embedded Computing 6
Automotive Embedded Systems • Today’s high-end automobile have more than 100
microprocessors: – 4-bit microcontroller checks seat belt – microcontrollers run dashboard devices – 16/32-bit microprocessor controls engine
• Customer’s requirements – Reduced cost – Increased functionality – Improved performance – Increased overall dependability
Computer Organization / Architectures for Embedded Computing 7
An Engineering View
Computer Organization / Architectures for Embedded Computing 8
Digital Camera Block Diagram
Computer Organization / Architectures for Embedded Computing 9
GPPs versus Microcontrollers • General Purpose Processors (GPPs)
– CPU, Memory and IO integrated on a set of chips, on a board or several boards
• Microcontrollers – CPU, Memory, IO and peripherals integrated in a single
chip
Computer Organization / Architectures for Embedded Computing 10
GPPs versus Microcontrollers • General Purpose Processors (GPPs):
– High performance CPU, in an independent chip – Absence of any RAM, ROM and IO modules in the CPU chip
• The used memory space should be defined and adjusted according to each particular application
– Peripherals (timer, serial port, etc.) are external to the CPU chip
• Expansible, versatile and general purpose
Computer Organization / Architectures for Embedded Computing 11
GPPs versus Microcontrollers • Microcontrollers:
– CPU with few resources (e.g.: 8-bits) – RAM, ROM and IO integrated within the CPU chip
• The available memory space is fixed
– Peripherals integrated within the CPU chip.
• Suitable for low-cost and restricted (power, HW, etc.) applications
Computer Organization / Architectures for Embedded Computing 12
GPPs versus Microcontrollers • Adopted architectures:
– Von Neumann architecture: • Single memory shared by program and data • The processor is interconnected by a data and an address bus
– Harvard architecture: • Separated memories for program and data • Independent data and address buses for each memory device
Computer Organization / Architectures for Embedded Computing 13
Microcontroller’s CPU and Peripherals
• Simple CPU, implemented with: – Single-cycle state machine – Control unit with a state machine – Micro-programmed control unit – Very simple pipeline
• On-chip peripherals: – I/O ports – RAM and ROM memories – Timer – Interruptions controller – USART – Parallel port; etc.
Computer Organization / Architectures for Embedded Computing 14
Microcontrollers Families
• Most manufacturers offer a wide set of devices, with different performance levels
• Processing power: 4-bits, 8-bits, 16-bits, 32-bits – 8-bits microcontrollers are the most widely adopted
and used by the majority of the applications – 32-bits and 64-bits are only requested by very
specialized and reduced markets, with very specific requisites:
• Communications • Signal processing • Video processing • etc.
Computer Organization / Architectures for Embedded Computing 15
Microcontrollers Families • Atmel
– AVR • ARM • Intel
– 8-bit • 8XC42 • MCS48 • MCS51 • 8xC251
– 16-bit • MCS96 • MXS296
• Microchip – 12-bit instruction PIC
• PIC12F508 – 14-bit instruction PIC
• PIC16F84 – 16-bit instruction PIC
• National Semiconductor – COP8
• NEC • Motorola
– 8-bit • 68HC05 • 68HC08 • 68HC11
– 16-bit • 68HC12 • 68HC16
– 32-bit • 683xx
• SGS/Thomson – ST62
• Texas Instruments – TMS370 – MSP430
• Zilog – Z8 – Z86E02
Computer Organization / Architectures for Embedded Computing 16
Microcontrollers Market • Market:
– 8 and 16-bit microcontrollers satisfy more than 75% of the market needs!
• Dominant microcontrollers: – Microchip 16Fxx – Intel 8051 and derivatives – Motorola MC68HC05
Computer Organization / Architectures for Embedded Computing 17
Microcontroller Packaging and Appearance
• From left to right: PIC 12F508, PIC 16F84A, PIC 16C72, Motorola 68HC05B16, PIC 16F877, Motorola 68000
Computer Organization / Architectures for Embedded Computing 18
Example: Intel MCS-51 Microcontrollers Family • 8-bits microcontroller • Introduced in the market by Intel (8051) by the end of the 1970’s • One of the most popular microcontrollers (about 40% of the market) • Today, it is produced by several manufacturers in different formats:
– Intel • 8751 microcontroller UV-EPROM
– Philips • 8051 AD, DA, extended I/O, and flash
– Atmel • AT89C51, Flash (erase before write)
– Dallas Semiconductor • DS5000 NV-RAM, RTC
Computer Organization / Architectures for Embedded Computing 19
Example: Intel MCS-51 Microcontrollers Family
• Intel MCS-51 Family: – CPU, RAM, ROM, I/O, interrupt logic, timer, etc. in a single
chip – 8-bits data bus – 16-bits address bus
• can access 216 = 64 kB memory positions (RAM and ROM) – On-chip RAM: 128 bytes (“Data Memory”) – On-chip ROM: 4 kB (“Program Memory”) – 4-bytes bi-directional IO port – UART (serial port) – 2 × 16-bit counters/timers – Interrupt controller (2 priority levels) – Low-power mode
Computer Organization / Architectures for Embedded Computing 20
Example: Intel MCS-51 Microcontrollers Family
Architecture:
Computer Organization / Architectures for Embedded Computing 21
Example: Intel MCS-51 Microcontrollers Family
• Internal peripherals: – Parallel IO ports – Clock generator – Serial port – Timers – Interrupt controller
Computer Organization / Architectures for Embedded Computing 22
• Parallel IO ports: – Each port can be configured either for input or output – The direction is defined by special registers
• Serial port: – Data is sent/received serially – The transmission rate (BAUD rate) and the transmission
mode are configured with specific registers (SFR)
Example: Intel MCS-51 Microcontrollers Family
Computer Organization / Architectures for Embedded Computing 23
Example: Intel MCS-51 Microcontrollers Family
• 2 × internal timer: – Each timer increments the counter at each clock cycle – The count limit is configured using specific timer
registers (TH0, TL0, TH1, TL1) – The current count value can be read in registers TH0,
TL0, TH1, TL1 – At the end of the count:
• An interruption is generated • Dedicated bits at SFR register are activated
Computer Organization / Architectures for Embedded Computing 24
Example: Intel MCS-51 Microcontrollers Family • Interrupt controller
– 5 types of interruption: • Timer 1 Overflow • Timer 2 Overflow • External interruption 1 • External interruption 2 • Serial port event (buffer full, buffer empty, etc.)
– Interruptions are activated/inhibited using the SFR register.
Computer Organization / Architectures for Embedded Computing 25
Example: Microchip Microcontrollers PIC Family
• Large microcontrollers (PIC) family – Advanced communication peripherals and protocols – Wide processing capacity offer
• 8, 16 or 32 bits
– Several (memory) addressing spaces available:
• RAM • ROM • EEPROM • Flash
Computer Organization / Architectures for Embedded Computing 26
Example: Microchip Microcontrollers PIC Family
Vast set of peripherals and protocols: • Communication peripherals and protocols:
– RS232/RS485 – SPI – I2C – CAN – USB – TCP/IP – Ethernet
• Control and timer peripherals: – Acquisition and comparison – Pulse Width Modulation (PWM) – Counters and timers – Watchdogs
• Visual peripherals: – LED drivers – LCD drivers
• Analog peripherals: – A/D converters up to 12-
bits – D/A converters – Comparators and signal
amplifiers – Voltage detectors – Temperature sensors – Oscillators – Voltage references – Voltage regulators
Computer Organization / Architectures for Embedded Computing 27
Example: Microchip Microcontrollers PIC Family
Computer Organization / Architectures for Embedded Computing 28
Example: Microchip Microcontrollers PIC Family PIC Family Stack Size Instruction
Word Size No of
Instructions Interrupt Vectors
12CX/12FX 2 12- or 14-bit 33 None 16C5X/16F5X 2 12-bit 33 None
16CX/16FX 8 14-bit 35 1 17CX 16 16-bit 58 4
18CX/18FX 32 16-bit 75 2
Computer Organization / Architectures for Embedded Computing 29
Example: TMS32010
Computer Organization / Architectures for Embedded Computing 30
Example: Philips TriMedia-Processor
Computer Organization / Architectures for Embedded Computing 31
Example: SH-MobileG1 chip System on a Chip (SoC)
Computer Organization / Architectures for Embedded Computing 32
Smart-Cards • Appeared in the beginning of the 1970’s, but...
– Only by the beginning of the 1980’s were the supporting technologies developed
• Two types of cards: – Memory card (without CPU) – Card with microprocessor
Chip Plastic card
Computer Organization / Architectures for Embedded Computing 33
Smart-Cards
• Applications – Information technology
• Secure access and user authentication • Storage of digital certificates and passwords • Encryption of critical data
– Cellular phones (GSM) • Subscriber authentication • Data storage
– e-Commerce • e-Banking and e-Payments • Identification and access control (tickets) • Parking • Phone credit (decrement of a credit counter)
Computer Organization / Architectures for Embedded Computing 34
Smart-Cards
• Smart-Cards with microprocessor – Processor
• Usually, 16-bits @ 5-16 MHz • Cryptographic co-processors
– Memory • ROM (16 kBytes - 128 kBytes) for the operating system • EEPROM (4 kBytes - 64 kBytes) for persistent data • RAM (256 Bytes – 4k Bytes) for data • ROM size ≈ 4 × EEPROM size ≈ 16 × RAM size
– File system supported on the installed memory – Small silicon area (5mm2), due to space and energy
restrictions
Computer Organization / Architectures for Embedded Computing 35
Smart-Cards
• Dedicated commands to support secure / cryptography protocols – Access control
• Examples: check key(), change key() – Authentication
• Examples: authenticate() – Encryption
• Examples: start encryption(), stop encryption() – Atomic operations
• Examples: exchange(), increment(), decrement()
Computer Organization / Architectures for Embedded Computing 36
Smart-Cards • Communication
– Contact-based – Contact-less (transmission with an antenna)
• Serial protocol, 9600 bps
• Power-supply – With battery – Without battery
• the CPU is powered with an inductive circuit
Computer Organization / Architectures for Embedded Computing 37
Smart-Cards: Infineon SLE66
Computer Organization / Architectures for Embedded Computing 38
Conclusion • Microprocessors come in many varieties
– GPP – DSP – Microcontrollers – Smartcards
• A significant share of the market is targeted to embedded systems: – I/O – Small – Cheap – Application oriented – Energy restricted
Computer Organization / Architectures for Embedded Computing 39
Next Class
• Multiprocessors – Programming overheads – Shared-Memory Multiprocessor
• UMA vs NUMA
– Memory coherence
Computer Organization Architectures for Embedded Computing
Computer Organization Architectures for Embedded Computing
Embedded Architectures
Tuesday 25 November 14