System Design and Methodology/ Embedded Systems Design (Modeling and Design of Embedded Systems)

Similar documents
Architectures and Platforms

ELEC 5260/6260/6266 Embedded Computing Systems

7a. System-on-chip design and prototyping platforms

Embedded Systems. introduction. Jan Madsen

Agenda. Michele Taliercio, Il circuito Integrato, Novembre 2001

EEM870 Embedded System and Experiment Lecture 1: SoC Design Overview

Digital Systems Design! Lecture 1 - Introduction!!

Aims and Objectives. E 3.05 Digital System Design. Course Syllabus. Course Syllabus (1) Programmable Logic

High-Level Synthesis for FPGA Designs

Introduction to System-on-Chip

Embedded Systems Engineering Certificate Program

9/14/ :38

Introduction to Digital System Design

From Control Loops to Software

Product Development Flow Including Model- Based Design and System-Level Functional Verification

FPGA Prototyping Primer

Model Checking based Software Verification

Embedded System Design: Embedded Systems Foundations of Cyber-Physical Systems

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

SoC Curricula at Tallinn Technical University

Chapter 2 Features of Embedded System

Systems on Chip Design

Echtzeittesten mit MathWorks leicht gemacht Simulink Real-Time Tobias Kuschmider Applikationsingenieur

System-on. on-chip Design Flow. Prof. Jouni Tomberg Tampere University of Technology Institute of Digital and Computer Systems.

Contents. System Development Models and Methods. Design Abstraction and Views. Synthesis. Control/Data-Flow Models. System Synthesis Models

Architectural Level Power Consumption of Network on Chip. Presenter: YUAN Zheng

Seeking Opportunities for Hardware Acceleration in Big Data Analytics

Software Engineering for Real- Time Systems.

on-chip and Embedded Software Perspectives and Needs

Eli Levi Eli Levi holds B.Sc.EE from the Technion.Working as field application engineer for Systematics, Specializing in HDL design with MATLAB and

VHDL DESIGN OF EDUCATIONAL, MODERN AND OPEN- ARCHITECTURE CPU

EMBEDDED SYSTEM BASICS AND APPLICATION

Client/Server Computing Distributed Processing, Client/Server, and Clusters

Chapter 1: Introduction. What is an Operating System?

How To Design An Image Processing System On A Chip

BUILD VERSUS BUY. Understanding the Total Cost of Embedded Design.

Software Development Under Stringent Hardware Constraints: Do Agile Methods Have a Chance?

1. Memory technology & Hierarchy

Best Practises for LabVIEW FPGA Design Flow. uk.ni.com ireland.ni.com

MAJORS: Computer Engineering, Computer Science, Electrical Engineering

1. Introduction to Embedded System Design

NIOS II Based Embedded Web Server Development for Networking Applications

Low-Level Verification of Embedded Software: Addressing the Challenge

Programming Logic controllers

SuperIOr Controller. Digital Dynamics, Inc., 2014 All Rights Reserved. Patent Pending. Rev:

HARDWARE ACCELERATION IN FINANCIAL MARKETS. A step change in speed

Testing of Digital System-on- Chip (SoC)

Software Development with Real- Time Workshop Embedded Coder Nigel Holliday Thales Missile Electronics. Missile Electronics

Overview and History of Operating Systems

Design and Verification of Nine port Network Router

Medical Device Design: Shorten Prototype and Deployment Time with NI Tools. NI Technical Symposium 2008

Embedded Systems Lecture 9: Reliability & Fault Tolerance. Björn Franke University of Edinburgh

OPC COMMUNICATION IN REAL TIME

ESE566 REPORT3. Design Methodologies for Core-based System-on-Chip HUA TANG OVIDIU CARNU

FPGA area allocation for parallel C applications

Chapter 2 Logic Gates and Introduction to Computer Architecture

Design of a High Speed Communications Link Using Field Programmable Gate Arrays

Design and Implementation of the Heterogeneous Multikernel Operating System

GEDAE TM - A Graphical Programming and Autocode Generation Tool for Signal Processor Applications

Study Plan Masters of Science in Computer Engineering and Networks (Thesis Track)

Software-Programmable FPGA IoT Platform. Kam Chuen Mak (Lattice Semiconductor) Andrew Canis (LegUp Computing) July 13, 2016

MsC in Advanced Electronics Systems Engineering

Types Of Operating Systems

A Lab Course on Computer Architecture

