Engineering Use of Microprocessor - University of...
Transcript of Engineering Use of Microprocessor - University of...
1
Urs Utzinger 1
ECE372 (Microprocessor Organization)
Embedded Systems
Introduction Embedded Systems Example
Structure of Embedded SystemUrs Utzinger 2
Engineering - Science
Computer Engineering and Computer Sciences are not at all differentiated by whether they involve hardware or software, since each includes both. Rather, computer engineering is more concerned with the implementation of ideas, while computer sciences is more concerned with the formal structure of those ideas.
A. Ralston, E.D. Reilly: Encyclopedia of Computer Science
Urs Utzinger 3
Engineering
ENERGY“moving”
MATERIALS“creating”
INFORMATION“organizing”
Urs Utzinger 4
Use of Microprocessor• Engineering and Science:
– CAD– Simulations– Data Acquisition– Data Analysis
• Data Management:– Administration– Accounting– Inventory
• Embedded Systems:– Process Control– Realtime Applications– Appliances
2
Urs Utzinger 5
Microcontroller Systems
• Nearly any computing system other than a computer
• Microcontroller systems are often called embedded systems
• A computing system, embedded within a larger system, and repeatedly performing a specific task (“the application”)
Urs Utzinger 6
Embedded Systems
Environment
Sensors InformationProcessing Actuators
• Environment to Environment• Sensors + Information Processing + Actuators
Urs Utzinger 7
Embedded Systems
• Single chip microcontroller (low cost)• Additional IO functions (serial, parallel,
AD, DA, motorcontrol)• Low power consumption (limited cooling)
Processor ROM RAM I/O-Interface
single chip
reset clock I/O
Urs Utzinger 8
Embedded SystemsDIL/NetPC
PC 104
HCS12
3
Urs Utzinger 9
Applications
• Consumer– Washing machine,
Remote, Entertainment (Audio/Video), Clocks, Games
• Communication– Wireless (Pager, Cell
phone)– Telephone, Answering
machines– Networking (ATM, credit
card, Ethernet) • Automotive
– Motor control (Ignition, exhaust)
– Power windows, seats– Safety (airbag, ABS)– Information
• Military– Target recognition– Guidance– Navigation
• Industrial– Traffic Control– Robotics, Production– Inventory, Stock
management• Medial
– Monitors, Treatment, Prosthetics
Urs Utzinger 10
Market
C o m p u te r M a r k e t
1
1 0
1 0 0
1 0 0 0
1 0 0 0 0
1 9 9 8 1 9 9 9 2 0 0 0 2 0 0 1 2 0 0 2
Mill
ions
of C
ompu
ters
E m b e d d e d S y s te m sD e s k to p sS e rve rs
Urs Utzinger 11
Example Device: Pulse Oximeter
$400.-(2004)
http://www.nonin.com/Products/oximetry.htmlUrs Utzinger 12
Example Device: Algorithm
]HbO[RHb][][HbOSATHbO
2
22 +
=
100on)SAT(fractiHbOSAT(%)HbO 22 ×=
Blood Oxygenation
4
Urs Utzinger 13
Example Device: Physical Principle is based on optical properties of blood
200 300 400 500 600 700 800 900 1000 110010
-4
10-3
10-2
10-1
100
101
102
103
Hemoglobin & Water
Wavelength [nm]
Abs
orpt
ion
hb [1/mm] hbO2 [1/mm]H2O [1/cm]
lambda Hb02 Hb[nm] [cm-1/M] [cm-1/M]660 319.6 3226.56940 1214 693.44 Urs Utzinger 14
Example Device: Car
Urs Utzinger 15
Example Device: Car
More than 80 microprocessors and millions of lines of code Urs Utzinger 16
Embedded SystemsDevelopment Areas
5
Urs Utzinger 17
Design Productivity Gap
Manufacturing
Design
Urs Utzinger 18
Traditional Design Flow
Hardware/SoftwareIntegration
Hardware Verification
Software Design
Hardware Design
System Specification
Hardware/SoftwarePartitioning
Software Verification
Verification of theIntegration
Urs Utzinger 19
Problems with the Traditional Design Flow
• Lack of a unified hardware-software framework– Hard to verify the entire system– Incompatibilities at the HW/SW boundary
• “Prejudiced” definition of the partitions– Sub-optimal design– Any change in the partitioning may require
considerable redesign efforts (negative impact on the time-to-market)
Urs Utzinger 20
Sub-optimal vs. optimal Architecture
HundertwasserHaus
6
Urs Utzinger 21
Embedded System Design Challenge
• Simultaneous optimization of competing design metrics
• Unified representation of hardware and software
Renaissance Engineer: Proficient in both HW&SW
Urs Utzinger 22
Main Research Areas
Technologies that enable to design more rapidly
• Formal process for system specification • Reuse of designs• Verification of designsLow power consumption optimization
Urs Utzinger 23
Low Power Design
• Mobile Computing Devices– Battery driven devices: average power, battery lifetime
• System Feasibility– Excessive thermal dissipation (the IC cannot withstand it)– Excessive cost: special packaging, heat sinks, cooling fans, …– Logic design is overwhelmingly difficult
• System Reliability– Heat induced electro-migration (propagation delays)– Every 10°C increase the component failure rate roughly
doubles
• Environmental Considerations
Urs Utzinger 24
Structure of Embedded System
7
Urs Utzinger 25
Embedded System: Microcontroller
Processor ROM RAM I/O-Interface
single chip
reset clock I/O
DIO INT SIO
GPT WDT AIOPWM
Internal bus
Local bus
Peripheral bus
Urs Utzinger 26
Microcontroller: Function Units
• CPU: Central Processor Unit (4,8,16,32 bit data bus)• Memory
– ROM: Firmware and Application (Flash Memory)– RAM: Register area, Processor Stack, Temporary data
• DIO: Digital I/O (relays, sensor)• SIO: Serial I/O (SPI, I2C, CAN, RS232, USB)• INT: Interrupt inputs (external/internal sources)• GPT: General Purpose Timer (optional event counter)• PWM: Pulse Width Modulator (motor controller)• WDT: Watch Dog Timer (automatic reset)• AIO: Analog I/O (DAC & ADC)
Urs Utzinger 27
Microcontroller: Processor (CPU)Control
SequencerArithmetic &
Logic Unit
InstructionDecoder
Register 1
Register 2
Register 3
Register 4
Memory AddressRegister
Memory DataRegister
Program Counter
Address Bus Data Bus
Clock
ControlSignals
Urs Utzinger 28
Microcontroller: Basic Operation
Execute Decode
Fetch
microcode program
read instruction and operandsmachine code (Assembler)
bit pattern
several CPU cycles for one instruction
8
Urs Utzinger 29
Microcontroller: Basic Operation
• Program (instructions) and data are stored in memory
• Each instruction is read (fetched) from memory, interpreted (decoded), and executed– Arithmetic Logic Unit (ALU) performs operations on data– Data is transferred (register, memory, I/O)
• Program Counter (PC) indicates current location of program in Memory and is automatically incremented after each instruction
• Each instruction can take several clock cyclesUrs Utzinger 30
• DIL = Dual in Line = DIP = Dual In Line Package• SIP = Single Inline Package• SDIP = Shrink DIP• SOP = Small Outline Package• SSO = Single Small Outline Package• SSOP = Small Shrink Outline Package• QFP = Quad Flat Package• LQFP= Low Profile Quad Flat Package• FQFP = Fine pitch Quad Flat Package• TQFP = Thin Quad Flat Package• BGA = ball grid array
Microcontroller: Packaging
www.xs4all.nl/~ganswijk/chipdir/package.htm
Urs Utzinger 31
Micro Controller Manufacturers
• PICmicro®, www.microchip.com• MOTOROLA, e-www.motorola.com (microcontrollers)• AMD, www.amd.com (embedded microcontrollers)• Renesas (Mitsubishi & Hitachi), america.renesas.com• NEC, 78k, www.necelam.com microcontrollers• JAVA, www.ajile.com, www.imsys.se• Intel, www.intel.com, www.intel.com/design/embcontrol• Dallas/Maxim Semiconductor based on xx51
architecture, www.maxim-ic.com• Philips Semiconductors www.semiconductors.philips.com/products• Infineon Technologies www.infineon.com• ST Microelectronics www.st.com
Urs Utzinger 32
Microchip
• PIC 10– 8 bit, 6 IO pins, <512bytes EEPROM, $0.50
• PIC12 – 8 bit, 6 IO pins, 1kbytes, $1– internal oscillator
• PIC14– PIC14C000 battery chargers and controllers, SMB bus
compatible, 8 channels 8bit A/D, 4bit D/A current source, temperature sensor, $8
• PIC16 ($3 - $4)– PIC16C6x or C7x standard, 192 RAM, 4K EPROM I2C, SPI, 3
timers, WDT– PIC16C9xx integrated LCD driver
• PIC18 ($3-$7)– 10bit A/D, PWM, PLL
9
Urs Utzinger 33
Motorola
• 8 Bit microcontrollers– HC05, legacy– HC08, automotive, USB– HC11, legacy
• 16 Bit microcontrollers– HC12 now S12– HC16
• 32 Bit microcontrollers– 68xxx/Coldfire– M*Core– PowerPC MPC5xx, MPC52xx– ARM Processors
Show on Web
Urs Utzinger 34
Last Lecture
Status of TeamStatus of WorkshopsStatus of Webpage
Homework 1Homework 2
Urs Utzinger 35
Embedded System: Microcontroller
Processor ROM RAM I/O-Interface
single chip
reset clock I/O
DIO INT SIO
GPT WDT AIOPWM
Internal bus
Local bus
Peripheral bus
Urs Utzinger 36
Microcontroller: Processor (CPU)Control
SequencerArithmetic &
Logic Unit
InstructionDecoder
Register 1
Register 2
Register 3
Register 4
Memory AddressRegister
Memory DataRegister
Program Counter
Address Bus Data Bus
Clock
ControlSignals
10
Urs Utzinger 37
Microcontroller: Basic Operation
Execute Decode
Fetch
microcode program
read instruction and operandsmachine code (Assembler)
bit pattern
several CPU cycles for one instruction
Urs Utzinger 38
Today's Lecture
Introduction Embedded Systems Continued
Urs Utzinger 39
PowerROMRAMDebugOscillatorInterruptsModePORT EExpansion
Analog 2DTimer InputTimer OutputPulse Width MSerial RS232Serial CANSerial SPI
Urs Utzinger 40
HCS12 CPU Registers
11
Urs Utzinger 41