COMP3221/9221: Microproce ssors and Embedded System s COMP3221: Microprocessors and Embedded Systems Lecture 31: Embedded Systems http://www.cse.unsw.edu.au/~cs3221 Lecturer: Hui Wu Session 2, 2005
Dec 29, 2015
COMP3221/9221: Microprocessors and Embedded Systems
COMP3221: Microprocessors and Embedded Systems
Lecture 31: Embedded Systems
http://www.cse.unsw.edu.au/~cs3221
Lecturer: Hui Wu
Session 2, 2005
COMP3221/9221: Microprocessors and Embedded Systems
Overview
• What is an embedded system?
• Characteristics of embedded systems
• Embedded system requirements
COMP3221/9221: Microprocessors and Embedded Systems
Embedded Systems
An embedded system
• is a combination of hardware and software to perform a specific function;
• is part of a larger system;
• works in a reactive and time-constrained environment.
Characteristics of Embedded Systems• Application specific
An embedded system performs a single or fixed set of functions;
All functions are known a priori before the system design begins.
The fixed functionality provides opportunities for design optimization.
Application specific processor design can be a significant component of some embedded systems
Advantages
Customization yields lower area, power, cost and higher performance.
Disadvantages
Higher hardware/software development overhead, resulting in longer time-to-market.
• Strict design constraints
performance, timing, power, area, cost, reliability etc.
Characteristics of Embedded Systems (Cont.)
• Multiple heterogeneous processing units
General processor, ASIC (Application Specific Integrated Circuit) , ASIP (Application Specific Instruction set Processor), DSP (Digital Signal Processing processor) etc.
• Reactive
Embedded systems constantly interact with their environment, taking in data from sensors and/or other input devices and making appropriate responses.
• Real-time
Embedded systems interact with their environments in a timely manner.
• Parallel and distributed computing
Many embedded systems use parallel/distributed architecture where multiple processing units are tightly or loosely coupled.
COMP3221/9221: Microprocessors and Embedded Systems
Examples of Embedded Systems
• Consumer electronics, e.g., cellular phones, personal digital assistants, interactive game boxes, cameras, camcorders, ....
• Consumer products, e.g., washers, microwave ovens, ...
• Automobiles (anti-lock braking, engine control, ...)
• Industrial process controllers & avionics/defence applications
• Computer/Communication products, e.g., printers, FAX machines, ...
COMP3221/9221: Microprocessors and Embedded Systems
Traditional Embedded Systems Design: Major Procedures
• Modelling
Specifying the behaviours of the target embedded system.
• Hardware-software partitioning
Partitioning the specifications into either hardware components or software components.
Hardware components are implemented in co-processors.
Software components run on custom hardware or a general microprocessor.
• Hardware design and software design
Hardware design includes co-processor design, interfaces etc.
Software design includes interrupt handlers, task scheduler etc.
COMP3221/9221: Microprocessors and Embedded Systems
Traditional Embedded Systems Design: Major Procedures (Cont.)
Modelling
Hardware-software partitioning
Hardware design Software design
COMP3221/9221: Microprocessors and Embedded Systems
Problems with Traditional Embedded Systems Design
• The precise information (execution time etc) about each task is not available at the partitioning stage.
• Designers have to use estimated values in partitioning, leading to bad partitioning and therefore bad design.
• How to solve this problem?
Use hardware-software co-design.
COMP3221/9221: Microprocessors and Embedded Systems
What Is Hardware-Software Co-design?
• The hardware/software designs proceed in parallel, with feedbacks and interactions occurring between the two as the design progresses.
• An multi-objective function of cost, area, power etc is used to find an optimal design.
COMP3221/9221: Microprocessors and Embedded Systems
Goals of Embedded System Design
• Reduce time-to-market.
• Produce an optimal design which minimize the multi-objective function of cost, area, power etc.
New design methodology and CAD tools for automating embedded system design are needed.
CAD today addresses synthesis problems at a purely hardware level:
efficient techniques for data-path and control synthesis down to silicon.
COMP3221/9221: Microprocessors and Embedded Systems
Disciplines Involved in Embedded System Design
• Application domain (Signal processing, process control, machine control, robot, ...).
• Software engineering
How to build a correct and reliable embedded system?
Software reuse?
• Programming Languages and Compilers
How to reduce the execution time of each task?
How to reduce the power consumption of processors and memory?
COMP3221/9221: Microprocessors and Embedded Systems
• Operating Systems
How to schedule tasks such that all timing constraints are satisfied?
How to schedule tasks such that the processor power consumption is minimized?
• VLSI (computer aided) design
How to minimize the area and maximize the performance for a co-processor?
How to minimize the power consumption of a co-processor?
Disciplines Involved in Embedded System Design (Cont.)
COMP3221/9221: Microprocessors and Embedded Systems
• Parallel/Distributed systems
Many embedded systems use parallel/distributed architecture where the multiple processors are tightly coupled or loosely coupled. Many issues exist.
Task scheduling;
Resources sharing etc.
• Real-time systems (Hard & soft real time systems)
How to specify and satisfy timing requirements?
How to share resource such that timing constraints are still satisfied?
Disciplines Involved in Embedded System Design (Cont.)
COMP3221/9221: Microprocessors and Embedded Systems
Embedded System Requirements
• Functional requirements
• Timing requirements
• Dependability requirements
Functional Requirements
• Data collection
Sensors
AD converters
Signal conditioning etc
• Direct digital control
Actuators
• Man-machine interface
Informs the operator of the current state of the controlled object
Assists the operator in controlling the system.
COMP3221/9221: Microprocessors and Embedded Systems
Timing Requirements
• Tasks Release times and deadlines
• Minimal task distance
• Maximal task distance
• Task Periods
• Minimal error detection latency
• Minimal latency jitter etc.
Timing constraints are often imposed on tasks. Typical timing constraints include:
• Release time: A task cannot be executed before its release time.
• Deadline: A task is required to finish by its deadline.
• Minimal distance: The distance between two tasks is required to be greater than a specified value.
The distance is defined to be the difference of the start time of the other task completed later and the completion time of the task completed earlier.
• Maximal distance: The distance between two tasks is required to be less than a specified value.
Timing Requirements (Cont.)
COMP3221/9221: Microprocessors and Embedded Systems
• Period: A periodic task must be executed periodically. For example, if the period of a task is 5, it must be executed and completed every 5 time units.
…
0 2 5 7 10 12
T1 T1 T1
Figure 1: A periodic task T1 has a period of 5 and a worst-case execution time of 2.
Timing Requirements (Cont.)
COMP3221/9221: Microprocessors and Embedded Systems
• Hard Timing constraints: Miss of any hard timing constraints may cause catastrophes e.g., control systems for aircraft/space probes/nuclear reactors.
• Soft timing constraints: The violation of soft timing constraints only causes performance degradation. e.g., game box.
• Embedded systems may contain both hard and soft timing constraints.
• Task scheduler is responsible for satisfying all timing constraints.
Timing Requirements (Cont.)
Consider an embedded system with a single processor and a set of 3 tasks T1, T2 and T3 with the following attributes:
• T1 is a periodic task with a period of 4 and a worst-case execution time of 2;
• T2 is a periodic task with a period of 5 and a worst-case execution time of 2;
• T3 is a non-periodic task with a release time of 0, a deadline of 20 and a worst-case execution of 2.
T1 T2 T1T1 T1
0 2 4 6 8 10 12 14 16 18 20
T1T2 T2 T3 T2
Timing Requirements (Cont.)
Dependability Requirements
• Reliability
Number of failures per hour or Mean-Time-To-Failure (MTTF) in hours.
• Safety
critical failure modes
certification
• Maintainability
Mean-Time-To-Repair (MTTR).
• Availability
A = MTTF / (MTTF + MTTR)
• Security
Major Components in Embedded Systems
• Microprocessors/microcontrollers, co-processors, DSP cores, ASICs, ASIPs, FPGAs (Field Programmable Gate Arrays), memory (RAM, ROM, FLASH, EEPROM) and buses.
• Data acquisition and processing
• Communication
• System logic and control
• Interfaces
• Auxiliary units
display
storage
monitoring and protection
test and diagnosis.
COMP3221/9221: Microprocessors and Embedded Systems
Reading Material
1. Chapter 1 in Embedded Systems Design: An Introduction to Processes, Tools, and Techniques by Arnold S. Berger.
2. S. Edwards, L. Lavagno, E. Lee, A. Sangiovanni-VincentelliDesign of Embedded Systems: Formal Methods, Validation and Synthsis. Proceedings of the IEEE, vol. 85 (no.3) , March 1997, p366-290.