ACOE433 – Advanced Embedded Systems

Slides:



Advertisements
Similar presentations
2008/03/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
Advertisements

Embedded Systems Design: A Unified Hardware/Software Introduction 1 Introduction to embedded Systems.
Embedded Systems Introduction. What is an Embedded System What is an Embedded System? Definition of an embedded computer system: is a digital system.
Chapter 1: Introduction
Software Engineering CSE470: Embedded Systems Overview 49 What is an Embedded System What is an Embedded System? Definition of an embedded computer system:
ASPPRATECH.
1 © Unitec New Zealand Overview Of Embedded Hardware ETEC 6416 Date: - 03 Aug, 2011.
L29:Lower Power Embedded Architecture Design 성균관대학교 조 준 동 교수,
Microcontroller Systems: Motivation
Embedded Systems. 2 A “short list” of embedded systems And the list goes on and on Anti-lock brakes Auto-focus cameras Automatic teller machines Automatic.
1 ENGR 631 Embedded Systems Dr. Jerry H. Tucker. 2 Contact Information Class web page egre631/index.html
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
1 Introduction High-Performance Embedded System Design: Using FPGA.
Computing Systems Computer abstractions and technology.
©2008 The McGraw-Hill Companies, Inc. All rights reserved. Digital Electronics Principles & Applications Seventh Edition Chapter 13 Computer Systems Roger.
1 Chapter 1: Introduction.  Embedded systems overview  What are they?  Design challenge – optimizing design metrics  Technologies  Processor technologies.
Computer Hardware Basic Computer Concepts Components of Data Processing  Data processing is a technique of collecting, manipulating and distributing.
Technology discontinuities drive new computing paradigms and applications 1960 Mainframe ComputerIBM 1970 Mini-Computer DEC 1980 WorkstationSun, HP 1990PCIntel,
Digital Literacy: Computer Basics
Embedded Systems Overview Prepared by Nisha Sinsinbar Subject: Microcontoller & Interfacing Sub code: EC Department.
Chapter 1: Embedded Computing Embedded System Design.
KAASHIV INFOTECH – A SOFTWARE CUM RESEARCH COMPANY IN ELECTRONICS, ELECTRICAL, CIVIL AND MECHANICAL AREAS
1 Lesson 1 Computers and Computer Systems Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Programmable Logic Devices
Introduction to Embedded Systems
High-Performance Embedded System Design: Using FPGA
GCSE COMPUTER SCIENCE Computers
EMBEDDED SYSTEMS.
Objectives Overview Explain why computer literacy is vital to success in today’s world Define the term, computer, and describe the relationship between.
Fundamental of Information Communication Technology (ICT)
ECE354 Embedded Systems Introduction C Andras Moritz.
Control Unit Lecture 6.
OVERVIEW Impact of Modelling and simulation in Mechatronics system
Embedded Systems Introduction
Unified Modeling Language
System Design and Modeling
Technology Literacy Hardware.
How SCADA Systems Work?.
Embedded Systems Design
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Principles & Applications
CS4101 Introduction to Embedded Systems Design and Implementation
Introduction to Computing
Chapter 1: Introduction
EmbedDed Systems – MECT190
AS PER OBE SYLLABUS DTE KARNATAKA SHANTHU M.Tech SAI JAYANI ACADEMY (R) SIXTH SEMESTER Diploma in ELECTRONICS AND COMMUNICATION ENGINEERING.
Chapter 1: Introduction
Real-time Software Design
Introduction to Realtime Systems (& Embedded Systems)
Dayton Metro Library Computer Basics September 19, 2018
EmbedDed Systems – MECT190
Tiny Computers, Hidden Control
EMBEDDED SYSTEMS.
Topics Introduction Hardware and Software How Computers Store Data
Dayton Metro Library Place photo here Computer Basics December 8, 2018.
Chapter 5: Computer Systems Organization
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Computer Architecture
Recall: ROM example Here are three functions, V2V1V0, implemented with an 8 x 3 ROM. Blue crosses (X) indicate connections between decoder outputs and.
Introduction to Embedded Systems
Embedded Systems Design
Embedded Processors.
Overheads for Computers as Components, 2nd ed.
SNS COLLEGE OF TECHNOLOGY
Introduction to Embedded Systems
Overheads for Computers as Components, 2nd ed.
Chapter-1 Computer is an advanced electronic device that takes raw data as an input from the user and processes it under the control of a set of instructions.
Embedded Systems By : Simran Amaandeep Singh
Chapter 4 The Von Neumann Model
Presentation transcript:

