Ee382N 4 Embedded Systems Architecture Course: Mark Mcdermott
Ee382N 4 Embedded Systems Architecture Course: Mark Mcdermott
EE382N‐4
Embedded Systems Architecture Course
Mark McDermott
EE382N-4 Embedded Systems Architecture
Goals of the Course
High‐Level Goals
– Understand the scientific principles and concepts behind embedded systems,
and
– Obtain hands‐on experience in programming embedded systems.
By the end of the course, you will be able to
– Understand the “Big Ideas" in embedded systems
– Obtain direct hands‐on experience on both hardware and software elements
commonly used in embedded system design.
– Understand basic real‐time resource management theory
– Understand the basics of embedded system application concepts such as
signal processing and feedback control
– Understand, and be able to discuss and communicate intelligently about
• embedded processor architecture and programming
• I/O and device driver interfaces to embedded processors with networks,
multimedia cards and disk drives
• OS primitives for concurrency, timeouts, scheduling, communication and
synchronization
1/7/2012 2
EE382N-4 Embedded Systems Architecture
What are the “Big Ideas”
HW/SW Architecture
– Non processor centric view of architecture
Bowels of the “operating system”
– Specifically, the lower half of the OS
– Concurrency
Real world design
– performance vs. cost tradeoffs
Analyzability
– how do you “know” that your drive‐by‐wire system will function correctly?
Application‐level techniques
– Power Aware Programming
1/7/2012 3
EE382N-4 Embedded Systems Architecture
So, what is an embedded system?
Simple answer ‐
Anything that uses a “processor” but isn't a general‐purpose
computer.
The user “sees” a smart (special‐purpose) system as opposed to the
computer inside the system
“how does it do that?”
“it has a computer inside it!”
“it does not or cannot run Windows or MacOS!”
But it might run Windows CE or Linux…
The end‐user typically does not or cannot modify or upgrade the
internals
1/7/2012 4
EE382N-4 Embedded Systems Architecture
Four General Categories of Embedded Systems
General Computing
– Applications similar to desktop computing, but in an embedded package
– Video games, set top boxes, wearable computers, automatic tellers
Control Systems
– Closed loop feedback control of real time system
– Vehicle engines, chemical processes, nuclear power, flight control
Signal Processing
– Computations involving large data stream
– Radar, Sonar, video compression
Communication & Networking
– Switching and information transmission
– Telephone system, Internet
Courtesy Intel
1/7/2012 5
EE382N-4 Embedded Systems Architecture
Types of Embedded System Functions
Control Laws
– PID control
– Fuzzy logic, ...
Sequencing logic
– Finite state machines
– Switching modes between control laws
Signal processing
– Multimedia data compression
– Digital filtering
Application specific interfacing
– Buttons, bells, lights,...
– High speed I/O
Fault response
– Detection & reconfiguration
– Diagnosis
Courtesy Intel
1/7/2012 6
EE382N-4 Embedded Systems Architecture
Distinctive Embedded System Attributes
Reactive: computations occur in response to external events
– Periodic events (e.g., rotating machinery and control loops)
– Aperiodic events (e.g., button closures)
Real‐Time: timing correctness is part of system correctness
– Hard real‐time
• Absolute deadline, beyond which answer is useless
• May include minimum time as well as maximum time
– Soft real‐time
• Missing a deadline is not catastrophic
• Utility of answer degrades with time difference from deadline
– Example:
• a train is entering an urban area...
• the railway gate in the city allows automotive traffic to go over the tracks
• when should the railway gate close?
In general,
Real Time does not equal “Real Fast”
Courtesy Intel
1/7/2012 7
EE382N-4 Embedded Systems Architecture
Typical Embedded System Constraints
Small Size, Low Weight
– Handheld electronics
– Transportation applications weight costs money
Low Power
– Battery power for 8+ hours (laptops often last only 2 hours)
– Limited cooling may limit power even if AC power available
Harsh environment
– Heat, vibration, shock
– Power fluctuations, RF interference, lightning
– Water, corrosion, physical abuse
Safety critical operation
– Must function correctly
– Must not function incorrectly
Extreme cost sensitivity
– $.05 adds up over 1,000,000 units
Courtesy Intel
1/7/2012 8
EE382N-4 Embedded Systems Architecture
A Hierarchy of Embedded Computer Design
H Transistors, Resistors,
1 Electronics Gates, FF’s Circuit Diagrams
A etc.
R
D
W
2 Logic Registers, ALU’s Gates, FF’s Logic Diagrams
A
R Processors, Busses, Register Transfer
E 3 Organization Registers, ALU’s ...
Memories Notation
Assembly
FIRMWARE 4 Microprogramming Microinstructions Microprogram
Language
A Typical Embedded System
Applications
Libraries Operating System & Boot Loader
Software
Architecture
Complier
Assembler & Linker
ISA ISA
HW HW
Accelerator Accelerator
Processor Processor
Hardware Interconnect Fabric
Architecture
SOC Peripherals:
MTD, UART, I2C, PCMCIA, NIC, USB, ADC, DAC, GPIO, Audio, Video
Sensors & Actuators Connectors
1/7/2012 10
EE382N-4 Embedded Systems Architecture
Types of System Abstraction
Hidden Aspect Applications
Applications Hidden Aspect
Hidden Aspect OS OS
[email protected]
1/7/2012 11
EE382N-4 Embedded Systems Architecture
Processor Classification
1/7/2012 12
EE382N-4 Embedded Systems Architecture
Computing Element Choices
General Purpose Selection Factors:
Processors ‐ Type and complexity of computational algorithms
(GPPs): ‐ Desired level of flexibility ‐ Performance
Programmability /Flexibility
‐ Development cost ‐ System cost
‐ Power requirements ‐ Real‐time constrains
Application‐Specific
Processors (ASPs)
Configurable Hardware
Co‐Processors &
Accelerators Application Specific
Integrated Circuits
(ASICs)
Specialization , Development cost/time Performance
Performance/Chip Area/Watt
(Computational Efficiency)
Courtesy Intel
1/7/2012 13
EE382N-4 Embedded Systems Architecture
The Real Problem facing Embedded Systems: POWER
1/7/2012 14
EE382N-4 Embedded Systems Architecture
Why ARM?
1/7/2012 15
EE382N-4 Embedded Systems Architecture
Because it is the “other” architecture
1/7/2012 16
EE382N-4 Embedded Systems Architecture
Course Syllabus
Hardware Software
ISAs for Embedded Systems Monitors & Bootloaders
GPP Microarchitectures Embedded Linux
ARM ISA Device Driver Development
FPGA Architectures Interrupt Handlers
DSP Microarchitectures Debugging Embedded Systems
Blackfin ISA Real Time Operating Systems
Reconfigurable Logic OS Services and Middleware
I/O Subsystems SW Library Development
Networks‐on‐Chips File System Development
Cognitive Sensors SW Optimization
1/7/2012 17
EE382N-4 Embedded Systems Architecture
Grading
Homework: 10%
Labs: 30%
Exam 1: 15%
Exam 2: 15%
Project: 30%
1/7/2012 18
EE382N-4 Embedded Systems Architecture
Overview of the Lab Assignments
Lab #1
– Develop an Interrupt handler to measure the latency of Linux running on the TLL2020
platform using the I/O ports on the FPGA.
Lab #2
– Write an ARM assembly language program (ALP) implementation of a memory test.
Use the ARM ADS system to verify.
Lab #3
– Write an ALP and/or C‐routine which slows down and speeds up the processor clock
on the ARM processor without disrupting the I/O capability. The processor will be
performing a memory tests on the Block RAM that is in the FPGA.
1/7/2012 19
EE382N-4 Embedded Systems Architecture
ENS 114 Lab
Located on first floor of ENS.
Systems can be accessed via Remote Desktop
– MAC ,PC or Linux Desktop
ABSOLUTLEY NO FOOD OR DRINK ALLOWED IN THE LAB
– Zero tolerance. Two students received F’s in the lab for spilling drinks on the
equipment.
1/7/2012 20
EE382N-4 Embedded Systems Architecture
TLL5000/TLL6219 Prototype System Block Diagram
MZ_CPLD_CLKO SPARTAN-3 FPGA
ARM 926
CPLD
MZ_CPLD_CS5
CLKO FF State
MZ_CPLD_CS1
CS_5 FF Machine
CS_1 MZ_CPLD_BE[3:0]
FF
BE[3:0]
MZ_CPLD_AS
AS FF
DIR
EN
ADDR[23:0] A B FF
XCVR
FF
DIR
EN
DATA[31:0] A B
1/7/2012 21
EE382N-4 Embedded Systems Architecture
TLL‐5000 Block Diagram
1/7/2012 22
EE382N-4 Embedded Systems Architecture
TLL‐5000
Baseboard
1/7/2012 23
EE382N-4 Embedded Systems Architecture
TLL 6219 Block Diagram
i.MX21 SOC Memory Power Supplies
Communication
Keypad SDRAM
SDMMC 18 V Input Adapter
64MB / 3.3 V Base
Mini USB OTG Platform
IrDA Flash
Display
RJ45 16MB
ENET
Ethernet LCD Smart LCD
RJ12
SSI
Serial ARM926
EJ-S core
Glue
1-Wire Logic
Status/Jumpers
CSPI CPLD
User
Jumpers
GPIO IO
I2C
User LED Buffers
Connectors
40 pin Mezzanine
CPU CPLD
GPIO JTAG Connectors JTAG
1/7/2012 24
EE382N-4 Embedded Systems Architecture
TLL6219 ARM 926‐EJS Board
Ethernet
Flash CPLD Controller
Reset
i.MX21
SDRAM
SDRAM
Mini
USB
Power
User Reset User Power
Jumpers LEDs
Supply
Power LED
1/7/2012 25
EE382N-4 Embedded Systems Architecture
i.MX21 Features
1/7/2012 26
EE382N-4 Embedded Systems Architecture
ARM926 Clock Generation
1/7/2012 27
EE382N-4 Embedded Systems Architecture
ARM926
Bus Cycle
Waveforms
and
Timing
EE382N-4 Embedded Systems Architecture
TLL6219 Memory Map
1/7/2012 29