Formal Synthesis and Code Generation of Embedded Real-Time Software Pao-Ann Hsiung National Chung Cheng University Chiayi-621, Taiwan, ROC. 9th ACM/IEEE.

Slides:



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

Hardware/ Software Partitioning 2011 年 12 月 09 日 Peter Marwedel TU Dortmund, Informatik 12 Germany Graphics: © Alexandra Nolte, Gesine Marwedel, 2003 These.
Courseware Scheduling of Distributed Real-Time Systems Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens.
Formal Methods for Real- Time Embedded Software Engineering 正規方法應用於即時嵌入式 軟體工程 熊博安 國立中正大學資訊工程學系 民國九十一年五月二十二日.
From HRT-HOOD to ADA95 Real-Time Systems Lecture 5 Copyright, 2001 © Adam Czajka.
Task Allocation and Scheduling n Problem: How to assign tasks to processors and to schedule them in such a way that deadlines are met n Our initial focus:
1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory Embedded Systems Exercise 2: Scheduling Real-Time Aperiodic Tasks.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Hardware/Software Codesign.
Introduction Designing cost-sensitive real-time control systems for safety-critical applications requires a careful analysis of the cost/fault-coverage.
Overview of PTIDES Project
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Efficient Software Performance Estimation Methods for Hardware/Software Codesign Kei Suzuki Alberto Sangiovanni-Vincentelli Present: Yanmei Li.
Architecture Modeling and Analysis for Embedded Systems Oleg Sokolsky CIS700 Fall 2005.
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,
1 HW/SW Partitioning Embedded Systems Design. 2 Hardware/Software Codesign “Exploration of the system design space formed by combinations of hardware.
Scheduling for Embedded Real-Time Systems Amit Mahajan and Haibo.
Investigating the Effect of Voltage- Switching on Low-Energy Task Scheduling in Hard Real-Time Systems Paper review Presented by Chung-Fu Kao.
A Schedulability-Preserving Transformation of BDF to Petri Nets Cong Liu EECS 290n Class Project December 10, 2004.
1 of 14 1/15 Schedulability Analysis and Optimization for the Synthesis of Multi-Cluster Distributed Embedded Systems Paul Pop, Petru Eles, Zebo Peng Embedded.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
1 Quasi-Static Scheduling of Embedded Software Using Free-Choice Petri Nets Marco Sgroi, Alberto Sangiovanni-Vincentelli Luciano Lavagno University of.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
Models of Computation for Embedded System Design Alvise Bonivento.
Utrecht, february 22, 2002 Applications of Tree Decompositions Stan van Hoesel KE-FdEWB Universiteit Maastricht
1 Oct 2, 2003 Design Optimization of Mixed Time/Event-Triggered Distributed Embedded Systems Traian Pop, Petru Eles, Zebo Peng Embedded Systems Laboratory.
System-Wide Energy Minimization for Real-Time Tasks: Lower Bound and Approximation Xiliang Zhong and Cheng-Zhong Xu Dept. of Electrical & Computer Engg.
Courseware Basics of Real-Time Scheduling Jan Madsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building.
EE 249, Fall Discussion: Scheduling Haibo Zeng Amit Mahajan.
Real-Time Systems – The big Picture
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
Lecture 37 CSE 331 Dec 1, A new grading proposal Towards your final score in the course MAX ( mid-term as 25%+ finals as 40%, finals as 65%) .
ECE Synthesis & Verification - LP Scheduling 1 ECE 667 ECE 667 Synthesis and Verification of Digital Circuits Scheduling Algorithms Analytical approach.
Misconceptions About Real-time Computing : A Serious Problem for Next-generation Systems J. A. Stankovic, Misconceptions about Real-Time Computing: A Serious.
Router modeling using Ptolemy Xuanming Dong and Amit Mahajan May 15, 2002 EE290N.
Universität Dortmund  P. Marwedel, Univ. Dortmund, Informatik 12, 2003 Hardware/software partitioning  Functionality to be implemented in software.
Scheduling for Dedicated Machine Constraint Using Integer Programming Huy Nguyen Anh Pham, Arthur Shr, and Peter P. Chen Louisiana State University, Baton.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Binghamton University EngiNet™ State University of New York
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 {
An efficient active replication scheme that tolerate failures in distributed embedded real-time systems Alain Girault, Hamoudi Kalla and Yves Sorel Pop.
Real-Time Embedded Software Synthesis 即時嵌入式軟體合成 熊博安國立中正大學資訊工程學系民國九十年十一月廿九日.
High Performance Embedded Computing © 2007 Elsevier Chapter 4, part 1: Processes and Operating Systems High Performance Embedded Computing Wayne Wolf.
Time-Memory Scheduling and Code Generation of Real-Time Embedded Software Chuen-Hau Gau and Pao-Ann Hsiung National Chung Cheng University Chiayi, Taiwan,
Scheduling policies for real- time embedded systems.
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.
BFair: An Optimal Scheduler for Periodic Real-Time Tasks
- 1 - EE898_HW/SW Partitioning Hardware/software partitioning  Functionality to be implemented in software or in hardware? No need to consider special.
1 Formal Synthesis and Control of Soft Embedded Real-Time Systems Pao-Ann Hsiung National Chung Cheng University Dept. of Computer Science and Information.
The Global Limited Preemptive Earliest Deadline First Feasibility of Sporadic Real-time Tasks Abhilash Thekkilakattil, Sanjoy Baruah, Radu Dobrin and Sasikumar.
NC STATE UNIVERSITY Center for Embedded Systems Research (CESR) Electrical & Computer Engineering North Carolina State University Ali El-Haj-Mahmoud and.
Automatic Synthesis and Code-Generation of Real- Time Embedded Software 即時嵌入式軟體之自動合成 及程式碼之產生 熊博安 國立中正大學資訊工程學系 民國九十一年四月二十六日.
6. A PPLICATION MAPPING 6.3 HW/SW partitioning 6.4 Mapping to heterogeneous multi-processors 1 6. Application mapping (part 2)
Safely Exploiting Multithreaded Processors to Tolerate Memory Latency
SE-3910 Real-time Systems Week 5, Class 2 – Lab turn-in page is up! – Use interrupts in a Linux/C environment – Scheduling – Watchdog follow-up Watchdog.
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.
CprE 458/558: Real-Time Systems (G. Manimaran)1 CprE 458/558: Real-Time Systems RMS and EDF Schedulers.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
High Performance Embedded Computing © 2007 Elsevier Chapter 7, part 3: Hardware/Software Co-Design High Performance Embedded Computing Wayne Wolf.
Chapter 3: Real-Time Scheduling and Schedulability Analysis Albert M. K. Cheng.
Branch and Bound Algorithms Present by Tina Yang Qianmei Feng.
A Fault-Tolerant Scheduling Algorithm for Real-Time Periodic Tasks with Possible Software Faults Ching-Chih Han, Kang G. Shin, and Jian Wu.
Real-Time Scheduling --- An Overview Real-Time Scheduling --- An Overview Xiaoping He.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Carnegie Mellon Lecture 8 Software Pipelining I. Introduction II. Problem Formulation III. Algorithm Reading: Chapter 10.5 – 10.6 M. LamCS243: Software.
Presented by: Suresh Vadlakonda Ramanjaneya Gupta Pasumarthi
Lecture 36 CSE 331 Nov 28, 2011.
Lecture 36 CSE 331 Nov 30, 2012.
Maximum flow problems II.
Thank you!!! Thanks to ACM Taipei Chapter Thanks to IICM
Presentation transcript:

Formal Synthesis and Code Generation of Embedded Real-Time Software Pao-Ann Hsiung National Chung Cheng University Chiayi-621, Taiwan, ROC. 9th ACM/IEEE International Symposium on Hardware- Software Codesign, Copenhagen, Denmark, April 25-27, 2001.

2 Contents  Embedded Real-Time Software  Model and Problem  Synthesis Algorithm  Code Generation  Example  Conclusions

3 Embedded Real-Time Software  Two Main Issues:  Real-Time Constraints  Bounded Memory Execution Quasi-Static Data Scheduling (QSDS) Dynamic Real-Time Scheduling (DRTS) Proposed Solutions

4 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.

5 Synthesis Problem  Given a set of TFCPNs, an upper-bound on memory use, and a set of real-time constraints, a software code is to be generated such that: 1) it can be executed on a single processor, 2) its memory usage does not exceed the upper bound, and 3) it satisfies all real-time constraints.