ACOE433 – Advanced Embedded Systems Dr. Konstantinos Tatas com.tk@frederick.ac.cy

Introduction to Embedded Systems Unit 1 Introduction to Embedded Systems

Microprocessors for Embedded systems Computing systems are everywhere Most of us think of “desktop” computers PC’s Laptops Mainframes Servers But there’s another type of computing system Far more common...

Embedded systems overview Embedded computing systems Computing systems embedded within electronic devices Hard to define. Nearly any computing system other than a desktop computer Billions of units produced yearly, versus millions of desktop units Perhaps 50 per household and per automobile Computers are in here... and here... and even here... Lots more of these, though they cost a lot less each.

A “short list” of embedded systems Anti-lock brakes Auto-focus cameras Automatic teller machines Automatic toll systems Automatic transmission Avionic systems Battery chargers Camcorders Cell phones Cell-phone base stations Cordless phones Cruise control Curbside check-in systems Digital cameras Disk drives Electronic card readers Electronic instruments Electronic toys/games Factory control Fax machines Fingerprint identifiers Home security systems Life-support systems Medical testing systems Modems MPEG decoders Network cards Network switches/routers On-board navigation Pagers Photocopiers Point-of-sale systems Portable video games Printers Satellite phones Scanners Smart ovens/dishwashers Speech recognizers Stereo systems Teleconferencing systems Televisions Temperature controllers Theft tracking systems TV set-top boxes VCR’s, DVD players Video game consoles Video phones Washers and dryers And the list goes on and on

Definitions Broad definition: Narrow definition: Any computer system that is not a general-purpose computer That would include robots, and all portable devices Narrow definition: A computer system (software and hardware) that interacts with its physical environment, mainly without human intervention That would exclude printers, modems, portable devices such as dvd and mp3 players, etc.

Some common characteristics of embedded systems Single-functioned Executes a single program, repeatedly Tightly-constrained Low cost, low power, small, fast, etc. Reactive and real-time Continually reacts to changes in the system’s environment Must compute certain results in real-time without delay

Considerations in embedded system design An embedded system receives input from its environment through sensors, processes this input and acts upon its environment through actuators Besides the usual software and hardware design issues the embedded system designer must consider the properties of the sensors and actuators and the environment itself The ultimate test of an embedded systems are the laws of physics

An embedded system example – Digital camera Microcontroller CCD preprocessor Pixel coprocessor A2D D2A JPEG codec DMA controller Memory controller ISA bus interface UART LCD ctrl Display ctrl Multiplier/Accum Digital camera chip lens CCD Single-functioned -- always a digital camera Tightly-constrained -- Low cost, low power, small, fast Reactive and real-time -- only to a small extent

Design challenge – optimizing design metrics Common metrics Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost NRE cost (Non-Recurring Engineering cost): The one-time monetary cost of designing the system Size: the physical space required by the system Performance: the execution time or throughput of the system Power: the amount of power consumed by the system Flexibility: the ability to change the functionality of the system without incurring heavy NRE cost

Design challenge – optimizing design metrics Common metrics (continued) Time-to-prototype: the time needed to build a working version of the system Time-to-market: the time required to develop a system to the point that it can be released and sold to customers Maintainability: the ability to modify the system after its initial release Correctness, safety, many more

Design Economics (1) The selling price of an IC Stotal=Ctotal/(1-m), Ctotal is manufacturing cost for a single IC, m desired profit margin Costs for produce an IC Non-recurring engineering costs (NREs) Recurring engineering costs Fixed costs