Reconfigurable Architecture Requirements for Co-Designed Virtual Machines

Rapid System Prototyping with FPGAs

Embedded Software development Process and Tools:

Lecture 1. Introduction to Embedded Computer Systems

Finite State Machine Design and VHDL Coding Techniques

Video Conferencing Unit. by Murat Tasan

Attaining EDF Task Scheduling with O(1) Time Complexity

Levels of Programming Languages. Gerald Penn CSC 324

Eingebettete Systeme. 4: Entwurfsmethodik, HW/SW Co-Design. Technische Informatik T T T

The Emerging Trends in Electrical and Computer Engineering

Lecture 11: Multi-Core and GPU. Multithreading. Integration of multiple processor cores on a single chip.

Networked Embedded Systems: Design Challenges

Design Cycle for Microprocessors

Objective. Testing Principle. Types of Testing. Characterization Test. Verification Testing. VLSI Design Verification and Testing.

Hardware/Software Codesign Overview

Multiprocessor System-on-Chip

Programmable Logic IP Cores in SoC Design: Opportunities and Challenges

synthesizer called C Compatible Architecture Prototyper(CCAP).

Lecture 3 - Model-based Control Engineering

Software engineering for real-time systems

A New Paradigm for Synchronous State Machine Design in Verilog

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

AC : A PROCESSOR DESIGN PROJECT FOR A FIRST COURSE IN COMPUTER ORGANIZATION

Modeling a GPS Receiver Using SystemC

Electronic system-level development: Finding the right mix of solutions for the right mix of engineers.

Contents. Chapter 1. Introduction

Switch Fabric Implementation Using Shared Memory

Verification by. Simulation. Verification by. Simulation. Verification by. Simulation / Model Check. Validation and Testing.

Master Specialization in Digital Design: Design and Programming of Embedded Systems

ARM Webinar series. ARM Based SoC. Abey Thomas

NVM memory: A Critical Design Consideration for IoT Applications

Figure 1 FPGA Growth and Usage Trends

VLSI Design Verification and Testing

Going Linux on Massive Multicore

LSN 2 Computer Processors

Dataflow Programming with MaxCompiler

Transcription:

System Design&Methodologies Fö 1&2-1 System Design&Methodologies Fö 1&2-2 Course Information System Design and Methodology/ Embedded Systems Design (Modeling and Design of Embedded Systems) TDTS30/TDDI08 Web page: http://www.ida.liu.se/~tdts30 (http://www.ida.liu.se/~tddi08) Examination: written Petru Eles Institutionen för Datavetenskap (IDA) Linköpings Universitet email: petel@ida.liu.se http://www.ida.liu.se/~petel phone: 28 1396 B building, 329:220 Lecture notes: available from the web page, latest 24 hours before the lecture. Recommended literature: Wayne Wolf: "Computers as Components. Principles of Embedded Computing System Design", Morgan Kaufmann Publishers, 2001. Peter Marwedel: "Embedded System Design", Springer, 2nd edition, 2006. System Design&Methodologies Fö 1&2-3 Course Information (cont d) Labs&Lessons&Report: System Design&Methodologies Fö 1&2-4 Daniel Karlsson Institutionen för Datavetenskap (IDA) email: danka@ida.liu.se http://www.ida.liu.se/~danka phone: 28 2419 B building, 329:198 Soheil Samii Institutionen för Datavetenskap (IDA) email: sohsa@ida.liu.se http://www.ida.liu.se/~sohsa phone: 28 2424 B building, 329:202 Embedded Systems and Their Design 1. What is an Embedded System 2. Characteristics of Embedded Applications 3. The Traditional Design Flow 4. An Example 5. A New Design Flow 6. The System Level 7. Course Topics

System Design&Methodologies Fö 1&2-5 System Design&Methodologies Fö 1&2-6 That s how we use microprocessors What is an Embedded System? There are several definitions around! Some highlight what it is (not) used for: An embedded system is any sort of device which includes a programmable component but itself is not intended to be a general purpose computer. Some focus on what it is built from: An embedded system is a collection of programmable parts surrounded by ASICs and other standard components, that interact continuously with an environment through sensors and actuators. System Design&Methodologies Fö 1&2-7 System Design&Methodologies Fö 1&2-8 A Look at Two Typical Implementation Architectures What is an Embedded System? (cont d) Telecommunication System on Chip Some of the main characteristics: Dedicated (not general purpose) RF A/D & D/A DSP core RAM RISC core RAM High-Speed DSP Blocks Control Logic Interface LAN Contains a programmable component Interacts (continuously) with the environment Programmable processor ASIC block (Application Specific Integrated Circuit) Standard block Memory Reconfigurable logic (FPGA) dedicated electronics

