Real-Time Embedded Software Synthesis 即時嵌入式軟體合成 熊博安國立中正大學資訊工程學系民國九十年十一月廿九日.

Slides:



Advertisements
Similar presentations
© 2004 Wayne Wolf Topics Task-level partitioning. Hardware/software partitioning.  Bus-based systems.
Advertisements

Flexible Scheduling of Software with Logical Execution Time Constraints* Stefan Resmerita and Patricia Derler University of Salzburg, Austria *UC Berkeley,
Resource Access Protocols
Formal Methods for Real- Time Embedded Software Engineering 正規方法應用於即時嵌入式 軟體工程 熊博安 國立中正大學資訊工程學系 民國九十一年五月二十二日.
CS4101 嵌入式系統概論 Design and Development 金仲達教授 國立清華大學資訊工程學系 Slides from Computers as Components: Principles of Embedded Computing System Design, Wayne Wolf,
Real-Time Scheduling CIS700 Insup Lee October 3, 2005 CIS 700.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Roman LyseckyUniversity of California, Riverside1 Techniques for Reducing Read Latency of Core Bus Wrappers Roman L. Lysecky, Frank Vahid, & Tony D. Givargis.
VERTAF: An Application Framework for Design and Verification of Embedded Real-Time Software Pao-Ann Hsiung, Shang-Wei Lin, Chih-Hao Tseng, Trong-Yen Lee,
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Behavioral Design Outline –Design Specification –Behavioral Design –Behavioral Specification –Hardware Description Languages –Behavioral Simulation –Behavioral.
Chess Review May 11, 2005 Berkeley, CA Composable Code Generation for Distributed Giotto Tom Henzinger Christoph Kirsch Slobodan Matic.
Periodic Task Scheduling
1 Quasi-Static Scheduling of Embedded Software Using Free-Choice Petri Nets Marco Sgroi, Alberto Sangiovanni-Vincentelli Luciano Lavagno University of.
Chapter 13 Embedded Systems
Real-Time System: Introduction
Real-Time Systems and Programming Languages
Courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building.
Aperiodic Task Scheduling
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Real-Time Operating System Chapter – 8 Embedded System: An integrated approach.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 15 Slide 1 Real-time Systems 1.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
9/14/2015B.Ramamurthy1 Operating Systems : Overview Bina Ramamurthy CSE421/521.
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction n What is an Operating System? n Mainframe Systems.
CAD Techniques for IP-Based and System-On-Chip Designs Allen C.-H. Wu Department of Computer Science Tsing Hua University Hsinchu, Taiwan, R.O.C {
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 16 System Architecture and Design II.
An efficient active replication scheme that tolerate failures in distributed embedded real-time systems Alain Girault, Hamoudi Kalla and Yves Sorel Pop.
EEL Software development for real-time engineering systems.
Time-Memory Scheduling and Code Generation of Real-Time Embedded Software Chuen-Hau Gau and Pao-Ann Hsiung National Chung Cheng University Chiayi, Taiwan,
Real-Time Operating Systems for Embedded Computing 李姿宜 R ,06,10.
Real-Time Systems Mark Stanovich. Introduction System with timing constraints (e.g., deadlines) What makes a real-time system different? – Meeting timing.
1 Formal Synthesis and Control of Soft Embedded Real-Time Systems Pao-Ann Hsiung National Chung Cheng University Dept. of Computer Science and Information.
Dynamic software reconfiguration using control supervisors Ugo Buy 13 June 2005.
REAL-TIME SOFTWARE SYSTEMS DEVELOPMENT Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Formal Synthesis and Code Generation of Embedded Real-Time Software Pao-Ann Hsiung National Chung Cheng University Chiayi-621, Taiwan, ROC. 9th ACM/IEEE.
Summary :-Distributed Process Scheduling Prepared By:- Monika Patel.
6. Application mapping 6.1 Problem definition
Automatic Synthesis and Code-Generation of Real- Time Embedded Software 即時嵌入式軟體之自動合成 及程式碼之產生 熊博安 國立中正大學資訊工程學系 民國九十一年四月二十六日.
Modeling Mobile-Agent-based Collaborative Processing in Sensor Networks Using Generalized Stochastic Petri Nets Hongtao Du, Hairong Qi, Gregory Peterson.
1 VERTAF: An Object-Oriented Application Framework for Embedded Real-Time Systems Pao-Ann Hsiung*, Trong-Yen Lee, Win-Bin See, Jih-Ming Fu, and Sao-Jie.
Special Class on Real-Time Systems
CSCI1600: Embedded and Real Time Software Lecture 24: Real Time Scheduling II Steven Reiss, Fall 2015.
Introduction to Embedded Systems Rabie A. Ramadan 5.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
Real-Time Systems, Events, Triggers. Real-Time Systems A system that has operational deadlines from event to system response A system whose correctness.
Determining Optimal Processor Speeds for Periodic Real-Time Tasks with Different Power Characteristics H. Aydın, R. Melhem, D. Mossé, P.M. Alvarez University.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
1 of 14 Lab 2: Design-Space Exploration with MPARM.
系統程式 System Programming
Resource Optimization for Publisher/Subscriber-based Avionics Systems Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee.
CONCEPTS OF REAL-TIME OPERATING SYSTEM. OBJECTIVE  To Understand Why we need OS?  To identify Types of OS  To Define Real - Time Systems  To Classify.
Real-Time Operating Systems RTOS For Embedded systems.
Embedded System Scheduling
REAL-TIME OPERATING SYSTEMS
Operating Systems : Overview
Wayne Wolf Dept. of EE Princeton University
Techniques for Reducing Read Latency of Core Bus Wrappers
EEE 6494 Embedded Systems Design
Real-time Software Design
Operating Systems : Overview
CSCI1600: Embedded and Real Time Software
Operating Systems : Overview
Dynamic Voltage Scaling
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Presentation transcript:

Real-Time Embedded Software Synthesis 即時嵌入式軟體合成 熊博安國立中正大學資訊工程學系民國九十年十一月廿九日

2001/11/292 What do I want to talk about ? What is a real-time system? What is a real-time system? What is an embedded system? What is an embedded system? Why software? Why software? Why synthesis? Why synthesis? How to generate code automatically? How to generate code automatically? Real-world applications? Real-world applications? Future work? Future work?

2001/11/293 What is a REAL-TIME SYSTEM? Timely Response Timely Response Predictable Response Predictable Response System Correctness: System Correctness: Timing (period, deadlines, etc.) Timing (period, deadlines, etc.) Function Function Constraints: Constraints: Hard (meet ALL deadlines) Hard (meet ALL deadlines) Soft (miss SOME deadlines) Soft (miss SOME deadlines)

2001/11/294 Examples of Real-Time Systems multimedia servers automobiles air crafts telecommunications

2001/11/295 What is an EMBEDDED SYSTEM? Installed in a larger system Installed in a larger system Dedicated task Dedicated task Small Memory Space (200~400 KB) Small Memory Space (200~400 KB) Low Processing Power (100~200 MHz ) Low Processing Power (100~200 MHz ) Unstable Environment (mobile, …) Unstable Environment (mobile, …) Reactive Reactive Real-Time Real-Time

2001/11/296 Embedded Systems Example medical instrumentshome appliancesoffice equipments space crafts research lab equipments factory automation

2001/11/297 Embedded System Architecture

2001/11/298 Why SOFTWARE? more than 70% software in many real-time embedded systems!!! more than 70% software in many real-time embedded systems!!! software is more flexible and easily reconfigurable, hence more errors!!! software is more flexible and easily reconfigurable, hence more errors!!! real-time  need correct software real-time  need correct software embedded  need small, efficient software embedded  need small, efficient software

2001/11/299 Why SYNTHESIS? More software  high complexity  need for automatic design (synthesis) More software  high complexity  need for automatic design (synthesis) Eliminate human and logical errors Eliminate human and logical errors Relatively immature synthesis techniques for software Relatively immature synthesis techniques for software Code optimizations Code optimizations size size efficiency efficiency Automatic code generation Automatic code generation

2001/11/2910

2001/11/2911

2001/11/2912

2001/11/2913 How to generate CODE automatically? Real-Time Embedded System Model? Set of concurrent tasks with memory and timing constraints! Real-Time Embedded System Model? Set of concurrent tasks with memory and timing constraints! How to execute in an embedded system (e.g. 1 CPU, 100 KB Mem)? Task Scheduling! How to execute in an embedded system (e.g. 1 CPU, 100 KB Mem)? Task Scheduling! How to generate code? Map schedules to software code! How to generate code? Map schedules to software code! Code optimizations? Minimize size, maximize efficiency! Code optimizations? Minimize size, maximize efficiency!

2001/11/2914 Design Issues and Solutions 2. Real-Time Constraints 1. Bounded Memory Execution Quasi-Static Scheduling (QSS) Proposed Solutions Real-Time Scheduling (RTS) Hard Real-Time Firing Interval Bound Synthesis (FIBS) Soft Real-Time

2001/11/2915 Real-Time Embedded System Model Time Free-Choice Petri Nets (TFCPN) Each arc from a place is either a unique outgoing arc or a unique incoming arc to a transition.

2001/11/2916 Synthesis Algorithm (Hard RTES) Synthesize_Hard_RTES(S, ,  QSS = Quasi_Static_Schedule(S,  QSS = Quasi_Static_Schedule(S,  If (QSS = NULL) return MemOverFlow; If (QSS = NULL) return MemOverFlow; RTS = Real_Time_Sched(S, QSS,  RTS = Real_Time_Sched(S, QSS,  If (RTS = NULL) return RTS_Error; else Code = Code_Gen(S,QSS,RTS); If (RTS = NULL) return RTS_Error; else Code = Code_Gen(S,QSS,RTS); return Code; return Code;

2001/11/2917 Synthesis Algorithm (Soft RTES) Synthesize_Soft_RTES(S, ,  QSS = Quasi_Static_Schedule(S,  QSS = Quasi_Static_Schedule(S,  If (QSS = NULL) return MemOverFlow; If (QSS = NULL) return MemOverFlow; FIB = Firing_Interv_Synth(S, QSS,  ); FIB = Firing_Interv_Synth(S, QSS,  ); If (FIB = NULL) return FIB_Error; else Code = Code_Gen(S, QSS, FIB); If (FIB = NULL) return FIB_Error; else Code = Code_Gen(S, QSS, FIB); return Code; return Code;

2001/11/2918 Quasi-Static Scheduling TFCPN net decomposition Conflict-Free Components Quasi-Static Schedules Finite Complete Cycle Deadlock Free Satisfy Memory Reqts Memory OK!!!

2001/11/2919 Real-Time Scheduling Single Processor Single Processor Worst Case Timing Analysis: Worst Case Timing Analysis: Rate Monotonic (RM) Rate Monotonic (RM) fixed priority fixed priority small period  high priority small period  high priority Earliest Deadline First (EDF) Earliest Deadline First (EDF) dynamic priority dynamic priority early deadline  high priority early deadline  high priority

2001/11/2920 Firing Interval Bound Synthesis 2 issues in Soft Real-Time Embedded System Control: 2 issues in Soft Real-Time Embedded System Control: Synchronization Wait: (for completion of other tasks) Synchronization Wait: (for completion of other tasks) Real-Time Specification: (complete before deadlines) Real-Time Specification: (complete before deadlines) Proposed Solutions: Proposed Solutions: Postpone Release Time:    +  w,  w > 0 Postpone Release Time:    +  w,  w > 0 Advance Finish Time:      n,  n >0 Advance Finish Time:      n,  n >0

2001/11/2921 Code Generation generate_code(S, QSS 1, QSS 2, …, QSS n, RTS) { generate_code(S, QSS 1, QSS 2, …, QSS n, RTS) { for i = 1, …, n { for i = 1, …, n { D i = create_process(QSS i ); D i = create_process(QSS i ); for j = 1, …, Indep_Tasks(A i ) { for j = 1, …, Indep_Tasks(A i ) { d ij = create_task(QSS i ); d ij = create_task(QSS i ); generate_task_code(d ij ); generate_task_code(d ij ); add_task(d ij, D i ); } add_task(d ij, D i ); } } } create_main(); create_main(); output “ for(i=0, i<length(RTS); i++) { ”; output “ for(i=0, i<length(RTS); i++) { ”; for k = 1, …, RTS output_code(D ik ); for k = 1, …, RTS output_code(D ik ); output “ } ”; output “ } ”; }

2001/11/2922 Optimal Code Hierarchy Main Program Process i Task 1Task 2Task k … TFCPN # Tasks = # Independent Source Transitions

2001/11/2923 Example S = {F 1, F 2 }

2001/11/2924 Conflict Free Components for F 1 v 12 = (t 11, t 13, t 15, t 15 ) 13   (v 12 )  26 Quasi-Static Scheduling v 11 = (t 11, t 12, t 11, t 12, t 14 ) 11   (v 11 )  22

2001/11/2925 Conflict Free Components for F 2 v 21 = (t 21, t 22, 2t 24, 4t 26, t 28, t 29, t 26 ) 31   (v 21 )  68 v 22 = (t 21, t 23, t 25, 2t 27, t 28, t 29, t 26 ) 15   (v 22 )  36 Quasi-Static Scheduling

2001/11/2926 Real-Time Scheduling TaskPriority iiii  max (  1 )  max (  2 ) T1T1T1T T2T2T2T SchedulableYesNo Algorithms RM, EDF  1 = {v 11, v 12 }  2 = {v 12, t 11 t 12 k  v 12 t 11 t 12 t 14, k  1}

CASE STUDY: AN ATM VIRTUAL PRIVATE NETWORK SERVER CLASSIFIER CONGESTION CONTROL (MSD) SUPERVISOR WFQ SCHEDULER ATM IN (155 Mbit/s) ATM OUT (155 Mbit/s) DISCARDED CELLS

2001/11/2928 ATM Server Example

2001/11/ MSD 1 CID 2 PTI 3 t1 4 READ_STATE_VCC 7 READ_OUT_QUID 10 t2 11 t3 t4 t5 12 t6 UPDATE_STATE_INIT READ_MAX_QLEN GTH 15 CHECK_QLENGTH1 18 t7 19 t6 UPDATE_STATE_INIT 12 READ_THRESHOLD 15 CHECK_QLENGTH2 18 t8 19 t10 t9 PU SH COMPUTE_OUT_TIME t12 *SCHEDULE _WFQ t10 t9 PU SH COMPUTE_OUT_TIME t12 *SCHEDULE _WFQ PU SH t11 UPDATE_STATE_REJ PU SH *SCHEDULE _WFQ COMPUTE_OUT_TIME t12 *SCHEDULE _WFQ COMPUTE_OUT_TIME t12 *SCHEDULE _WFQ UPDATE_STA TE_ACC t11 UPDATE_S TATE_REJ t6 UPDATE_STATE_INIT Schedule Results: 49 markings 14 schedules 63 instructions 12 Kbytes Memory

2001/11/ Schedules of MSD in ATM

2001/11/2931 Conclusions Software needs to be synthesized automatically because it is getting more and more complex! Software needs to be synthesized automatically because it is getting more and more complex! Hard RTES Synthesis Method = QSS + RTS + Code-Generation Hard RTES Synthesis Method = QSS + RTS + Code-Generation Soft RTES Synthesis Method = QSS + FIBS + Code-Generation Soft RTES Synthesis Method = QSS + FIBS + Code-Generation ATM VPN Server Example shows feasibility of our approach ATM VPN Server Example shows feasibility of our approach

2001/11/2932 Current and Future Work Integrate Time & Memory Scheduling Integrate Time & Memory Scheduling A general Petri Net system model A general Petri Net system model Java Implementation: install into embedded systems such as PDA for dynamic code change and management by user (web computing) Java Implementation: install into embedded systems such as PDA for dynamic code change and management by user (web computing) C Code Generation: for embedding into prototyping systems such as SoC design and verification platform C Code Generation: for embedding into prototyping systems such as SoC design and verification platform