Design Economics (2) Non-recurring engineering costs (NREs) Engineering design cost Prototype manufacturing cost Recurring costs Process Package Test

NRE and unit cost metrics Costs: Unit cost: the monetary cost of manufacturing each copy of the system, excluding NRE cost NRE cost (Non-Recurring Engineering cost): The one- time monetary cost of designing the system total cost = NRE cost + unit cost * # of units per-product cost = total cost / # of units = (NRE cost / # of units) + unit cost Example NRE=$2000, unit=$100 For 10 units total cost = $2000 + 10*$100 = $3000 per-product cost = $2000/10 + $100 = $300 Amortizing NRE cost over the units results in an additional $200 per unit

NRE and unit cost metrics Compare technologies by costs -- best depends on quantity Technology A: NRE=$2,000, unit=$100 Technology B: NRE=$30,000, unit=$30 Technology C: NRE=$100,000, unit=$2 But, must also consider time-to-market

Summary Embedded systems are everywhere Key challenge: optimization of design metrics Design metrics compete with one another A unified view of hardware and software is necessary to improve productivity Three key technologies Processor: general-purpose, application-specific, single- purpose IC: Full-custom, semi-custom, PLD Design: Compilation/synthesis, libraries/IP, test/verification

Embedded System Classification Dr. Konstantinos Tatas

What is real-time? Is there any other kind? A real-time computer system is a computer system where the correctness of the system behavior depends not only on the logical results of the computations, but also on the physical time when these results are produced. By system behavior we mean the sequence of outputs in time of a system.

Real-time means reactive A real-time computer system must react to stimuli from its environment The instant when a result must be produced is called a deadline. If a result has utility even after the deadline has passed, the deadline is classified as soft, otherwise it is firm. If severe consequences could result if a firm deadline is missed, the deadline is called hard. Example: Consider a traffic signal at a road before a railway crossing. If the traffic signal does not change to red before the train arrives, an accident could result.

Classification of Embedded Systems Real-time vs NonReal-Time Hard deadline Failsafe Fail-operational Soft deadline Firm deadline Centralized vs Distributed

Fail-Safe hard-deadline RT systems If a safe state can be identified and quickly reached upon the occurrence of a failure, then we call the system fail-safe. Failsafeness is a characteristic of the controlled object, not the computer system. In case a failure is detected in a railway signaling system, it is possible to set all signals to red and thus stop all the trains in order to bring the system to a safe state. In failsafe applications the computer system must have a high error-detection coverage. Often a watchdog, is required to monitor the operation of the computer system and put it in safe state.

Fail-Operational hard-deadline RT systems In fail-operational applications, threre is no safe state a flight control system aboard an airplane. The computer system must remain operational and provide a minimal level of service even in the case of a failure to avoid a catastrophe

Guaranteed response systems a design that operates correctly even in the case of a peak load and fault scenario is a system with a guaranteed response. The probability of failure of a perfect system with guaranteed response is reduced to the probability that the assumptions about the peak load and the number and types of faults do not hold in reality. This probability is called assumption coverage [Pow95]. Guaranteed response systems require careful planning and extensive analysis during the design phase.

Best-effort systems If an analytic response guarantee cannot be given, we speak of a best-effort design. Best-effort systems do not require a rigorous specification of the load- and fault-hypothesis. The design proceeds according to best effort the sufficiency of the design is established during the test and integration phases. It is difficult to establish that a best-effort design operates correctly in a rare-event scenario. Many non safety-critical real-time systems are designed as best-effort systems.

Embedded System Requirements and Specifications Unit 2 Embedded System Requirements and Specifications

Embedded System Requirements Essentially turning a concept into a product Asking potential customers, understanding their needs determining the best feature and price point Sales and marketing usually responsible R&D engineers should contribute

Embedded System Requirements Functional: describe each function of the system Input: Output: Processing: Non-functional: system properties not related to its function Power Consumption Cost Time-to-market Reliability Portability Maintainability Security