System Design&Methodologies Fö 1&2-9 System Design&Methodologies Fö 1&2-10 Distributed Embedded System (automotive application) Actuators Sensors Input/Output RAM CPU FLASH Network Interface Gateway The Software Component Software running on the programmable processors: Application tasks Real-Time Operating System I/O drivers, Network protocols, Middleware Gateway System Design&Methodologies Fö 1&2-11 System Design&Methodologies Fö 1&2-12 Characteristics of Embedded Applications Characteristics of Embedded Applications (cont d) What makes them special? Like with ordinary applications, functionality and user interfaces are often very complex. But, in addition to this: Time constraints Power constraints Cost constraints Safety Time to market Time constraints: Embedded systems have to perform in real-time: if data is not ready by a certain deadline, the system fails to perform correctly. - Hard deadline: failure to meet leads to major hazards. - Soft deadline: failure to meet can be tolerated but quality of service is reduced.

System Design&Methodologies Fö 1&2-13 System Design&Methodologies Fö 1&2-14 Characteristics of Embedded Applications (cont d) Power constraints: There are several reasons why low power/energy consumption is required: Cost aspects: High power consumption strong power supply expensive cooling system Battery life High energy consumption short battery life time Characteristics of Embedded Applications (cont d) Cost constraints: Embedded systems are very often mass products in highly competitive markets and have to be shipped at a low cost. What we are interested in: - Manufacturing cost - Design cost Factors: design time, type of components used (processor, memory, I/O devices), technology, testing time, power consumption, etc. Non-recurring engineering (NRE) costs (such as design cost, masks, prototypes) are becoming very high - It is very difficult to come out with low quantity products; - Hardware and software platforms are introduced which are used for several products in a family; System Design&Methodologies Fö 1&2-15 System Design&Methodologies Fö 1&2-16 Characteristics of Embedded Applications (cont d) Safety critical: Embedded systems are often used in life critical applications: avionics, automotive electronics, nuclear plants, medical applications, military applications, etc. Reliability and safety are major requirements. In order to guarantee safety during design: - Formal verification: mathematics-based methods to verify certain properties of the designed system. - Automatic synthesis: certain design steps are automatically performed by design tools. Characteristics of Embedded Applications (cont d) Short time to market: In highly competitive markets it is critical to catch the market window: a short delay with the product on the market can have catastrophic financial consequences (even if the quality of the product is excellent). Design time has to be reduced! - Good design methodologies. - Efficient design tools. - Reuse of previously designed and verified (hardware and software) blocks. - Good designers who understand both software and hardware!

System Design&Methodologies Fö 1&2-17 System Design&Methodologies Fö 1&2-18 Why is Design of Embedded Systems Difficult? An Example High Complexity Strong time and power constraints Low cost Short time to market Safety critical systems In order to achieve all these requirements, systems have to be highly optimized. Both hardware and software aspects have to be considered simultaneously! T 2 T 4 T 1 T 3 T 5 T 6 T 7 T 8 The system to be implemented is modelled as a task graph: a node represents a task (a unit of functionality activated as response to a certain input and which generates a certain output). an edge represents a precedence constraint and data dependency between two tasks. Period: 42 time units The task graph is activated every 42 time units one activation has to be terminated in time less than 42. Cost limit: 8 The total cost of the implemented system has to be less than 8. System Design&Methodologies Fö 1&2-19 System Design&Methodologies Fö 1&2-20 The Traditional Design Flow The Traditional Design Flow (cont d) It works like this (or even worse): 1. Start from some informal specification of functionality and a set of constraints (time and power constraints, cost limits, etc.) Informal Specification, Constraints 2. Generate a more formal specification of the functionality, based on some modeling concept (finite state machine, data-flow, etc.). This model is in Matlab, Statecharts, C, UML, VHDL. Such a model is our task graph (slide 18). Modeling System Model Functional 3. Simulate the model in order to check the functionality. If needed make adjustments. 4. Choose an architecture (µprocessor, buses, etc.) such that the cost limits are satisfied and, you hope, that time and power constraints will be fulfilled. 5. Build a prototype and implement the system. 6. Verify the system: neither time nor power constraints are satisfied!!! Now you are in great trouble: you have spent a lot of time and money and nothing works! Go back to 4 and choose another architecture and start a new implementation. Or negotiate with the customer on the constraints. Testing OK Fabrication Select Architecture Hardware and Software Implementation Prototype More work should be done here!