6 Synthesis Algorithm  ERTS_Synth(S, , E) {  // Quasi-Static Data Scheduling (QSDS)  for each A i in S {  B i = CF_generate (A i ); // B i: set of CF components  for each CF component A ij in B i {  QSS ij = quasi_static_schedule (A ij,  );  if QSS ij = NULL { print “QSDS failed for A ij ”; return QError;}  else QSS i = QSS i  {QSS ij } ; } }  // Dynamic Real-Time Scheduling (DRTS)  RTS = real_time_schedule (QSS 1,…,QSS n, B 1,…,B n, E );  if RTS = NULL {  print “DRTS failed for S”; return DRTS_Error; }  else generate_code (S, QSS 1,…, QSS n,RTS );  return Synthesized; }

7 Quasi-Static Data Scheduling TFCPN net decomposition Conflict-Free Components Finite Complete Cycle Deadlock-Free Quasi-Static Data Scheduled CF-Components

8 Dynamic Real-Time Scheduling  Single Processor  Rate-Monotonic Scheduling  Earliest Deadline First Scheduling  Worst Case Timing Analysis for each TFCPN

9 Code Generation  generate_code(S, QSS 1, QSS 2, …, QSS n, RTS) {  for i = 1, …, n {  D i = create_process(QSS i );  for j = 1, …, IFR(A i ) {  d ij = create_task(QSS i );  generate_task_code ( d ij );  add_task ( d ij, D i ); } }  create_main() ;  output “ for(i=0, i<length(RTS); i++) { ”;  for k = 1, …, RTS output_code ( D ik );  output “ } ”; } IFR(A i ): # transitions in A i with independent firing rates

10 Optimal Code Hierarchy Main Program Process i Task 1Task 2Task k … Source Transitions in TFCPN

11 Task Code Generation  generate_task_code(d ij ) {  output t 0 ; // t 0 : source transition  for each ICF sub-component d ijk in d ij {  for l = 1, …, u k {  if t l is visited continue;  if t l is a conflicting transition in T i {  if p = in_place(t l ) not visited  output “ switch(p){ ”;  else output “ break; ”;  output “ case t l : call t l ; ”;  for all p = out_place(t l )  output “ count(p’)+=F(t(l),p’); ”;  times_visited p ++; }

12 Task Code Generation (contd.)  if NumFire (t l ) < NumFire (t l-1 ) {  output “ if(count(p)>=F(p,t l ) {call t l ; ”;  output “ count(p)  =NumFire(t(l  1)); } ”; }  if NumFire (t l ) > NumFire (t l-1 ) {  output “ while(count(p)>=F(p,t l )){call t l ; ”;  for all p = in_place(t l )  output “ count(p)  =F(p, t l ); ”;  output “ } ”; }  if NumFire (t l ) = NumFire (t l-1 ) {  output “ count(p)  = F(p, t l ); call t l ”;  output “ count(p) += F(t l,p); ”; }  if times_visited p = num_choice (p)  output “ } ”; } } }