Requirements should be Concise: Brief yet complete and unambiguous Structured: Requirements should be numbered Black-box view: Not concerned with implementation Verifiable: Able to check if they are met by the implementation

Example: Digital Camera Requirements Draft Functional: R1. Image capture Input: Light from lens Output: Pixels corresponding to light at 10.2 Mpixels R2. Image compression Input: Pixels of uncompressed image Output: Pixels of compressed image (compression ratio: 4:1) R3. Image Display Input: Pixels of compressed image Output: Pixels of display on 4x3 inch LCD display R3.1 Zoom Image display Input: Pixels of compressed image, zoom area, zoom ratio Output: Pixels of display at R4. Image transfer Output: USB stream of pixels of compressed image

Example: Digital Camera Requirements Draft Non-Functional: R5. Cost: 150€ R6. Weight: 800 g R7. Power consumption (number of photographs away from mains) R8. Security

UML diagrams (1/2) Structural Modeling Diagrams Structure diagrams define the static architecture of a model.  Package diagrams are used to divide the model into logical containers, or 'packages', and describe the interactions between them at a high level. Class or Structural diagrams  define the basic building blocks of a model: the types, classes and general materials used to construct a full model. Object diagrams show how instances of structural elements are related and used at run-time Composite Structure diagrams provide a means of layering an element's structure and focusing on inner detail, construction and relationships Component diagrams are used to model higher level or more complex structures, usually built up from one or more classes, and providing a well defined interface Deployment diagrams show the physical disposition of significant artifacts within a real-world setting.

UML diagrams (2/2) Behavioral Modeling Diagrams Behavior diagrams capture the varieties of interaction and instantaneous states within a model as it 'executes' over time Use Case diagrams  are used to model user/system interactions. They define behavior, requirements and constraints in the form of scripts or scenarios. Activity diagrams  have a wide number of uses, from defining basic program flow, to capturing the decision points and actions within any generalized process. State Machine diagrams are essential to understanding the instant to instant condition, or "run state" of a model when it executes. Communication diagrams show the network, and sequence, of messages or communications between objects at run-time, during a collaboration instance. Sequence diagrams  are closely related to communication diagrams and show the sequence of messages passed between objects using a vertical timeline. Timing diagrams fuse sequence and state diagrams to provide a view of an object's state over time, and messages which modify that state. Interaction Overview diagrams fuse activity and sequence diagrams to allow interaction fragments to be easily combined with decision points and flows.

Sequence Diagram

State machines transition a b state state name

Example state machine start finish input/output region found got menu region = menu/ which_menu(i) mouse_click(x,y,button)/ find_region(region) call_menu(I) region found got menu item called menu item region = drawing/ find_object(objid) highlight(objid) object highlighted found object

Sequence diagram Shows sequence of operations over time. Relates behaviors of multiple objects.

Sequence diagram example m: Mouse d1: Display u: Menu mouse_click(x,y,button) which_menu(x,y,i) time call_menu(i)

Design example 1: Alarm Clock Source: Wayne Wolf, “Computers as Components: Principles of Embedded Computing System Design”, Second edition, Morgan Kaufmann, 2008

Functional Requirements Name: Alarm clock. Purpose: A 24-h digital clock with a single alarm Inputs: Six push buttons set time set alarm Hour minute alarm on alarm off. Outputs: Four-digit, clock-style output. PM indicator light. Alarm ready light. Buzzer. Functions Default mode: The display shows the current time. PM light is on from noon to midnight. Hour and minute buttons are used to advance time and alarm, respectively. Pressing one of these buttons increments the hour/minute once. Depress set time button: This button is held down while hour/minute buttons are pressed to set time. New time is automatically shown on display. Depress set alarm button:While this button is held down, display shifts to current alarm setting; depressing hour/ minute buttons sets alarm value in a manner similar to setting time. Alarm on: puts clock in alarm-on state, causes clock to turn on buzzer when current time reaches alarm time, turns on alarm ready light. Alarm off: turns off buzzer, takes clock out of alarm-on state, turns off alarm ready light.