System Design&Methodologies Fö 1&2-21 System Design&Methodologies Fö 1&2-22 The Traditional Design Flow (cont d) Example What are the consequences: Delays in the design process - Increased design cost - Delays in time to market missed market window High cost of failed prototypes Bad design decisions taken under time pressure - Low quality, high cost products Let s come back to the example on slide 18. We have the system model (task graph) which has been validated by simulation. What next? We decide on a certain µprocessor µp1, with cost 4. For each task the worst case execution time (WCET) when executed on µp1 is estimated. System Design&Methodologies Fö 1&2-23 System Design&Methodologies Fö 1&2-24 A schedule: Task WCET T 1 4 T 2 6 T 3 4 T 4 7 T 5 8 T 6 12 T 7 7 T 8 10 task - - - - Estimator WCET µprocessor arch. model Time 0 2 4 6 81012 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 T 1 T 2 T 4 T 3 T 5 T 6 T 7 T 8 Using this architecture we got a solution with: Execution time: 58 > 42 Cost: 4 < 8 We have to try with another architecture!

System Design&Methodologies Fö 1&2-25 System Design&Methodologies Fö 1&2-26 We look after a µprocessor which is fast enough: µp2 For each task the WCET, when executed on µp2, is estimated. Task WCET Using this architecture we got a solution with: T 1 2 T 2 3 Execution time: 28 < 42 T 3 2 T 4 3 Cost: 15 > 8 T 5 4 T 6 6 T 7 3 We have to try with another architecture! T 8 5 Now we have to look to a multiprocessor solution. In order to meet cost constraints we try two cheap (and slow) µps: µp3: cost 3 µp4: cost 2 interconnection bus: cost 1 Task WCET µp3 µp4 For each task the WCET, when executed T 1 5 6 on µp3 and µp4, is estimated. T 2 7 9 T 3 5 6 T 4 8 10 µp3 µp4 T 5 10 11 T 6 17 21 Bus T 7 10 14 T 8 15 19 System Design&Methodologies Fö 1&2-27 System Design&Methodologies Fö 1&2-28 Now we have to map the tasks to processors. µp3: T 1, T 3, T 5, T 6, T 7, T 8. µp4: T 2, T 4. If communicating tasks are mapped to different processors, they have to communicate over the bus. Communication time has to be estimated; it depends on the amount of bits transferred between the tasks and on the speed of the bus. Estimated communication times: C 1-2 : 1 C 4-8 : 1 A schedule: Time 0 2 4 6 81012 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 µp3 T 1 T 3 T 5 T 6 T 7 T 8 µp4 T 2 T 4 bus C 1-2 C 4-8 We have exceeded the allowed execution time (42)!

System Design&Methodologies Fö 1&2-29 System Design&Methodologies Fö 1&2-30 Try a new mapping; move T 5 to µp4, in order to increase parallelism. Two new communications are introduced, with estimated times: C 3-5 : 2 C 5-7 : 1 A schedule: Time 0 2 4 6 81012 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 µp3 µp4 bus T 1 T 3 T 6 T 7 T 8 T 2 T 4 T 5 C 1-2 C 3-5 C 4-8 C 5-7 The execution time is still 62, as before! There exists a better schedule! Time 0 2 4 6 81012 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 µp3 T 1 T 3 T 6 T 7 T 8 µp4 T 2 T 5 T 4 bus C 1-2 C 3-5 C 5-7 C 4-8 Using this architecture we got a solution with: Execution time: 52 > 42 Cost: 6 < 8 System Design&Methodologies Fö 1&2-31 System Design&Methodologies Fö 1&2-32 Possible solutions: Change µprocessor µp3 with a faster one cost limits exceeded Implement some part of the functionality in hardware as an ASIC New architecture Cost of ASIC: 1 µp3 µp4 Mapping ASIC µp3: T 1, T 3, T 6, T 7. µp4: T 2, T 4, T 5. ASIC: T 8 with estimated WCET= 3 New communication, with estimated time: C 7-8 : 1 Bus A schedule: Time 0 2 4 6 81012 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 µp3 T 1 T 3 T 6 T 7 µp4 T 2 T 5 T 4 ASIC bus C 1-2 C 3-5 C 5-7 C 4-8 C 7-8 Using this architecture we got a solution with: Execution time: 41 < 42 Cost: 7 < 8 T 8