13 Example S = {F 1, F 2 }

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

15 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 Data Scheduling

16 Dynamic Real-Time Scheduling TaskPriority ii  max (  1 )  max (  2 ) T1T T2T SchedulableYesNo AlgorithmsRM, EDF  1 = {v 11, v 12 }  2 = {v 12, t 11 t 12 k  v 12 t 11 t 12 t 14, k  1}

17 ERTS Code for task 11  task 11 ( ) { // d 11 = {t 11, t 12, t 14, t 13, t 15 }  call t 11 ;  switch( p 1 ) {  case t 12 : call t 12 ; coun t(p 2 ) + = 1;  if(coun t(p 2 )  2)  { call t 14 ; coun t(p 2 )  = 2; }  break;  case t 13 : call t 13 ; coun t(p 3 ) += 2;  whil e(count(p 3 )  1)  { call t 15 ; coun t(p 3 )  =1; }  break; }  }

18 ERTS Code for task 21  task 21 ( ) { // d 21 = {t 21, t 22, t 24, t 26, t 23, t 25, t 27 }  call t 21 ;  switch( p 1 ) {  case t 22 : call t 22 ; coun t(p 2 ) += 2;  while(coun t(p 2 )  1) {  coun t(p 4 ) += 2; call t 24 ; coun t(p 2 )  =1;}  while(coun t(p 4 )  1) {  call t 26 ; coun t(p 4 )  =1;} break;  case t 23 :call t 23 ; coun t(p 3 ) += 1; coun t(p 3 )  =1;  call t 25 ; coun t(p 5 ) += 2; coun t(p 6 ) += 2;  whil e (coun t(p 5 )  1  coun t(p 6 )  1) {  call t 27 ; coun t(p 5 )  =1; coun t(p 6 )  =1; }  break; } }

19 ERTS Code for task 22 and main()  task 22 ( ) { // d 22 = {t 28, t 29, t 26 }  call t 28 ; call t 29 ; call t 26 ;  }  main( ) {  k 11 = k 21 = k 22 = 0 ;// iteration numbers  while true {  if(now()  11  k 11  100) { task 11 ( ); k 11 ++;}  if(now()  21  k 21  110) { task 21 ( ); k 21 ++;}  if(now()  22  k 22  110) { task 22 ( ); k 22 ++;} }  }

20 Conclusions  An algorithm proposed for synthesizing Embedded Real-Time Software  Bounded Memory Execution  Quasi-Static Data Scheduling  Real-Time Constraints  Dynamic Real-Time Scheduling  Code Generation  Optimal # of tasks  Future Work: Exception Handling, Verification, Theory on Separation of Concerns