Non-functional Requirements Performance: Displays hours and minutes but not seconds. Should be accurate within the accuracy of a typical microprocessor clock signal. (Excessive accuracy may unreasonably drive up the cost of generating an accurate clock.) Manufacturing cost: Consumer product range. Cost will be dominated by the microprocessor system, not the buttons or display. Power: Powered by AC through a standard power supply. Physical size and weight: Small enough to fit on a nightstand with

Update time FSM update-time is activated once per second and must update the seconds clock. If it has counted 60 s, it must then update the displayed time; when it does so, it must roll over between digits and keep track of AM-to- PM and PM-to-AM transitions. It sends the updated time to the display object. It also checks if the time has reached the alarm time to activate the buzzer

Unit 4 Embedded System Implementation Platforms

Implementation Platform The hardware on which the embedded computing system will execute the software Could be a combination of platforms Hardware platforms: General Purpose Processors RISC CISC Application-Specific Processors Microcontrollers Digital Signal Processors ASIPs Hardware Accelerators GPUs FPGAs Custom ICs

General-purpose processors Datapath IR PC Register file General ALU Controller Program memory Assembly code for: total = 0 for i =1 to … Control logic and State register Data memory Programmable device used in a variety of applications Also known as “microprocessor” Features Program memory General datapath with large register file and general ALU User benefits Low time-to-market and NRE costs High flexibility “Pentium” the most well-known, but there are hundreds of others

Single-purpose processors Datapath Controller Control logic State register Data memory index total + Digital circuit designed to execute exactly one program a.k.a. coprocessor, accelerator or peripheral Features Contains only the components needed to execute a single program No program memory Benefits Fast Low power Small size

Application-specific processors Datapath IR PC Registers Custom ALU Controller Program memory Assembly code for: total = 0 for i =1 to … Control logic and State register Data memory Programmable processor optimized for a particular class of applications having common characteristics Compromise between general-purpose and single-purpose processors Features Program memory Optimized datapath Special functional units Benefits Some flexibility, good performance, size and power

General Purpose Processors High Flexibility General Instruction Set Good for all applications, optimized for none Low development time Programming in high-level language Low/Medium Processing Power Medium Cost High Power Consumption

Application-Specific Processors: Microcontrollers Medium Flexibility ISA optimized for control applications Low processing power Not suitable for data intensive applications Low power consumption Low cost Low development time

Application-Specific Processors: DSPs Medium Flexibility ISA optimized for optimized for fast execution of numerical algorithms necessary for analyzing signals Medium/High processing power Low/Medium power consumption Medium cost Low development time

Comparison of CMOS design methods/ Implementation Platforms NRE Unit Cost Power Dissipation Complexity of Implementation Time-to-Market Performance Flexibility μProcessor/DSP low medium high PLA FPGA Custom Design Very high

Loop unrolling for (i=0; i<64; i++) A technique for reducing the loop overhead The overhead decreases as the unrolling factor increases at the expense of code size Doesn’t work with zero overhead looping hardware DSPs for (i=0; i<64; i++) { sum +=*(data++); } for (i=0; i<64/4; i++) { sum +=*(data++); }

Loop Unrolling example Unroll the following loop by a factor of 2, 4, and eight for (i=0; i<64; i++) { a[i] = b[i] + c[i+1]; } ACOE343 - Embedded Real-Time Processor Systems - Frederick University

Loop Reordering Transformations Change the relative order of execution of the iterations of a loop nest or nests. Expose parallelism and improve memory locality.

Loop Reordering Transformations (1) Loop Interchange enable vectorization by interchanging an inner, dependent loop with an outer, independent loop; improve vectorization by moving the independent loop with the largest range into the innermost position; improve parallel performance by moving an independent loop outwards in a loop nest to increase the granularity of each iteration and reduce the number of barrier synchronizations; reduce stride, ideally to stride 1; and increase the number of loop- invariant expressions in the inner loop.

Loop Reordering Transformations (2) Loop Reversal Reversal changes the direction in which the loop traverses its iteration range. It is often used in conjunction with other iteration space reordering transformations because it changes the dependence vectors