System Design&Methodologies Fö 1&2-34 The Design Flow Informal Specification, Constraints System Design&Methodologies Fö 1&2-33 Modeling What did we achieve? We have selected an architecture. We have mapped tasks to the processors and ASIC. We have elaborated a a schedule. Arch. Selection System architecture System model Mapping Functional Extremely important!!! Nothing has been built yet. All decisions are based on simulation and estimation. Now we can go and do the software and hardware implementation, with a high degree of confidence that we get a correct prototype. Estimation Scheduling Mapped and scheduled model OK Hardware and Software Implementation Testing OK Fabrication Prototype System Design&Methodologies Fö 1&2-35 System Design&Methodologies Fö 1&2-36 The Design Flow (cont d) The Design Flow (cont d) What is the essential difference compared to the flow on slide 20? It is the inner loop which is performed before the effective hardware/software implementation. This loop is performed several times as part of the design space exploration. Different architectures, mappings and schedules are explored, before the actual implementation and prototyping. We get highly optimised good quality solutions in short time. We have a good chance that the outer loop, including prototyping, is not repeated. Some additional remarks: Formal verification It is impossible to do an exhaustive verification by simulation! Especially for safety critical systems (but not only) formal verification is needed. is used not only for functional validation. It is used also after mapping and scheduling in order to test, for example, timing aspects. It is used also during the implementation steps; especially interesting: hardware/software cosimulation.

System Design&Methodologies Fö 1&2-38 The Design Flow (cont d) Informal Specification, Constraints System Design&Methodologies Fö 1&2-37 Hardware/software codesign The Design Flow (cont d) During the mapping step we also decide what is going to be executed on a programmable processor (software) and what is going into hardware (ASIC, FPGA). During the implementation phase, hardware and software components have to be developed in a coordinated way, keeping their consistency (hardware/software cosimulation is important here) Hardware/Software partitioning Hardware/Software codesign System Level Arch. Selection System architecture Estimation Softw. model Modeling System model Mapping Scheduling Functional Formal Verification Mapped and scheduled model OK Formal Verification Hardw. model Softw. Generation Hardw. Synthesis Lower Levels Softw. blocks Testing OK Fabrication Prototype Hardw. blocks System Design&Methodologies Fö 1&2-39 System Design&Methodologies Fö 1&2-40 The Lower Levels The Lower Levels (cont d) Software generation: - Encoding in an implementation language (C, C++, assembler). - Compiling (this can include particular optimizations for application specific processors, DSPs, etc.). - Generation of a real-time kernel or adapting to an existing operating system. - Testing and debugging (in the development environment). Hardware synthesis: - Encoding in a hardware description language (VHDL, Verilog) - Successive synthesis steps: high-level, register-transfer level, logic-level synthesis. - Testing and debugging (by simulation) Hardware/software integration: - The software is run together with the hardware model (cosimulation) Prototyping: - A prototype of the hardware is constructed and the software is executed on the target architecture.

System Design&Methodologies Fö 1&2-41 System Design&Methodologies Fö 1&2-42 The Lower Levels (cont d) There are available tools on the market which automatically perform many of the low level tasks: Code generators (software model C, hardware model VHDL) Compilers Test generators and debuggers and cosimulation tools Hardware synthesis tools - High level synthesis - RT-level synthesis - Logic synthesis - Layout and physical implementation The System Level This is a hot research area. Very few commercial tools are offered. Mostly experimental and academic tools available. Huge efforts and investments are currently made in order to develop tools and methodologies for system level design. Ad-hoc solutions are less and less acceptable. It is the system level we are interested in, in this course! System Design&Methodologies Fö 1&2-43 Course Topics at a Glance Introduction: Embedded Systems and Their Design (just finished!) Models of Computation and Specification Languages - Dataflow Models, Petri Nets, Discrete Event Models, Synchronous Finite State Machines & Synchronous Languages, Globally Asynchronous Locally Synchronous Systems, Timed Automata Architectures and Platforms for Embedded Systems Design - General Purpose vs. Application Specific Architectures, Component and Platform-based Design, Reconfigurable Systems, Functionality Mapping. Task Scheduling System-Level Power/Energy Optimization