c Cop yrigh t b y Ali Dasdan TIMING ANAL YSIS OF EMBEDDED REAL TIME SYSTEMS BY ALI D ASD AN B S Bogazici Univ ersit y M S Bilk en t Univ ersit y THESIS Submitted in partial ful llmen t of the requiremen ts for the degree of Do ctor of Philosoph y in Computer Science in the Graduate College of the Univ ersit y of Illinois at Urbana Champaign Urbana Illinois Abstract W e address the problem of timing constrain t deriv ation and v alidation for reactiv e and real time em b edded systems W e assume that suc h a system is structured in to its tasks and the structure is mo deled using a task graph Our solution uses the timing b eha v ior committed b y the en vironmen t to the system rst to deriv e the timing constrain ts on the system s in ternal b eha vior and then use them to deriv e and v alidate the timing constrain ts on the system s external b eha vior Our solution consists of the follo wing con tributions a generalized task graph mo del and a comprehensiv e classi cation of timing constrain ts algorithms for deriv ation and v alidation of timing constrain ts of the system mo deled in the generalized task graph mo del new and impro v ed al gorithms for nding the p erformance of cyclic em b edded systems and a comprehensiv e comparison of the existing algorithms a general form ulation of the problem of debug ging timing violations in cyclic em b edded systems and its complexit y and a co design metho dology that com bines the mo del and the algorithms and its implem en tation in a to ol called RADHA RA T AN The main adv an tages of our solution are that it simpli es the problem of ensuring timing correctness of the system b y reducing the complexit y of the problem from system lev el to task lev el and that it mak es the co design metho dology timing driv en in that our solution mak es it p ossible to main tain a handle on the system s timing correctness from v ery early stages in the system s design o w iii T o m y family iv Ac kno wledgmen ts I w ould lik e to thank all the p eople without whom this dissertation w ould not ha v e b een p ossible I am grateful to m y advisor Prof Ra jesh K Gupta for the guidance supp ort and freedom that he has giv en me o v er the last four y ears m y dissertation committe e mem b ers Prof Mic hael F aiman Prof Jane Liu and Prof Klara Nahrstedt for b eing in m y committee and giving me helpful commen ts Jane Bro c k Barbara Cicone Bonnie Ho w ard Julie Legg and Julie Misa for their administrativ e help at v arious p oin ts during m y graduate study Nese Aktan and Meh tap Basar for their help at m y original sp onsoring agency Prof Gul Agha and Prof Da v e Liu Prof Daniel Ga jski Prof Nikil Dutt and Prof Sandy Irani for their help and encouragemen t Sandy help ed me clarify man y ideas related to the cycle p erio d algorithms and debugging timing constrain t violations o v er man y discussions She also pro v ed the theorems and Dr Andrew Goldb erg and Dr Stephane Gaub ert for their motiv ation that led us to dev elop an impro v ed v ersion of Ho w ard s algorithm in Chapter Dr Anmol Math ur for his help when I started m y researc h in rate analysis v m y M S thesis advisor Prof Cevdet Ayk anat and Prof Kemal O azer for their help and supp ort I am esp ecially grateful to Prof O azer for his advice and encouragemen t Dr Andy Brotman and Dr Jagesh Sangha vi for their in terest in m y w ork and encouragemen t during m y in ternships at Conexan t Systems Inc I am happ y that I got a friend lik e Jagesh all m y friends for their help advice coun tless discussions b eing there when I needed them and basically b eing a friend I ha v e so man y friends that I am afraid that I ha v e not listed all of them b elo w If I forget an y of y ou please forgiv e me My friends are Ugur Akdemir Esra Akman Aydin Akseki Ahmet F eyzi A tes Matt Buc hanan T ev k Bultan T olga Capin P aco Lop ez Dekk er Coskun Demir Ja y Desouza Nihat Dincer Ioanna Doufexi Y akup Genc Recep Gul Sumit Gupta Hak an Hacigum us Ilk er Hamzaoglu Ismail Haritaoglu Orhan Kala yci Ulku Kan tarcioglu Galip Karagoz Ibrahim Karaman Gurhan Keskin Zek a yi Kilinc Ali Riza Ko c Sukru Ko cak a y a T ahsin Kurc Jian Li Bo y ana Nor ris Remzi Oten Murat Ozturk Alba P erez Dinesh Ramanathan Ra jesh Satapa th y Huseyin Simitci Izzet Sirin Diane Stev enson Rasim T an bug Egemen T ezcan Onder Uluy ol Alp er Y egin Da vut Yilmaz and Jason Zyc h The Scien ti c and T ec hnical Researc h Council TUBIT AK of T urk ey In terstate Electronics Corp oration and Design Automation Conference D A C for their nancial supp ort Hyun Ky oung Ko o for her lo v e and making me a happ y individual m y family for their lo v e patience and constan t and unconditional supp ort They ha v e made it all p ossible vi T able of Con ten ts Chapter P age In tro duction Thesis and Con tributions Timing Driv en Co design Metho dology Dissertation Ov erview F undamen tal Timing Issues System and Ev en ts System and Beha vior System and En vironmen t System and State Ev en ts and Timeline Ev en t T yp es Ev en t P atterns Ev en t Ordering T emp oral A tomicit y Sim ultaneit y and Precedence T emp oral and Causal Orders T emp oral Order Clo c ks Time In terv als Causal Order Ev en t Graphs AND and OR Causalit y Num b er of Orderings Clo c ks and Ordering Clo c ks and Timestamps Logical Clo c ks Ph ysical Clo c ks Clo c k Gran ularit y Timing Constrain ts vii Rate and P erio d Time Separation Rate and Separation Constrain ts Max Min and Linear Timing Constrain ts A Classi cation of Timing Constrain ts External Timing Constrain ts In ternal Timing Constrain ts Rate and Separation Problems Related W ork F undamen tal Concepts System Mo del Timing Constrain t Classi cation Time Separation Algorithms Summary Generalized T ask Graph Mo del System Sp eci cation Mo del System and Its Beha viors Information Pro cessing or Data Flo w Beha vior Con trol Flo w Beha vior Information Mo deling Beha vior Datapath and Con trol P ath Activ ation and Deactiv ation Finite State Mac hines Requiremen ts and Arc hitectural Mo dels T ask Graph and Its T asks and Channels T asks and Channels Data and Con trol Flo ws T ok ens Input v ersus Output Flexibilit y T ask In teractions Basic In teractions Additional In teractions Causalit y T ask T yp es T ask and Channel Prop erties T ask Prop erties Av erage P erio d Av erage Rate Input and Output Rates P erio d and Rate In terv als Channel Prop erties viii Bounding Start Time T ask Input Beha vior T ask Output Beha vior Hierarc h y Single rate v ersus Multi rate Related W ork Summary Timing Constrain t Deriv ation and V alidation Deriv ation and V alidation Problems The Case for Av erage Timing Constrain ts Related W ork Subtask Deadline Assignmen t Kao and Garcia Molina Data o w Design T o ol Jones Syn thesis of Real Time Signal Pro cessing Systems from Pro cessing Graphs Go ddard and Je a y Distributed Pip eline Sc heduling of Heterogeneous Real Time Sys tems Chatterjee and Strosnider Sync hronous and Dynamic Data Flo w Graphs Lee et al Calibration of In termediate T asks Gerb er et al Other Related W ork Summary Acyclic Rate Deriv ation and V alidation Rate Equation Rate Deriv ation Algorithm for One Input Rate Deriv ation Criteria Rate Deriv ation with Required Rates Both P and C are Unkno wn pc pc Case Both l RT and uRT are Unkno wn c c Case l RT is Kno wn but uRT is Unkno wn c c Case l RT is Unkno wn but uRT is Kno wn c c Case Both l RT and uRT are Kno wn c c P is Unkno wn but C is Kno wn pc pc Case Both l RT and uRT are Unkno wn c c Case l RT is Kno wn but uRT is Unkno wn c c Case l RT is Unkno wn but uRT is Kno wn c c Case Both l RT and uRT are Kno wn c c P is Kno wn but C is Unkno wn pc pc Case Both l RT and uRT are Unkno wn c c Case l RT is Kno wn but uRT is Unkno wn c c Case l RT is Unkno wn but uRT is Kno wn c c Case Both l RT and uRT are Kno wn c c ix Both P and C are Kno wn pc pc Case Both l RT and uRT are Unkno wn c c Case l RT is Kno wn but uRT is Unkno wn c c Case l RT is Unkno wn but uRT is Kno wn c c Case Both l RT and uRT are Kno wn c c Rate Deriv ation with Giv en Rates Both P and C are Unkno wn pc pc Case Both l D T and uD T are Unkno wn c c Case l D T is Kno wn but uD T is Unkno wn c c Case l D T is Unkno wn but uD T is Kno wn c c Case Both l D T and uD T are Kno wn c c P is Unkno wn but C is Kno wn pc pc Case Both l D T and uD T are Unkno wn c c Case l D T is Kno wn but uD T is Unkno wn c c Case l D T is Unkno wn but uD T is Kno wn c c Case Both l D T and uD T are Kno wn c c P is Kno wn but C is Unkno wn pc pc Case Both l D T and uD T are Unkno wn c c Case l D T is Kno wn but uD T is Unkno wn c c Case l D T is Unkno wn but uD T is Kno wn c c Case Both l D T and uD T are Kno wn c c Both P and C are Kno wn pc pc Case Both l D T and uD T are Unkno wn c c Case l D T is Kno wn but uD T is Unkno wn c c Case l D T is Unkno wn but uD T is Kno wn c c Case Both l D T and uD T are Kno wn c c Rate Deriv ation Algorithm for Man y Inputs An y T ask with No Inputs An y task with One Input An y T ask with Man y Inputs Unskipp ed T ask with Man y Inputs Skipp ed T ask with Man y Inputs Rate V alidation Algorithm Deriving Latency Bounds or Time Budgets Related W ork Summary Acyclic Separation Deriv ation and V alidation Minim um and Maxim um Time Separations Bounding Start Time Revisited Separation Deriv ation Algorithms Separation V alidation Algorithms Related W ork x Summary Cyclic Rate Deriv ation and V alidation Optim um Cycle Ratio Optim um Cycle Mean Linear Programming F orm and Criticalit y Critical Arcs and Criticalit y Criterion Critical No des and Graphs Cycle P erio d P erio dicit y of Cycle P erio d Computation of the Occurrence Index K Computation of the Occurrence P erio d P Optim um Cycle Ratio and Cycle P erio d Cyclic Rate Deriv ation Algorithms Cyclic Rate V alidation Algorithms Related W ork Summary Cycle P erio d Algorithms Bac kground Classi cation and Related W ork Burns Algorithm Karp s Algorithm and its V arian ts P arametric Shortest P ath Algorithms La wler s Algorithm Ho w ard s Algorithm Scaling Algorithms Exp erimen tal Comparison Results Summary Debugging Timing Violations Generalized Maxim um Mean Cycle Problem GMMCP Related Problems GMMCP without Cost Constrain ts GMMCP with Cost Constrain ts Complexit y of GMMCP More Problems Related to GMMCP Algorithms for GMMCP F uture W ork and Observ ations Summary xi Implem en tation and Applications Implem en tation Details The Dash b oard Con troller Example Timing driv en T ask Structuring Example T ask Structuring of the Dash b oard Con troller Initial T ask Structuring Stage Re ned T ask Structuring Stage Final T ask Structuring Stage Summary of T ask Structuring Timing driv en Hardw are Soft w are P artitioning Impro ving the EPP Approac h Impro ving the ILP Approac h Example P artitioning the Dash b oard Con troller Timing Sim ulation Timing Sim ulation Scenarios Related W ork Summary Case Studies Syn thetic Ap erture Radar Application Mobile Satellite Receiv er Application Directed Lo w F requency Analysis and Recording Acoustic Signals Appli cation Summary Conclusions and F uture W ork References App endix A Input and Output Files for RADHA RA T AN A RADHA RA T AN Input Sp eci cation Language A Input File for the Dash b oard Con troller A Output File for Rate Deriv ation of the Dash b oard Con troller Vita xii List of T ables T able P age Cases of rate deriv ation with required rates These cases are deriv ed based on the v alues tak en b y the required p erio ds l RT and uRT The term c c kno wn means that the corresp onding p erio d b ound is a nite n um b er sp eci ed in adv ance The case when the lo w er p erio d b ound equals is analyzed separately Cases of rate deriv ation with giv en rates These cases are deriv ed based on the v alues tak en b y the giv en p erio ds l D T and uD T The term kno wn c c means that the corresp onding p erio d b ound is a nite n um b er sp eci ed in adv ance Minim um mean cycle and minim um cycle ratio algorithms for a graph with n no des and m arcs W the max arc w eigh t T the total transit time of the graph xiii List of Figures Figure P age a An em b edded system with external constrain ts lab eled b The same system with in ternal constrain ts lab eled on tasks The exter nal constrain ts and are giv en and and are required The constrain ts and are rate constrain ts and are correlation constrain ts and are resp onse time constrain ts is an execution time constrain t and nally is an arbitrary separation constrain t The timing driv en hardw are soft w are co design metho dology using RADHA RA T AN The phases in the solid rectangles also exist in other co design metho dologies In fact most of the other co design metho dologies start with phase The RADHA RA T AN part with lab el is mainly for acyclic p ortions of the input task graph and the RADHA RA T AN part with lab el is mainly for its cyclic p ortions Three clusters of a large system The system in the middle whic h is em b edded in the large system is an em b edded system The system on the left is h uman and the one on the righ t is non h uman The en vironmen t of the system consists of b oth the h uman and non h uman systems that the system in terfaces Our de nition of the in teraction b et w een the system and its en vironmen t The system gets its stim uli or inputs from its en vironmen t through its sen sors and sends its resp onses or outputs bac k to the en vironmen t through its actuators Note that the system and its en vironmen t are in a cyclic in teraction xiv Ev en t patterns a P erio dic pattern with p erio d U b Irregular pattern with p erio d b et w een lo w er b ound L and upp er b ound U In eac h in terv al of length T this pattern has t w o p erio ds of U and one p erio d of L suc h that its a v erage p erio d o v er T is U L This pattern is a v erage regular with this a v erage p erio d c Irregular pattern with p erio d b et w een lo w er b ound L and upp er b ound U The n um b er of ev en ts during eac h in terv al of T is not constan t y et the b ounds are alw a ys satis ed d Burst y pattern with a burst size of and a burst in terv al of T There are ev en ts during eac h in terv al of T Assigning an o ccurrence time to ev en ts using a clo c k Before the assign men t only ev en ts d and h are sim ultaneous After the assignmen t the ev en ts b et w een t w o clo c k tic ks b ecome sim ultaneous with resp ect to the assignmen t This gure also depicts an in terv al b et w een ev en ts b and j Thirteen p ossible temp oral orderings b et w een t w o ev en ts A and B when their o ccurrence times are represen ted b y in terv als Note that the top six and b ottom six are symmetri c in that one can b e obtained from the other b y exc hanging A and B Rate lab el T and separation lab el S constrain ts The former is b e t w een the o ccurrences of the same ev en t whereas the latter is b et w een the o ccurrences of di eren t ev en ts Note that a separation constrain t can also mo del a rate constrain t Tw o ev en ts in an ev en t graph Ev en t i dep ends on ev en t j There are t w o time separations sp eci ed here one is a time separation of d b et w een the j i k th o ccurrences of i and j and another is a time separation of d b et w een ii t w o successiv e o ccurrences of i An ev en t graph with an ev en t i and its man y predecessors j The set of the predecessors of i is denoted b y P r ed The dela y b et w een the o ccurrence i times of ev en t i and its predecessor j is equal to d This dela y is assigned j i to the arc from j to i a An em b edded system with external constrain ts lab eled b The same system with in ternal constrain ts lab eled on tasks The exter nal constrain ts and are giv en and and are required The constrain ts and are rate constrain ts and are correlation constrain ts and are resp onse time constrain ts is an execution time constrain t and nally is an arbitrary separation constrain t Note that this gure is the same as Figure Three basic views of the system and the in teractions b et w een these views W e are in terested in t w o views on the left the information pro cessing and con trol b eha vior views The former view mo dels the datapath of the system whereas the latter view mo dels the con trol path of the system xv The datapath and con trol path of the system The datapath consists of the pro cess mo del and data inputs and outputs The con trol path consists of the con trol mo del and its inputs and outputs Note the mapping of the system s inputs and outputs as data and con trol inputs and outputs Prop erties p erio ds and rates of t w o tasks pro ducer p and consumer c and those tok en n um b ers as pro duce and consume n um b ers the c hannel p c b et w een them Hierarc h y in the generalized task graph mo del F or timing analysis w e regard t w o lev els as imp ortan t the top and b ottom lev els The b ottom lev el con tains the strongly connected p ortions of the task graph and the top lev el con tains a no de for ev ery suc h cyclic p ortion as w ell as no des in acyclic p ortions The a v erage b eha vior of a system that consists of only AND u tasks The p erio ds T corresp ond to a v erage p erio ds Eac h small ellipse in the diagrams on the righ t sho w one task execution a The a v erage b eha vior in the acyclic case The diagram on the righ t sho ws the task executions when task a starts its rst execution at time The system rep eats itself after time b The a v erage b eha vior in the cyclic case The diagram on the righ t sho ws the task executions when all the tasks start their rst execution at time The dashed arcs in the diagram denote enable signals The system rep eats itself after time A series parallel task task A The precedence relations b et w een the sub tasks of suc h a task are suc h that these relations can b e mo deled using a series parallel graph This graph con tains v e stages eac h of whic h can b e considered as a subtask in series Moreo v er some of these stages e g stages and con tain subtasks in parallel e g b c and d The task graph used b y Gerb er et al Prop erties p erio ds and rates of t w o tasks pro ducer p and consumer c and those tok en n um b ers as pro duce and consume n um b ers the c hannel p c b et w een them Rate deriv ation algorithm for a single arc Consumer c with t w o pro ducers p and q Note that eac h input c hannel of c has di eren t tok en n um b ers T ask c m ust b e resp onsiv e to b oth of its pro ducers Executions of c as p executes when c hannel p c has zero dela y Here T but T is set to and from top to b ottom The tok en n um b ers p c are equal to the task p erio ds as sho wn Eac h horizon tal line is the timeline The lab el Time refers to the tic ks on the timeline The lab els Before and After refer to the capacit y of c hannel p c b efore and after c starts its execution at the corresp onding tic k xvi T ok en deriv ation algorithm for a single arc when required p erio d b ounds are kno wn Rate deriv ation algorithm for a single arc when required p erio d b ounds are kno wn T ok en deriv ation algorithm for a single arc when giv en p erio d b ounds are kno wn Rate deriv ation algorithm for a single arc when giv en p erio d b ounds are kno wn Rate deriv ation algorithm for acyclic task graphs V alidating the input correlation requiremen t on a task The correlation constrain t on task k in a is transformed to a separation constrain t b et w een t w o dumm y tasks k and k These dumm y tasks are created as predecessors of task k Note that the dela ys of the input c hannels of task c are zero after the transformation Separation deriv ation algorithm for all task pairs and one task pair when the GTG G con tains only AND no des Separation deriv ation algorithm for all task pairs when the GTG G con tains b oth AND and OR no des i e b oth max and min constrain ts and linear constrain ts Algorithm to initialize table and algorithm to computing initial sepa ration b ounds for all task pairs These are in v ok ed in D S epAl l C ases A no de directed graph Of the t w o n um b ers giv en next to eac h arc the rst one is its w eigh t and the second one is its transit time a The graph G obtained from the graph G in Figure where G Of the t w o n um b ers giv en next to eac h arc the second one is its transit time of the arc and the rst one is its w eigh t less G b The graph of a after the addition of a source no de s and zero w eigh ted arcs from the source no de s to the other no des The v alues on the righ t side in b are the no de distances Rate deriv ation and v alidation algorithm for cyclic task graphs Dasdan Gupta s minim um mean cycle algorithm the DG algorithm An impro v ed v ersion of Ho w ard s minim um mean cycle algorithm The dash b oard con troller example T ask structuring for the dash b oard con troller in three stages lab eled a c The lab els for the p erio d in terv als are T for giv en RT for required and D T for deriv ed p erio d in terv als The SAR application The INMARSA T application The DIF AR application xvii Chapter In tro duction Em b edded systems ha v e widespread use in consumer industry commerc ial and military applications Their applications are no w p erv asiv e and gro wing rapidly These systems are usually con trolled b y micro con trollers The p erv asiv eness of these systems can b e estimated b y the total n um b er of micro con trollers shipp ed w orldwide According to the W orldwide Semiconductor T rade Statistics for the total n um b er of w orldwide mi cro con troller shipmen ts is around billion corresp onding to a total w orldwide rev en ue of billion Of the total n um b er of shipmen ts almost three quarters are and bit micro con trollers whic h are more commonly used in em b edded systems The estimates for indicate a large gro wth in the total n um b er of micro con troller shipmen ts F or example the n um b er of bit micro con trollers is estimated to reac h billion in The p erv asiv eness of em b edded systems can also b e estimated b y the n um b er of suc h systems that w e in teract ev ery da y These systems are part of our daily life as consumers F or instance ev en though consumers ma y b e una w are of the existence of em b edded sys tems in consumer pro ducts these systems can b e found in a wide range of consumer pro ducts suc h as automobiles to ys p ersonal computers and consumer electronic appli ances lik e TVs and o v ens An em b edded system the system is a comp onen t of a larger system In other w ords it is em b edded within the larger system F or example an automobile cruise con trol system is em b edded in an automobile The other comp onen ts in the larger system constitute the envir onment of the system e g the other parts of the automobile and the driv er The en vironmen t can con tain b oth h uman and non h uman systems The h uman systems are the op erators of the system e g the driv er of the automobile and the non h uman systems are the systems that are con trolled b y the system with the help of the op erators e g the automobile engine The system often op erates without h uman in terv en tion i e its en vironmen t is to a large exten t non h uman The system is t ypically r e active and r e al time in nature The system is reactiv e b ecause it con tin uously has to react to the stim uli coming from its en vironmen t The resp onse in reaction to an input stim ulus is usually state dep enden t in that the resp onse dep ends not only the stim ulus itself but also what has previously happ ened in the system The system is real time b ecause it has to p erform its in teraction with its en vironmen t under timing constrain ts In other w ords the system m ust pro cess stim uli coming from its en vironmen t within a giv en time frame The in teraction b et w een the system and its en vironmen t is referred to as the system s external b ehavior and the timing constrain ts on that b eha vior are referred to as the system s external timing c onstr aints The rst t w o phases of a t ypical em b edded system design o w are requiremen ts sp ec i cation and arc hitectural design The requiremen ts sp eci cation phase describ es what the system s external b eha vior m ust b e without describing ho w the system w orks in ter nally The latter is expressed in the arc hitectural design phase b y means of a task gr aph whic h describ es a functional decomp osition of the system in to manageable comp onen ts or tasks Since the system has man y activities o ccurring in parallel these tasks are usu ally concurren t Viewing them as b eing p oten tially concurren t ensures the maxim um exibilit y for the designers during esp ecially the early phases of the design o w The system s external timing constrain ts can b e classi ed in to t w o groups those on the system and those on the en vironmen t The former are called the r e quir e d timing c onstr aints or the timing r e quir ements b ecause the system is required to meet them whereas the latter are called the given timing c onstr aints b ecause the en vironmen t rather than the system is required to meet them i e they are committed to the system Ev ery em b edded system m ust satisfy its required functionalit y i e it m ust b e functionally correct Ev ery em b edded system m ust also satisfy its required timing i e it m ust b e temp orally correct As a matter of fact w e will sa y that the system is temp or al ly c orr e ct if it satis es its timing requiremen ts Unfortunately the problem of designing a temp orally correct system is a di cult one and the curren t approac h for this problem is ad ho c it is based on trial and error guided b y engineering exp erience Moreo v er the emphasis in this approac h is usually on designing a functionally correct system The temp oral correctness of the system is usually c hec k ed v ery late usually after the comp onen ts of the system are in tegrated and the functional correctness of the resulting system is ensured ev en though it is w ell kno wn that the ma jorit y of errors esp ecially soft w are errors are in tro duced during the requiremen ts sp eci cation phase The biggest dra wbac k of this approac h is that as the system in tegration phase comes v ery late in the design o w correcting an y timing problems detected at this phase is v ery exp ensiv e in terms of time and cost b ecause of the considerable amoun t of commitm en t that has already b een made It is estimated that correcting requiremen ts errors late can cost up to times as m uc h as correcting the same errors during the requiremen ts sp eci cation phase Therefore it is v ery crucial to tak e the timing asp ects of the system in to accoun t during the requiremen ts sp eci cation phase b ecause timing requiremen ts are among the requiremen ts of the system as w ell One imp ortan t observ ation here is that the designers on the one hand kno w that the system s required timing constrain ts are imp osed on the en tire system but during the early phases of the design o w the designers do not ha v e a grasp of the en tire system since the system is going to b e designed task b y task On the other hand the designers kno w that the temp oral correctness m ust b e tak en in to accoun t during the early phases in order to eliminate the dra wbac k of the curren t approac h that is men tioned ab o v e Th us the main issue is to ensure that the designers can main tain a handle on the system s temp oral correctness from v ery early phases on w ards ev en though they do not ha v e the en tire system ready An e ectiv e solution to this issue is to pro vide timing budgets on the system s tasks v ery early in the design o w in suc h a w a y that an y violation of these individual timing budgets will lead to a violation of the system s timing requiremen ts E ectiv eness of this solution comes from the fact that it not only helps in the pro cess of ensuring the system s temp oral correctness but it also helps reduce the complexit y of this pro cess from system lev el to task lev el This complexit y reduction in turn reduces the cost of the pro cess as w ell as the time to mark et the system W e will refer to these timing budgets as the system s internal timing c onstr aints Roughly sp eaking this dissertation is ab out the details of our prop osed solution and its e ectiv eness W e use Figure to illustrate the p oin ts made so far In a the system and its in teraction with its en vironmen t under external timing constrain ts are describ ed The constrain ts and are giv en timing constrain ts and the constrain ts and are required timing constrain ts In b the same system with its decomp osition in to tasks and its in ternal timing constrain ts are describ ed The decomp osition is mo deled using a task graph The external and in ternal timing constrain ts are either r ate constrain ts or sep ar ation constrain ts The rate of the system is its throughput so rate constrain ts are used to mo del the rate at whic h the system gets its stim uli lab eled b y the rate at whic h the system pro duces its resp onses lab eled b y or the rate at whic h a task 1 1 Sensors Actuators Sensors Actuators Task 2 3 2 7 8 3 11 10 9 4 5 4 5 Embedded System Embedded System 6 6 (a) (b) Figure a An em b edded system with external constrain ts lab eled b The same system with in ternal constrain ts lab eled on tasks The external constrain ts and are giv en and and are required The constrain ts and are rate constrain ts and are correlation constrain ts and are resp onse time constrain ts is an execution time constrain t and nally is an arbitrary separation constrain t executes lab eled b y Separation constrain ts on the other hand are used to mo del the distance b et w een t w o p oin ts in time commonly referred to as a time sep ar ation They are used to mo del resp onse time constrain ts lab eled b y and execution time constrain t lab eled b y and correlation constrain ts lab eled b y and More detailed discussion of timing constrain ts is giv en in Chapter Thesis and Con tributions In this dissertation w e prop ose a solution to the problems of deriving and v alidating the timing constrain ts of an em b edded system Our goal is t w ofold to deriv e the in ternal timing constrain ts of the system using its giv en external constrain ts and to deriv e its required external constrain ts using its deriv ed in ternal timing constrain ts W e p erform the deriv ation in terms of rate constrain ts in the sense that w e assume that w e only kno w the system s input rate constrain ts lab eled b y and w e use them to deriv e the rate of eac h task lab eled b y These deriv ed rate constrain ts together with the input separation constrain ts of the system lab eled b y are in turn used to nd separations b et w een task pairs In the end w e ha v e b een able to deriv e and v alidate ev ery t yp e of timing constrain t in the system under fairly general task in teraction seman tics Our thesis is that the timing asp ects of an em b edded system should b e tak en in to accoun t starting from the requiremen ts sp eci cation phase and that these asp ects can b e mo deled in terms of the problems of deriving and v alidating the timing constrain ts of the system This dissertation pro vides an e ectiv e and complete solution to these problems In general our approac h con tains con tributions in high lev el deriv ation v alidation and debugging of em b edded systems In particular our solution con tains the follo wing v e main con tributions Eac h con tribution represen ts a group of related con tributions W e prop ose a general task graph mo del called the gener alize d task gr aph GTG mo del and a comprehensiv e classi cation of timing constrain ts Our task graph mo del builds up on earlier task graph mo dels b y com bining and extending all those features of these earlier mo dels that are necessary for timing analysis Our mo del has b oth AND causalit y and OR causalit y b oth acyclic and cyclic task dep enden cies and b oth skipp ed and unskipp ed task b eha viors If a task is dep enden t on a set of other tasks AND and OR causalit y t yp es de ne the in teraction b et w een the task and those in the set Cyclic task dep endencies relate to the structure of the task graph W e can handle b oth acyclic and cyclic task graphs Finally skipp ed and unskipp ed b eha viors de ne whether or not a task has to consume all the input sen t to it This con tribution is do cumen ted in c hapters and W e prop ose algorithms to deriv e the system s in ternal timing constrain ts and v ali date its timing requiremen ts Since an y timing constrain t is either a rate constrain t or a separation constrain t w e prop ose new algorithms as w ell as adaptation of the existing algorithms in the literature to deriv e b oth rate and separation constrain ts W e prop ose algorithms for b oth acyclic and cyclic rate deriv ation as w ell as acyclic separation deriv ation W e next sho w ho w to use the deriv ed results to v alidate the system s timing requiremen ts This con tribution is do cumen ted in c hapters and W e should men tion that w e do not consider cyclic separation deriv ation in this dissertation b ecause our goal is to la y the foundations for the deriv ation idea and w e ha v e done it using acyclic and cyclic rate deriv ation and acyclic separation deriv ation Our results can b e extended to cyclic separation deriv ation but it has man y op en problems that ma y require another dissertation e g W e prop ose new and impro v ed algorithms to nd the cycle p erio d of a cyclic dis crete ev en t system and p erform their exp erimen tal and theoretical comparison The cyclic rate deriv ation in v olv es nding the cycle p erio d of the system if it is cyclic The cycle p erio d of a cyclic system is the metric used to c haracterize its p erformance its e cien t computation is critical to the p erformance analysis of suc h systems W e ha v e collected the cycle p erio d algorithms in the literature analyzed them and compared on exp erimen tal data to determine their practical p erformance In the pro cess not only ha v e w e disco v ered a n um b er of impro v e men ts to these algorithms but also w e ha v e created one of the fastest algorithms in theory and the fastest algorithm in practice This con tribution is do cumen ted in Chapter W e form ulate the problem of debugging timing violations in a cyclic system p erform its complexit y analysis and prop ose an appro ximation algorithm The problem arises when the system do es not satisfy its required cycle p erio d or its through put requiremen t W e generalize this problem and then pro v e that this problem is NP complete and that it includes man y other in teresting subproblems eac h of whic h is NP complete W e giv e an appro ximation algorithm for the problem This con tribution is do cumen ted in Chapter W e pro vide an implem en tati on of the deriv ation and v alidation algorithms in a to ol called RADHA RA T AN prop ose a timing driv en hardw are soft w are co design metho dology also called RADHA RA T AN based on this to ol and pro vide the application of the deriv ation and v alidation algorithms on other imp ortan t steps of this metho dology as w ell as on three case studies from the literature Some of these con tributions ha v e b een published in Timing Driv en Co design Metho dology Our solution is impleme n ted in a to ol called RADHA RA T AN and is giv en within the framew ork of a co design metho dology This to ol com bines RADHA and RA T AN This metho dology is illustrated using the design o w in Figure The steps handled b y RADHA RA T AN are iden ti ed in the gure b y dashed rectangles The steps and are similar to those in a traditional co design metho dology e g POLIS The use of RADHA RA T AN mak es this metho dology timing driv en Being timing driv en means taking the timing constrain ts of the system in to consideration at ev ery phase in the system s design o w but more imp ortan tly doing so during v ery early phases in the design o w suc h as the requiremen ts sp eci cation phase The design of the system up to task structuring t ypically pro ceeds as follo ws i The en vironmen tal mo del of the system is prepared The en vironmen tal mo del de nes the b oundary b et w een the system and the external en vironmen t b y means of iden tifying the system s sensors and actuators The en vironmen tal mo del is describ ed b y the system s con text diagram whic h roughly corresp onds to the diagram in Figure a ii The system is decomp osed in to a n um b er of subsystems under certain criteria This is usually p erformed if the system app ears to con tain fairly indep enden t subsystems iii The system is describ ed using a data o w con trol o w diagram This diagram corresp onds to further decomp osition of the system suc h that it con tains the en tities in the system as no des and their in teractions as arcs Since it is p ossible to classify these en tities as data and or con trol transformations and their in teractions as data and or con trol o ws the no des and arcs of this diagram corresp ond to suc h transformations and o ws resp ectiv ely The gran ularit y of eac h no de in the diagram is large in that a con trol no de con tains an en tire nite state mac hine and a data no de con tains an en tire data pro cess T o ensure maxim um exibilit y for the designers at the mo deling phase eac h no de is view ed as b eing p oten tially concurren t This view is also carried out to the later stages of the mo deling phase iv Eac h no de of this diagram can p oten tially b e cast in to a task but it is also p ossible to com bine a few of them in to one task Determining the tasks of the system is called task structuring The criteria for task structuring are w ell do cumen ted in The main concern in task structuring is to determine whic h no des of the data o w con trol o w diagram ma y run concurren tly and whic h ones ma y run sequen tially Those that ma y run concurren tly are structured in to separate tasks These criteria enable the designers mak e tradeo s b et w een in tro ducing tasks to simplify and clarify the design as w ell as not in tro ducing to o man y tasks whic h could mak e the system to o complex W e start our co design metho dology in Figure with task structuring Step as w e o er some help for it in Chapter After p erforming task structuring the design of the system using our co design metho d ology t ypically pro ceeds as follo ws In Step RADHA RA T AN is p erformed This step is explained in c hapters and In Step the system s tasks are written in a hardw are description language HDL or a programming language b oth at b eha vioral lev el This step actually corresp onds to the rst step in the existing co design metho dologies and in that resp ect RADHA RA T AN can pro vide timing budgets to enhance those metho d ologies In Step the tasks are also partitioned in to hardw are and soft w are tasks to determine their implem en tation platforms Some partitioning approac hes can b e found in and in the references therein The application of RADHA RA T AN to partitioning is discussed in Chapter In Step RADHA RA T AN is p erformed again b ecause w e no w kno w more ab out the dela ys within the system This step is explained in c hapters and In Step all the tasks are syn thesized in their resp ectiv e implem e n tation platforms together with the in terface b et w een these platforms This step is explained w ell in Finally Step is needed to p erform mo di cations on the system in case there are functional or temp oral constrain t violations This material in Chapter is related to this step This step sho ws that the metho dology is an iterativ e one as it should b e Dissertation Ov erview Chapter discusses the timing fundamen tals and serv es as a bac kground for the follo wing c hapters It rst presen ts the concepts related to the in teraction within the system as w ell as the one b et w een the system and its en vironmen t suc h as ev en ts and their ordering ei ther temp orally or causally Then it discusses the timing prop erties of these in teractions in terms of v arious timing constrain ts and de nes t w o fundamen tal problems related to these prop erties It nally giv es a comprehensiv e classi cation of timing constrain ts that are general enough to mo del ev ery high lev el timing constrain t in the system Chapter discusses our task graph mo del whic h called the Generalized T ask Graph GTG mo del During the early phases of an em b edded design o w or at phases where higher lev els of abstraction are considered the system tasks ha v e coarser gran ularit y As a result higher lev els of abstraction requires a task graph This c hapter presen ts the GTG mo del in terms of the lev el that it is used in the design cycle of the system as w ell as the prop erties and b eha vior of its tasks and their in teractions whic h are implem en te d using c hannels Chapter in tro duces the deriv ation and v alidation problems for the system discusses the reasons b ehind using a v erage rather than the w orst case v alues in the solution of these problems and reviews the related literature mainly on the idea of timing constrain t deriv ation Chapter presen ts rate deriv ation and v alidation algorithms for acyclic GTGs It in tro duces the rate equation that constitutes the basis for all the algorithms in this c hapter The rate deriv ation algorithm in v ok es other algorithms for sp ecial cases suc h as tasks with only one input c hannel tasks with man y input c hannels tasks with rate requiremen ts and tasks whose rates are kno wn This c hapter also presen ts an algorithm for eac h of these cases Chapter presen ts separation deriv ation and v alidation algorithms for acyclic GTGs These algorithms are used to deriv e b oth input and output correlation separation or resp onse time constrain ts and v alidate an y requiremen ts on them These constrain ts and requiremen ts can b e de ned on the system or on an y of the tasks in it Chapter presen ts rate deriv ation and v alidation algorithms for cyclic GTGs W e assume that the input GTG con tains either AND no des only or OR no des only The theory in this c hapter is presen ted in terms of a GTG with only AND tasks The theory for a GTG with only OR tasks is analogous Chapter presen ts a comprehensiv e classi cation of the fastest and the most common cycle p erio d algorithms W e also discuss some of these algorithms in terms of their essen tial prop erties and giv e the results of an exp erimen tal comparison of these algorithms Chapter presen ts the issues related to debugging timing violations in a cyclic system The main timing violation that w e consider happ ens when the system do es not satisfy its cycle p erio d requiremen t If this is the case w e try to nd di eren t c hoices with v arying p erformance and cost prop erties for eac h comp onen t of the system so that the system will satisfy its cycle p erio d requiremen t after these c hoices This c hapter also con tains NP completeness pro ofs Chapter rst presen ts the implem en tation details of the to ol RADHA RA T AN It then sho ws the use of our deriv ation and v alidation algorithms in t w o imp ortan t phases of the timing driv en co design metho dology sho wn in Figure These t w o phases are lab eled b y and in this gure and they are task structuring and hardw are soft w are partitioning phases After that this c hapter sho ws the use of our algorithms for timing sim ulation whic h pro vides a fast protot yping of the system at the requiremen ts sp ec i cation and arc hitectural design phase for sim ulation In these sections a dash b oard con troller from the literature is used as an example Chapter presen ts three case studies from the literature These examples mainly b elong to signal pro cessing applications Chapter presen ts our conclusions a short summary of our con tributions and future w ork 1 System decomposition into tasks (Task structuring) RADHA - RATAN Generalized Task Graph and External constraints 2 Rate/Period derivation Internal constraint derivation External constraint validation 6 Task internals design 3 HW/SW partitioning HW/SW delay estimation Refinement and/or redesign RADHA-RATAN 4 Rate/Period derivation Internal constraint derivation 5 HW/SW/Interface synthesis Figure The timing driv en hardw are soft w are co design metho dology using RADHA RA T AN The phases in the solid rectangles also exist in other co design metho dologies In fact most of the other co design metho dologies start with phase The RADHA RA T AN part with lab el is mainly for acyclic p ortions of the input task graph and the RADHA RA T AN part with lab el is mainly for its cyclic p ortions Chapter F undamen tal Timing Issues This c hapter discusses the timing fundamen tals and serv es as a bac kground for the fol lo wing c hapters It rst presen ts the concepts related to the in teraction within the system as w ell as the one b et w een the system and its en vironmen t suc h as ev en ts and their or dering either temp orally or causally Then it discusses the timing prop erties of these in teractions in terms of v arious timing constrain ts and de nes t w o fundamen tal prob lems related to these prop erties It nally giv es a comprehensiv e classi cation of timing constrain ts that are general enough to mo del ev ery high lev el timing constrain t in the system System and Ev en ts This section de nes a system and its b eha vior its en vironmen t and its state and ev en ts and their t yp es and their patterns System and Beha vior A system is something that exhibits b ehavior An ything can b e a system The concept of a system is hierarc hical in that a system usually consists of other systems that are lo w er in complexit y than itself These other systems are called the subsystems of the system eac h of whic h is regarded as a system Behavior is a set of activities that can b e de ned in terms of the manipulations of materials energy or information In this dissertation w e fo cus on em b edded systems and their timing b eha vior It should b e assumed that these em b edded systems are real time and computer based System and En vironmen t An em b edded system is a system that is part of a larger system i e it is em b edded within the larger system or in other w ords it is a subsystem of the larger system W e will refer to an em b edded system shortly as the system The larger system con tains three clusters as depicted in Figure the c omputational cluster the op er ator cluster and the c ontr ol le d obje ct cluster The computational cluster is the system itself and the other clusters constitute the envir onment of the system The op erator cluster and the con trolled ob ject cluster are simply referred to as the op erator and the con trolled ob ject The system in teracts with its en vironmen t through its interfac es as illustrated in Figure and Figure The in terface b et w een the system and the op erator is called the man machine interfac e and the one b et w een the system and the con trolled ob ject is called the instrumentation interfac e Both in terfaces con tain sensors and actuators with resp ect to the system As Figure sho ws the sensors of the system carry the stimuli or inputs in to the system from its en vironmen t and the actuators carry the r esp onses or outputs out of the system in to its en vironmen t Note that the sensors and actuators in Man-machine Instrumentation Interface Interface Embedded Operator System Controlled (The system) Object The environment Figure Three clusters of a large system The system in the middle whic h is em b ed ded in the large system is an em b edded system The system on the left is h uman and the one on the righ t is non h uman The en vironmen t of the system consists of b oth the h uman and non h uman systems that the system in terfaces the man mac hine in terface consist of suc h input devices as k eyb oards and suc h output devices as displa ys resp ectiv ely System and State The state of the system at some time t is the information required at t suc h that all the outputs of the system at some later time t t are uniquely determined from this information and from the inputs of the system at t The state of the system de nes the system s b eha vior at v arious p oin ts in time i e ho w the system will resp ond to its inputs at these times The state of the en vironmen t is de ned similarly In the sequel w e de ne all the concepts from the system s p oin t of view these concepts ha v e similar de nitions from the en vironmen t s p oin t of view b ecause the en vironmen t is also a system The state of the system consists of a collection of the pr op erties of the system An y prop ert y of a state is called a state variable Di eren t state v ariables are signi can t at di eren t times In addition w e are usually not in terested in all the state v ariables Sensors Actuators The system Responses Stimuli The environment Figure Our de nition of the in teraction b et w een the system and its en vironmen t The system gets its stim uli or inputs from its en vironmen t through its sensors and sends its resp onses or outputs bac k to the en vironmen t through its actuators Note that the system and its en vironmen t are in a cyclic in teraction A signi can t state v ariable is an entity F or example in an automobile cruise con trol system the sp eed of the automobile is an en tit y Ev ery en tit y is in the sphere of con trol of a subsystem of the system An en tit y can b e mo di ed only within its sphere of con trol outside its sphere of con trol it can only b e observ ed F or example the sp eed of the car is in the sphere of con trol of the car outside the car its sp eed can only b e observ ed The rst functional requiremen t of the system is the observation of the en tities in its en vironmen t These observ ations are represen ted in the system b y their images Ev en ts and Timeline The term ev en t is a primitiv e concept lik e the term system Nev ertheless w e can sa y that an event is an o c curr enc e that happ ens at an instan t of time It is a state c hange or a cut along the timeline The timeline extends from the past in to the future Since an observ ation is also an ev en t ev en ts are observ ed through their consequences or state c hanges An observ ation can con tain the state of an en tit y e g its v alue at an instan t or di erence b et w een the old and new states i e the di erence b et w een the old and new v alues It is also p ossible that the v alue of an en tit y is observ ed indirectly Ev en t T yp es Ev en ts can result from the in teractions b et w een the system and its en vironmen t These ev en ts are called external events Some example external ev en ts are a k ey depression from a console an emergency p o w er failure noti cation a message from another computer the detection of a target in a radar system and the arriv al of sensor data to b e pro cessed Ev en ts can also result from the in teractions within the system i e due to the in teractions b et w een the tasks of the system These ev en ts are called internal events An example in ternal ev en t happ ens when a trac king algorithm predicts a collision of aircraft and activ ates other soft w are to deal with the prediction In addition to external and in ternal ev en ts there are time d events These ev en ts result from the passage of time An example timed ev en t happ ens in con trolling the temp erature of a reactor This con trol ma y require that the temp erature b e sensed ev ery ms Th us ms after the previous temp erature reading a timed ev en t triggers the next reading Ev en t P atterns Ev en ts can o ccur rep eatedly W e refer to the recurrence of ev en ts as an event se quenc e An ev en t sequence can ha v e a p attern The arriv al pattern is the ev en t s pattern of o ccurrence as a function of time Arriv al patterns can b e one of the follo wing v e b ounded irregular p erio dic burst y and un b ounded An arriv al pattern also lab els the sequence and ev en ts it c haracterizes e g a p erio dic arriv al pattern con tains p erio dic ev en ts These patterns are illustrated in Figure In a b ounde d p attern ev en ts o ccur with p erio d T apart where T is a time in ter v al Because of the ph ysics of the situation requiremen t s of the system hardw are constrain ts or soft w are design T is alw a ys b ounded from b elo w it can also b e b ounded from ab o v e as in the case of irregular and p erio dic patterns In an irr e gular p attern ev en ts are b ounded ev en ts with p erio d T where T is b ounded from b oth b elo w and ab o v e F or irregular ev en ts T is di eren t for eac h arriv al but kno wn in adv ance b y its b ounds In a p erio dic p attern ev en ts are irregular ev en ts with p erio d T where T is constan t F or p erio dic ev en ts a small random deviation in T e g T is allo w ed An imp ortan t p oin t to note here is that the presence of a p erio d for an ev en t do es not imply that the ev en t has a constan t p erio d The p erio d of an ev en t is the same as its inter o c curr enc e time the time b et w een t w o successiv e o ccurrences of the ev en t In a bursty p attern the next ev en t can o ccur arbitrarily close to a previous ev en t but the n um b er of ev en ts o v er a sp eci ed p erio d of time is restricted Burst y arriv al patterns are c haracterized b y an ev en t densit y consisting of a burst in terv al and a burst size The burst in terv al of a sequence can con tain at most as man y ev en ts as the burst size An example is that a transaction manager ma y b e required to pro cess up to transactions within an y second p erio d these transactions arriv e in a burst y pattern b ecause all can o ccur at one time or they can b e spread out In an unb ounde d p attern successiv e ev en ts are arbitrarily close in time and the arriv als are neither b ounded nor burst y Suc h patterns can only b e describ ed sta tistically so they are c haracterized with a distribution function U (a) Timeline L U (b) Timeline L U (c) Timeline (d) Timeline T T T Figure Ev en t patterns a P erio dic pattern with p erio d U b Irregular pattern with p erio d b et w een lo w er b ound L and upp er b ound U In eac h in terv al of length T this pattern has t w o p erio ds of U and one p erio d of L suc h that its a v erage p erio d o v er T is U L This pattern is a v erage regular with this a v erage p erio d c Irregular pattern with p erio d b et w een lo w er b ound L and upp er b ound U The n um b er of ev en ts during eac h in terv al of T is not constan t y et the b ounds are alw a ys satis ed d Burst y pattern with a burst size of and a burst in terv al of T There are ev en ts during eac h in terv al of T In the ab o v e classi cation of the ev en t patterns it is easy to see that the p erio dic pattern is a sp ecial case of the irregular pattern and the irregular pattern is a sp ecial case of the b ounded pattern Based on this observ ation the ev en t patterns can also b e classi ed as the follo wing three patterns b ounded burst y and un b ounded Our fo cus is on the rst t w o ev en t patterns In this dissertation w e consider the b ounded irregular p erio dic and burst y patterns for the ev en ts that are input to the system i e the external ev en ts As for the in ternal ev en ts w e consider an ev en t pattern that is similar to the burst y pattern Our ev en t pattern uses a v erage p erio ds in the sense that a v erage p erio d of ev en ts o v er a constan t in terv al of time is b ounded from b elo w and ab o v e This in terv al is referred to as the r e curr enc e interval W e call this pattern as aver age r e gular p attern b ecause it is regular on the a v erage sense In Figure the ev en t pattern in b corresp onds to the a v erage regular pattern The a v erage p erio d here is not computed in the probabilistic sense it is the arithmetic a v erage of all the p erio ds o v er the giv en constan t in terv al of time The a v erage regular pattern readily mo dels the burst y pattern and p erio dic pattern b ecause the recurrence in terv al is the burst in terv al in the burst y pattern and is the p erio d in the p erio dic pattern The a v erage regular pattern also mo dels the b ounded and irregular patterns if w e assume that w e can b ound the a v erage p erio d o v er the recurrence in terv al As w e discuss in Chapter this assumption is w ell grounded b ecause it is usually dictated b y the seman tics of ev en t in teractions within the system Ev en t Ordering This section discusses time divisibilit y sim ultaneit y and precedence as fundamen tal or dering relations and temp oral and causal orders as fundamen tal orderings T emp oral A tomicit y Time has one dimension and w e represen t it b y a directed line called the timeline The timeline extends from the past in to the future Eac h ev en t o ccurs at an instant along the timeline Time along the timeline is divisible in to instan ts y et there is a limit to divisibilit y of time whic h is referred to as the temp or al atomicity T emp oral atomicit y means that there are minim al pro cesses in nature no pro cess o ccurring in less than some shortest unit of time the chr onon In realit y w e use an idealization of temp oral atomicit y in whic h w e assume the temp oral con tin uum of instan ts i e the timeline con tains of an in nite n um b er of instan ts Sim ultaneit y and Precedence Ordering of ev en ts has to do with t w o fundamen tal relations simultaneity and pr e c e denc e In resp ect to these relations an y ev en t is judged to b e either sim ultaneous with an y other ev en t or else either earlier than or later than an y other ev en t Tw o ev en ts whic h are co presen t for some time no matter ho w short compared with their resp ectiv e durations are said to b e simultane ous or to o v erlap Hence if one ev en t do es not o v erlap the other one m ust precede the other An instant is de ned as a set of all the ev en ts that are pairwise sim ultaneous T emp oral and Causal Orders W e next discuss t w o fundamen tal ordering relations for ev en ts temp or al or der and c ausal or der The former is deriv ed b y the o ccurrence times of ev en ts as assigned b y a clo c k whereas the latter is deriv ed b y the dep endencies b et w een ev en ts Roughly sp eaking the former is deriv ed b y asking the question Whic h ev en t happ ened rst whereas the latter is deriv ed b y asking the question Whic h ev en t caused what others T emp oral Order An ev en t is said to b e at an instan t when it is a mem b er of the set de ning that instan t T emp or al or der of t w o instan ts is then de ned b y stipulating that one is earlier than another if there is some ev en t at the former instan t whic h is earlier than some ev en t at the latter instan t If neither instan t is earlier than the other then they are sim ultaneous This ordering relation de nes a total order of the instan ts y et it de nes a partial order of the ev en ts con tained in the instan ts b ecause the ev en ts at an instan t are not ordered Ev en ts can b e totally ordered b y imp osing another criterion on them F or instance ev en ts d and h in Figure are not ordered b ecause they b oth o ccur at instan t t i e they are sim ultaneous Ho w ev er using their alphab etic order as an ordering criterion w e can order these t w o ev en ts suc h that d is earlier than h Clo c ks Instan ts or ev en ts can b e mapp ed to the timeline using a clo c k In other w ords clo c ks can b e used to assign an o c curr enc e time to the instan ts along the timeline This assign men t is illustrated in Figure F or example ev en ts a b and c ha v e an o ccurrence time of t in this gure i e they are sim ultaneous with resp ect to their assigned o ccurrence times A clo ck is a mec hanism that if set at an y giv en instan t will strik e at a unique later instan t F or instance the instan ts t t and t are the p oin ts along the timeline that the clo c k tic ks or strik es The c hain of instan ts of striking constructed with the help of a giv en clo c k is referred to as the temp or al chain or chain of instan ts of the clo c k The temp oral c hain from a clo c k that is set at an y giv en instan t t co v ers all the instan ts along the timeline that follo w t in the sense that an y other instan t is either an instan t of the c hain or else is b et w een an y t w o successiv e instan ts of the c hain F or instance ev en t a in Figure is an instan t of the temp oral c hain so are ev en ts d f and h The other ev en ts can b e mapp ed b et w een t w o instan ts of the temp oral c hain e g ev en ts b and c are b et w een instan ts t and t of the temp oral c hain It is imp ortan t to note that neither the ev en ts at an instan t of the c hain nor the ev en ts b et w een t w o instan ts of the c hain are ordered among themselv es F or example ev en ts d and h are not ordered neither are ev en ts b and c Clock instants (or ticks) t t+1 t+2 Timeline a b c d e f Timeline g h i j Timeline Events Interval Figure Assigning an o ccurrence time to ev en ts using a clo c k Before the assignmen t only ev en ts d and h are sim ultaneous After the assignmen t the ev en ts b et w een t w o clo c k tic ks b ecome sim ultaneous with resp ect to the assignmen t This gure also depicts an in terv al b et w een ev en ts b and j Time In terv als An interval is de ned as the set of all the instan ts whic h either are preceded b y a giv en instan t or precede a giv en instan t or b oth Th us an in terv al is from a start instan t to an end instan t If the instan ts ha v e their o ccurrence times the dur ation of an in terv al is equal to the di erence b et w een the o ccurrence time of the end instan t and that of the start instan t Since it is p ossible to iden tify an instan t b y one of its mem b er ev en ts w e can also measure the duration of an in terv al using a start ev en t and an end ev en t Figure also depicts an in terv al whic h is from start ev en t b to end ev en t j the duration of this in terv al is equal to one clo c k tic k since the di erence b et w een the o ccurrence times of these t w o ev en ts is equal to one clo c k tic k Causal Order T emp oral order is a fundamen tal ordering mec hanism for ev en ts Another fundamen tal one is c ausal or der If one ev en t p can cause another ev en t q p is earlier than q Sim ul taneit y means the exclusion of causal connection Causal order helps determine whic h ev en t happ ens b efore what others and th us implies temp oral order but temp oral order do es not necessarily imply causal order This creates the impression that causal order is more fundamen tal than temp oral order y et the opp osite of this impression has more supp ort W e will regard b oth orders as fundamen tal to ev en t ordering Instead of sa ying that ev en t p causes ev en t q w e can also sa y that p a ects q p activ ates q for ring p enables q p mak es q eligible to re or o ccur or q dep ends on p for activ ation or o ccurrence Eac h of these v erbs is used b y v arious mo dels to denote causal order W e will use them in terc hangeably Ev en t Graphs T emp oral and causal orders b et w een the ev en ts in the system can b e used to mo del these ev en ts using a directed graph called the event gr aph in whic h the no des corresp ond to the ev en ts and the arcs to the orders b et w een the ev en ts An ev en t in suc h a graph dep ends on its predecessors in temp oral order or causal order or b oth A simple ev en t graph with t w o ev en ts is giv en in Figure This ev en t graph will b e explained in more detail in x AND and OR Causalit y When an ev en t gets caused b y an enough n um b er of its predecessors in the ev en t graph these predecessors are said to enable that ev en t or that ev en t b ecomes eligible for o ccur rence An ev en t can need zero one some more than one or all of its predecessor s to get enabled Then the ev en t is resp ectiv ely called an input event OR event AND OR event or AND event An OR ev en t uses OR causal order or OR c ausality and an AND ev en t uses AND causal order or AND c ausality These t w o causalit y t yp es are the fun damen tal ones for causal order b ecause AND OR ev en ts can easily b e sho wn to use a com bination of them Because of this w e assume that the ev en t graph con tains either AND or OR ev en ts or b oth Num b er of Orderings If w e asso ciate an instan t or a p oin t with the o ccurrence time of an ev en t along the timeline there are three p ossible relations b et w een an y t w o ev en ts A and B A is sim ul taneous with B A is earlier than B and A is later than B Note here that sim ultaneit y is symmetri c whereas precedence is not Sometimes w e do not kno w or care ab out the order b et w een suc h t w o ev en ts Then there are relations b et w een these ev en ts eac h of whic h is a disjunction of the ab o v e three basic ones If w e asso ciate an in terv al with the o ccurrence time of an ev en t along the timeline there are thirteen p ossible relations b et w een an y t w o ev en ts A and B as sho wn in Figure As in the p oin t based case if w e do not kno w or care ab out the exact order b et w een t w o ev en ts then there are a total of relations b et w een an y t w o ev en ts eac h of whic h is a disjunction of the ab o v e three basic ones Clo c ks and Ordering It is imp ortan t to order the ev en ts in the system With resp ect to sim ultaneit y and precedence w e can ha v e a partial order or total order of a giv en set of ev en ts A partial B A before B A meets B A overlaps B A finished by B A contains B A starts B A equals B A started by B A during B A finishes B A overlapped by B A met by B A after B Figure Thirteen p ossible temp oral orderings b et w een t w o ev en ts A and B when their o ccurrence times are represen ted b y in terv als Note that the top six and b ottom six are symmetric in that one can b e obtained from the other b y exc hanging A and B order of these ev en ts ma y include sim ultaneous ev en ts whereas their total order do es not their total order requires that ev ery pair of ev en ts b e ordered Clo c ks and Timestamps Ev en ts can b e partially or totally ordered if their o ccurrence times are kno wn Their o ccurrence times can b e assigned b y a lo gic al clo ck or physic al clo ck As a matter of fact a clo c k assigns a timestamp for an ev en t whic h is regarded as the o ccurrence time of that ev en t with resp ect to this clo c k Logical Clo c ks T o order a giv en set of ev en ts a logical clo c k tries to infer the causal order b et w een these ev en ts If ev en t A causes ev en t B then a logical clo c k m ust assign a smaller timestamp to A than to B A logical clo c k can determine a partial order or total order for a giv en set of ev en ts A detailed discussion of logical clo c ks can b e found in Ph ysical Clo c ks T o order a giv en set of ev en ts a ph ysical clo c k tries to infer the temp oral order b et w een these ev en ts If ev en t A happ ens b et w een tic k t inclusiv e and tic k t exclusiv e of a ph ysical clo c k then A gets the timestamp of t Note that a ph ysical clo c k ma y not ensure a total order of a set of ev en ts unless it has a w a y of ordering sim ultaneous ev en ts A detailed discussion of ph ysical clo c ks can b e found in Clo c k Gran ularit y Here are a few de nitions that w e used ab o v e and will need later A tick of a ph ysical clo c k is a p erio dic and in ternal ev en t generated b y the clo c k The duration b et w een t w o consecutiv e tic ks of a clo c k is its gr anularity The gran ularit y of a clo c k is measured b y a r efer enc e clo ck A reference clo c k can observ e all the ev en ts that are of in terest in a giv en con text A reference clo c k is in p erfect agreemen t with the in ternational standard of time It is usually assumed that the gran ularit y of a reference clo c k is smaller than the gran ularit y of the clo c k that it tries to measure Timing Constrain ts A timing c onstr aint is an in terv al on the timeline hence it is b et w een t w o ev en t o ccur rences If these o ccurrences b elong to the same ev en t w e refer to the timing constrain t as a r ate c onstr aint If these o ccurrences b elong to di eren t ev en ts w e refer to the tim ing constrain t as a sep ar ation c onstr aint Figure illustrates rate with lab el T and separation with lab el S constrain ts Rate and P erio d The duration b et w een successiv e o ccurrences of a rep etitiv e ev en t is called its p erio d It is also referred to as inter o c curr enc e time The n um b er of o ccurrences of the ev en t p er unit time its frequency is referred to as its r ate The rate of the ev en t can b e found b y taking the recipro cal of its p erio d Because of this close relationship b et w een rate and p erio d w e will sometimes use these t w o prop erties in terc hangeably F or instance in Figure T actually giv es the p erio d of ev en t A so that its rate is T ho w ev er w e will still refer to this timing constrain t as a rate constrain t Time Separation Regardless of the fact that a timing constrain t is a rate or separation constrain t a timing constrain t is essen tially a separation in time or time sep ar ation b et w een t w o o ccurrence times Without loss of generalit y w e use an in terv al of nonnegativ e in tegers for the duration of eac h timing constrain t The lo w er b ound of suc h an in terv al can b e zero or larger and its upp er b ound can b e in nit y or lo w er T Occurences of event A S Occurences of event B Timeline Figure Rate lab el T and separation lab el S constrain ts The former is b et w een the o ccurrences of the same ev en t whereas the latter is b et w een the o ccurrences of di eren t ev en ts Note that a separation constrain t can also mo del a rate constrain t Rate and Separation Constrain ts W e can no w de ne rate and separation constrain ts more formally Supp ose w e ha v e a timing constrain t in terv al l D uD where D stands for dela y and l and u for lo w er b ound and upp er b ound resp ectiv ely Let t k denote the k th o ccurrence time of i ev en t i where k The rst o ccurrence time t is sometimes called the initial i o ccurrence time Consider t w o ev en ts i and j The timing constrain t l D t k t K uD i j means that the time separation b et w een the K th o ccurrence of ev en t j and the k th o ccurrence of ev en t i is b ounded from b elo w b y l D and from upp er b y uD Then the time constrain t l D t k t K uD i j is a rate constrain t if i j and k K where k is usually large and the timing constrain t l D t k t K uD i j is a separation constrain t if i j and usually k K Note that a rate constrain t can easily b e considered as a sp ecial case of a separation constrain t In the next c hapter w e will de ne a rate constrain t in the a v erage sense using the concept of an a v erage regular pattern This de nition is more suitable for our purp oses Max Min and Linear Timing Constrain ts Since eac h timing constrain t is b et w een a pair of ev en ts eac h timing constrain t can b e mapp ed to an arc of the ev en t graph The duration of the timing constrain t b ecomes the delay of the arc that it is mapp ed to Arcs b et w een di eren t ev en ts represen t separation constrain ts and arcs on the same ev en t i e self lo ops in the ev en t graph represen t rate constrain ts Figure illustrates this mapping for t w o ev en ts i and j The arc from j to i represen ts the separation constrain t t k t k d and the self lo op on i represen ts i j j i the rate constrain t t k t k d i i ii It should b e observ ed that although eac h arc de nes a binary timing constrain t in the ev en t graph temp oral and causal orders can easily de ne a timing constrain t b et w een more than t w o ev en ts e g b et w een one ev en t and its p oten tially man y predecessors In particular temp oral order b et w een one ev en t and its predecessors de nes a line ar timing c onstr aint and causal order b et w een them de nes a max timing c onstr aint or min timing c onstr aint dep ending on whether the ev en t is an AND ev en t or OR ev en t resp ectiv ely Note that the term max stands for maxim um and the term min stands for minim um The max and min timing constrain ts are sometimes called the latest and e arliest timing constrain ts resp ectiv ely Let j denote a predecessor ev en t of ev en t i Denote b y d the dela y b et w een the k th j i o ccurrence times of ev en ts i and j for ev ery k Let t k denote the k th o ccurrence i time of ev en t i Since w e will asso ciate the k th o ccurrence times of b oth ev en ts i and j dji dii j i t (k) t (k+1) j j Timeline dji dji Timeline dii t (k) t (k+1) i i Figure Tw o ev en ts in an ev en t graph Ev en t i dep ends on ev en t j There are t w o time separations sp eci ed here one is a time separation of d b et w een the k th j i o ccurrences of i and j and another is a time separation of d b et w een t w o successiv e ii o ccurrences of i w e will use t instead of t k since k is insigni can t here In other w ords one o ccurrence i i of ev en t i corresp onds to one o ccurrence of ev en t j or the k th o ccurrence of ev en t i corresp onds to the k th o ccurrence of ev en t j for an y k This asso ciation is required b y the seman tics of the ev en t graph Then if w e ha v e t max ft d g i j j i j P r ed i where P r ed denotes the set of the predecessor ev en ts of ev en t i that cause i then ev en t i i is an AND ev en t Similarly if w e ha v e t min ft d g i j j i j O Rpr ed i where P r ed is de ned ab o v e then ev en t i is an OR ev en t If ev en t i is an AND ev en t i or an OR ev en t that is temp orally dep enden t on its predecessors j then w e ha v e t t d j P r ed i j j i i dji j i Predi Figure An ev en t graph with an ev en t i and its man y predecessors j The set of the predecessors of i is denoted b y P r ed The dela y b et w een the o ccurrence times of ev en t i i and its predecessor j is equal to d This dela y is assigned to the arc from j to i j i where P r ed denotes those predecessors that are earlier than ev en t i but do not cause it i In the ab o v e de nitions the con v erse of eac h de nition also holds in the sense that if ev en t i is an AND ev en t its o ccurrence time has to satisfy the corresp onding equation On the other hand in the most general case ev en t i can ha v e some predecessors for AND causalit y some for OR causalit y and some for temp oral order In that case for eac h causalit y order and temp oral order the corresp onding predecessors m ust b e used in the equations ab o v e F or instance Equation can b e written in terms of AN D P r ed i whic h is the set of the predecessors of ev en t i that i dep ends on using AND causalit y Since it is di cult to restrict the dela y d to a single n um b er due to uncertain t y w e j i use an in terv al suc h that d l D uD Here the lo w er b ound can b e zero and the j i j i j i upp er b ound can b e in nit y ev en though w e ha v e abused the notation b y using a closed in terv al This notational con v enience will b e used for ev ery in terv al in the sequel No w using this dela y in terv al w e can rewrite the ab o v e equalities in terms of the lo w er and upp er b ounds of the dela y in terv al This will turn the ab o v e equalities in to inequalities Also b y di eren tiating b et w een the predecessors w e ha v e the follo wing inequalities Equation b ecomes max ft l D g t max ft uD g j j i i j j i j AN D pr ed j AN D pr ed i i Equation b ecomes min ft l D g t min ft uD g j j i i j j i j O Rpr ed j O Rpr ed i i and nally Equation b ecomes max ft l D g t min ft uD g j j i i j j i j LinP r ed j LinP r ed i i where eac h causal or temp oral order is imp osed b y the corresp onding predecessors hence the di eren t predecessor set names suc h as AN D pr ed Note that the left and righ t sides of the ab o v e three equations use the follo wing com binations of max and min op erations max max min min and max min There is one more com bination i e min max whic h is not used in either causal or temp oral order A Classi cation of Timing Constrain ts Consider the system and its decomp osition in to its tasks The next c hapter is dev oted to the system mo del and the system s decomp osition in to tasks and related issues will b e discussed there F or no w w e presen t a classi cation of timing constrain ts on the system This classi cation will b e useful in later c hapters F or our purp oses the ev en ts of in terest in the system are the stim uli and resp onses b et w een the system and its en vironmen t as w ell as b et w een the tasks within the system The initiation and sometimes termination of a task execution are also the ev en ts of in terest 1 1 Sensors Actuators Sensors Actuators Task 2 3 2 7 8 3 11 10 9 4 5 4 5 Embedded System Embedded System 6 6 (a) (b) Figure a An em b edded system with external constrain ts lab eled b The same system with in ternal constrain ts lab eled on tasks The external constrain ts and are giv en and and are required The constrain ts and are rate constrain ts and are correlation constrain ts and are resp onse time constrain ts is an execution time constrain t and nally is an arbitrary separation constrain t Note that this gure is the same as Figure As the system is real time the ev en ts are go v erned b y timing constrain ts All the timing constrain ts of the system can b e cast in to either a separation constrain t or a rate constrain t ho w ev er at higher lev els of abstraction it is more useful to classify them further as follo ws In Chapter w e men tioned the external and internal timing c onstr aints of the system The former constrain ts are de ned on the system s external b eha vior the one b et w een the system and its en vironmen t and the latter ones are de ned on its in ternal b eha vior the one b et w een its tasks Figure illustrates these timing constrain ts In this gure the timing constrain ts lab eled are the external timing constrain ts and those lab eled are the in ternal timing constrain ts External Timing Constrain ts Consider Figure a for the external timing constrain ts These timing constrain ts can b e classi ed further as follo ws The lab els in paren thesis b elo w refer to the lab els in Figure a and for eac h category of timing constrain ts b elo w w e describ e the place where they are de ned and giv e the category name On the same input or output an input r ate c onstr aint or output r ate c onstr aint resp ectiv ely These constrain the time separation b et w een successiv e inputs to and outputs from the system The output rate constrain t of the system is sometimes called its thr oughput c onstr aint Bet w een t w o di eren t inputs or outputs an input c orr elation c onstr aint or output c orr elation c onstr aint resp ectiv ely These constrain the time separation or correlation b et w een t w o di eren t inputs to and outputs from the system F rom an input to an output or vice v ersa a r esp onse time c onstr aint on the system or on the en vironmen t It is also p ossible to de ne these constrain ts b et w een an y input output pair The resp onse time constrain t of the system constrains the time separation b et w een the time an input is fed in to the system and the time the output corresp onding to this input is sen t out from the system The resp onse time constrain t of the system is sometimes called its latency c onstr aint In Figure a the external timing constrain ts lab eled and are the given timing c onstr aints of the system whereas those lab eled and are the r e quir e d timing c onstr aints or the timing r e quir ements of the system The giv en timing constrain ts are committed to the system b y the en vironmen t e g the system cannot con trol the rate of stim uli coming from the en vironmen t The required timing constrain ts are those that the system m ust satisfy in order to p erfectly sync hronize with its en vironmen t These are required b y the en vironmen t i e the en vironmen t assumes that the system satis es them As a matter of fact the temp or al c orr e ctness of the system is de ned in terms of its timing requiremen ts in that the system is temp or al ly c orr e ct if it satis es its timing requiremen ts In ternal Timing Constrain ts No w consider Figure b for the in ternal timing constrain ts Then w e classify them further as follo ws They are de ned on the tasks On the same input to or output from a task a r ate c onstr aint This ma y constrain the input rate the output rate or the execution rate of the task The input rate de nes the n um b er of inputs that the task consumes p er unit time the output rate de nes the n um b er of outputs that the task pro duces p er unit time and the execution rate de nes the n um b er of executions of the task p er unit time Bet w een t w o di eren t inputs or outputs an input c orr elation c onstr aint and an output c orr elation c onstr aint These constrain the time separation or correlation b et w een the times that the inputs of the task arriv e for it to read or the times that the task pro duces its outputs In Chapter w e will transform the output correlation constrain t on a task to a separation constrain t b et w een the times that the task s outputs reac h its successors F rom an input of a task to its output a latency or execution time constrain t F rom an input of one task to an output of another task an arbitrary separation constrain t whic h is useful to de ne resp onse time constrain ts on the subsys tems of the system If an y of these timing constrain ts on the tasks are required ones then they are also referred to as the timing requiremen t s of the tasks That is in ternal constrain ts can also b e giv en or required A required latency on a task can for example b e used to constrain the system so that the task can b e replaced with a pre designed comp onen t whose latency is the required one Rate and Separation Problems There are t w o fundamen tal problems of timing analysis on the ev en t graphs the sep ar a tion pr oblem and r ate pr oblem These problems are a natural b ypro duct of the fact that a timing constrain t is either a separation constrain t or a rate constrain t Problem Sep ar ation pr oblem Find the maximum and minimum time sep ar ations b etwe en p articular o c curr enc es of any two di er ent events in the event gr aph Problem R ate pr oblem Find the maximum and minimum time sep ar ation b etwe en p articular o c curr enc es usual ly suc c essive of any one r ep etitive event in the event gr aph In the latter case the time separation refers to the p erio d of the ev en t and the problem asks to nd the maxim um and minim um p erio d of the ev en t Using the close relationship b et w een rate and p erio d this problem can easily b e cast as nding the maxim um and minim um rate of the ev en t W e will k eep the ab o v e problem de nition This dissertation pro vides a solution to more general v ersions of these problems These general v ersions are giv en in Chapter Related W ork The related w ork is discussed under the follo wing four headings fundamen tal concepts system mo del timing constrain t classi cation and time separation algorithms F undamen tal Concepts Whitro w Klein et al Kop etz Guna w ardena and Ra ynal and Sing hal con tain a go o d discussion of fundamen tal timing concepts suc h as time divis ibilit y ev en t ev en t sequence and patterns temp oral and causal orders AND and OR causalit y and ph ysical and logical clo c ks In particular Whitro w discusses the nature of time in general and time divisibilit y ev en ts and instan ts and temp oral and causal orders in particular Klein et al describ e step b y step tec hniques for ev aluating the sc hedulabilit y of the system s tasks Our discussion of ev en t sequence and ev en t patterns is from theirs Kop etz explains v arious timing issues of distributed em b edded systems suc h as temp oral accuracy ev en t triggered v ersus time triggered approac hes temp oral and causal orders and ph ysical clo c ks and clo c k sync hronization Guna w ardena discusses the p erio dic b eha vior of timed systems He also discusses AND and OR causalit y orders Finally Ra ynal and Singhal giv e a go o d o v erview of logical clo c ks System Mo del Cassandras Edw ards and Hartley and Pirbhai are go o d references for mo d eling and p erformance analysis of em b edded systems In particular Cassandras discusses mo deling and p erformance analysis of discrete ev en t systems His discussion of deter ministic and sto c hastic p erformance analysis is v ery systematic and go o d This reference inspired our de nitions of system state and ev en t Edw ards presen ts the real time struc tured metho ds from a systems analysis p ersp ectiv e He analyzes v arious mo deling issues using the principle of the Blac k Bo x in that it emphasizes what the system s b eha vior is rather than ho w the b eha vior is implem e n ted This reference inspired our task graph mo del discussed in Chapter and our de nitions of system and b eha vior Hartley and Pirbhai describ e the Hatley Pirbhai extension of the data o w based structured mo deling of em b edded systems This extension studies the system in terms of its data b eha vior as w ell as its con trol b eha vior They pro vide a go o d discussion of timing requiremen ts and their sp eci cation This reference inspired our task graph mo del and classi cation of timing constrain ts Timing Constrain t Classi cation Dasarath y Gupta and De Mic heli Choi et al and Xu and P arnas are go o d references for classi cation of timing constrain ts In particular Dasarath y is one of the most comprehensiv e references Lik e our classi cation Dasarath y discusses timing constrain ts in a few dimensions In the rst dimension he in tro duces t w o categories of timing constrain ts based on T a ylor p erformance constrain ts whic h set limits on the resp onse time of a system and b eha vioral constrain ts whic h mak e demands on the rates at whic h users apply stim uli to the system Although this categorization seem to corresp ond to our classi cation of timing constrain ts in to separation and rate constrain ts Dasarath y s classi cation is less general than ours in his classi cation the rst category actually corresp ond to our resp onse time constrain t only and the second category corresp onds to our input rate constrain ts only Dasarath y later uses p erformance constrain ts almost lik e our required timing constrain ts and the b eha vioral constrain ts almost lik e our giv en timing constrain ts That is p erformance constrain ts are imp osed on the system and the b eha vioral constrain ts are imp osed on the en vironmen t the system s user in Dasarath y s terminology Dasarath y s second dimension of classi cation considers timing constrain ts as max im um minim um or durational timing constrain ts A durational timing constrain t is similar to an arbitrary separation constrain t o v er a path of tasks in the system s task graph in our classi cation it can b e considered as a path latency constrain t Since w e use an in terv al for a timing constrain t w e co v er b oth maxim um and minim um timing constrain ts As a result w e will only compare Dasarath y s classi cation of maxim um timing constrain ts with ours Dasarath y divides a maxim um timing constrain t in to four kinds S S S R R S and R R where S stands for stim ulus and R stands for re sp onse In our classi cation the rst kind is an input rate or correlation constrain t the second kind is a resp onse time constrain t on the system the third kind is a resp onse time constrain t on the en vironmen t and nally the fourth kind is an output rate or correlation constrain t The distinction b et w een rate and correlation constrain ts is not clear in Dasarath y s classi cation Gupta and De Mic heli and Choi et al mak e the clear distinction b et w een rate and separation constrain ts but do not detail them as w e did in our classi cation F or example they do not de ne v arious re nemen ts of timing constrain ts suc h as input v ersus output system lev el v ersus task lev el or giv en v ersus required The classi cation of timing constrain ts in Xu and P arnas is geared to w ards sc hedulabilit y analysis so this reference discusses timing constrain ts that apply to a single task in a sc hedule These timing constrain ts are release times deadlines nish times and p erio ds Since w e are not concerned with sc hedulabilit y of the system s tasks at a v ery early design stage w e ha v e not discussed these t yp es of timing constrain ts Time Separation Algorithms Before w e giv e the related w ork w e ha v e to in tro duce some useful terminology The ev en ts in the system are usually mo deled b y an ev en t graph Figures and illustrate t w o simple ev en t graphs In an ev en t graph eac h no de represen ts an ev en t and eac h arc represen ts a temp oral or causal order b et w een t w o ev en ts Eac h arc is asso ciated with a dela y whic h is usually an in terv al as in Figure A dela y of d from ev en t j j i to ev en t i denotes that ev en t j will enable ev en t i d time units after ev en t j is enabled j i An ev en t graph can use either or b oth of AND and OR causal orders as w ell as temp oral order In case of AND causal order OR causal order and temp oral order the o ccurrence time of an ev en t is expressed as in equations and resp ectiv ely W e refer to an ev en t graph with AND causal order as an ev en t graph with max timing constrain ts to an ev en t graph with OR causal order as an ev en t graph with min timing constrain ts and to an ev en t graph with temp oral order as an ev en t graph with linear timing constrain ts An ev en t graph ma y con tain a com bination of these orders A time separation algorithm computes the time separation b et w een a pair of ev en ts in an ev en t graph In other w ords suc h an algorithm solv es the rate and separation problems Unless otherwise stated a time separation algorithm computes the w orst case minim um and maxim um time separation b et w een t w o ev en ts T o compute all the time separations in an ev en t graph a time separation algorithm is usually run for eac h pair of ev en ts in the ev en t graph An algorithm that can compute the time separations in an ev en t graph with max constrain ts can also compute the time separations in an ev en t graph with min constrain ts as discussed in Chapter As a result w e will only men tion the former ev en t graph in describing the time separation algorithms An ev en t graph can b e acyclic or cyclic If the ev en t graph is acyclic then a time separation algorithm basically solv es the separation problem If the ev en t graph is cyclic then a time separation algorithm basically solv es b oth the rate and separation problems W e rst giv e the related w ork on the algorithms for acyclic ev en t graphs Borriello Brzozo wski et al Cormen et al Chapter on single source shortest paths Section on di erence constrain ts and shortest paths all giv e a time separation algorithm for an ev en t graph with only linear constrain ts i e with only temp oral order The algorithms in Ra ju et al and Mok and Liu though giv en in a di eren t con text also solv e the separation problem in an ev en t graph with only linear constrain ts McMillan and Dill giv es the rst correct time separation algorithm for an ev en t graph with max constrain ts This algorithm is partially based on an earlier incorrect algorithm giv en in V an b ekb ergen et al McMillan and Dill also pro v e that the separation problem in an graph with b oth max and min constrain ts is NP Complete They further prop ose an exp onen tial time algorithm for an ev en t graph with b oth max and linear constrain ts W alkup and Borriello and Y en et al b oth prop ose time separation algorithms for an ev en t graph with b oth max and linear constrain ts Both of these algorithms are conjectured to run in lo w order p olynomial time Burks and Sak allah Giro dias et al and Chakrab ort y and Dill all presen t algorithms for an ev en t graph with all three t yp es of constrain ts Burks and Sak allah s algorithm is an exact algorithm based on min max linear programming Giro dias et al s algorithm is an exact algorithm based on constrain t logic programming Chakrab ort y and Dill s algorithm is an appro ximate algorithm based on McMillan and Dill s algorithm Chakrab ort y and Dill s algorithm do es not pro vide an y appro ximation b ound Finally Amon et al pro vides a time separation algorithm for an ev en t graph with max constrain ts that can w ork in the presence of unkno wn dela ys in the ev en t graph The unkno wn dela ys are mo deled b y v ariables W e no w giv e the related w ork on the algorithms for cyclic ev en t graphs The related w ork in this case con tains few references In particular Hulgaard et al giv es the rst exact time separation algorithm for an ev en t graph with max constrain ts This algorithm is later extended to an ev en t graph with max constrain ts and a restricted class of min constrain ts in Hulgaard and Burns and to an ev en t graph with b oth max and linear constrain ts in Jin et al My ers and Meng prop oses an appro ximate time separation algorithm based on McMillan and Dill s algorithm for an ev en t graph with an ev en t graph with max constrain ts Their algorithm pro vides no appro ximation b ound Finally Xie and Beerel presen ts an algorithm that can compute the probabilistic a v erage time separation of ev en ts in an ev en t graph with max constrain ts Summary In this c hapter w e ha v e discussed the fundamen tal issues for expressing and reasoning ab out the timing b eha vior of the system x has de ned suc h concepts as system en vironmen t b eha vior state in teraction ev en t and ev en t patterns x has de ned the ordering of a set of ev en ts x and x has discussed t w o fundamen tal ev en t orders x has determined the n um b er of p ossible orderings b et w een t w o ev en ts when a p oin t or an in terv al in the timeline is assigned to the o ccurrence times of these ev en ts x has discussed clo c ks whic h are used to assign the o ccurrence times of ev en ts x has de ned timing constrain ts and t w o particular forms of timing constrain ts rate and separation constrain ts x has discussed ho w to express temp oral and causal order formally using timing constrain ts x presen ted a comprehensiv e classi cation of timing constrain ts that can b e de ned on the system externally or in ternally Finally x has de ned t w o fundamen tal problems at the ev en t lev el The con tributions of this c hapter are a uni ed presen tation of concepts related to the timing b eha vior and a comprehensiv e classi cation of timing constrain ts Chapter Generalized T ask Graph Mo del During the early phases of an em b edded design o w or at phases where higher lev els of abstraction are considered the system tasks ha v e coarser gran ularit y As a result at higher lev els of abstraction w e ha v e a task graph rather than an ev en t graph This c hapter discusses our task graph mo del whic h called the Generalized T ask Graph GTG mo del This c hapter presen ts the GTG mo del in terms of the lev el that it is used in the design cycle of the system the prop erties of its tasks and their in teractions whic h are impleme n ted using c hannels and the b eha vior of its tasks and c hannels System Sp eci cation Mo del This section de nes system and its three main b eha viors its information pro cessing or data con trol and information mo deling the system paths asso ciated with the rst t w o main b eha viors i e data and con trol paths the concept of pro cess activ ation and deactiv ation asso ciated with the system s data b eha vior and nite state mac hines asso ciated with the system s con trol b eha vior This section is ended with an in tro duction to the system s requiremen ts and arc hitectural mo dels System and Its Beha viors As discussed in Chapter a system is something that exhibits b eha vior Beha vior is a set of activities that can b e de ned in terms of the manipulations of materials energy or information W e fo cus on em b edded systems and their activities An ything can b e view ed as a system It is p ossible that one s system is someone else s subsystem or vice v ersa W e decomp ose a system in to its subsystems i e the whole in to its parts to tac kle its design complexit y and to ev aluate its requiremen ts This decomp osition is done on the basis of the follo wing three basic views to w ards the system s b eha vior its information pro cessing functional b eha vior its con trol state b eha vior and its information or data mo deling b eha vior These in teractions are illustrated in Figure Information Pro cessing or Data Flo w Beha vior The information pr o c essing b ehavior sho ws what functions the system is to p erform This b eha vior is mo deled b y a data ow diagr am This diagram is the primary to ol to depict the functional requiremen ts of the system The data o w diagram partitions these requiremen ts in to comp onen t functions or pr o c esses and represen ts them as a net w ork in terconnected b y data ows or data signals Its main purp ose is to sho w ho w eac h pro cess transforms its input data o ws in to output data o ws and to sho w the relationships b et w een these pro cesses A pro cess is also referred to as a data tr ansform Con trol Flo w Beha vior The c ontr ol b ehavior sho ws under what circumstances the system will p erform its func tions or under what circumstances the pro cesses in the system happ en or p erform their functions or ho w the system s b eha vior c hanges o v er time This b eha vior is mo d eled b y a c ontr ol ow diagr am The con trol o w diagram partitions the system s con trol b eha vior in to comp onen ts eac h of whic h is referred to as a c ontr ol tr ansform and repre sen ts them as a net w ork in terconnected b y c ontr ol ows or c ontr ol signals Information Mo deling Beha vior The information mo deling b eha vior sho ws ho w stored information m ust b e organized in order to b e of maxim um use to the system This b eha vior is mo deled b y a en tit y relationship diagram Datapath and Con trol P ath In this dissertation w e fo cus on the rst t w o b eha viors the information pro cessing b e ha vior and the con trol b eha vior In other w ords w e assume b oth a data o w view and a con trol o w view The data o w view mo dels the datap ath of the system Data passes through the datapath of the system and gets pro cessed The system transforms its input data to its output data The con trol o w view mo dels the c ontr ol p ath of the system The con trol path con trols the pro cessing of data along the datapath The datapath and con trol path of the system are illustrated in Figure This gure is from In this gure Pro cess Mo del mo dels the datapath and Con trol Mo del mo dels the con trol path Both of these paths ha v e inputs and outputs whic h are connected to the system s inputs and outputs These paths are also connected to eac h other via Data Conditions and Pro cess Activ ators lines The data conditions are actually con trol signals that the Changing Processing Information Processing of Required for over Time Information Processing (Data Flow) Behavior Organization over of Time Information (Control Flow) Changing Information over Time Figure Three basic views of the system and the in teractions b et w een these views W e are in terested in t w o views on the left the information pro cessing and con trol b eha vior views The former view mo dels the datapath of the system whereas the latter view mo dels the con trol path of the system datapath pro duces through tests on data and sends to the con trol path Based on these conditions as w ell as its inputs and state the con trol path sends bac k to the datapath some con trol signals called pro cess activ ators Pro cess activ ators are used to activ ate enable or deactiv ate disable pro cesses Data conditions and pro cess activ ators are sometimes called status signals and con trol signals resp ectiv ely in the literature Activ ation and Deactiv ation When a pro cess is activ ated its b eha vior b ecomes data trigger e d in that it p erforms its sp eci ed function when there is su cien t data at its inputs That is it resp onds to its inputs on demand When a pro cess is deactiv ated it do es nothing and its output is n ull as if it did not ha v e su cien t data at its inputs Deactiv ating a pro cess is lik e temp orarily deleting it and all its outputs from the system Data Data Inputs Outputs Process Model Conditions Data Outputs System System Inputs Process Activators Control Model Control Control Inputs Outputs Figure The datapath and con trol path of the system The datapath consists of the pro cess mo del and data inputs and outputs The con trol path consists of the con trol mo del and its inputs and outputs Note the mapping of the system s inputs and outputs as data and con trol inputs and outputs A data o w diagram can b e hierarc hical in whic h a pro cess at some lev el can corre sp ond to a set of pro cesses at a lo w er lev el The set of pro cesses are the descendan ts of the pro cess or the pro cess is the ancestor of the set of pro cesses Activ ating and deacti v ating a pro cess uses the follo wing rule when it is in a hierarc h y a pro cess is activ e only when it and all its ancestors are activ e and when it is deactiv ated all its descendan ts are also deactiv ated Finite State Mac hines Eac h con trol transform is usually mo deled b y a nite state mac hine A state mac hine consists of inputs outputs and states The outputs of a state mac hine are determined b y either its inputs only or b oth its inputs and states In the former case the mac hine is called a c ombinational machine and in the latter case it is called a se quential machine The inputs and outputs of a state mac hine are also referred to as events and actions resp ectiv ely Requiremen ts and Arc hitectural Mo dels The pro cess or data and con trol mo dels of a system constitute its r e quir ements mo del The requiremen ts mo del captures what the system requiremen ts are The data and con trol transforms in the requiremen ts mo del do not corresp ond to the actual ph ysical units of the system The latter are sho wn in the ar chite ctur al mo del of the system The arc hi tectural mo del captures ho w the system will ful ll its requiremen ts The arc hitectural mo del uses an arc hitecture o w diagram This diagram sho ws the ph ysical partitioning of the system in to its comp onen t pieces or mo dules and the information o w data and con trol b et w een these mo dules Its main purp ose is to map the functional partitioning of the system to its ph ysical partitioning In this dissertation w e are not in terested in the arc hitectural mo del of the system T ask Graph and Its T asks and Channels This section discusses tasks and c hannels in the task graph data and con trol o ws through the c hannels and their abstraction as tok ens assigning input and output at tributes to tasks and c hannels and the w a ys of ensuring exibilit y in the task graph mo del T asks and Channels A Generalized T ask Graph GTG is a directed graph in whic h eac h no de is a task and eac h arc is a channel from a pro ducer task to a consumer task W e will refer to this graph as the GTG in the sequel Eac h task is either a data transform or a con trol transform A data transform simply pro duces its outputs from its inputs according to its functionalit y A con trol transform con trols the b eha vior of the data transforms and other con trol transforms within the system Channels carry b oth data and con trol o ws As a result the GTG is created from the union of the data and con trol o w diagrams in the requiremen ts mo del Data and Con trol Flo ws Data o ws are discrete v alued or con tin uous v alued but the latter is more common Con trol o ws are alw a ys discrete v alued A discrete v alued signal or discrete signal ma y tak e on one of a nite n um b er of kno wn v alues whereas a con tin uous v alued signal or con tin u ous ma y tak e on one of an arbitrarily large n um b er of v alues Con tin uous signals usually represen t a con tin uous ph ysical quan tit y e g temp erature or pressure whereas discrete signals usually represen t some unique mo de or condition e g v alv e condition as op en closed or jammed T ok ens Data and con trol o ws are mo deled b y tokens T ok en gran ularit y for a c hannel m ust b e c hosen suc h that it is su cien t to represen t the v alues of b oth data and con trol signals that pass through the c hannel That is tok en gran ularit y is c hannel sp eci c Ho w ev er once tok en gran ularit y is xed it is iden tical within a single c hannel and across di eren t c hannels Input v ersus Output In the GTG the c hannel b et w een a task and eac h one of its predecessors is called its input channel and the one b et w een it and eac h one of its successors is called its output channels Similarly the tok ens in the input c hannels of a task are called its input tokens and the tok ens in its output c hannels are called its output tokens In the GTG the tasks without an y predecessors are called the input tasks and those without an y successors are called the output tasks The input tasks and output tasks corresp ond to the sensors and actuators of the system resp ectiv ely T ok ens are added to the system b y the input tasks and deleted from the system b y the output tasks The input tasks and the output tasks are part of the system s con text diagram The con text diagram iden ti es the b oundary b et w een the system and its en vironmen t It con tains b oth data and con trol parts b ecause the in teraction b et w een the system and its en vironmen t is carried out b y b oth data and con trol o ws The rectangle with rounded corners in Figure corresp onds to the system s con text diagram Flexibil it y F or maxim um exibilit y tasks are concurren t with resp ect to eac h other In other w ords they op erate in parallel as long as their data is a v ailable to do so Sequen tial pro cessing is an additional design constrain t and will b e dealt with later during hardw are soft w are partitioning phase This phase is lab eled b y in Figure W e assume that eac h task is non pip elined Ho w ev er the GTG mo del can also mo del a pip elined task as follo ws W e represen t eac h pip eline stage of a pip elined task as a separate task in the GTG Similarly w e represen t eac h connection b et w een a pair of pip eline stages as a c hannel in the GTG T ask In teractions This section discusses enables disables and triggers as basic task in teractions the in corp oration of additional in teractions in to the task graph and mo deling in teractions in terms of fundamen tal causalit y relations Basic In teractions In teractions within almost an y em b edded system can b e mo deled b y using the follo wing three actions enables disables and triggers An enabled task runs un til it is disabled A triggered task runs and terminates b y itself W e are concerned with when eac h task starts its activ ation i e the start time of eac h task therefore w e use enables to mean b oth enables and triggers and do not consider disables at all b ecause only enabled tasks can b e disabled and b ecause a non pip elined task has to stop its curren t activ ation b efore it is enabled for the next time regardless of whether it is enabled or triggered As a result eac h arc in the GTG represen ts an enable Additional In teractions In teractions b et w een tasks in the GTG ma y in v olv e additional information o ws other that enables disables and triggers W e are not in terested in these additional o ws The designers can use arcs to represen t these o ws but they m ust mak e sure that they do not confuse these arcs with enable arcs Similarly task in teractions ma y in v olv e m utual exclusion and priorit y Both are used to serialize a set of concurren t tasks Mutual exclusion giv es the tasks in the set an arbitrary order whereas priorit y giv es them a sp eci c order based on their imp ortance or priorit y usually as judged b y the designers Both m utual exclusion and priorit y are additional design constrain ts that m ust b e tak en in to accoun t during arc hitectural design phase Causalit y In teractions in the GTG represen t enables but w e ha v e to resolv e the in teraction b eha vior when a task gets enable signals or enables from more than one predecessor task W e base the in teraction b eha vior on causalit y just as in an ev en t graph Th us the GTG uses b oth AND causalit y and OR causalit y A task that uses AND causalit y for its input b eha vior is an AND task and a task that uses OR causalit y for its input b eha vior is an OR task W e re ne these task t yp es in the next section T ask T yp es AND and OR task t yp es in the GTG need further re nemen t b ecause the presence of m ultiple tok ens creates the p ossibilit y of losing some tok ens in the input c hannels A task is called an unskipp e d task if it has to consume ev ery tok en pro duced for it b y its pro ducers it is a skipp e d task otherwise Both of these concepts apply to b oth AND and OR tasks suc h that w e no w ha v e AND unskipp ed AND u AND skipp ed AND s OR unskipp ed OR u and OR skipp ed OR s tasks W e no w explain these re ned task t yp es in more detail An AND u task reads ev ery one of its predecessors and do es not skip an y tok ens It has to w ait for its slo w est predecessor Since during that duration tok ens will build up in the c hannels from the other predecessors these c hannels m ust ha v e su cien t capacit y to accommo date all of these tok ens An AND s task reads ev ery one of its predecessors but ma y skip some tok ens while w aiting for its slo w est predecessor In other w ords during the duration that it w aits for the slo w est the c hannels from the other predecessors ma y skip some tok ens Skipping o ccurs b ecause the c hannels do not ha v e su cien t capacit y or the AND s task cannot consume all the tok ens in the input c hannels or it is not fast enough to k eep up with all the predecessors An OR u task is similar to an AND u task in that b oth ha v e to read all the tok ens pro duced for them The di erence is that an OR u task gets enabled b y the input from only one of its predecessors the fastest one whereas an AND u task has to get enabled b y all of its predecessors Once an OR u task is enabled it sta ys at this state un til it gets enabled b y the last one of its predecessors Some time after the last enable it stops pro cessing un til it gets enabled again An OR s task gets enabled b y only one of its predecessors usually the fastest one Un til it gets enabled again it can read as man y tok ens as its functionalit y dictates It ma y not read all the tok ens and this m ust not create an y problems with resp ect to its functionalit y In the GTG skipp ed b eha vior is not obtained b y making c hannels lossy skipp ed b eha vior is in ten tional in that a skipp ed consumer kno ws that it will lose some tok ens from its input c hannels b ecause it cannot k eep up with the rate of its ev ery predecessor The skipp ed consumer is made skipp ed b y the designers so the skipp ed b eha vior m ust b e one of the functional requiremen ts of the task It is p ossible to extend the task in teractions b y the use of other Bo olean op erators F or example de nes X OR together with AND and OR as a basic in teraction b eha vior It de nes an X OR task as the one that gets enabled if one and only one of its predecessors enables it Note that it is also p ossible to use NOT b ecause its use will mo del m utual exclusion As a matter of fact the use of AND OR and NOT can mo del an y Bo olean op erator b eha vior including X OR Ho w ev er w e did not w an t to trade simplicit y for expressibilit y in the GTG mo del b esides NOT b eha vior do es not seem to b elong to suc h a high abstraction lev el mo del of the system as its GTG mo del T asks are indep enden t from eac h other In other w ords they are not a w are of eac h other Ev en if they are made a w are of eac h other they cannot assume an ything ab out their relativ e sp eeds b ecause they are concurren t If it is necessary that t w o tasks m ust con trol eac h other then this can b e ac hiev ed b y creating a cyclic task dep endency b et w een them Ev en in this cyclic dep endency they need not b e a w are of eac h other This assumption is devised to supp ort information hiding and reuse T ask and Channel Prop erties This section discusses the prop erties of tasks suc h as their p erio d and their input output and activ ation rates the prop erties of c hannels lik e their dela y and mo deling of these prop erties using in terv als Token numbers Channel delay p T Ppc dpc Cpc Tc Period r p c p rc Rate t t p c Start time Producer Consumer Figure Prop erties p erio ds and rates of t w o tasks pro ducer p and consumer c and those tok en n um b ers as pro duce and consume n um b ers the c hannel p c b et w een them T ask Prop erties Consider Figure In this gure w e ha v e a c hannel p c from pro ducer p to consumer c Eac h task sa y c has three timing prop erties a rate r an in teger p erio d T and an c c in teger start time t If task c w ere an ev en t t corresp onds to its o ccurrence time Since c c c ma y run more than once w e rede ne t k as the start time of the k th activ ation of c c where k In the sequel w e will use activ ation execution and run in terc hangeably In Figure pro ducer p puts P tok ens p er execution in to c hannel p c and con pc sumer c gets C tok ens p er execution from that c hannel The rst n um b er is called the pc pr o duc e numb er and the second one is called the c onsume numb er These t w o n um b ers whic h are t w o prop erties of the c hannel are together called the token numb ers of the c hannel The tok en n um b ers are in tegers The tok en n um b ers need not b e kno wn in adv ance or b e constan ts e g when w e x T but not T C b ecomes v ariable The c p pc assumption here is that eac h task pro duces and consumes a xed n um b er of tok ens p er execution regardless of whether or not the designers kno w it during the GTG mo deling stage The GTG mo del can still w ork if eac h task s tok en n um b ers p er execution are v ariables b ounded b y in terv als This last case is discussed in x to some exten t Av erage P erio d W e de ne the p erio d of a task asymptotically or in the a v erage sense First note that the a v erage p erio d T k of c o v er k runs where k of c can b e computed as c t k t c c T k c k since there are k p erio ds o v er k runs and these k runs last t k time units relativ e c to the initial start time t of c Generalizing this for large k w e de ne the p erio d T c c of c as t k c T lim c k k where the denominator is c hanged from k to k since the limit is the same W e will see in x and x that w e ha v e to w ait only for a nitely long time duration to reac h this a v erage Av erage Rate The basic relation b et w een the rate and p erio d of c is giv en as r c T c whic h is also de ned in the a v erage sense b ecause of T A w ord of caution here is that c the term a v erage is not in the probabilistic sense as also clari ed in x Av erage is de ned in the same sense as in the follo wing example If a task executes with p erio ds of and alternately then its a v erage p erio d is The reason for using an a v erage p erio d and rate is b ecause tasks in our mo del as in man y similar mo dels are enabled b y their predecessors and these predecessors are ultimately dep enden t on the sensors of the system It is a restriction on the mo del to assume that the enable signals from these sensors come at p erfectly regular in terv als Recall that the input to the system can ha v e one of the ev en t patterns other than the un b ounded one as discussed in Chapter Moreo v er the use of a v erage v alues is dictated b y the ev en t and task in teraction seman tics as will b e demonstrated in x and x Input and Output Rates The rate of a task giv es the a v erage n um b er of executions of this task p er unit time A task also has its tok en pro duction rate and tok en consumption rate whic h are resp ectiv ely called the output r ate and input r ate of that task More formally the output rate or of p p with resp ect to c hannel p c is de ned as P pc or P r p pc p T p and the input rate ir of c with resp ect to c hannel p c is de ned as c C pc ir C r c pc c T c where the input and output rates are also de ned in the a v erage sense just as the rates and p erio ds P erio d and Rate In terv als Due to the exten t of uncertain t y during the requiremen ts phase w e mo del ev ery timing prop ert y using an in terv al F or an in terv al of a prop ert y w e de ne lo w er and upp er b ound op erators on the prop ert y denoted as l and u resp ectiv ely These op erators are pre x op erators F or p erio d and rate w e use these op erators as follo ws T l T uT and r l r ur c c c c c c whic h are the p erio d and rate in terv als for consumer c resp ectiv ely These in terv als can readily b e obtained from eac h other using Equation as l r and ur c c uT l T c c Due to the ease of con v ersion b et w een rate and p erio d w e will use the terms p erio d and rate in terc hangeably in that if w e try to nd the rate of a task w e can instead try to nd its p erio d if the latter is more con v enien t to handle or vice v ersa Note that the p erio d of a task is alw a ys an in teger whereas its rate can b e a real n um b er Lo w er and upp er b ounds on these prop erties can b e de ned as l T uT c c so that l r ur c c using Equation Note that the lo w er p erio d b ound is not allo w ed to b e equal to zero since there m ust b e some non zero time ho w ev er small b et w een successiv e task executions Note that w e abuse the notation when w e write a b ounded in terv al for the p erio d ev en though the upp er b ound can b e in nit y This notational con v enience is used for ev ery in terv al in the sequel Channel Prop erties In Figure c hannel p c has an in teger b ounded dela y of d that ranges from a lo w er pc b ound of l D to an upp er b ound of uD i e pc pc d l D uD pc pc pc where l D uD The c hannel dela y means that it tak es d time units for pc pc pc the tok ens of pro ducer p to enable consumer c Bounding Start Time W e no w w an t to determine lo w er and upp er b ounds on the start time of c With resp ect to c hannel p c there m ust b e at least C tok ens in that c hannel for consumer c to get pc enabled Supp ose p has to execute i times till the time c gets enabled for the j th time Then w e m ust ha v e i P j C C and i P j C C pc pc pc pc pc pc so that p c will ha v e at least C tok ens with i executions of p and few er n um b er of pc executions of p will not accum ulate enough n um b er of tok ens to enable c F rom this w e get C C pc pc j i j P P pc pc whic h implies that C pc i j P pc since i m ust b e an in teger Note that b oth i and j are p ositiv e in tegers here Our deriv ation ab o v e is similar to the one in Using Equation w e no w express the j th start time t j of c in terms of the ith c start time t i of p The j th start time t j can b e written as p c C pc t j t i d t j t j d c p pc c p pc P pc where d is the dela y of c hannel p c This equation can b e rewritten as pc C C pc pc t j l D t j t j uD p pc c p pc P P pc pc since d is in the in terv al l D uD W e will use these b ounds in Chapter pc pc pc T ask Input Beha vior Let G V E denote the GTG and consider Figure Then if c is an AND u task it reads C tok ens from eac h one of its predecessors p whereas if it is an AND s task pc it reads C tok ens from its slo w est predecessor p T ask c has to w ait for its slo w est pc predecessor p to accum ulate at least C tok ens for it regardless of whether c is an pc AND u or AND s task This implies that the j th start time t j is go v erned b y c C C pc pc max ft j l D g t j max ft j uD g p pc c p pc p c E p c E P P pc pc whic h is obtained b y applying Equation to ev ery predecessor p of c Note that this equation de nes a max timing constrain t This equation m ust b e augmen ted with one more constrain t on the next start time t j of task c when c is an AND u task This c additional constrain t is C pc max ft j d g t j p pc c p c E P pc where d refers to the actual dela y of c hannel p c pc If c is an OR u task it reads C tok ens from one of its predecessors p whereas if pc it is an OR s task it reads C tok ens from at least one of its predecessors usually the pc fastest one T ask c can start executing as so on as one of its predecessors p has sen t at least C tok ens for it regardless of whether c is an OR u or OR s task This implies pc that the j th start time t j is go v erned b y c C C pc pc min ft j l D g t j min ft j uD g p pc c p pc p c E p c E P P pc pc whic h is obtained b y applying Equation to ev ery predecessor p of c Note that this equation de nes a min timing constrain t This equation should b e augmen ted with one more constrain t on the next start time t j of task c when c is an OR u task This c additional constrain t is C pc max ft j d g t j p pc c p c E P pc where d refers to the actual dela y of c hannel p c In this equation it ma y b e b etter to pc use the nish time of task c rather than its start time but w e did not w an t to in tro duce another task prop ert y for the sak e of simplicit y W e assume that at least one predecessor of an OR s task sends enable signals when that predecessor executes hence in the ab o v e equation for the OR tasks w e use the start times of those predecessors that send enable signals in case there are some that do not send an y enable signals As a matter of fact those that do not send enable signals can still b e used in the equation b y setting the corresp onding c hannel dela y to in nit y This w orks b ecause w e are taking the minim um rather than maxim um The order of reading c hannels in b oth the AND and OR cases is determined b y the functionalit y of the consumer and is arbitrary for our purp oses In the case of OR tasks if there are t w o enables arriving sim ultaneously for an OR task via t w o input c hannels only one of them will b e used to enable the OR task The c hoice is arbitrary for our purp oses T ask Output Beha vior The output b eha vior of a task in the GTG is determined b y its successors This rule do es not mean that a task m ust kno w the t yp es of its successor tasks W e use this rule to reason ab out the tasks in the GTG F or instance if a task p of an y t yp e is succeeded b y an AND task c but p do es not send tok ens for eac h execution of c then w e ha v e a problem in the GTG b ecause these t w o tasks cannot in teract as dictated b y their t yp es F or our purp oses w e assume that tasks b eha v e as de ned b y their t yp es and there are no problems in their in teractions as in this example Supp ose c hannel p c has P as one of its tok en n um b ers If c is an AND task w e pc exp ect p to send P tok ens ev ery time it executes whereas if c is an OR task p ma y not pc ev en send an y tok ens to c but w e exp ect at least one predecessor of c will send to it some tok ens Then task p has to send at most P tok ens to its successor c Ho w ev er in pc the ab o v e start time expressions w e assumed that p sends exactly P tok ens whenev er pc it sends an y That is ev ery time p executes either it sends no tok ens at all or it sends P tok ens The former case ma y happ en if the corresp onding successor of p is an OR s pc task W e can extend the ab o v e output b eha vior b y assuming a tok en n um b er in terv al as follo ws Supp ose p sends P tok ens ev ery execution and c consumes C tok ens ev ery pc pc execution suc h that P l P uP and C l C uC pc pc pc pc pc pc where l P uP and l C uC Then w e can mo dify pc pc pc pc Equation as l C uC pc pc j i j uP l P pc pc to obtain lo w er and upp er b ounds on i These lo w er and upp er b ounds can no w b e used in the deriv ations that follo w Equation ab o v e W e lea v e this extension as a future w ork Hierarc h y It is p ossible to use m ultiple lev els of GTGs to describ e the system Eac h lev el con tains GTGs that ha v e the same seman tics W e do not consider this in this dissertation although it is an easy extension W e ho w ev er do consider the follo wing hierarc h y in the GTG The hierarc h y in the GTG consists of t w o lev els top level and b ottom level as illustrated in Figure The b ottom lev el con tains all the strongly connected comp onen ts SCCs of the GTG including those with a single no de The top lev el corresp onds to the comp onen t graph of the original GTG in that some no des called sup erno des represen t the SCCs at the b ottom lev el Note that the b ottom lev el con tains cyclic p ortions of the GTG whereas the top lev el is acyclic This is actually the reason for in tro ducing hierarc h y Task graph Top level Bottom level Actual system graph Figure Hierarc h y in the generalized task graph mo del F or timing analysis w e regard t w o lev els as imp ortan t the top and b ottom lev els The b ottom lev el con tains the strongly connected p ortions of the task graph and the top lev el con tains a no de for ev ery suc h cyclic p ortion as w ell as no des in acyclic p ortions b ecause the algorithms for cyclic and acyclic task graphs are generally di eren t W e will discuss these algorithms later in the dissertation F or the sak e of simplici t y w e assume that the c hannels in the top lev el of the GTG do not ha v e tok ens in them when the system starts executing for the rst time The c hannels at the b ottom lev el ho w ev er m ust ha v e initial tok ens b ecause they are needed to enable the tasks that are connected to eac h other under cyclic dep endencies Note that cyclic dep endencies can b e used to mo del feedbac ks Single rate v ersus Multi rate W e also assume that the cyclic p ortions of the GTG are single r ate whereas the acyclic p ortions can b e multi r ate In a m ulti rate system eac h task can ha v e a di eren t rate whereas in a single rate system eac h task has the same rate Since there are tec h niques to transform a m ulti rate cyclic system in to an equiv alen t single rate one e g see w e do not lose generalit y with our simplifying assumption Related W ork The GTG mo del builds up on man y previous mo dels in the literature Our mo del is an abstraction and com bination of these previous mo dels for the purp oses of timing analysis W e no w describ e these previous mo dels Before this description w e ha v e a w ord of caution The mo dels that w e will discuss in this section are not all prop osed for mo deling em b edded systems Some of them are for signal pro cessing some for parallel pro cessing and some for async hronous circuits Ho w ev er w e ha v e realized that these mo dels con tain almost the same underlying b eha vior and that the tec hniques dev elop ed for one particular mo del in mind are generally applicable to man y other mo dels to o Therefore w e will examine ev ery one of these mo dels as if they w ere task graph mo dels prop osed for mo deling em b edded systems In this section w e will refer to a mo del that use only AND causalit y as an AND mo del or an AND task graph and the one that use only OR causalit y as an OR mo del or an OR task graph Man y of the earliest mo dels that are used for sc hedulabilit y analysis suc h as the mo del in Liu and La yland con tain indep enden t tasks That is there is no precedence b et w een the tasks in the task graph The Pro cess Graphs of Je a y the T ask Graphs of Y en and the Async hronous T ask Graphs of Gerb er et al pro vide a generalization of this mo del In these mo dels the task graph is an acyclic AND graph In these mo dels an AND task ma y not ha v e the same input and output b eha vior F or example an AND task in Y en s mo del can ha v e m ultiple input and output c hannels and eac h c hannel has a capacit y of more than one tok en ho w ev er an AND task in Je a y s mo del can ha v e only one input c hannel and eac h c hannel has zero capacit y The Computation Graphs of Karp and Miller Pro cessing Graph Mo del PGM of Go ddard the Logical Application Stream Mo del LASM of Chatterjee and Stros nider the Pro cess Graphs of Math ur et al the Ev en t Rule System of Burns the Pro cess Graphs of Hulgaard et al and Sync hronous Data Flo w SDF graphs of Lee and Messersc hmitt are also AND mo dels but they can b e cyclic Enabling a task is sligh tly di eren t from the GTG mo del in the rst three cyclic mo dels as follo ws The c hannels in these mo dels ha v e a threshold tok en n um b er A consumer b ecomes eligible only if all of its input c hannels con tain as man y tok ens as their resp ectiv e threshold tok en n um b ers sp ecify Once the consumer is eligible it consumes from eac h input c hannel as man y tok ens as their resp ectiv e consume n um b ers sp ecify The task structure of an em b edded system can con tain data dep enden t b eha vior Y et AND mo dels cannot mo del this b eha vior so they are extended to con tain OR tasks The extended data o w mo del of Puc hol and Mok the T ok en Flo w Mo del of Buc k and Lee the T ask Flo w Graph of P eng and Shin the data o w graph of Len t and Kurmann the AND OR Mo del of Gillies and Liu the timed AND OR automaton of Guna w ardena and the task graph of Silb erman are all AND OR mo dels in that they ha v e b oth AND and OR tasks Some of these AND OR mo dels suc h as the AND OR Mo del of Gillies and Liu are acyclic Gillies and Liu also in tro duced the skipp ed and unskipp ed b eha viors for OR tasks P etri nets can mo del b oth AND and OR causalit y but they cannot prop erly handle all the di eren t OR b eha viors that are iden ti ed in The AND OR b eha vior is implicitl y handled i e within the functionalit y of tasks in the underlying mo dels used for real time design metho ds lik e those in These mo dels also emphasize a uni ed represen tation of data and con trol Summary In this c hapter w e ha v e discussed our task graph mo del the GTG mo del x has presen ted the lev el of abstraction that the GTG mo del represen ts x has de ned the GTG mo del x has giv en the t yp es of in teractions b et w een the tasks in the GTG mo del These in teractions results in suc h task t yp es as AND tasks and OR tasks x has discussed the prop erties of the tasks and the c hannels in the GTG mo del Most of these prop erties are timing prop erties x x and x ha v e explained the input and output b eha vior of the tasks x and x ha v e presen ted t w o more prop erties of the GTG mo del its hierarc hical structure and the fact that the tasks in the GTG mo del can ha v e di eren t rates of execution The con tribution of this c hapter is the GTG mo del itself Chapter Timing Constrain t Deriv ation and V alidation This c hapter de nes the deriv ation and v alidation problems for b oth rate and separation constrain ts and pro vides an o v erview of the follo wing three c hapters Since w e p erform the deriv ations and v alidations in terms of a v erage v alues this section also discusses the reasoning b ehind that c hoice of ours Finally it in tro duces the related w ork for the deriv ation and v alidation of timing constrain ts The related w ork review ed in this section also serv es the next c hapter Deriv ation and V alidation Problems In this dissertation w e prop ose a solution to the follo wing problems These problems are generalizations of rate and separation problems that are in tro duced in Chapter Problem Derivation pr oblem Derive every r ate and sep ar ation c onstr aint in the system mo dele d by the GTG Problem V alidation pr oblem V alidate every r ate and sep ar ation r e quir ement in the system mo dele d by the GTG Our solution w orks as follo ws W e rst use the giv en and required rate constrain ts of the system to deriv e its in ternal rate constrain ts i e w e nd the rate of ev ery task or equiv alen tly the p erio d of ev ery task in the system This step is referred to as the r ate derivation or p erio d derivation W e then use these p erio ds together with the in put correlation constrain ts of the system to deriv e the in ternal and external separation constrain ts of the system suc h as its resp onse time and output correlation constrain ts This step is referred to as the sep ar ation derivation W e nally compare the deriv ed timing constrain ts with the corresp onding timing requiremen ts of the system to v alidate its timing correctness as w ell as with the corresp onding timing requiremen ts on the tasks to v alidate their timing requiremen ts This step is referred to as the r ate and sep ar ation validation W e p erform deriv ation and v alidation for acyclic and cyclic task graphs separately The rate deriv ation and v alidation for acyclic graphs is describ ed in Chapter The rate deriv ation for cyclic task graphs is describ ed in Chapter The t w o c hapters fol lo wing Chapter namely c hapters and discuss algorithmic issues for the cyclic rate deriv ation and complexit y issues for debugging timing violations resp ectiv ely As for the separation deriv ation and v alidation w e only presen t algorithms for acyclic separation deriv ation and v alidation in Chapter b ecause of the reasons discussed in the In tro duc tion The cyclic case can b e based on whic h seems to b e the rst w ork ab out cyclic separation deriv ation and v alidation In our deriv ation and v alidation approac h w e do not assume that a global clo c k is used in the system W e assume that the timing constrain ts of the system whether in ternal or external are de ned with resp ect to an outside observ er s timefram e If the system uses di eren t clo c ks leading to clo c k sync hronization issues the deriv ation results corresp onding to the domain of a certain clo c k ha v e to b e con v erted to the timeframe of this clo c k Our approac h stems from the fact that the external timing constrain ts on the system are imp osed on the en tire system from the requiremen ts sp eci cation p oin t of view whether or not the system is implem en te d as a distributed em b edded system is an issue that the system designers ha v e to deal with The Case for Av erage Timing Constrain ts W e no w try to sho w wh y w e use a v erage rather than w orst case timing constrain ts in our solution W e will argue that the reason stems from the natural b eha vior of the systems that our task graph mo dels and that the a v erage b eha vior is more appropriate for high lev els of abstraction This section is merely an in tro duction More detailed information is a v ailable in the follo wing c hapters W e will discuss this issue on the t w o task simple graphs giv en in Figure Supp ose that w e w an t to determine an upp er latency b ound or a time budget for eac h task in order to guaran tee b ounded c hannels In this gure a giv es an acyclic task graph that consists of a c hannel from a pro ducer task task a to a consumer task task b T ask a pro duces tok ens ev ery time units and task b consumers tok ens ev ery time units The diagram to the righ t of this task graph sho ws the b eha vior of these tasks when task a starts its execution at time In the time in terv al of task b runs times corresp onding to runs of task a After time units the b eha vior depicted in this diagram rep eats itself F rom this diagram w e can see that task a alw a ys runs with a p erio d of time units whereas the p erio d of task b c hanges its p erio d tak es on the follo wing v alues in order and Based on this sequence of v alues w e can sa y that the w orst case p erio d in terv al of task b is whereas its a v erage p erio d is Time 0 7 14 21 28 a Timelines 7 3 a b 10 17 24 27 T = 7 T = 3 a b b (a) Time 1 0 1 2 3 4 5 6 7 8 9 a a b Timelines 2 b 4 3 c T = T = T = 8/3 c a b c (b) Figure The a v erage b eha vior of a system that consists of only AND u tasks The p erio ds T corresp ond to a v erage p erio ds Eac h small ellipse in the diagrams on the righ t sho w one task execution a The a v erage b eha vior in the acyclic case The diagram on the righ t sho ws the task executions when task a starts its rst execution at time The system rep eats itself after time b The a v erage b eha vior in the cyclic case The diagram on the righ t sho ws the task executions when all the tasks start their rst execution at time The dashed arcs in the diagram denote enable signals The system rep eats itself after time Based on the w orst case in terv al it seems that that the upp er latency b ound for task b ha v e to b e set to time unit Ho w ev er an upp er latency b ound of the a v erage p erio d of task b is su cien t to guaran tee b ounded c hannels This b ound will w ork out quite w ell b ecause if w e x the latency of task b to time units the c hannel will still b e b ounded although task b will sometimes dela y its starting time No w supp ose that there is a throughput or output rate requiremen t of on this system This requiremen t corresp onds to a p erio d requiremen t of time units for the system Since the throughput of the system is determined b y task b the system will not satisfy its p erio d requiremen t if the requiremen t is a w orst case one Ho w ev er based on the discussion in the previous paragraph w e can add another task after task b whose p erio d is xed to time units in order to satisfy this w orst case p erio d requiremen t b ecause the newly added task will b e able to an output ev ery time units W e can easily see that the argumen t for cyclic systems is similar to the one for acyclic systems W e will no w describ e the cyclic task graph in Figure b without rep eating the argumen t for ensuring b ounded c hannels and satisfying throughput requiremen ts In this gure b giv es a cyclic task graph that consists of four c hannels b et w een three tasks a b and c The n um b ers giv en on eac h arc sp eci es the dela y of the corresp onding c hannel Without loss of generalit y assume that eac h task is an AND u task that eac h task consumes and pro duces tok en and that they start their rst executions at the same time at time The dashed arro ws in the diagram to the righ t side of the task graph corresp ond to enable signals so that when a task gets an enable signal from all of its predecessor tasks it runs This diagram sho ws that the p erio d of task a c hanges as and time units the p erio d of task b c hanges as and time units and nally the p erio d of task c c hanges as and time units After time units the system rep eats itself As a result the w orst case p erio d in terv al for eac h task is whereas the a v erage p erio d for eac h task is In the con text of a v erage p erio ds the ab o v e discussion sho ws that the system b eha v es as if the p erio d of eac h task in the system w ere set to their a v erage p erio ds This b eha vior results from the natural b eha vior of the system It seems that due to the amoun t of uncertain t y and the desire to gain more insigh t in to the system the designers should fo cus on the system s a v erage b eha vior rather than its w orst case one at higher lev els of abstraction or during the early phases of the system s design o w This is also a practical approac h b ecause for example it is in tractable to nd the w orst case b eha vior of a cyclic discrete ev en t system although its a v erage case b eha vior can b e e cien tly determined As a matter of fact the p erformance of man y systems that can b e mo deled b y cyclic discrete ev en t systems is c haracterized b y their a v erage b eha vior As a nal note w e w an t to stress once more that the a v erage b eha vior in this dissertation is not a probabilistic one so it do es not carry the disadv an tages of suc h an approac h it is an asymptotic a v erage in that it refers to the steady state of the system Related W ork This section is a lot more detailed compared to the other Related W ork sections in this dissertation b ecause the idea of timing constrain t deriv ation is a cen tral comp o nen t of our thesis The related w ork in this section also serv es for Chapter The related w ork discussed in this section include subtask deadline assignmen t b y Kao and Garcia Molina data o w design to ol b y Jones syn thesis of real time signal pro cessing systems from pro cessing graphs b y Go ddard et al distributed pip eline sc heduling of heterogeneous real time systems b y Chatterjee and Strosnider syn c hronous data o w and tok en o w mo dels b y Lee at al and p erio d calibration metho d b y Gerb er et al Gerb er et al s w ork is the earliest most comprehensiv e timing constrain t deriv ation w ork for real time systems Subtask Deadline Assignmen t Kao and Garcia Molina Kao and Garcia Molina studied the problem of subtask deadline assignmen t SD A for distributed soft real time systems They consider tasks that can b e mo deled using a series parallel graph as depicted in Figure In this gure task A is comp osed of v e series subtasks eac h of whic h corresp onds to a stage in the gure Some of these series subtasks con tain subtasks in parallel e g stages and T ask A has a deadline b Task A f a c e h g d 1 2 3 4 5 Stages Figure A series parallel task task A The precedence relations b et w een the subtasks of suc h a task are suc h that these relations can b e mo deled using a series parallel graph This graph con tains v e stages eac h of whic h can b e considered as a subtask in series Moreo v er some of these stages e g stages and con tain subtasks in parallel e g b c and d sa y D The SD A problem for task A is to determine the deadlines for all the subtasks within task A on a distributed arc hitecture computer Kao and Garcia Molina partition the SD A problem in to t w o subproblems the problem of subtask deadline assignmen t when the subtasks are in series whic h is re ferred to as the serial subtask problem SSP and the problem of subtask deadline assignmen t when the subtasks are in parallel whic h is referred to as the parallel subtask problem PSP The subtask assignmen t problem when the subtasks are in series parallel can then b e solv ed as a com bination of the solutions to these t w o subproblems Kao and Garcia Molina prop ose a n um b er of strategies for b oth of these problems The b est strategy for the SSP is called the equal exibilit y strategy This strategy tries to estimate the total amoun t of slac k that a task has and divides this slac k among the subtasks prop ortional to their execution time estimates After this assignmen t eac h subtask has the same slac k to execution time ratio its exibilit y Here the slac k of a subtask is the amoun t of time that the subtask can dela y the termination of its execution without violating its deadline On the other hand the b est strategy for the PSP is called the DIV strategy This strategy equally divides the amoun t of time that a task has b efore its deadline equally among its subtasks Assuming that task A is the system its subtasks are the tasks of the system and the deadline for task A is the system s latency w e can easily consider Kao and Garcia Molina s w ork as a system lev el timing constrain t deriv ation approac h The SD A problem in that case is almost equiv alen t to the problem of deriving a latency b ound for the sys tem s tasks from the system s latency requiremen t One problem with this consideration is that the solution of the SSP needs the execution time estimates of the subtasks the v ery prop erties that the solution tries to deriv e b ounds for Three of the four strate gies that Kao and Garcia Molina prop ose for the SSP need the subtask execution time estimates In their exp erimen ts they assume a p erfect estimate for ev ery subtask the one that exactly matc hes the actual execution time They ho w ev er exp erimen tally sho w that the b est strategy for the SSP can still deliv er go o d p erformance when eac h estimate can b e o b y a factor of t w o In summary Kao and Garcia Molina s w ork is more imp ortan t b ecause of its iden ti cation of the deadline assignmen t problem rather than the strategies that it prop oses The w eaknesses of this w ork from the system lev el deriv ation p oin t of view are the task graph mo del is v ery restrictiv e it consists of an acyclic task graph of AND tasks connected in a series parallel fashion and the solution needs go o d execution time estimates whic h are not a v ailable at the high lev el of abstraction and whic h are one of the targets of a deriv ation approac h in the rst place Data o w Design T o ol Jones Jones dev elops a soft w are to ol for selecting a m ultipro cessor sc heduling solution for a class of computation problems suc h as signal pro cessing and con trol la w problems This class of problems consists of those problems that can b e mo deled with a data o w graph and are in tended to b e executed rep etitiv ely on a set of iden tical pro cessors The to ol is capable of determining and ev aluating the steady state b eha vior of these problems for iterativ e parallel execution on m ultiple pro cessors These problems eac h as mo deled b y an algorithm m ust meet the follo wing criteria An algorithm decomp osition in to primitiv e op erations or tasks m ust b e kno wn The algorithm task dep endencies preferably due to the inheren t data dep endencies m ust b e mo deled b y a deterministic directed graph suc h as sync hronous data o w graph of Lee and Messersc hmitt The algorithm execution m ust b e rep etitiv e for an in nite input data stream The algorithm m ust b e executed on iden tical pro cessors The data o w graph apart from ha ving a set of tasks no des and a set of data dep endencies arcs has a set of task latencies a set of comm unication latencies and the initial state or the initial marking of the system as indicated b y the presence of initial data The data o w graph is also augmen ted with t w o sp ecial tasks the source task that supplies all the tok ens to the system and the sink task that consumes all the tok ens sen t to it The to ol measures t w o t yp es of metrics for the system mo deled b y the data o w graph a resp onse time and an output rate Both of these metrics are for the en tire system The resp onse time is de ned as the elapsed time b et w een the pro duction of an input tok en b y the source and the consumption of the corresp onding output tok en b y the sink The resp onse time is usually equal to the length of the longest path through the graph where the length of a path is equal to the sum of the latencies of no des and arcs on the path The output rate is de ned as the time b et w een consecutiv e consumptions of output tok ens b y the sink Since all the tasks execute with the same rate the output rate is equal to the input rate the rate at whic h input data are injected in to the graph The maxim um ratio of the data o w graph is used to compute a lo w er b ound on the output rate In summary Jones graph mo del is a cyclic single rate task graph with all AND tasks hence his mo del is a sp ecial case of the GTG mo del His cyclic rate deriv ation is lik e ours but he do es not men tion an y cycle p erio d algorithm for the deriv ation His acyclic rate deriv ation is not a problem at all b ecause ev ery task in his task graph executes at the same rate whic h is equal to the rate of the source task Jones assumes that the task and c hannel latencies are kno wn whereas w e do not Syn thesis of Real Time Signal Pro cessing Systems from Pro cessing Graphs Go ddard and Je a y Go ddard studies a pro cessing graph mo del PGM dev elop ed b y the U S Na vy for em b edded signal pro cessing applications The PGM is a directed cyclic m ulti rate data o w graph with all AND no des It is almost iden tical to the Computation Graphs of Karp and Miller and the Sync hronous Data o w graphs of Lee and Messersc hmitt hence the PGM is a sp ecial case of the GTG mo del Go ddard presen ts form ulas for computing no de execution rates tec hniques for map ping no des to tasks in the rate based execution RBE task mo del whic h will b e describ ed b elo w and conditions to v erify the sc hedulabilit y of the resulting task set under a rate based earliest deadline rst sc heduling algorithm He in addition pro vides upp er and lo w er b ounds on the total latency an y sample or tok en will encoun ter in the system The RBE task mo del is prop osed b y Je a y and Bennett In the RBE mo del the execution rate r of a task p is de ned b y an in teger pair r x y This pair p p of in tegers sho ws that task p executes x times in a time in terv al of length y This rate de nition is also an a v erage rate de nition lik e ours but is sligh tly more general than ours since in our rate de nition r x y or r y x where y x giv es the a v erage p p p erio d of task p Note that our de nition simpli es the ratio of x y e g if x and y then our de nition sa ys that r whic h is simpli ed to r whereas p p the RBE mo del sa ys that r without an y simpli cation p In summary Go ddard s cyclic rate deriv ation is not p o w erful in that Go ddard do es not seem to b e a w are of the theory of cyclic systems and cycle p erio d algorithms that w e discuss in c hapters and On the other hand Go ddard s acyclic rate deriv ation is a sp ecial case of ours b ecause our acyclic rate deriv ation for AND u tasks and Go ddard s rate deriv ation on the acyclic p ortions of the PGM are equiv alen t except for the fact that Go ddard presen ts his results in the RBE mo del and assumes that all the tok en n um b ers of the c hannels in the PGM are kno wn In the acyclic rate deriv ation he also deriv es bu er or c hannel size requiremen ts whic h w e ha v e not done in this dissertation In addition he also uses the deriv ed rates for a sc hedulabilit y analysis using the earliest deadline rst sc heduling algorithm In this analysis he assumes that the w orst case execution time of eac h task is kno wn Although this last assumption do es not hold at the high lev el of abstraction his sc hedulabilit y analysis can compleme n t our w ork in that it can b e the basis for a similar analysis under p ossibly more general task t yp es in the soft w are syn thesis stage of the RADHA RA T AN metho dology Distributed Pip eline Sc heduling of Heterogeneous Real Time Systems Chatterjee and Strosnider Chatterjee and Strosnider dev elop a framew ork called the Distributed Pip eline Sc heduling F ramew ork DPSF for designing distributed heterogeneous real time sys tems The DPSF has a set of Logical Application Streams Mo dels LASM a target platform mo del and a set of optional parameters as its inputs The LASM is the system s logical mo del i e its task graph with the timing prop erties of its tasks and c hannels The system is assumed to b e a p erio dic real time system The LASM is an acyclic AND mo del similar to the Pro cessing Graph Mo del of Go ddard In the LASM an appli cation stream refers to a set of tasks on a path in the task graph The target platform mo del is a directed graph with no des represen ting ph ysical system resources and arcs represen ting ph ysical connections b et w een resources The target platform mo del also captures the timing prop erties of these resources and connections Finally the optional parameter set sp eci es the resource assigned to a task and the execution time and rate of the task on its resource After reading its input the DPSF maps LASM on to the target platform mo del i e it allo cates resources to tasks During mapping the system s timing requiremen ts are not considered The mapping results in a set of target sp eci c application streams After the mapping step the DPSF transforms eac h target sp eci c application stream corresp ond ing to a path in the system s task graph in to a distributed pip eline b y partitioning groups of tasks in to distributed pip eline stages The use of pip eline mo del is c hosen based on the observ ation that a ma jorit y of real time systems are curren tly designed based on the pro cessor pip eline mo del called the lo c k step pip elining In suc h a pip eline all pip eline stages execute at the same rate and all pip eline stages b egin at the same time The main adv an tages of this pip elining approac h are its predictabilit y and simplicit y The DPSF extends this lo c k step pip elining in to a m ulti rate and distributed one The distributed pip eline is distributed b ecause the pip eline stages in the pip eline are async hronously clo c k ed After the system s transformation to a distributed pip eline the DPSF p erforms a timing analysis to determine whether or not the system s timing requiremen ts ha v e b een met In this analysis the DPSF also uses the prop erties of the op erating systems net w orks busses and disks used in the target platform If the result of the timing analysis is negativ e a system optimizer tries to rectify the violation problem b y v arious w a ys suc h as re mapping c hanging system con guration parameters e g net w ork pac k et size and the op erating system s timer tic k in terv al or c hanging some pip eline stage parameters In summary Chatterjee and Strosnider s task graph and their timing analysis on the task graph are sp ecial cases of ours Their approac h uses a h uge n um b er of parameters for tasks c hannels resources op erating systems net w orks etc The parameters for the tasks and c hannels include execution time and c hannel dela ys whic h are again not p ossible to obtain at a high lev el of abstraction The biggest adv an tage of their approac h is that it can b e a v ery useful ground on whic h w e can add arc hitectural requiremen ts to our o wn approac h Sync hronous and Dynamic Data Flo w Graphs Lee et al Lee and Messersc hmitt prop osed the Sync hronous Data Flo w SDF The SDF used a task graph mo del called the SDF graph The SDF graph is cyclic and m ulti rate Ev ery task in this graph is an AND task The tok en n um b ers of eac h c hannel in the SDF graph are kno wn and sp eci ed a priori Lee and Messersc hmitt study the problem of sc heduling a giv en SDF graph on to single or parallel pro cessors and sho w that sc heduling can b e done statically i e at compile time A sc hedule determines when and where tasks execute The SDF is called sync hronous b ecause all task rates in suc h a system whic h is usually a signal pro cessing system are rational m ultiple s of all other task rates Lee and Messersc hmitt use a balance equation similar to our rate equation dis cussed in x This equation sho ws that for an y c hannel from a pro ducer to a consumer the tok en pro duction rate of the pro ducer m ust matc h the tok en consumption rate of the consumer so that the c hannel do es not miss an y tok ens with a b ounded capacit y They represen t the execution rate of a task as the n um b er of executions of the task in eac h cycle of the iterated sc hedule The iterated sc hedule stems from the fact that the SDF system rep eats itself after a certain time in terv al whic h is tak en as a cycle of the iterated sc hedule Lee and Messersc hmitt write a system of balance equations that consists of a balance equation for eac h c hannel The existence of a solution of this system of equations sho ws consistency If the system of balance equations is consisten t there exist an in teger rate for eac h task Buc k and Lee later add to sp ecial t yp es of no des called SWITCH and SE LECT to the SDF graph to mo del data dep enden t iteration and conditionals Their mo del is called the tok en o w mo del In a sense they add the OR b eha vior to the SDF graph The SWITCH no de pro duce an exp ected n um b er of tok ens and the SELECT no de consumes an exp ected n um b er of tok ens b oth of whic h are sp eci ed with sym b olic constan ts denoting the probabilit y of pro ducing or consuming a tok en on the corresp ond ing c hannels Buc k and Lee sho w ho w to c hec k the existence of a solution to the system of balance equations without estimating n umerical v alues of these sym b olic constan ts In summary the SDF graph is a sp ecial case of the GTG mo del The tok en o w mo del is similar to the GTG mo del but the OR b eha vior in the GTG mo del is more suitable for a high lev el of abstraction In b oth the SDF and tok en o w mo dels the analysis assumes to ha v e all the tok en n um b ers whic h is not the case in our analysis In that sense our approac h is more p o w erful Ho w ev er if all the tok en n um b ers are kno wn X 1 X 2 X 3 14 s a b c 28 14 42 d e 28 42 f 42 Y1 28[21,31] Y 2 42[29,47] Figure The task graph used b y Gerb er et al our rate deriv ation for a SDF lik e v ersion of the GTG mo del is iden tical to the analysis p erformed on the SDF graph Finally these researc hers do not consider the deriv ation problem but sc heduling problem of data o w graphs on m ultipro cessors In that sense our w ork is more useful for co design Calibration of In termediate T asks Gerb er et al Gerb er et al mo del a real time system as a set of task c hains o v er a task graph in whic h ev ery task b eha v es lik e an AND s task suc h that whenev er a task executes it reads data from al l its incoming c hannels and writes to al l its outgoing c hannels They also allo w in nite c hannel sizes whic h are realized b y circular bu ers that ma y p ermit o ccasional con trolled data loss It is con trolled in the sense that eac h task kno ws ho w man y data items to read and where in the c hannel to nd them the rest of the data items can b e skipp ed They assume that they are giv en a w orst case resp onse time constrain t an input cor relation constrain t b et w een ev ery set of related input tasks and an output rate constrain t on ev ery c hain of tasks They also assume that they kno w the execution time of eac h task They then driv e inequalities that tie together the ab o v e giv en constrain ts with task p erio ds deadlines and ready times Their goal is rst to deriv e the task p erio ds and then the other task prop erties A t this p oin t they usually ha v e a v ery large searc h space T o reduce the size of the searc h space they use the follo wing four heuristics applied in the order giv en b elo w Harmonic chain mer ging They rst assume that the p erio d of a pro ducer exactly divides that of its consumer s whic h is called harmonicity This ensures that the p erio ds of all the tasks in a c hain is expressed in terms of the p erio d of the head of the c hain GCD p ar ent pruning This is to ensure that the head of eac h c hain forms a greatest common divisor GCD for the en tire c hain Utilization pruning Using the execution times of the tasks they eliminate p erio ds that mak e the utilization more than the maxim um allo w able utilization LCM child pruning This ensures that the p erio d of a task is a m ultiple of its predecessors com bined least common m ultiple LCM The biggest adv an tage of their approac h is that they driv e all the task prop erties ho w ev er they do this at the cost of sev erely restricting the applicabilit y of their deriv ation tec hniques F or example the assumption that the task execution times are kno wn at the task graph lev el cannot hold b ecause it is imp ossible to kno w the task execution times at suc h a high lev el of abstraction In fact nding the task execution times is a v ery di cult problem ev en after the co de for eac h task is ready and the pro cessor to whic h they are assigned is kno wn Without the assumption of kno wn execution times their approac h cannot deriv e most of the task prop erties and their third heuristic cannot b e used Moreo v er their other heuristics do not hold under the OR b eha vior W e no w compare their w ork with our w ork on the task graph in Figure This task graph is tak en from They deriv e the p erio ds of the tasks from the p erio d in terv als giv en for the output tasks Y and Y in the gure and other external constrain ts as men tioned b efore The deriv ation starts from task s The p erio ds that they deriv e are giv en next to eac h task in the graph As our algorithm deriv es task p erio ds from those of the input tasks X X and X and their p erio ds are not giv en w e cannot compute the task p erio ds ho w ev er w e can v erify them as if w e deriv ed them The tasks in this graph are AND tasks and they can in ten tionally lose data Our metho d deriv es the same task p erio ds if the follo wing assumptions for some of the tasks hold tasks a b c consume t w o one and four tok ens of task s resp ectiv ely p er execution and task e consumes four tok ens of task b p er execution These assumptions tak e care of the fact that these consumers are slo w er than their resp ectiv e pro ducers If these assumptions do not hold w e can still determine the task p erio ds but our deriv ation will dep end largely on the tok en usage patterns W e think this is the correct approac h Their pap er do es not men tion the exact tok en usage so an y violations of these assumptions lead to the problems of either un b ounded bu ers or b ounded bu ers with data loss In fact it is easy to come up with certain tok en usage patterns for the task graph suc h that none of their heuristics except the third one is v alid an y more In summary Gerb er et al do not assume that they kno w the rates of the input tasks They actually men tion the need for an approac h to deriv e the task prop erties from the rates of the input tasks In this resp ect our w ork complem en ts theirs b ecause w e prop ose exactly suc h an approac h As this dissertation sho ws our approac h is more e ectiv e b ecause it has far few er assumptions than their approac h Besides their rst heuristic whic h they utilize most is just a b ypro duct of our rate equation for the AND u case and the second and fourth can b e sho wn to b e easily handled b y our rate deriv ation algorithm Nonetheless their tec hniques suc h as sym b olic v ariable handling will b e v ery useful when w e do not kno w the rates of all the input tasks W e lea v e this extension of our approac h as a future w ork Gerb er et al s w ork has b een extended in man y directions as can b e seen in e g Other Related W ork The references ab o v e are the main references whose scop e is close to ours Ho w ev er the follo wing references are somewhat related b ecause they are also concerned with timing issues although they usually consider lo w er lev els of abstraction Avrunin et al Jahanian and Mok Co olahan and Roussop oulos Jahanian Khordo c et al Liu and Ha Martello et al Douk as and LaP augh and W allace and Sequin Summary In this c hapter w e ha v e discussed the deriv ation and v alidation problems in general x has de ned these problems with an o v erview of our solution and x has examined the issue of using a v erage v alues rather than the w orst case ones in our deriv ation and v alidation approac h Chapter Acyclic Rate Deriv ation and V alidation This c hapter presen ts rate deriv ation and v alidation algorithms for acyclic GTGs It in tro duces the rate equation that constitutes the basis for all the algorithms in this c hapter The rate deriv ation algorithm in v ok es other algorithms for sp ecial cases suc h as tasks with only one input c hannel tasks with man y input c hannels tasks with rate requiremen ts and tasks whose rates are kno wn This c hapter also presen ts an algorithm for eac h of these cases Rate Equation Consider the arc or c hannel p c from pro ducer p to consumer c in Figure Our rate deriv ation algorithm assumes that the rate of pro ducer p the predecessor of c is kno wn and w e are to deriv e the rate of consumer c Th us to ensure that c hannel p c is b ounded w e require that the output rate or of p and the input rate ir of c matc h p c Token numbers Channel delay p T Ppc dpc Cpc Tc Period r p c p rc Rate t t p c Start time Producer Consumer Figure Prop erties p erio ds and rates of t w o tasks pro ducer p and consumer c and those tok en n um b ers as pro duce and consume n um b ers the c hannel p c b et w een them In other w ords w e require that P C pc pc or ir p c T T p c holds This equation implies that all the tok ens that p pro duces in to the c hannel p c are eventual l y consumed b y c The adjectiv e ev en tually is due to the fact that the rates are de ned in the a v erage sense W e refer to Equation as the r ate e quation An y violation of this equation leads to an inc onsistency In this equation T refers to the actual p erio d in terv al but since w e usually do not kno w it w e assume that it refers to the deriv ed p erio d in terv al In our deriv ations w e will ensure that this equation is also satis ed b y the deriv ed p erio ds No w supp ose that c has a required p erio d in terv al RT c l RT uRT Then w e c c m ust ha v e l RT l D T uD T uRT c c c c where D T c l D T uD T is the p erio d in terv al that w e deriv e for c An y violation c c of this equation leads to a violation It is imp ortan t to note that since w e use a v erage p erio ds the deriv ed p erio d in terv al for c ma y not subsume the actual p erio d in terv al for c W e sa y that a prop ert y of a task or c hannel is known if it is a nite n um b er that is sp eci ed in adv ance it is unknown otherwise The rate deriv ation algorithm is based on an en umeration of the cases as to ho w man y of the parameters in the follo wing equation are kno wn or in nite l RT C l D T uD T uRT c pc c c c l D T P l D T uD T uD T p pc p p p This equation is obtained from b oth Equation the rate equation and Equation In this equation only l D T and uD T are kno wn for sure The other v ariables ma y or p p ma y not b e kno wn F rom Equation w e deriv e l D T and uD T as c c C l D T C uD T pc p pc p l D T and uD T c c P P pc pc Since the ab o v e fractions ma y not b e in tegers w e con v ert them to in tegers b y using the o or and ceil functions as follo ws C l D T C uD T pc p pc p l D T and uD T c c P P pc pc Note that the in teger in terv al l D T uD T deriv ed in Equation subsumes the in terv al c c l D T uD T in Equation W e p erform our violation c hec k with resp ect to the v alues c c in Equation in the sense that a violation o ccurs if these in teger v alues do not satisfy Equation Rate Deriv ation Algorithm for One Input W e use the algorithm D P er iod in Figure to deriv e p erio d in terv al for task c with r esp e ct to the arc p c This algorithm in v ok es t w o other algorithms D P er iodG in Figure and D P er iodR in Figure dep ending on whether or not the p erio d of c is also kno wn The naming of these algorithms follo w from the fact that D P er iodG and D P er iodR deriv e p erio ds with giv en and required rates resp ectiv ely If the p erio d of D P er iod r eq uir ed P C P C l D T uD T l D T uD T pc pc p p c c Input r eq uir ed P C l D T uD T l D T uD T pc pc p p c c Output P C l D T and uD T if r eq uir ed and violations and inconsistencies if an y c c Chec k for violations if l D T uD T do es not hold then p p return with violation if b oth l D T and l RT are kno wn and l D T l RT then c c c c return with violation if b oth uD T and uRT are kno wn and uD T uRT then c c c c return with violation Cop y the arc prop erties in order not to mo dify them P P C C pc pc Deriv e the prop erties of consumer c and arc p c if c has kno wn p erio d b ounds then return D P er iodG r eq uir ed P C l D T uD T l D T uD T p p c c else return D P er iodR r eq uir ed P C l D T uD T l RT uRT l D T uD T p p c c c c Figure Rate deriv ation algorithm for a single arc c is giv en or kno wn then D P er iodG is in v ok ed to deriv e the prop erties of c hannel p c and those of c If it is not kno wn D P er iodR is in v ok ed to do the job These algorithms also c hec k for an y p oten tial violations or inconsistencies during deriv ation Eac h of these algorithms runs in constan t time W e will discuss these t w o algorithms in detail in sections and The set of the prop erties that the algorithm D P er iod deriv es i e the solution is not unique in that there ma y b e other solutions that satisfy Equation This p ossibilit y dep ends on the n um b er of unkno wn prop erties among those of p c and c If the n um b er of unkno wn prop erties is greater than the n um b er of equations that can b e obtained from Equation there is ob viously no unique solution Our strategy is to b e practical and pro vide a reasonable solution rather than no solution that satisfy all the requiremen ts The reasonableness of the pro vided solution is determined b y our deriv ation criteria whic h is describ ed in the next section If an in terv al of v alues is p ossible for a prop ert y w e sa v e this in terv al in order to use it later to obtain another solution Since our deriv ation guaran tees that all the requiremen ts are satis ed with this in terv al of v alues for the prop ert y w e will obtain another solution The di erence b et w een the solutions is that the initial solution is obtained using our deriv ation criteria whereas the follo wing solutions ma y not use this criteria completely Rate Deriv ation Criteria Consider the c hannel p c from pro ducer p to consumer c in Figure Then w e use the follo wing rate equation C pc D T D T c p P pc to compute D T where D T is assumed to b e kno wn As w e will later sho w during our c p deriv ations it is usually true that this equation do es not ha v e a unique solution when w e ha v e man y unkno wns F or instance the tok en n um b ers ma y b e unkno wn or ev en if they are kno wn their v alues ma y b e constrained b y in terv als Since man y v alues are p ossible within an in terv al w e ha v e to use some criteria to reduce the n um b er of c hoices W e use the follo wing criteria referred to as our derivation criteria for a c hannel together with its pro ducer and consumer T ry to mak e the c hannel capacit y as small as p ossible and T ry to mak e the consumer as fast as p ossible unless required otherwise b y the timing requiremen ts If the consumer can b e made arbitrarily fast or there are no clear guidelines as to ho w fast it should made try to mak e it at least as fast as the pro ducer Here the phrase as p ossible means without violating the timing requiremen ts if there are an y sp eci ed The in tuition b ehind these criteria is that it is alw a ys adv an tageous to ha v e a faster system than a slo w er one b ecause it is easier to slo w do wn the system than to sp eed it up and the resp onse time of a fast system is slo w er than that of a slo w system Of course this in tuition holds if the system is fast but at the same time its sp eed is the lo w est that it can tolerate without disrupting its in teraction with its en vironmen t Since w e will p erform all our deriv ations without violating an y timing requiremen ts our solution will not disrupt the system s op eration That is w e will try to nd the fastest solution within the p eriphery of the timing requiremen t s and then if required try to slo w it do wn without lea ving this p eriphery As for realizing these criteria w e can fortunately realize the rst t w o of them at the same time b ecause of Equation The rst criterion can b e realized b y k eeping C pc as small as p ossible ho w ev er a small C implies a small D T and a small D T in turn pc c c implies a fast consumer In terms of the parameters in this equation w e will realize these criteria as follo ws If C is kno wn then c ho ose P as large as p ossible pc pc If P is kno wn then c ho ose C as small as p ossible pc pc If b oth C and P are unkno wn then c ho ose C and P in suc h a w a y that the pc pc pc pc ratio C P is as small as p ossible pc pc Rate Deriv ation with Required Rates This case means that the p erio d in terv al D T of c is unkno wn so the required p erio ds c l RT and uRT will b e tak en in to accoun t The deriv ations in this case in v olv e a long c c case analysis based on Equation In this equation w e assume that l RT uRT if c c b oth are kno wn and that l D T uD T Both of these assumptions m ust p p T able Cases of rate deriv ation with required rates These cases are deriv ed based on the v alues tak en b y the required p erio ds l RT and uRT The term kno wn means c c that the corresp onding p erio d b ound is a nite n um b er sp eci ed in adv ance The case when the lo w er p erio d b ound equals is analyzed separately Case lRT uRT c c Case unkno wn unkno wn unkno wn unkno wn Case kno wn unkno wn kno wn Case unkno wn kno wn kno wn Case kno wn kno wn b e c hec k ed b ecause they are required for our deriv ations The case that uD T is p handled in the algorithm D P er iodR This case uses C P l RT and uRT from Equation The tok en n um b ers pc pc c c can b e kno wn or unkno wn Based on that w e ha v e four main sub cases b oth tok en n um b ers are unkno wn either P or C is kno wn t w o cases b oth are kno wn In eac h pc pc sub case w e consider whether or not the required p erio d b ounds are kno wn or not the lo w er required p erio d b ound can b e unkno wn or b oth kno wn and non zero the upp er required p erio d b ound can b e b oth unkno wn and not in nit y in nit y or kno wn Th us eac h sub case con tains nine sub sub cases as listed in T able This case is implem en te d in the algorithms D T ok enR and D P er iodR where D and R stand for Deriv e and Required resp ectiv ely The former algorithm is giv en in Figure and the latter is giv en in Figure The former algorithm is in v ok ed in the latter it is written as a separate algorithm for the sak e of clarit y Both of these algorithms run in constan t time They are based on the case analysis presen ted in the follo wing four subsections The correctness of these algorithms is giv en b y the follo wing theorem whose pro of is due to the follo wing case analysis Theorem If the algorithm D P er iodR r eturns suc c ess then the derivations it has p erforme d satisfy al l the r e quir e d p erio d b ounds If it r eturns with violation then ther e ar e no derivations that satisfy al l the r e quir e d p erio d b ounds No w w e determine the deriv ations in eac h case and pro v e them In the sequel the notation x means that x is kno wn Both P and C are Unkno wn pc pc This case reduces to the t w o cases in the follo wing t w o subsections x and x in whic h either P or C is kno wn pc pc Case Both l RT and uRT are Unkno wn c c If w e ha v e either l RT C l D T uD T uRT c pc c c c P pc uD T uD T l D T l D T p p p p or C l D T uD T uRT pc c c c P pc uD T uD T l D T l D T p p p p or l RT C l D T uD T c pc c c P pc uD T uD T l D T l D T p p p p or C l D T uD T pc c c P pc uD T uD T l D T l D T p p p p then there are no timing requiremen ts to satisfy so no violations are p ossible Th us w e get P and C pc pc i e the tok en n um b ers can tak e an y v alue W e c ho ose the smallest v alues for them and deriv e C P pc pc This c hoice mak es the consumer as fast as the pro ducer as suggested b y our deriv ation criteria Case l RT is Kno wn but uRT is Unkno wn c c If w e ha v e l RT and either c l RT C l D T uD T uRT c pc c c c P pc uD T uD T l D T l D T p p p p or l RT C l D T uD T c pc c c P pc uD T uD T l D T l D T p p p p then w e get l RT C c pc l D T P p pc In this case the relativ e sizes of l RT and l D T b ecome signi can t If l RT l D T c p c p then C m ust b e greater than P W e c ho ose for P the smallest v alue that it can pc pc pc tak e After this c hoice Equation b ounds C from b elo w as pc l RT c C pc l D T p so that w e ha v e l RT c C pc l D T p As suggested b y our deriv ation criteria w e c ho ose the smallest v alue for C as pc l RT c C pc l D T p On the other hand if l RT l D T the left hand side of Equation is smaller than c p Th us w e can c ho ose a smaller C and a larger P as suggested b y our deriv ation pc pc criteria W e assign to C the smallest v alue that it can tak e After this c hoice pc Equation b ounds P from ab o v e as pc l D T p P pc l RT c so that w e ha v e l D T p P pc l RT c As suggested b y our deriv ation criteria w e c ho ose the largest v alue for P as pc l D T p P pc l RT c W e no w sho w that these c hoices do not lead to an y violations F or that w e will plug in these v alues in to Equation and compare the resulting equation with the kno wn timing requiremen ts Hence if l RT l D T w e compute l D T as c p c l m lRT c l D T p C l D T l RT pc p lD T c p l D T l D T l RT c p c P l D T pc p meaning that l RT is satis ed If l RT l D T w e compute l D T as c c p c C l D T l D T l D T l D T pc p p p p j k j k l D T l RT c c lD T lD T lD T p p p P pc lRT lRT lRT c c c meaning that l RT is satis ed Note that there is no timing requiremen t on uRT so w e c c do not ha v e to compute it Case l RT is Unkno wn but uRT is Kno wn c c If w e ha v e either uRT l RT C l D T uD T c c pc c c P pc l D T l D T uD T uD T p p p p or uRT C l D T uD T c pc c c P pc uD T uD T l D T l D T p p p p then w e get C uRT pc c P uD T pc p Here the relativ e sizes of uRT and uD T are signi can t If uRT uD T the righ t c p c p hand side of Equation is greater than or equal to This means that w e can mak e the ratio C P as small as p ossible as suggested b y our deriv ation criteria Hence w e pc pc deriv e C P pc pc Note that P can ha v e a larger v alue e g it can b e equal to l D T so that l D T b ecomes pc p c Ho w ev er w e set it to to mak e the consumer as fast as the pro ducer as suggested b y our deriv ation criteria On the other hand if uRT uD T then the righ t hand side of Equation c p b ecomes less than This dictates a smaller C and a larger P W e assign to C pc pc pc This c hoice b ounds P from b elo w as pc uD T p P pc uRT c so that w e ha v e uD T p P pc uRT c F rom this w e deriv e uD T p P pc uRT c An y v alue greater than this assigned v alue of P can do the job W e p erform this pc assignmen t to mak e the consumer as fast as the pro ducer as suggested b y our deriv ation criteria W e no w sho w that these c hoices do not lead to an y violations F or that w e will plug in these v alues in to Equation and compare the resulting equation with the kno wn timing requiremen ts Hence if uRT uD T w e compute uD T as c p c C uD T uD T pc p p uD T uRT c c P pc meaning that uRT is satis ed If uRT uD T w e compute uD T as c c p c C uD T uD T uD T uD T pc p p p p l m l m uD T uRT c c uD T uD T uD T p p p P pc uRT uRT uRT c c c meaning that uRT is satis ed c Case Both l RT and uRT are Kno wn c c If w e ha v e l RT and c l RT uRT C l D T uD T c c pc c c P pc uD T uD T l D T l D T p p p p then w e get l RT C uRT c pc c l D T P uD T p pc p If w e ha v e l RT uRT c c l D T uD T p p then w e deriv e l RT l D T c p C and P pc pc GC D l RT l D T GC D l RT l D T c p c p If w e ha v e l RT uRT c c l D T uD T p p then the relativ e sizes of l RT and l D T b ecome signi can t If l RT l D T then C c p c c pc m ust b e greater than P W e c ho ose for P the smallest v alue that it can tak e After pc pc this c hoice Equation b ounds C from b elo w and ab o v e as pc l RT uRT c c C pc l D T uD T p p so that w e ha v e l RT uRT c c C pc l D T uD T p p As suggested b y our deriv ation criteria w e c ho ose the smallest p ossible v alue for C as pc l RT c C pc l D T p where w e ha v e to ensure that the equation l RT uRT c c l D T uD T p p holds W e no w pro v e that this v alue of C do es not lead l D T to violate the timing require pc c men t l RT and do es not lead uD T to violate the timing requiremen t uRT F or l RT c c c c w e compute l D T as c l m lRT c l D T p C l D T l RT pc p lD T c p l D T l D T l RT c p c P l D T pc p meaning that l RT is satis ed F or uRT w e compute uD T as c c c l m lRT c l m uD T p lD T p C uD T pc p uD T c P pc l j k m l m uRT uRT c c uD T uD T uRT p p c uD T uD T p p meaning that uRT is satis ed In the last pro of w e used Equation c On the other hand if l RT l D T then the left hand side of Equation is smaller c c than Then w e c ho ose a smaller C and a larger P as suggested b y our deriv ation pc pc criteria W e assign to C the smallest v alue that it can tak e After this c hoice pc Equation b ounds P from b elo w and ab o v e as pc uD T l D T p p P pc uRT l RT c c so that w e ha v e uD T l D T p p P pc uRT l RT c c As suggested b y our deriv ation criteria w e c ho ose the largest p ossible v alue for P as pc l D T p P pc l RT c where w e ha v e to ensure that the equation uD T l D T p p uRT l RT c c holds W e no w pro v e that this v alue of P do es not lead l D T to violate the timing require pc c men t l RT and do es not lead uD T to violate the timing requiremen t uRT F or l RT c c c c w e compute l RT as c C l D T l D T l D T pc p p p j k l D T l RT c c lD T lD T p p P pc lRT lRT c c meaning that l RT is satis ed F or uRT w e compute uRT as c c c C uD T uD T uD T uD T pc p p p p j k l m uD T uRT c c uD T lD T uD T p p p P pc uRT lRT uRT c c c meaning that uRT is satis ed In the last pro of w e used Equation c P is Unkno wn but C is Kno wn pc pc F or this case our deriv ation criteria dictate that w e should try to assign as large a v alue for P as p ossible pc Case Both l RT and uRT are Unkno wn c c If w e ha v e either C pc l RT l D T uD T uRT c c c c P pc l D T l D T uD T uD T p p p p or C pc l D T uD T uRT c c c P pc uD T uD T l D T l D T p p p p or C pc l D T uD T c c P pc l D T l D T uD T uD T p p p p or C pc l RT l D T uD T c c c P pc uD T uD T l D T l D T p p p p then there are no timing requiremen ts to satisfy so no violations are p ossible Th us w e get P pc i e P can tak e an y v alue W e c ho ose a large v alue and deriv e pc P C pc pc This c hoice mak es the consumer as fast as the pro ducer as suggested b y our deriv ation criteria Case l RT is Kno wn but uRT is Unkno wn c c If w e ha v e l RT and either c C l RT pc l D T uD T uRT c c c c P pc uD T uD T l D T l D T p p p p or C l RT pc l D T uD T c c c P l D T pc l D T uD T uD T p p p p then w e get C l D T pc p l RT l D T c c P pc In this case Equation b ounds P from ab o v e as pc C l D T pc p P pc l RT c so w e m ust ha v e C l D T pc p P pc l RT c As suggested b y our deriv ation criteria w e c ho ose the largest p ossible v alue for P as pc C l D T pc p P pc l RT c where w e ha v e to ensure that the equation C l D T pc p l RT c holds W e no w pro v e that this c hoice for P do es not lead l D T to violate the timing pc c requiremen t l RT W e compute l D T as c c C l D T C l D T C l D T pc p pc p pc p j k l D T l RT c c C lD T C lD T pc p pc p P pc lRT lRT c c meaning that l RT is satis ed In this pro of w e used Equation c Case l RT is Unkno wn but uRT is Kno wn c c If w e ha v e either C uRT pc l RT l D T uD T c c c c P pc l D T l D T uD T uD T p p p p or C pc uRT l D T uD T c c c P pc uD T uD T l D T l D T p p p p then w e get C uD T pc p uD T uRT c c P pc This equation b ounds P from b elo w as pc C uD T pc p P pc uRT c so w e m ust ha v e C uD T pc p P pc uRT c Here P can b e as large as C uD T so that l D T can get its smallest v alue Ho w ev er pc pc p c w e use our deriv ation criteria to mak e the consumer as fast as the pro ducer if C is larger pc than the lo w er b ound on P If not the lo w er b ound of P dictates a faster consumer pc pc Th us w e deriv e C uD T pc p P max fC g pc pc uRT c where the lo w er b ound is alw a ys greater than or equal to W e no w pro v e that this c hoice for P do es not lead uD T to violate the timing pc c requiremen t uRT W e compute uD T as c c l m C uD T C uD T pc p pc p l m uD T c C uD T P pc p pc max fC g pc uRT c C uD T C uD T pc p pc p l m uRT C uD T c pc p C uD T pc p uRT c uRT c meaning that uRT is satis ed c Case Both l RT and uRT are Kno wn c c If w e ha v e l RT and c C l RT uRT pc c l D T uD T c c c P pc l D T l D T uD T uD T p p p p then w e get C l D T C uD T pc p pc p l RT l D T uD T uRT c c c c P P pc pc In this case Equation b ounds P from b elo w and ab o v e as pc C uD T C l D T pc p pc p P pc uRT l RT c c so w e m ust ha v e C uD T C l D T pc p pc p P pc uRT l RT c c As suggested b y our deriv ation criteria w e c ho ose the largest v alue for P Th us w e pc deriv e C l D T pc p P pc l RT c where w e ha v e to ensure that the equation C uD T C l D T pc p pc p uRT l RT c c holds W e no w pro v e that this v alue of P do es not lead l D T to violate the timing require pc c men t l RT and do es not lead uD T to violate the timing requiremen t uRT F or l RT c c c c w e compute l RT as c C l D T C l D T C l D T pc p pc p pc p j k l D T l RT c c C lD T C lD T pc p pc p P pc lRT lRT c c meaning that l RT is satis ed F or uRT w e compute uRT as c c c l m C uD T C uD T pc p pc p j k uD T c C lD T P pc p pc lRT c C uD T C uD T pc p pc p l m uRT C uD T c pc p C uD T pc p uRT c uRT c meaning that uRT is satis ed In the last pro of w e used Equation c P is Kno wn but C is Unkno wn pc pc F or this case our deriv ation criteria dictate that w e should try to assign as small a v alue for C as p ossible pc Case Both l RT and uRT are Unkno wn c c If w e ha v e either l RT C l D T uD T uRT c pc c c c l D T P l D T uD T uD T p pc p p p or C l D T uD T uRT pc c c c P uD T uD T l D T l D T pc p p p p or l RT C l D T uD T c pc c c l D T P l D T uD T uD T p pc p p p or C l D T uD T pc c c P uD T uD T l D T l D T pc p p p p then there are no timing requiremen ts to satisfy so no violations are p ossible Th us w e get C pc i e C can tak e an y v alue W e c ho ose the smallest v alue that C can tak e and deriv e pc pc C pc This c hoice mak es the consumer the fastest p ossible Case l RT is Kno wn but uRT is Unkno wn c c If w e ha v e either l RT C l D T uD T uRT c pc c c c P uD T uD T l D T l D T pc p p p p or l RT c C l D T uD T pc c c l D T P l D T uD T uD T p pc p p p then w e get C l D T pc p l RT l D T c c P pc In this case Equation b ounds C from b elo w as pc P l RT pc c C pc l D T p so w e m ust ha v e P l RT pc c C pc l D T p As suggested b y our deriv ation criteria w e c ho ose the smallest p ossible v alue for C as pc P l RT pc c C pc l D T p where the lo w er b ound is alw a ys greater than or equal to W e no w pro v e that this c hoice for C do es not lead l D T to violate the timing pc c requiremen t l RT W e compute l D T as c c l m P lRT P lRT pc c pc c l D T l D T p p C l D T lD T lD T pc p p p l D T l RT c c P P P pc pc pc meaning that l RT is satis ed c Case l RT is Unkno wn but uRT is Kno wn c c If w e ha v e either uRT l RT C l D T uD T c c pc c c P uD T uD T l D T l D T pc p p p p or uRT C l D T uD T c pc c c l D T P l D T uD T uD T p pc p p p then w e get C uD T pc p uD T uRT c c P pc This equation b ounds C from ab o v e as pc P uRT pc c C pc uD T p so w e m ust ha v e P uRT pc c C pc uD T p As suggested b y our deriv ation criteria w e c ho ose the smallest p ossible v alue for C as pc C pc where w e ha v e to ensure that the equation P uRT pc c uD T p holds W e no w pro v e that this c hoice for C do es not lead uD T to violate the timing pc c requiremen t uRT W e compute uRT as c c l m l m C uD T uD T pc p p uD T c P P pc pc j k P uRT pc c P uRT pc c uD T p uD T p uD T p uD T p uRT c P P pc pc meaning that uRT is satis ed In this pro of w e used Equation c Case Both l RT and uRT are Kno wn c c If w e ha v e l RT and c l RT uRT C l D T uD T c c pc c c l D T P l D T uD T uD T p pc p p p then w e get C l D T C uD T pc p pc p l RT l D T uD T uRT c c c c P P pc pc In this case Equation b ounds C from b elo w and ab o v e as pc P l RT P uRT pc c pc c C pc l D T uD T p p so w e m ust ha v e P l RT P uRT pc c pc c C pc l D T uD T p p As suggested b y our deriv ation criteria w e c ho ose the smallest v alue for C Th us w e pc deriv e P l RT pc c C pc l D T p where w e ha v e to ensure that the equation P l RT P uRT pc c pc c l D T uD T p p holds W e no w pro v e that this v alue of C do es not lead l D T to violate the timing require pc c men t l RT and do es not lead uD T to violate the timing requiremen t uRT F or l RT c c c c w e compute l D T as c l m P lRT P lRT pc c pc c l D T l D T p p C l D T pc p lD T lD T p p l D T l RT c c P P P pc pc pc meaning that l RT is satis ed F or uRT w e compute uD T as c c c l m P lRT pc c l m uD T p lD T p C uD T pc p uD T c P P pc pc j k P uRT pc c P uRT pc c uD T p uD T p uD T p uD T p uRT c P P pc pc meaning that uRT is satis ed In the last pro of w e used Equation c Both P and C are Kno wn pc pc Case Both l RT and uRT are Unkno wn c c If w e ha v e either C pc l RT l D T uD T uRT c c c c l D T P l D T uD T uD T p pc p p p or C pc l RT l D T uD T c c c P uD T uD T l D T l D T pc p p p p then no violations are p ossible Case l RT is Kno wn but uRT is Unkno wn c c If w e ha v e either C l RT pc l D T uD T uRT c c c c P uD T uD T l D T l D T pc p p p p or C l RT pc l D T uD T c c c P uD T uD T l D T l D T pc p p p p then w e get C l D T pc p l RT l D T c c P pc where a violation happ ens if the equation C l D T pc p l RT l D T c c P pc do es not hold Case l RT is Unkno wn but uRT is Kno wn c c If w e ha v e either C pc uRT l RT l D T uD T c c c c P uD T uD T l D T l D T pc p p p p or C pc uRT l RT l D T uD T c c c c P uD T uD T l D T l D T pc p p p p then w e get C uD T pc p uD T uRT c c P pc where a violation happ ens if the equation C uD T pc p uD T uRT c c P pc do es not hold Case Both l RT and uRT are Kno wn c c If w e ha v e l RT and c C l RT pc uRT l D T uD T c c c c l D T P l D T uD T uD T p pc p p p then w e get C l D T C uD T pc p pc p l RT l D T uD T uRT c c c c P P pc pc where a violation happ ens if the equation C l D T C uD T pc p pc p l RT l D T uD T uRT c c c c P P pc pc do es not hold Rate Deriv ation with Giv en Rates This case means that the b ounds of the p erio d in terv al D T of c are kno wn or unkno wn c and there are no required p erio d b ounds The deriv ations in this case in v olv e a long case analysis based on the equation C l D T uD T pc c c P l D T uD T pc p p where w e assume that l D T uD T This assumption m ust b e c hec k ed p p b ecause it is required for our deriv ations The case that uD T is handled in the p algorithm D P er iodG This case uses C P l D T and uD T from Equation The tok en n um b ers pc pc c c can b e kno wn or unkno wn Based on that w e ha v e four main sub cases b oth tok en n um b ers are unkno wn either P or C is kno wn t w o cases b oth are kno wn In eac h pc pc sub case w e consider whether or not the giv en p erio d b ounds are kno wn or not the lo w er T able Cases of rate deriv ation with giv en rates These cases are deriv ed based on the v alues tak en b y the giv en p erio ds l D T and uD T The term kno wn means that c c the corresp onding p erio d b ound is a nite n um b er sp eci ed in adv ance Case lD T uD T c c Case unkno wn unkno wn unkno wn Case kno wn unkno wn kno wn Case unkno wn kno wn Case kno wn kno wn required p erio d b ound can b e unkno wn or kno wn the upp er required p erio d b ound can b e unkno wn and not in nit y in nit y and kno wn Th us eac h sub case con tains six sub sub cases as listed in T able This case is implem en ted in the algorithms D T ok enG and D P er iodG where D and G stand for Deriv e and Giv en resp ectiv ely The former algorithm is giv en in Figure and the latter is giv en in Figure The former algorithm is in v ok ed in the latter it is written as a separate algorithm for the sak e of clarit y If the former algorithm returns inconsistency then the algorithm D P er iodR is in v ok ed to nd another solution in whic h the giv en p erio d b ounds are used as the required p erio d b ounds The designers do not ha v e to p erform this step ho w ev er it is somewhat in agreemen t with our deriv ation criteria b ecause the solution will b e a faster one with resp ect to its upp er b ound Both of the algorithms D T ok enG and D P er iodG run in constan t time They are based on the follo wing case analysis The correctness of these algorithms is giv en b y the follo wing theorem whose pro of is the follo wing case analysis Theorem If the algorithm D P er iodG r eturns suc c ess then the derivations it has p erforme d ar e c onsistent If the algorithm D P er iodG r eturns inc onsistency or vio lation then either ther e ar e no c onsistent derivations or ther e ar e no derivations that satisfy the given p erio d b ounds even when these given p erio d b ounds ar e taken as r e quir e d p erio d b ounds No w w e determine the deriv ations in eac h case and pro v e them In the sequel the notation x means that x is kno wn Both P and C are Unkno wn pc pc This case reduces to the t w o cases in the follo wing t w o subsections x and x in whic h either P or C is kno wn pc pc Case Both l D T and uD T are Unkno wn c c If w e ha v e either C l D T uD T pc c c P pc uD T l D T p p or C l D T pc c P pc l D T uD T p p then w e get P and C pc pc As suggested b y our deriv ation criteria w e mak e the consumer as fast as the pro ducer and deriv e C P pc pc where no inconsistencies are p ossible Case l D T is Kno wn but uD T is Unkno wn c c If w e ha v e either l D T C uD T c pc c P pc l D T uD T p p or l D T C c pc P pc l D T uD T p p then w e deriv e l D T l D T c p C and P pc pc GC D l D T l D T GC D l D T l D T c p c p where no inconsistencies are p ossible Case l D T is Unkno wn but uD T is Kno wn c c If w e ha v e uD T C l D T c pc c P pc uD T l D T p p then w e deriv e uD T uD T c p C and P pc pc GC D uD T uD T GC D uD T uD T c p c p where no inconsistencies are p ossible Case Both l D T and uD T are Kno wn c c If w e ha v e l D T uD T C c c pc P pc uD T l D T p p then w e deriv e l D T l D T c p C and P pc pc GC D l D T l D T GC D l D T l D T c p c p where an inconsistency happ ens if l D T uD T c c l D T uD T p p do es not hold P is Unkno wn but C is Kno wn pc pc Case Both l D T and uD T are Unkno wn c c If w e ha v e either C pc l D T uD T c c P pc l D T uD T p p or C pc l D T c P pc uD T l D T p p then w e get P pc As suggested b y our deriv ation criteria w e mak e the consumer as fast as the pro ducer and deriv e P C pc pc where no inconsistencies are p ossible Case l D T is Kno wn but uD T is Unkno wn c c If w e ha v e either C l D T pc uD T c c P pc uD T l D T p p or C pc l D T c P pc uD T l D T p p then w e deriv e C l D T pc p P pc l D T c where an inconsistency happ ens if P is not an in teger pc Case l D T is Unkno wn but uD T is Kno wn c c If w e ha v e C pc uD T l D T c c P pc uD T l D T p p then w e deriv e C uD T pc p P pc uD T c where an inconsistency happ ens if P is not an in teger pc Case Both l D T and uD T are Kno wn c c If w e ha v e C l D T uD T pc c c P pc uD T l D T p p then w e deriv e C l D T pc p P pc l D T c where an inconsistency happ ens if either P is not an in teger or pc l D T uD T c c l D T uD T p p do es not hold P is Kno wn but C is Unkno wn pc pc Case Both l D T and uD T are Unkno wn c c If w e ha v e either C l D T uD T pc c c P uD T l D T pc p p or C l D T pc c P l D T uD T pc p p then w e get C pc As suggested b y our deriv ation criteria w e mak e the consumer as fast as p ossible and deriv e C pc where no inconsistencies are p ossible Case l D T is Kno wn but uD T is Unkno wn c c If w e ha v e either l D T C c uD T pc c P l D T uD T pc p p or l D T C c pc P uD T l D T pc p p then w e deriv e P l D T pc c C pc l D T p where an inconsistency happ ens if C is not an in teger pc Case l D T is Unkno wn but uD T is Kno wn c c If w e ha v e uD T C l D T c pc c P l D T uD T pc p p then w e deriv e P uD T pc c C pc uD T p where an inconsistency happ ens if C is not an in teger pc Case Both l D T and uD T are Kno wn c c If w e ha v e l D T uD T C c c pc P uD T l D T pc p p then w e deriv e P l D T pc c C pc l D T p where an inconsistency happ ens if either C is not an in teger or pc l D T uD T c c l D T uD T p p do es not hold Both P and C are Kno wn pc pc Case Both l D T and uD T are Unkno wn c c If w e ha v e either C pc l D T uD T c c P l D T uD T pc p p or C pc l D T c P l D T uD T pc p p then no inconsistencies are p ossible Case l D T is Kno wn but uD T is Unkno wn c c If w e ha v e either C pc l D T uD T c c P uD T l D T pc p p or C l D T pc c P l D T uD T pc p p then an inconsistency happ ens if C l D T pc c P l D T pc p do es not hold Case l D T is Unkno wn but uD T is Kno wn c c If w e ha v e C uD T pc l D T c c P uD T l D T pc p p then an inconsistency happ ens if C uD T pc c P uD T pc p do es not hold Case Both l D T and uD T are Kno wn c c If w e ha v e C l D T uD T pc c c P l D T uD T pc p p then an inconsistency happ ens if C l D T uD T pc c c P l D T uD T pc p p do es not hold Rate Deriv ation Algorithm for Man y Inputs The algorithm D P er iodAcy c in Figure is the main algorithm for the rate deriv ation for tasks with man y input c hannels in an acyclic GTG It is used during the stage lab eled in Figure It runs in time linear in the size of the input GTG D P er iodAcy c assumes that the rate of eac h input task is kno wn It tra v erses the input graph in top ological order of its no des from the inputs to the outputs and deriv es p Ppc Cpc c Cqc q P Consumer qc Producers Figure Consumer c with t w o pro ducers p and q Note that eac h input c hannel of c has di eren t tok en n um b ers T ask c m ust b e resp onsiv e to b oth of its pro ducers the p erio d of eac h task it visits It p erforms a di eren t action dep ending on the t yp e of the task it visits Supp ose c is the task that the algorithm is ab out to w ork on Then the algorithm w orks as follo ws An y T ask with No Inputs If c is an input task then w e assume that w e kno w its p erio d in terv al b ecause its p erio d in terv al is given The algorithm assigns the giv en p erio d in terv al of c to its deriv ed p erio d in terv al in line An y task with One Input If c has only one predecessor p as in Figure then c is an AND u task The algorithm deriv es the p erio d in terv al of c using the algorithm D P er iod This case is handled in lines An y T ask with Man y Inputs If c has more than one predecessor as in Figure then the algorithm D P er iodAcy c basically deriv es a p erio d in terv al for c with resp ect to eac h predecessor c using D P er iod It then com bines these deriv ed p erio d in terv als using the t yp e of c to obtain the deriv ed p erio d in terv al of c A more detailed explanation is as follo ws F or the sak e of clarit y the follo wing discussion is concerned with t w o input c hannels but it is quite easy to generalize this discussion to more than t w o input c hannels Consider Figure In this gure t w o pro ducers p and q are feeding one consumer c With resp ect to the c hannels in this gure w e ha v e the follo wing system of rate equations P p c C p c or ir p c and p c D T D T p c p c P q c C q c or ir q c q c D T D T q c q c where the c hannel name p c after a prop ert y means that this prop ert y is tak en with resp ect to this c hannel F or instance ir p c is the input rate of c with resp ect to c hannel c p c F or the tok en n um b ers the c hannel name as the subscript means the same thing i e w e ha v e P P p c and C C p c F or eac h c hannel w e use D P er iod to pc pc return a deriv ed p erio d in terv al for c Unskipp ed T ask with Man y Inputs If c is an unskipp ed task these deriv ed p erio d in terv als for c m ust satisfy b oth of the ab o v e equations i e the equalit y D T p c D T q c m ust hold If this is the case c c then the deriv ation is said to b e c onsistent If not it is inc onsistent The algorithm D P er iod returns a unique deriv ed p erio d in terv al for c if b oth the tok en n um b ers of at least one of the c hannels are kno wn If the unique deriv ed p erio d in terv al that D P er iod returns using one of the equations sa y D T p c from equation do es not satisfy the c other i e the equation then w e ha v e an inconsistency The inconsistency will b e rep orted in line b y D P er iod in D P er iodAcy c If there are no inconsistencies then w e ha v e a unique solution that satis es the equations for all the input c hannels of c Note that the deriv ed p erio d in terv al obtained using one of the input c hannels will b e tak en as giv en p erio d in terv al in D P er iod for the other input c hannels If b oth predecessors of c ha v e unkno wn tok en n um b ers w e lo ok to see if an y p erio d requiremen ts are sp eci ed on c If there are an y then w e can still use D P er iod to deriv e a p erio d in terv al for c The deriv ed p erio d in terv al will not b e as exact as the one that could b e deriv ed using kno wn tok en n um b ers y et it will help us deriv e the prop erties of the other predecessors of c If none of the ab o v e t w o cases is p ossible for c then w e can use heuristics to deriv e a p erio d in terv al for c One approac h is giv en in W e will refer to this approac h as the LCM heuristic In the LCM heuristic the p erio d in terv al is deriv ed b y taking the least common m ultiple LCM of the p erio d in terv als of the predecessors of c The resulting p erio d in terv al leads to c hanges in the tok en n um b ers of the predecessor c hannels of c As a matter of fact it implies in terv als of tok en n um b ers for the predecessor c hannels This heuristic is a v ery p essimistic b ound but it seems to b e the b est p ossible under so man y unkno wns This heuristic is also used in Moreo v er it is used in to nd the length of the sc hedule for the task set More sp eci cally the LCM heuristic w orks as follo ws If w e add b oth sides of the rate equations in Equation w e get or or ir p c ir q c p q c c whic h implies that P p c P q c C p c C q c D T D T D T p q c where D T D T p c D T q c F rom this w e let c c C D T LC M D T D T c p q suc h that the tok en n um b ers can b e deriv ed using D er iv edP er iod b ecause the p erio d of c is deriv ed and will b e tak en as giv en in D P er iod Since p q and c ha v e p erio d in terv als rather than p erio ds w e ha v e to generalize Equation to p erio d in terv als F or this w e deriv e the p erio d in terv al for c as l D T min fLC M i j g and uD T max fLC M i j g c c where i l D T uD T and j l D T uD T Note that this is a v ery p essimistic p erio d p p q q in terv al If w e kno w the correlation b et w een p erio ds of p and q i e if w e kno w what p erio d p has when q has a particular p erio d then w e can impro v e the last deriv ation Note that eac h deriv ed tok en n um b er will b e an in terv al rather than a single n um b er whic h sho ws that the tok en n um b ers m ust b e generalized to in terv als as a future w ork Skipp ed T ask with Man y Inputs If c is a skipp ed task the deriv ation is easier compared to the unskipp ed case W e use D P er iod to compute the prop erties of c and the c hannels Supp ose D P er iod returned D T p c for c hannel p c and D T a c for c hannel q c as the p erio d in terv al of c c c Then w e deriv e the lo w er and upp er b ounds of the nal p erio d in terv al of c as l D T max fl D T p c l D T q c g and uD T max fuD T p c uD T q c g c c c c c c if c is an AND s task and as l D T min fl D T p c l D T q c g and uD T min fuD T p c uD T q c g c c c c c c if c is an OR s task In this last case w e require that at least one predecessor of c pro duce tok ens for c but it is not required that ev ery predecessor of c do so Rate V alidation Algorithm As the rate requiremen ts on the system can b e transferred to the corresp onding output tasks w e ha v e to devise w a ys to v alidate the rate requiremen t on a task The solution is straigh tforw ard Since after the rate deriv ation w e obtain the rate or p erio d in terv al of ev ery task in the system w e compare eac h deriv ed in terv al with the corresp onding required in terv al If the required one subsumes the deriv ed one the required one is satis ed otherwise it is violated Deriving Latency Bounds or Time Budgets The deriv ed p erio d in terv als can b e used to deriv e b ounds or time budgets on the latency of eac h task An upp er b ound on the latency of a task is the lo w er b ound of the p erio d in terv al of that task This b ound is required in order to ha v e b ounded c hannels This simple result can b e used during hardw are soft w are partitioning and syn thesis to determine if there is an impleme n tation of the task and to eliminate those di eren t impleme n tations that will disrupt the system s timing correctness If the implem e n tation of a task do es not satisfy the latency b ound of the task then the task cannot k eep up with the rate of its pro ducers unless it is pip elined In case the task is pip elined the latency b ound giv es the largest latency b ound that an y pip eline stage can ha v e This exploration is done in x A w ord of caution is that the solution that consists of the deriv ed p erio d in terv als so the latency b ounds for the tasks is usually not unique Then if the implem en tation of a task do es not satisfy its latency b ound w e can use the latency of the implem e n tation as the giv en p erio d of that task in the rate deriv ation algorithm in order to see whether or not a di eren t solution satisfying the latency of the implem en tation is p ossible This requires another run of the rate deriv ation algorithm and indicates the in teractiv e nature of the design pro cess Since the algorithm is v ery fast another run will not b e a problem from an execution time p oin t of view T = 7 p T 7 c p c T c Time 0 7 14 21 28 35 42 49 56 63 Time c T = 8 Before 7 14 13 12 11 10 9 8 After 6 5 4 3 2 1 0 Time 10 17 24 27 T = 3 c Before 7 4 8 5 9 6 3 After 4 1 5 2 6 3 0 18 Time 9 11 16 20 T = 2 c Before 7 5 3 8 6 4 2 After 5 3 1 6 4 2 0 Figure Executions of c as p executes when c hannel p c has zero dela y Here T p but T is set to and from top to b ottom The tok en n um b ers are equal to the task c p erio ds as sho wn Eac h horizon tal line is the timeline The lab el Time refers to the tic ks on the timeline The lab els Before and After refer to the capacit y of c hannel p c b efore and after c starts its execution at the corresp onding tic k Sometime s it is p ossible and actually necessary to tigh ten the latency b ound of a task This can b e done using additional constrain ts in v olving the task latencies These ad ditional constrain t ma y come from m utual exclusion constrain ts and similar constrain ts A detailed exploration of this p oin t is left as a future w ork W e no w justify the use of the the lo w er b ound of the deriv ed p erio d in terv al of a task rather than the smallest separation b et w een the start times of that task as the latency b ound of that task This justi cation is needed b ecause the deriv ed p erio d in terv al con tains a v erage v alues rather than w orst case v alues F or this justi cation consider Figure In this gure the p erio d of c is set to and while the p erio d of p is k ept constan t at W e see the follo wing three di eren t b eha viors When T the separations b et w een the start times of c are all equal to c When T the separations b et w een the start times of c in order are c or Then the smallest and largest separations are and resp ectiv ely When T the separations b et w een the start times of c in order are c or Then the smallest and largest separations are and resp ectiv ely Although not sho wn the smallest and largest separations b et w een the start times of c are and resp ectiv ely when T and resp ectiv ely when T and and c c resp ectiv ely when T The main p oin t is that the smallest and largest separations c dep end on the p erio ds of the pro ducer and consumer and the tok en n um b ers of the c hannel b et w een them In ev ery case ab o v e the rate equation is satis ed since T c T c This means that ev ery case can b e realized with a b ounded c hannel In other w ords ha ving T as the latency b ound of c in eac h case ab o v e will not lead to an y problems as c far as the c hannel capacities are concerned If w e w an t to prev en t an y tok en accum ulation then w e ha v e to set T to the smallest separation b et w een the start times of c in eac h case c ab o v e This will w aste the computing resources b ecause for eac h set of the separations ab o v e since the smallest separation of o ccurs only once in the set Note that for the ab o v e cases the set of separations rep eats itself in ev ery time in terv al of length LC M T after time W e lea v e it as a future w ork to exactly determine the length c of this time in terv al for acyclic GTGs Related W ork The related w ork for this section is review ed in Chapter Summary In this c hapter w e ha v e presen ted rate deriv ation and v alidation algorithms for acyclic GTGs x has in tro duced the rate equation whic h is the basis for all the deriv ations in this c hapter This equation ensures that what is pro duced will ev en tually b e consumed in the system x has presen ted a rate deriv ation algorithm for tasks with only one input c hannel This algorithm in v ok es t w o other algorithms one to deriv e rates when there are required rates and the other to deriv e rates when there are giv en rates x and x ha v e giv en these t w o algorithms whic h are based on the deriv ation criteria in x x has presen ted the rate deriv ation algorithm for the general case i e for task with man y input c hannels Finally x and x ha v e discussed the use of the deriv ed rates in v alidating rate requiremen ts and deriving upp er b ounds on the task latencies The con tributions in this c hapter consist of the acyclic rate deriv ation and v alidation algorithms D T ok enR P C l D T uD T l RT uRT l D T uD T pc pc p p c c p p Input P C l D T uD T l RT uRT l D T and uD T pc pc p p c c p p Output P and C and violations if an y pc pc Compute P or C if none is kno wn pc pc if b oth P and C are unkno wn then pc pc if l RT is unkno wn or l RT then c c if uRT is unkno wn or uRT then c c P pc else if uRT uD T then c p C pc else P pc else if uRT is kno wn and l RT uD T l D T uRT then c c p p c C l RT GC D l RT l D T pc c c p P l D T GC D l RT l D T pc p c p else if l RT l D T then c p C pc else P pc Compute P or C if at least one is kno wn pc pc if P is unkno wn but C is kno wn then pc pc if l RT is unkno wn or l RT then c c if uRT is unkno wn or uRT then c c P C pc pc else P max fC dC uD T uRT eg pc pc pc p c else P bC l D T l RT c pc pc p c if P then pc return with violation if uRT is kno wn and P d C uD T uRT e then c pc pc p c return with violation else if P is kno wn but C is unkno wn then pc pc if l RT is unkno wn or l RT then c c C pc else C dP l RT l D T e pc pc c p if C then pc return with violation if uRT is kno wn and C b P uRT uD T c then c pc pc c p return with violation return with success Figure T ok en deriv ation algorithm for a single arc when required p erio d b ounds are kno wn D P er iodR r eq uir ed P C l D T uD T l RT uRT l D T uD T pc pc p p c c p p Input P C l D T uD T l RT uRT l D T and uD T pc pc p p c c p p Output P C l D T and uD T if r eq uir ed and violations if an y pc pc c c Chec k for violations if l RT or l D T then c p return with violation if uRT and uD T then c p return with violation Deriv e tok en n um b ers and nd violations if an y D T ok enR P C l D T uD T l RT uRT l D T uD T pc pc p p c c p p Compute the p erio d b ounds for the consumer if required if r eq uir ed then l D T bC l D T P c c pc p pc if uD T then uD T p c uD T c else uD T dC uD T P e c pc p pc return with success Figure Rate deriv ation algorithm for a single arc when required p erio d b ounds are kno wn D T ok enG P C l D T uD T l D T uD T pc pc p p p p Input P C l D T uD T l D T and uD T pc pc p p p p Output P and C and inconsistencies if an y pc pc if b oth P and C are unkno wn then pc pc if l D T is unkno wn then c if uD T is unkno wn or uD T then c c C pc P pc else C uD T GC D uD T uD T pc c c p P uD T GC D uD T uD T pc p c p else C l D T GC D l D T l D T pc c c p P l D T GC D l D T l D T pc p c p else if P is unkno wn but C is kno wn then pc pc if l D T is unkno wn then c if uD T is unkno wn or uD T then c c P C pc pc else P C uD T uD T pc pc p c else P C l D T l D T pc pc p c else if P is kno wn but C is unkno wn then pc pc if l D T is unkno wn then c if uD T is unkno wn or uD T then c c C pc else C P uD T uD T pc pc c p else C P l D T l D T pc pc c p else if b oth P and C are kno wn then pc pc if l D T is kno wn and l D T P l D T C then c c pc p pc return with inconsistency if uD T is kno wn and C uD T P uD T then c pc p pc c return with inconsistency if P is not an in teger or C is not an in teger then pc pc return with inconsistency if b oth l D T and uD T are kno wn and l D T uD T l D T uD T then c c c p p c return with inconsistency return with success Figure T ok en deriv ation algorithm for a single arc when giv en p erio d b ounds are kno wn D P er iodG r eq uir ed P C l D T uD T l D T uD T pc pc p p c c Input P C l D T uD T l D T and uD T pc pc p p p p Output P C l D T and uD T if r eq uir ed and violations if an y pc pc c c Chec k for violations if l D T or l D T then c p return with violation if uD T then p if uD T is unkno wn then c uD T c else if uD T then c return with violation else if uD T then p return with violation Deriv e tok en n um b ers and nd inconsistencies if an y D T ok enG P C l D T uD T l D T uD T pc pc p p c c If inconsistencies tak e D T as RT and deriv e D T again c c c if an y inconsistencies so far then D T ok enR P C l D T uD T l D T uD T l D T uD T pc pc p p c c p p Compute the p erio d b ounds for the consumer if required if r eq uir ed then l D T bC l D T P c c pc p pc if uD T then p uD T dC uD T P e c pc p pc return with success Figure Rate deriv ation algorithm for a single arc when giv en p erio d b ounds are kno wn D P er iodAcy c G Input an acyclic GTG G Output prop erties of ev ery arc and task in G Find a top ological sorting of the tasks in G for eac h task c in top ologically sorted order from inputs to outputs do if c has no predecessors i e c is an input task then l D T l T uD T uT c c c c else if c has one predecessor then Let p b e the only predecessor of c D P er iod tr ue P C P C l D T uD T l D T uD T pc pc pc pc p p c c else if c has more than one predecessor then if c is an unskipp ed task then Lo ok for an arc p c for whic h b oth P and C are kno wn pc pc if suc h an arc p c is found then D P er iod tr ue P C P C l D T uD T l D T uD T pc pc pc pc p p c c else if l RT or uRT is kno wn then c c D P er iod tr ue P C P C l D T uD T l D T uD T pc pc pc pc p p c c else Heuristic solutions are p ossible here return with an error of insu cien t data else if c is a skipp ed task then Initialize l T if c is an AND s task then l T else c is an OR s task then l T uT for eac h predecessor p of c do Do not up date an y prop erties y et D P er iod tr ue P C l D T uD T l D T uD T pc pc p p Compute the p erio d b ounds if c is an AND s task then l T max fl T l D T g else c is an OR s task then l T min fl T l D T g uT max fuT uD T g Cop y the p erio ds b ounds l D T l T uD T uT c c Up date the prop erties of the predecessor arcs for eac h predecessor p of c do D P er iod f al se P C P C l D T uD T l D T uD T pc pc pc pc p p c c return with success Figure Rate deriv ation algorithm for acyclic task graphs Chapter Acyclic Separation Deriv ation and V alidation This c hapter presen ts separation deriv ation and v alidation algorithms for acyclic GTGs These algorithms are used to deriv e b oth input and output correlation separation or resp onse time constrain ts and v alidate an y requiremen ts on them These constrain ts and requiremen ts can b e de ned on the system or on an y of the tasks in it Minim um and Maxim um Time Separations If w e kno w the separation b et w een the start times of the input tasks whic h m ust b e giv en it is p ossible to determine b ounds on the start time of an y no de in the ev en t graph W e de ne the maxim um and minim um time separations S and s b et w een the ij ij start times of an y t w o no des i and j in the ev en t graph as s min ft t g t t max ft t g S ij j i j i j i ij W e note that due to the conserv ativ e dela y assignmen t to the arcs the maxim um and minim um time separations ma y not b e realizable but are still v alid upp er and lo w er b ounds W e also note that since min ft t g max ft t g j i i j w e can set s S ij j i whic h means that w e only need to compute the maxim um separations Bounding Start Time Revisited In order to deriv e separations w e will reduce the GTG for the system to an ev en t graph b ecause the separation deriv ation algorithms assume an ev en t graph as their inputs The resulting ev en t graph is iden tical to the GTG in terms of the top ology but its c hannel dela ys are di eren t The seman tics of the ev en t graph is explained in x Consider Equation from x W e cop y this equation b elo w for con v enience C pc i j P pc where i and j are p ositiv e in tegers This equation implies that task p has to execute at least C pc P pc times and at most C pc P pc times for one execution of task c F or instance if P and C then p has to pc pc execute at least times and at most once for one execution of c Using this result w e will rewrite Equation from x as C C pc pc t j l D t j t j uD p pc c p pc P P pc pc where j This implies that once task p executes task c will execute after at least C pc l T l D p pc P pc time units but b efore at most C pc uT uD p pc P pc time units In these equations if w e do not kno w l D and uD then w e can use zero pc pc in place of them to ensure the fastest implem e n tation of the system A w ord of caution is that the equations and m ust ha v e the lo w er and upp er p e rio d b ounds l T and uT of task p for the w orst case v alidation Ho w ev er since w e deriv e p p only the a v erage p erio d in terv al for p w e will instead use the lo w er and upp er b ounds of the a v erage p erio d in terv al Satisfaction of these b ounds will ensure the satisfaction of the separation requiremen ts in the a v erage case Separation Deriv ation Algorithms Figure presen ts an algorithm called D S epAl l P air s to deriv e the exact maxim um and minim um separations b et w een ev ery pair of tasks in an acyclic GTG G when G con tains only AND tasks It in v ok es another algorithm to deriv e the exact maxim um and minim um separations b et w een a giv en pair of tasks in G Both of these algorithms can easily b e mo di ed to deriv e the separations when G con tains only OR tasks The algorithm for all the task pairs assumes that the arc dela ys of G are as de ned for those in the ev en t graph corresp onding to G Its running time is O jV j jE j for an acyclic GTG G V E The algorithm for one task pair is adapted from Figure presen ts an algorithm called D S epAl l C ases to deriv e b ounds on the maxim um and minim um separations b et w een ev ery pair of tasks in an acyclic GTG G dik i dik i k' 0 1 k 1 k j d j k'' jk 0 djk (a) (b) Figure V alidating the input correlation requiremen t on a task The correlation constrain t on task k in a is transformed to a separation constrain t b et w een t w o dumm y tasks k and k These dumm y tasks are created as predecessors of task k Note that the dela ys of the input c hannels of task c are zero after the transformation when G con tains b oth AND and OR tasks as w ell as linear timing constrain ts b et w een tasks The computed b ounds and for a pair of tasks i and j satisfy the equation ij j i s S j i j i ij ij This algorithm also assumes that the arc dela ys of G are as de ned for those in the ev en t graph corresp onding to G The running time of this algorithm is O jV j for an acyclic GTG G V E This algorithm is adapted from Separation V alidation Algorithms The solution of the separation problem deriv es the separations in the ev en t graph W e then v alidate an y external or in ternal separation requiremen ts b y comparing them with their corresp onding deriv ed separations As in the case of rate constrain ts if the required separation subsumes the deriv ed one w e sa y that the required one is satis ed otherwise it is violated Note that the resp onse time constrain t and correlation constrain ts can b e cast as separation constrain ts F or example the resp onse time constrain t is the maxim um separation b et w een an y pair of input and output tasks The correlation constrain ts of the system can b e translated to those on the tasks The output correlation constrain t on a task can b e translated in to a separation b et w een the successors of the task As for the input correlation constrain t w e p erform the translation in Figure from a to b In this gure the input correlation constrain t with lab el on task k is handled b y translating it to the separation b et w een t w o dumm y predecessors of task k Related W ork Computing the time separation of an y pair of no des in the ev en t graph is the separation problem as w e de ned in Chapter There are man y algorithms to solv e the separation problem w e ha v e giv en a surv ey of them in the Related W ork section of Chapter x to b e exact Time separations b et w een an y pair of tasks can b e used in man y phases in the design o w of a system In particular they are used during sc heduling of the tasks in soft w are Han et al Gerb er et al Cheng et al and Y en et al all prop ose sc heduling algorithms that tak e adv an tage of the time separation information deriv ed or kno wn It seems that only Y en et al are a w are of the time separation algorithms that w e ha v e review ed in Chapter Summary In this c hapter w e ha v e presen ted separation deriv ation and v alidation algorithms for acyclic GTGs x has de ned minim um and maxim um time separations on an ev en t graph x has transformed a giv en GTG in to an equiv alen t ev en t graph so that the algorithms in the literature can w ork for the GTG to o x has presen ted separation deriv ation algorithms one for the case the input GTG con tains only AND tasks and the other for the case the input GTG con tains b oth AND and OR tasks as w ell as linear timing constrain ts x has giv en an algorithm to v alidate an y separation requiremen t on the input GTG using the deriv ed separations The con tributions in this c hapter include the transformation of a GTG in to an ev en t graph and the adaptation of the separation algorithms in the literature for the separation analysis of the GTG D S epAl l P air s G Input an acyclic GTG G Output Exact maxim um and minim um separations S and S for ev ery task pair i and j ij j i Initialize tables S and for eac h no de i n do for eac h no de j n do if i j then S ij ij else if i and j are input no des then S giv en input correlation from i to j ij else S ij ij Initialize tables S and for eac h no de i n do for eac h no de j n do if S then ij D S epP air G i j S D S epP air G i j S Input an acyclic GTG G tasks i and j and tables S and Output Exact maxim um and minim um separations S and S b et w een the task pair i and j ij j i if S then ij S D S epP air G i j ij temp for eac h predecessor no de k of j do temp max ftemp D S epP air G i k S uD g k j S min fS tempg ij ij return S ij D S epP air G i j Input an acyclic GTG G tasks i and j and table S hor t Output Shortest path w eigh t from i to j ij if then ij for eac h successor no de k of j do min f D S epP air G i k l D g ij ij j k return ij Figure Separation deriv ation algorithm for all task pairs and one task pair when the GTG G con tains only AND no des D S epAl l C ases G Input an acyclic GTG G Output Bounds on maxim um and minim um separations and ij j i for all task pairs i and j Initialize table I nitial iz eT abl e G Up date with linear constrain ts for eac h no de i in G do for eac h predecessor no de k of i do if arc k i de nes a linear constrain t then min f l D g ik ik k i min f uD g k i k i k i Let the sequence n denote the no des of G in top ological order for eac h no de i n in top ological order do Compute initial separation b ound estimates C omputeI nitial E stimates G i Compute b ounds on separations if i is AND no de then for eac h no de j i in top ological order do temp for eac h predecessor no de k of i do temp min ftemp l D g k j k i min f tempg ij ij if j is an AND no de then temp for eac h predecessor no de k of j do temp max ftemp uD g ik k j min f tempg ij ij else if i is OR no de for eac h no de j i in top ological order do temp for eac h predecessor no de k of i do temp min ftemp uD g j k k i min f tempg j i j i if j is an OR no de then temp for eac h predecessor no de k of j do temp max ftemp l D g k i k j min f tempg j i j i Figure Separation deriv ation algorithm for all task pairs when the GTG G con tains b oth AND and OR no des i e b oth max and min constrain ts and linear constrain ts I nitial iz eT abl e G Input an acyclic GTG G and table Output table for eac h no de i n do for eac h no de j n do if i j then ij else if i and j are input no des then giv en input correlation from i to j ij else ij C omputeI nitial E stimates G i Input an acyclic GTG G no de i and table Output table if i is AND no de then for eac h predecessor k of i do min f l D g ik ik k i for eac h no de j i in top ological order do temp for eac h predecessor no de k of i do temp max ftemp uD g j k k i min f tempg j i j i else if i is OR no de for eac h predecessor k of i do min f uD g k i k i k i for eac h no de j i in top ological order do temp for eac h predecessor no de k of i do temp max ftemp l D g k j k i min f tempg ij ij Figure Algorithm to initialize table and algorithm to computing initial separation b ounds for all task pairs These are in v ok ed in D S epAl l C ases Chapter Cyclic Rate Deriv ation and V alidation This c hapter presen ts rate deriv ation and v alidation algorithms for cyclic GTGs W e assume that the input GTG con tains either AND no des only or OR no des only The case with b oth t yp es of no des is men tioned in the Related W ork section of this c hapter The algorithms in this c hapter are based on the theory of cyclic discrete ev en t systems As will b e seen it will tak e more space in this c hapter to explain the theory than the algorithms Once the theory is giv en the algorithms will readily follo w from it The theory in this c hapter will b e presen ted in terms of a GTG with only AND tasks The theory for a GTG with only OR tasks is analogous In this c hapter w e will sligh tly c hange our notation In previous c hapters a prop ert y P of a parameter x is alw a ys denoted b y P e g the p erio d of a task p is denoted b y x T In this c hapter this notation will b e c hanged to P x for some parameters x for the p sak e of clarit y esp ecially during the presen tation of the graph theoretical concepts in this c hapter Our notation closely follo ws the notation of This reference also pro vides us with the de nitions of man y graph theory concepts e g paths and cycles that w e use without re de ning in this dissertation Optim um Cycle Ratio Consider a digraph G V E w with n no des and m arcs The function w E R assigns a nonnegativ e real n um b er w e to ev ery arc e in E and the function t E N assigns a nonnegativ e in teger e to ev ery arc e in E W e refer to w e and e as the weight or cost and tr ansit time of arc e resp ectiv ely The latter term is historical The w eigh t w p and transit time p of a path p in G are de ned as follo ws X X w p w e and p e e p e p i e the w eigh t and transit time of the path are equal to the sum of the w eigh ts and transit times of the arcs on the path resp ectiv ely Since an y cycle C in G is also a path in G w C and C are de ned as in Equation The cycle r atio C of cycle C or its w eigh t to time ratio is de ned as w C C C C whic h basically giv es the a v erage cost p er transit time for the cycle C The condition that C for cycle C m ust hold for ev ery cycle C in the graph since if C for at least one cycle C the system will deadlo c k after a nite time W e note that the a v erage here is an arithmetic a v erage and that it is not computed in the probabilistic sense W e also note that the term cycle ratio or w eigh t to time ratio is historically called cost to time ratio This renaming is due to the follo wing reason W e are in terested in nding the maxim um and minim um cycle ratio in G Since cost is usually minimiz ed in optimization w e did not w an t to use a term in whic h cost is maximiz ed In our previous pap ers w e sometimes used the terms minim um cost to time ratio and maxim um pro t to time ratio in whic h cost and pro t are used for w eigh t Our curren t c hoice seems b etter a 3,1 b 2,1 4,1 2,1 d c 7,1 Figure A no de directed graph Of the t w o n um b ers giv en next to eac h arc the rst one is its w eigh t and the second one is its transit time There ma y b e man y cycles in G eac h with a p ossibly di eren t cycle ratio Among them w e are in terested in the optim um i e maxim um and minim um cycle ratios The maximum cycle r atio G is de ned as G max f C g C G whic h is computed o v er all cycles C in G W e will usually use when the graph G is clear from the con text The minim um cycle ratio of a graph is de ned analogously The problem of nding the maxim um cycle ratio of a graph is referred to as the maximum cycle r atio pr oblem The de nition of the minim um v ersion of this problem is analogous Figure illustrates these de nitions There are t w o cycles in this graph C a b c d a and C a c d a The cycle ratios of these cycles are C and C The maxim um cycle ratio of this graph is the maxim um of these ratios and is equal to Th us cycle C has the maxim um cycle ratio The minim um cycle ratio of this graph is then equal to the cycle ratio of cycle C If G is a non strongly connected graph then its maxim um cycle ratio is equal to the maxim um among the maxim um cycle ratios of the strongly connected comp onen ts in G The algorithm consists of the follo wing three steps P artition G in to its strongly connected comp onen ts whic h leads to the comp onen t graph of G Note that the comp onen t graph is acyclic Compute the maxim um cycle ratio of eac h strongly connected comp onen t in G T ak e the maxim um among these maxim um cycle ratios as the maxim um cycle ratio of G If a strongly connected graph do es not con tain an y cycles then its maxim um ratio is Note that this v alue is also the iden tit y for the maxim um op erator The maxim um cycle ratio of G can b e equal to This happ ens when eac h strongly connected comp onen t in G consists of only one no de and no arcs There is an imp ortan t sp ecial case of the maxim um cycle ratio problem in whic h the transit time of eac h arc in the graph is equal to unit y In the next section w e discuss this sp ecial case Optim um Cycle Mean De ne G V E w suc h that e for ev ery arc e in G Then C jC j for an y cycle C where jC j is equal to the length of C W e will refer to the cycle ratio of suc h a cycle as its mean Revised de nitions are as follo ws The cycle me an C of cycle C is de ned as w C C jC j whic h giv es the a v erage arc w eigh t of C The maximum cycle me an G is de ned as G max f C g C G whic h is computed o v er all cycles C in G W e will usually use when G is clear from the con text The minim um cycle mean of a graph is de ned analogously The problem of nding the maxim um cycle mean of a graph is referred to as the the maximum me an cycle pr oblem Note that the order of the w ords mean and cycle are in ten tionally in terc hanged in the problem name The de nition of the minim um v ersion of this problem is analogous Figure also illustrates these de nitions In this graph the transit time of eac h arc is in ten tionally set to so that the cycle ratio of a cycle will b e equal to its cycle mean Th us the maxim um cycle ratio of this graph is also its maxim um cycle mean Both the maxim um cycle ratio and mean cycle problems can b e form ulated using linear programming The linear programming form ulation giv es b etter insigh t in some resp ects This form ulation is discussed in the next section Linear Programming F orm and Criticalit y The maximum cycle r atio of G V E w is de ned as the optim um v alue of in the linear program minimi ze sub ject to v u u v w u v for all arcs u v E where v is called the distanc e or the no de p oten tial of v The minim um cycle ratio is de ned analogously Before de ning the no de distances more precisely some other de nitions are in order De ne G V E w where w e w e e That is w e subtract the pro duct e from w eigh t w e of ev ery arc e in G to obtain G Note that ev ery cycle in G is either a negativ e w eigh ted cycle or zero w eigh ted cycle Consider an arbitrary no de s in V and call it the sour c e The distance v is equal to the w eigh t of the maxim um w eigh ted path the longest path from s to v Note that the longest paths in G are w ell de ned b ecause G do es not ha v e an y p ositiv e w eigh ted cycles Critical Arcs and Criticalit y Criterion Let G b e an estimate on the maxim um cycle ratio of G W e sa y that an arc u v in E is critic al with r esp e ct to G if v u w u v G u v whic h w e will refer to as the critic ality c ondition An arc that is critical with resp ect to G is simply called critic al More sp eci cally arc u v is critic al if it satis es the criticalit y criterion with G Consider a cycle C in G W e sa y that C is critical with resp ect to G if ev ery arc on it is critical with resp ect to G Supp ose that ev ery arc in C is critical with resp ect to G This means that ev ery arc in C satis es the criticalit y condition If w e tak e the sum of eac h side of the criticalit y condition with resp ect to the arcs on C w e get X X v u w u v G u v u v C u v C but the left side of this equation telescop es and b ecomes equal to zero This implies that P X w u v u v C w u v G u v or G P u v u v C u v C or that if ev ery arc on C is critical with resp ect to G then C is critical with resp ect to G The con v erse of this result also holds it is implied b y b oth this deriv ation and the de nition of critical cycles Th us w e ha v e the follo wing theorems Theorem A cycle in G is critic al with r esp e ct to G if and only if every ar c on C is critic al with r esp e ct to G Theorem If a cycle C in G is critic al with r esp e ct to G then C G This theorem has the follo wing corollaries Corollary If a cycle C in G is critic al then C Corollary Every cycle that is critic al in G is a zer o weighte d cycle Corollary Every cycle in G is either zer o weighte d or ne gative weighte d The zer o weighte d cycles ar e critic al cycles in G Critical No des and Graphs W e no w de ne critical no des and graphs A no de is critic al if it is adjacen t to a critical arc A graph is critic al if its ev ery arc is critical The follo wing theorem follo ws from the corollaries of Theorem and constitutes the basis of the follo wing simple algorithm to nd the critical cycles in G W e note that if the critical subgraph of G is acyclic it is the longest path tree from the source of G Theorem The critic al sub gr aph of G c ontains al l the critic al cycles of G The simple algorithm to nd the critical cycles in G consists of the follo wing three steps Find the maxim um cycle ratio of G Subtract e from w eigh t w e of ev ery arc in G to obtain G Output ev ery zero w eigh ted cycle in G as a critical cycle Here an algorithm lik e the one in can b e used to nd all the simple critical cycles This algorithm nds the critical subgraph of G in time linear in the size of G ho w ev er outputting ev ery critical cycle in the third step tak es time prop ortional to the pro duct of the size of G and the n um b er of critical cycles in G Since there can b e an exp onen tial n um b er of critical cycles in G the third step ma y tak e exp onen tial time a -1,1 b s 0 0 a -1,1 b (a)=1 -2,1 0,1 (b)=0 -2,1 0 -2,1 0,1 -2,1 (c)=0 d c (d)=3 3,1 c d 3,1 0 (a) (b) Figure a The graph G obtained from the graph G in Figure where G Of the t w o n um b ers giv en next to eac h arc the second one is its transit time of the arc and the rst one is its w eigh t less G b The graph of a after the addition of a source no de s and zero w eigh ted arcs from the source no de s to the other no des The v alues on the righ t side in b are the no de distances Since cycle mean is a sp ecial case of cycle ratio all the de nitions in this section can b e giv en in terms of cycle mean Since this task is straigh tforw ard w e will skip them y et w e will refer to them later In Figure the graphs in a and b illustrate these de nitions The graph in a is the same graph call it G in Figure In this gure the pro duct e is subtracted from the w eigh t w e of ev ery arc e except those outgoing from s in b Recall that Since the transit time of ev ery arc is equal to the maxim um cycle ratio of is subtracted from ev ery arc w eigh t in G Hence the graph in a is G The graph G con tains only one critical cycle whic h is C a b c d a Its w eigh t w C in G is equal to zero The other cycle in G has a negativ e w eigh t In b a source no de s with zero w eighed arcs is added to G in order to compute the longest distances from s to ev ery other no de in G These computed distances are also giv en in b Using these distances w e can sho w that ev ery arc on C is critical but arc a c is not critical since c a A giv en graph ma y con tain an exp onen tial n um b er of cycles It is also p ossible that all of these cycle are critical This happ ens when eac h arc in the graph has the same w eigh t It is alw a ys b etter to deal with cycles that are simple Note that ev ery no de on a simple cycle is distinct and that ev ery cycle can b e expressed a set union of the simple cycles on it These together with the de nition of critical cycles imply the follo wing theorem Theorem Every simple cycle that is on a critic al cycle is also critic al Cycle P erio d W e mo del a discrete ev en t system b y an ev en t graph G V E w Eac h no de in G denotes an ev en t p ossibly the start of a computation asso ciated with the same no de and eac h arc de nes a timing constrain t b et w een its adjacen t no des W e will use the terms no de and ev en t in terc hangeably The functions w and are asso ciated with the arcs In the system mo deled b y G ev en ts re or o ccur and enable their successor ev en ts Let t k denote the time at whic h ev en t or no de i res for the k th time The function i t k is also called the timing simulation W e will refer to k as the o c curr enc e index i The ring seman tics has the follo wing t w o rules Indep endenc e rule The rst or initial ring time t for eac h ev en t i is indep enden t i of the other ev en ts AND c ausality rule F or the second and later rings ev ery ev en t has to w ait un til it gets enabled b y ev ery one of its predecessors This dep endence is go v erned b y t k max ft k j i w j i g k j i i j j P r ed i where P r ed i is the set of the immedi ate predecessor ev en ts of ev en t i j i is the o c curr enc e index o set i e it describ es the di erence in the o ccurrence indices of i and j relativ e to eac h other and w j i is the dela y b et w een the ab o v e t w o o ccurrences of i and j Note that w and k are all nonnegativ e Here note that the second rule ab o v e is the same as the AND causalit y rule de ned in x and that the arc w eigh t w j i is equal to the arc dela y d also de ned in x j i The ab o v e ring seman tics mak es the system mo deled b y G cyclic or rep etitiv e Since t k denotes the time of the k th o ccurrence for ev en t i it tak es i t k t i i k time b et w een t w o successiv e o ccurrences on the aver age This a v erage is an arithmetic a v erage and is not in the probabilistic sense The time b et w een t w o successiv e o ccurrences is called the cycle p erio d and is denoted b y T for ev en t i In order to nd the cycle time i for large enough k w e will tak e the limit of Equation as t k t i i lim k k from whic h w e get the cycle p erio d T as i t k i T lim i k k W e will use this equation as the de nition of the cycle p erio d T of ev en t i i This is an asymptotic de nition W e will sho w in the next section that the cycle p erio d is also p erio dic in the sense that there is a sequence of v alues that the cycle p erio d attains and this sequence rep eats itself W e will also c haracterize the length of this sequence Assume that G is strongly connected i e there is a directed path b et w een ev ery pair of no des in G Then the follo wing theorem implies that ev ery ev en t in the system mo deled b y G has the same cycle p erio d if G is strongly connected Theorem In a str ongly c onne cte d event gr aph every event has the same cycle p erio d By the ab o v e theorem let T denote the cycle p erio d of ev ery ev en t in a strongly connected G Then T is referred to the cycle p erio d of G In order to analyze the system analytically it will b e v ery useful to express t k i solely in terms of the prop erties of ev en t i of G although t k is determined b y the i predecessors of i as Equation sho ws F or that purp ose w e rst de ne a linear timing function t k as i t k t T k k i i i where the initial o ccurrence time t is also called the o set This function de nition i is adapted from Note here that w e can replace T with T the cycle p erio d of G i W e rst w an t to determine if the cycle p erio d is indep enden t of b oth the o set and the o ccurrence index k The follo wing theorems establish that the answ er is p ositiv e Theorem The cycle p erio d T of a str ongly c onne cte d event gr aph G is inde p endent of the o c curr enc e index of the events in G Theorem The cycle p erio d T of a str ongly c onne cte d event gr aph G is inde p endent of the o set of e ach event The last theorem ensures that it do es not matter when the ev en ts in G start their rst o ccurrences G will ev en tually attain the same cyclic b eha vior W e next w an t to determine if it is p ossible to appro ximate t k with t k If the i i di erence b et w een the successiv e o ccurrence times of ev en t i is alw a ys equal to its cycle p erio d then t k is exactly equal to t k for an y k Ho w ev er this is not the case in i i general b ecause the cycle p erio d is b y de nition an a v erage v alue Th us t k is only i an appro ximation to t k The imp ortan t p oin t is whether or not this appro ximation is i b ounded Indeed the di erence b et w een these t w o timing functions are alw a ys b ounded as the follo wing theorem sho ws Because of this result w e will use t instead of t in the sequel suc h that t is assumed to satisfy the de nition of t Theorem The di er enc e t k t k is b ounde d fr om ab ove by a nite numb er i i for al l events i and al l o c curr enc es k The theorems in this section imply that the system mo deled b y a strongly connected graph G has a cycle p erio d T that the cycle p erio d of the system is equal to the cycle p erio d of an y ev en t in the system that the cycle p erio d of the system can b e computed using an y ev en t in the system and nally that the o ccurrence time of an y ev en t can b e giv en as t k t T k k i i whic h holds for large k b ecause of Equation The large o ccurrence index k after whic h G reac hes its cyclic b eha vior or its ste ady state b ehavior is usually referred to as its tr ansient b ehavior W e next discuss what w e mean b y the steady state and transien t b eha viors P erio dicit y of Cycle P erio d The timing function t k for ev en t i is p erio dic with p erio d P if i t k P t k P T k i i i where T is the p erio d of the system and P is called the o c curr enc e p erio d F or the timing function t w e ha v e the follo wing theorem ab out its p erio dicit y Theorem F or a str ongly c onne cte d event gr aph ther e exist inte gers K and P such that for al l k K and for al l events i the timing function t k is i p erio dic with p erio d P In the ab o v e theorem K refers to the o ccurrence index after whic h the system b ecomes p erio dic Th us K is the transien t b eha vior The b eha vior of the system after b ecoming p erio dic is referred to as its steady state b eha vior Both K are P are di cult to compute exactly b ecause their computation in v olv es at least the en umeration of all the critical cycles in the ev en t graph This en umeration can tak e exp onen tial time in the size of the ev en t graph Because of these di culties w e will pro vide b ounds on these in tegers Some de nitions and results from are in order Computation of the Occurrence Index K Let a a a b e relativ ely prime p ositiv e in tegers all larger than The natural n n um b er N has a represen tation if there exists non negativ e in tegers x x x suc h n that N a x a x a x n n The F r ob enius pr oblem is to determine the largest in teger L a a a n with no suc h represen tation The F rob enius problem can o ccur in practice if w e consider the follo wing situation Giv en coins of denominations a a a in su cien t supply determine the largest n amoun t that cannot b e formed or represen ted b y means of these coins F or n no exact solution to this problem is kno wn but sev eral b ounds exists F or n the follo wing b ound is the most practical one for us L a a a a a n n assuming that n a a a n F or a strongly connected ev en t graph G w e ha v e K K L C jC G where K is the smallest distance b et w een an y critical cycle and an y ev en t Note that G is the critical subgraph of G W e can no w rede ne the b ounds on L as a min f C jC G g and a max f C jC G g n Finding a can b e done e cien tly using an all pairs shortest path algorithm whereas nding a is NP complete Th us a conserv ativ e b ound on a is the sum of the v alues n n in G It is not a go o d idea for the designers to run the system for a long time since K can b e large so that they can apply the analytical results in this c hapter to start analyze the system since they are applicable when the system b ecomes p erio dic This can b e a v oided b y the follo wing theorem Theorem The system mo dele d by a str ongly c onne cte d event gr aph G attains its ste ady state b ehavior starting with the rst event o c curr enc es i e Equation holds for al l k if t wher e is the no de p otential of no de i in G i i i The ab o v e theorem sho ws that as long as the rst o ccurrence times of the ev en ts in G are selected in a certain w a y w e do not ha v e to w orry ab out the transien t b eha vior of G The problem with the transien t b eha vior is that during the transien t b eha vior the b eha vior of G cannot b e analytically analyzed The analytical analysis capabilit y is gained once G reac hes its steady state b eha vior Note here that G describ es our cyclic system Computation of the Occurrence P erio d P The o ccurrence p erio d P is not as problematic as the o ccurrence index K as long as w e are in terested in the a v erage v alue of the cycle p erio d of the system Ho w ev er for the sak e of completeness w e can giv e the follo wing b ounds on P The o ccurrence p erio d P of a strongly connected ev en t graph G is giv en b y P g cdf C jC G g whic h can b e b ounded from ab o v e as P g cdf C jC G g min f C jC G g Finding the cycle with the minim um transit time can b e done e cien tly using an all pairs shortest path algorithm If G is not strongly connected then its o ccurrence p erio d is equal to the least common m ultiple of the o ccurrence p erio ds of the strongly connected comp onen ts of G Optim um Cycle Ratio and Cycle P erio d The reason that w e are in terested in the minim um cycle ratio problem is b ecause the cycle p erio d of the system as describ ed b y graph G in the previous section is closely related to the maxim um cycle ratio of G In fact these t w o are exactly the same as the follo wing theorem sho ws Theorem The cycle p erio d of a system mo dele d by a str ongly c onne cte d event gr aph G is e qual to the maximum cycle r atio of G It is this result that mak es the study of the maxim um cycle ratio problem imp ortan t for p erformance analysis This result is from man y sources suc h as W e are no w done with the theory part of the cyclic rate deriv ation and are ready to giv e our algorithms Cyclic Rate Deriv ation Algorithms W e assume that the system has only AND tasks is mo deled b y an ev en t graph The ev en t graph is equiv alen t to the GTG G if ev ery c hannel G has the same tok en n um b ers and the same n um b er of pro duced and consumed tok ens With this assumption the cycle p erio d of the system b ecomes equal to the maxim um cycle mean of G The results of this section can easily b e used if the system con tains only OR tasks The algorithm D P er iodC y c in Figure is the main algorithm for the rate deriv ation for a cyclic GTG It is usually used during the stage lab eled in Figure It assumes that the dela y in terv al of eac h arc is kno wn It uses the theorems and i e the fact that the p erio d of eac h task in a strongly connected graph is the same and is equal to the maximum cycle mean of that graph The algorithm D P er iodC y c runs in p olynomial time cubic in the n um b er of tasks in the input graph since the maxim um cycle mean of a graph can b e computed in p olynomial time The next c hapter will sho w ho w to compute the maxim um cycle mean of a graph e cien tly Assume that the GTG G has man y strongly connected comp onen ts Then if w e do not kno w the arc or c hannel dela ys in the strongly connected comp onen ts of G w e cannot compute their maxim um cycle means Ho w ev er recall that the top lev el of G will con tain a sup erno de for eac h strongly connected comp onen t of G at its b ottom lev el The rate deriv ation at the top lev el do es not use arc dela ys and it will deriv e a rate in terv al for ev ery sup erno de at the top lev el Then b y Theorem the rate of a sup erno de is equal to the rate of ev ery task in the strongly connected comp onen t that the sup erno de represen ts hence the rate of the sup erno de can b e copied to the rate of ev ery no de in its strongly connected comp onen t There is another w a y of using the rate of a sup erno de for its strongly connected comp onen t Assuming that the strongly connected comp onen t con tains all AND no des D P er iodC y c G Input a strongly connected GTG G Output prop erties of ev ery task in G if G has b oth AND and OR tasks then return with no kno wn analytical solution if G has only AND tasks then Find the maxim um cycle mean l of G using d for eac h arc p c pc Find the maxim um cycle mean u of G using D for eac h arc p c pc else if G has only OR tasks then Find the minim um cycle mean l of G using d for eac h arc p c pc Find the minim um cycle mean u of G using D for eac h arc p c pc for eac h task c do l D T l uD T u c c Chec k for violations Find the in tersection I T l I T uI T of the required p erio d in terv als of the tasks in G Find the p erio d in terv al D T l D T uD T deriv ed for the sup erno de for G if l I T l D T l u uD T uI T do es not hold then return with violation return with success Figure Rate deriv ation and v alidation algorithm for cyclic task graphs the p erio d of the sup erno de is an upp er b ound on the cycle mean of ev ery cycle in the comp onen t since the p erio d of the sup erno de has to b e equal to the maxim um cycle mean of the comp onen t This fact can b e esp ecially useful to determine b ounds on the arc dela ys within short cycles Cyclic Rate V alidation Algorithms Lines in D P er iodC y c in Figure are for rate v alidation Line computes the in tersection of the required p erio d in terv als for the tasks in G Since all the tasks in G run at the same rate as G itself the p erio d in terv al deriv ed for G m ust b e included in this in tersection This comparison is done in line Another v alidation c hec k is done with the p erio d in terv al deriv ed at the top lev el for the sup erno de that corresp onds to G The p erio d in terv al for the sup erno de and the one for G m ust b e the same This comparison is also done in line Related W ork The problem of p erformance analysis of cyclic discrete ev en t systems has b een studied b y man y researc hers since it has applications in man y areas suc h as computer aided design graph theory man ufacturing systems signal pro cessing systems con trol systems etc As a result some of the fundamen tal results w ere pro v en b y man y researc hers una w are of eac h other s results An in tro duction to the problem can b e found in Cassandras et al and Gaub ert in the con text of max algebra F or our purp ose it is su cien t to state that this algebra helps us study the problem for cyclic systems with only AND or only OR b eha vior v ery e ectiv ely Bacelli et al is a comprehensiv e reference for the study of the problem using max algebra Ramamo orth y and Ho is an early reference dedicated to computing the cycle p erio d of an cyclic system with only AND b eha vior They mo del the system using P etri nets Burns Hulgaard and Math ur et al study the problem in the con text of digital systems circuits or em b edded systems Guna w ardena studies cyclic systems with b oth AND and OR b eha vior and conjectures the existence of their cycle p erio d Lee and Gaub ert and Guna w ardena sho w that suc h systems also ha v e a cycle p erio d The latter reference also presen ts an e cien t algorithm to compute it Our algorithms in this c hapter can easily b e extended to tak e adv an tage of these ndings so that w e can consider more general cyclic systems Summary In this c hapter w e presen ted rate deriv ation and v alidation algorithms for cyclic GTGs and the theory b ehind these algorithms x has de ned the optim um cycle ratio of a giv en graph and x has de ned the optim um cycle mean of a giv en graph The latter is a sp ecial case of the former x has giv en a linear programming form ulation of nding the optim um cycle ratio of a giv en graph x has de ned the cycle p erio d of a system that is mo deled b y an ev en t graph x has sho w ed that the cycle p erio d of a system is p erio dic in the sense that the system rep eats itself o v er a p ossible long sequence of executions x has sho wn the relationship b et w een the cycle p erio d of a system and the optim um cycle ratio of the ev en t graph that mo dels this system Finally x and x ha v e presen ted our cyclic rate deriv ation and v alidation algorithms The con tributions in this c hapter include the cycle rate deriv ation and v alidation algorithms as w ell as the uni ed presen tation of the theory leading to these algorithms Chapter Cycle P erio d Algorithms This c hapter presen ts a comprehensiv e classi cation of the fastest and the most common algorithms for the minim um mean cycle problem W e will also discuss some of these algorithms in terms of their essen tial prop erties and giv e the results of an exp erimen tal comparison of these algorithms The reason for presen ting them in the con text of the minim um mean cycle problem rather than the maxim um mean cycle problem is that these algorithms are usually presen ted in the former con text in the literature and w e did not w an t to c hange the tradition Bac kground Classi cation and Related W ork There are man y algorithms prop osed for b oth the minim um cycle ratio problem and the minim um mean cycle problem W e giv e a comprehensiv e classi cation of the fastest and the most common ones in T able References to a few more algorithms can b e found in Note that as the minim um mean cycle problem is a sp ecial case of the minim um cycle ratio problem an y algorithm for the latter problem can b e used to solv e the former problem Con v ersely it is also p ossible to solv e the minim um cycle ratio problem using an algorithm for the minim um mean cycle problem In T able the p olynomial and pseudop olynomial algorithms are resp ectiv ely or dered according to their w orst case running times Those with the same running time are presen ted in alphab etical order of their in v en tors names Some references are cited more than once b ecause they con tain more than one algorithm The notation W is the largest in teger arc w eigh t T is the in teger sum of the transit times in the input graph and N is a b ound on the n um b er of iterations that Ho w ard s algorithm do es The previously kno wn b ound on N is the pro duct of the out degrees of all the no des Let denote the amoun t of error that w e w an t to tolerate when doing a comparison of t w o n um b ers La wler s algorithm con v erges when the in terv al that con tains the exact is smaller than whic h is wh y its result is appro ximate The algorithms in ro ws and can pro duce appro ximate results b ecause they use the same con v ergence criterion as that of La wler s algorithm W e also note that Burns algorithm the algorithm in ro w and Ho w ard s algorithm pro duce exact results but they ma y ha v e precision problems F or example Burns algorithm needs to p erform man y equalit y tests b et w een t w o oating p oin t n um b ers and suc h tests are con trolled b y W e no w discuss the main algorithms from T able The discussion assumes that the input digraph G V E con tains n no des and m arcs These algorithms consist of Burns algorithm Karp s algorithm and its three v arian ts parametric shortest path algorithms K O and YTO algorithms La wler s algorithm Ho w ard s algorithm and scaling algorithms O A and O A algorithms The con tributions in this c hapter include the follo wing W e are the rst to collect classify analyze and compare these algorithms W e ha v e impro v ed Karp s algorithm The resulting algorithm is referred to as the DG algorithm It has one of the fastest running time in theory T able Minim um mean cycle and minim um cycle ratio algorithms for a graph with n no des and m arcs W the max arc w eigh t T the total transit time of the graph Minim um mean cycle algorithms Name Source Y ear Running time Result Complexit y DG Dasdan Gupta O nm Exact P olynomial HO Hartmann Orlin O nm Exact P olynomial Karp s Karp nm Exact P olynomial Hartmann Orlin O nm n lg n Exact P olynomial YTO Y oung T arjan Orlin O nm n lg n Exact P olynomial Karp Orlin n Exact P olynomial K O Karp Orlin O nm lg n Exact P olynomial p O A Orlin Ah uja O nm lg nW Appro ximate Pseudop oly p O A Orlin Ah uja O nm lg nW Appro ximate Pseudop oly Cuninghame Gree n Yixun O n Exact P olynomial Minim um cycle ratio algorithms Name Source Y ear Running time Result Complexit y Burns Burns O n m Exact P olynomial Megiddo O n m lg n Exact P olynomial Hartmann Orlin O T m Exact Pseudop oly La wler s La wler O nm lg nW Appro ximate Pseudop oly Ito P arhi O T m T Exact Pseudop oly Gerez et al O T m T lg T Appro ximate Pseudop oly Gerez et al O T m T Exact Pseudop oly Ho w ard s Co c het T errasson et al O N m Exact Pseudop oly W e ha v e impro v ed Ho w ard s algorithm and determined t w o b ounds on its running time The running time analysis is the rst non trivial analysis of this algorithm This algorithm after our impro v em en ts is the fastest algorithm in practice W e ha v e also impro v ed most of these algorithms though sometimes in minor w a ys as do cumen ted in Burns Algorithm The pseudo co de for Burns algorithm is giv en in The v ersion of this algorithm that w e will discuss is actually the minim um mean cycle v ersion of the original Burns algorithm whic h can also solv e the minim um cycle ratio problem The algorithm in is iden tical to this algorithm Note that the authors of giv e the running time of their algorithm as O n whic h agrees with the O n m running time of Burns algorithm since m O n Burns algorithm is based on linear programming It is an iterativ e algorithm con structed b y applying the primal dual metho d It solv es the linear program in Equation and its dual sim ultaneously In essence the b eha vior of Burns algorithm is v ery simi lar to that of the parametric shortest path algorithms suc h as the K O algorithm The K O algorithm impro v es up on an initial acyclic critical subgraph of G un til the critical subgraph b ecomes cyclic at whic h p oin t the minim um cycle mean is found Burns algo rithm also op erates on the critical subgraph and terminates when it b ecomes cyclic but ev ery iteration it reconstructs the critical subgraph from scratc h Burns algorithm pro duces exact results but ma y ha v e some precision problems due to the criticalit y criterion in Equation that is uses to determine whether or not a giv en arc is critical As can easily b e seen this equation in v olv es a test to see the oating p oin t n um b er of the left hand side of the equalit y sign is equal to the one on its righ t hand side This criterion can b e c hanged to u v w u v for a giv en arc u v where is a v ery small user de ned constan t Karp s Algorithm and its V arian ts De ne D v to b e the w eigh t of the shortest path of length k from s the source to v k if no suc h path exists then D v Karp s algorithm whose pseudo co de is k giv en in is based on his observ ation that D v D v n k min max v V k n n k whic h is called Karp s the or em Karp s algorithm computes the quan tities D v b y k the recurrence D v min fD u w u v g k n with the initial k u v E k conditions that D s and D v v s As observ ed in this recurrence whic h is not implem en ted recursiv ely mak es the b est and w orst cases of Karp s algorithm the same whic h is wh y it runs in nm W e ha v e three v arian ts of Karp s algorithm the DG algorithm the HO algorithm and the Karp algorithm T o summarize the rst algorithm impro v es Karp s algorithm b y pro cessing the no des and arcs of the input graph more e cien tly The second algorithm c hec ks to see if an y of the cycles found b efore and during certain iterations in Karp s algorithm are critical If so it terminates The third algorithm impro v es the space complexit y of Karp s algorithm The remainder of this subsection describ es these three v arian ts in more detail The DG algorithm is discussed in more detail in Its pseudo co de is giv en in Figure This algorithm impro v es up on Karp s algorithm b y eliminating unnecessary w ork in tro duced b y the ab o v e recurrence It w orks in a breadth rst manner in that starting from the source it visits the successors of no des rather than their predecessors as done in the recurrence This pro cess creates an unfolding of G and when the algorithm is implem en te d using link ed lists its running time b ecomes equal to the size of the unfolded graph Dep ending on the structure of G the running time ranges from m to O mn The HO algorithm also impro v es up on Karp s algorithm Its pseudo co de is giv en in This algorithm helps to terminate Karp s algorithm early without c hanging its structure i e it still uses the ab o v e recurrence It is based on the follo wing observ ation Supp ose D v D v are computed for all v V and for some k n A t this p oin t k man y of these paths will con tain cycles If one of these cycles sa y C is critical in G when C then the minim um cycle mean is found and is equal to C Note that v min fD v k g whic h is needed to c hec k the criticalit y of C W e c hec k k n k for early termination when k b ecomes a p o w er of as suggested in If the early termination is not p ossible this algorithm can add an o v erhead of O n m lg n in total to the running time of Karp s algorithm although it do es not c hange the running time asymptotically This algorithm has the same precision problem as Burns algorithm so the c hange done in the criticalit y criterion in Burns algorithm also applies to this algorithm The Karp algorithm is a space e cien t v ersion of Karp s algorithm This v ersion is suggested b y S Gaub ert of INRIA F rance Karp s algorithm tak es up n space in order to store the D v alues The Karp algorithm reduces this space requiremen t to linear in the n um b er of no des n The Karp algorithm p erforms t w o passes In the rst pass it computes D v for eac h no de v without storing D v for k n In the second n k pass it computes the fraction in Karp s theorem as it computes eac h D v k n The k DG and HO algorithms also su er from this large space complexit y problem F ortunately the tec hnique used in the Karp algorithm is also applicable to them P arametric Shortest P ath Algorithms The K O algorithm and the YTO algorithm are in the category of parametric shortest path algorithms Their pseudo co de is giv en in The YTO algorithm is essen tially an e cien t implem en tation of the K O algorithm These algorithms are based on the observ ation that the minim um cycle mean is the largest suc h that G do es not ha v e an y negativ e cycles Th us these algorithms start with a and alw a ys main tain a tree of shortest paths to a source no de s These algorithms c hange incre men tally so that the shortest path tree c hanges b y one arc in eac h iteration When a cycle of w eigh t zero is detected in G that cycle is the cycle with the minim um mean W e ha v e impro v ed the K O algorithm sligh tly as discussed in La wler s Algorithm La wler s algorithm is based on the same observ ation as the parametric shortest path algorithms Its pseudo co de is giv en in It also uses the fact that of G lies b et w een the minim um and the maxim um arc w eigh ts in G La wler s algorithm do es a binary searc h o v er the p ossible v alues of and c hec ks for a negativ e cycle in G ev ery iteration If one is found then the c hosen is to o large so it is decreased if not it is to o small so it is increased La wler s algorithm terminates when the in terv al for the p ossible v alues of b ecomes to o small The size of that in terv al determines the precision of the algorithm The p erformance of this algorithm largely dep ends the negativ e cycle detection algo rithm that it uses The most common negativ e cycle detection algorithm is the standard Bellman F ord algorithm There are man y impro v em en ts o v er this algorithm in the lit erature e g see so their use will greatly impro v e the running time of La wler s algorithm Ho w ard s Algorithm An impro v ed v ersion of Ho w ard s algorithm is giv en in Figure It is similar to the st yle of the parametric shortest path algorithms except that it starts with a large and decreases un til the shortest paths in G are w ell de ned F or a giv en the algorithm attempts to nd the shortest paths from ev ery no de to an c hosen no de called s in Figure In doing so it either disco v ers that the shortest paths are w ell de ned in whic h case the correct has b een found or it disco v ers a negativ e cycle in G In the latter case the negativ e cycle has a smaller mean than the curren t In this case can b e up dated to the mean of the new cycle and the pro cess con tin ues Ho w ard s algorithm computes the shortest paths in G in a somewhat un usual w a y A p olicy gr aph called G in Figure is main tained The p olicy graph is simply a subgraph of G suc h that the out degree of eac h no de is exactly one The designated sink no de s is alw a ys a no de on a cycle in the p olicy graph The curren t is alw a ys the minim um one found from the rst iteration of the algorithm The p olicy graph is an estimate on the curren t shortest paths from eac h no de to s Ho w ard s algorithm main tains a distance u of a no de u whic h is an estimate on the distance to the designated no de s In eac h iteration of Ho w ard s algorithm a pass is made through all the arcs and eac h u is up dated as u min f v w u v g u v E The p olicy graph is also up dated so that the arc going out of u p oin ts to the no de v for whic h the minim um w as ac hiev ed In the next iteration is c hosen to b e the mean of a cycle in the p olicy graph if this cycle has the smallest mean among all the cycles in the p olicy graph and if the mean of this cycle is smaller than the curren t s is up dated and the pro cess con tin ues Note that since the p olicy graph con tains n arcs nding the cycle with the smallest mean tak es O n time If there is an iteration in whic h the p olicy graph do es not c hange then Equation has b een satis ed for ev ery no de This can only happ en when the graph G do es not ha v e a negativ e cycle In this case is the minim um cycle mean and eac h u is its distance in G to some no de on a zero length cycle Note that Equation is almost equiv alen t to Equation with the di erence that the places of u and v in the latter are exc hanged in the former In the implem e n tation of the algorithm u in Equation and the arc going out of u in the p olicy graph are only up dated if u will impro v e b y some whic h is the precision of the algorithm Note that unlik e La wler s algorithm Ho w ard s algorithm do es not use to con trol the v alue of The b eaut y of Ho w ard s algorithm is that eac h iteration of the algorithm is extremely simple and requires only m time Mean while although it ensures that the v alue of is non increasing from one iteration to another it usually manages to mak e signi can t progress in decreasing its v alue in a v ery few n um b er of iterations In it is pro v en that Ho w ard s algorithm do es terminate b y sho wing that the algorithm nev er has the same p olicy graph during its run Th us the running time is b ounded b y the total n um b er of p olicy graphs whic h is the pro duct of the out degrees of all the no des in the input graph G Belo w w e giv e t w o impro v ed b ounds on the running time of Ho w ard s algorithm Theorem de cr e ases by at le ast n at le ast every n iter ations of the main lo op of Howar d s algorithm in Figur e wher e is the pr e cision of the algorithm The pro of of this theorem app ears in Of course this is a v ery p essimistic b ound since in our exp erimen ts almost alw a ys decreases and usually b y m uc h more than The theorem yields the follo wing t w o corollaries Corollary The running time of Howar d s algorithm in Figur e is at most O nm wher e is the numb er of simple cycles in the gr aph G Corollary The running time of Howar d s algorithm in Figur e is at most O n m w w max min w and w ar e the maximum and minimum ar c weights in the gr aph G and is the max min pr e cision of the algorithm The rst corollary expresses the running time in terms of simple cycles in the graph whereas the second corollary expresses it in terms of the w eigh ts in the graph Dep ending on the input graph one of these corollaries can b e more e cien t than another Scaling Algorithms The O A and O A algorithms are in the category of scaling algorithms Refer to for more information on scaling algorithms The O A and O A algorithms assume that the arc w eigh ts are in tegers b ounded b y W If W is p olynomial in n then these algorithms are asymptotically the fastest algorithms The O A algorithm applies scaling to a h ybrid v ersion of an assignmen t algorithm called the auction algorithm and the successiv e shortest path algorithm It uses an appro ximate binary searc h tec hnique The O A algorithm is the same as the O A algorithm except that it do es not use the successiv e shortest path algorithm W e do not giv e the pseudo co de for the O A and O A algorithms b ecause the pseudo co de is quite long when describ ed in as m uc h detail as the others in this pap er F or the pseudo co de refer to Exp erimen tal Comparison Results W e systematically compared the ab o v e algorithms on a test suite comp osed of random graphs and b enc hmark circuits The results of this comparison are presen ted in These results ha v e pro vided imp ortan t insigh ts in to the individual p erformance as w ell as relativ e p erformance of these algorithms in practice Ov erall w e ha v e observ ed that Ho w ard s algorithm is the fastest minim um mean cycle algorithm b y a large margin compared to the other algorithms W e ha v e also observ ed that our impro v ed v ersion of Ho w ard s algorithm is ev en faster Summary In this c hapter w e ha v e presen ted a comprehensiv e classi cation of the fastest and the most common algorithms for the minim um mean cycle problem x has giv en the Input A strongly connected digraph G V E Output of G for eac h no de v V do LastLev el v s F indS our ce G D s V al id s LastLev el s E nq ueue Q s k v D eq ueue Q do for eac h successor no de u Ad j O ut v do if LastLev el u k then E nq ueue Q k u V al id k u LastLev el u LastLev el u k D k u D k u min fD k u D k v w v u g k v D eq ueue Q while k n for eac h no de v V do if LastLev el v n then M v the iden tit y for max k V al id n v while k do M v max fM v D n v D k v n k g k V al id k v min f M v g return Figure Dasdan Gupta s minim um mean cycle algorithm the DG algorithm classi cation and the sections and ha v e a short o v erview of some of these algorithms x has discussed an exp erimen tal comparison of these algorithms v ery brie y The con tributions of this c hapter are itemized in x Input A strongly connected digraph G V E Output of G Initialize for eac h no de u V do u for eac h arc u v E do if w u v u then u w u v u v p olicy Iterate while true do Find the set E of p olicy arcs E f u u E g Examine ev ery cycle in G V E Let C in G b e the cycle with the smallest mean w c jC j min f w C jC jg Select the lo w est n um b ered no de s C Compute the no de distances using the rev erse breadth rst searc h if there is a path from v to s in G then v v w v v Impro v e the no de distances impr ov ed f al se for eac h arc u v E do dif f u v w u v if dif f then if dif f then impr ov ed tr ue u v w u v u v If not m uc h impro v emen t in the no de distances exit if N O T impr ov ed then return Figure An impro v ed v ersion of Ho w ard s minim um mean cycle algorithm Chapter Debugging Timing Violations This c hapter presen ts the issues related to debugging timing violations in a cyclic system with only AND b eha vior The results in this c hapter can readily b e adapted for a cyclic system with only OR b eha vior The main timing violation that w e will consider happ ens when the system do es not satisfy its cycle p erio d requiremen t i e its cycle p erio d is larger than its cycle p erio d requiremen t If this is the case w e will try to nd di eren t c hoices with v arying p erformance and cost prop erties for eac h task of the system so that the system will satisfy its cycle p erio d requiremen t after these c hoices are made W e will form ulate the debugging problem and pro v e that the debugging problem and almost all of its in teresting subproblems are NP Complete Generalized Maxim um Mean Cycle Problem GMMCP Before discussing he Generalized Maxim um Mean Cycle Problem GMMCP w e will presen t t w o related problems the F eedbac k V ertex Set Problem FVSP and the F eed bac k Arc Set Problem F ASP Both of these problems are NP complete Related Problems F eedbac k V ertex Set Problem FVSP Instance Directed graph G V E a p ositiv e in teger K jV j Question Is there a subset V V with jV j K suc h that V con tains at least one v ertex from ev ery directed cycle in G This problem is lab eled GT in It remains NP complete for digraphs ha ving no in or out degree that exceed and for planar digraphs with no in or out degree that exceed F eedbac k Arc Set Problem F ASP Instance Directed graph G V E a p ositiv e in teger K jE j Question Is there a subset E E with jE j K suc h that E con tains at least one arc from ev ery directed cycle in G This problem is lab eled GT in It remains NP complete for digraphs in whic h no v ertex has total in degree and out degree more than but can b e solv ed in p olynomial time for planar graphs W e ha v e t w o v ersions of the GMMCP one with and one without cost constrain ts W e will refer to these v ersions as GMMCP and GMMCP resp ectiv ely In b oth v ersions w e ha v e a digraph G V E and a timing threshold T The graph G sp eci es a system with only AND b eha vior The timing threshold de nes an upp er b ound on the cycle p erio d of the system mo deled b y G i e it is a cycle p erio d requiremen t GMMCP without Cost Constrain ts In the GMMCP the v ersion of the GMMCP without cost constrain ts eac h no de and eac h arc in G are w eigh ted With eac h no de u w e asso ciate a w eigh t w u w u w u w u whic h is a tuple of k nonnegativ e in tegers The k tuple for a k no de u indicates that k c hoices are p ossible in the design library for the system comp o nen t that u mo dels Choice i for no de u has w eigh t w u whic h mo dels the dela y of this i c hoice With eac h arc e w e asso ciate a w eigh t d e The w eigh t of an arc u v mo dels the dela y of the c hannel or signal path from u to v in the sense that if u res at time t then it enables v for ring at time t w u d u v Note that this b eha vior is the u u usual AND causalit y b eha vior F or ease of notation w e ha v e c hosen to ha v e the n um b er of c hoices for eac h comp onen t b e the same If this is not the case in realit y w e can easily ac hiev e it b y adding extra c hoices for eac h comp onen t suc h that eac h extra c hoice has w eigh t A c hoice of comp onen ts for eac h no de is denoted b y the function f V f k g Th us if c hoice f u is decided for no de u then the dela y of the corresp onding comp onen t and also the w eigh t of u will b e w F or eac h outgoing arc u v of u this c hoice means f u that the time that v is enabled for ring with resp ect to u is w d u v time units f u after the time of the last ring of u The question that w e ask for the v ersion of the GMMCP without cost constrain ts is whether or not there is a c hoice assignmen t to eac h no de in the graph suc h that the graph satis es its cycle p erio d requiremen t T In other w ords w e are lo oking for a c hoice assignmen t suc h that P w u d u v f u u v C G max T f C G jC j where C represen ts an y cycle in G and T is the required upp er b ound on the cycle p erio d of the system that G mo dels Note that G is the maxim um cycle mean of G under f the c hoice assignmen t f GMMCP with Cost Constrain ts In the GMMCP the v ersion of the GMMCP with cost constrain ts the di erence is that eac h comp onen t in the design library has a cost and there is a cost requiremen t on the system In this v ersion eac h no de and eac h arc in G are w eigh ted With eac h no de u w e asso ciate a w eigh t w u c u w u c u w u c u w u c u k k whic h is a tuple of k pairs of nonnegativ e in tegers The k tuple for a no de u indicates that k c hoices are p ossible in the design library for the comp onen t that u mo dels Choice i for no de u has w eigh t w u c u whic h mo dels the dela y w v and cost c v of this i i i i c hoice With eac h arc e w e asso ciate a w eigh t d e The w eigh t of an arc u v mo dels the dela y of the c hannel or signal path from u to v in the sense that if u res at time t u then it enables v for ring at time t w u d u v Note that as in GMMCP this u b eha vior is the usual AND causalit y b eha vior F or ease of notation w e ha v e c hosen to ha v e the n um b er of c hoices for eac h comp onen t b e the same If this is not the case in realit y w e can easily ac hiev e it b y adding extra c hoices for eac h comp onen t suc h that eac h extra c hoice has cost A c hoice of comp onen ts for eac h no de is denoted b y the function f V f k g Th us if c hoice f u is decided for no de u then the dela y and cost of the corresp onding comp onen t will b e w and c i e the w eigh t of u will b e w u c u F or f u f u f u f u eac h outgoing arc u v of u this c hoice means that the time that v is enabled for ring with resp ect to u is w d u v time units after the time of the last ring of u f u The question that w e ask for the v ersion of the GMMCP with cost constrain ts is whether or not there is a c hoice assignmen t to eac h no de in the graph suc h that the graph satis es its cycle p erio d requiremen t T and the total cost of the comp onen ts for the nal system is minim iz ed In other w ords w e are lo oking for a c hoice assignmen t suc h that P w u d u v f u u v C G max T f C G jC j where C represen ts an y cycle in G and T is the required upp er b ound on the cycle p erio d of the system that G mo dels and X c u f u u V is minim iz ed Note that G is the maxim um cycle mean of G under the c hoice assign f men t f In the decision problem v ersion of this problem w e use an upp er b ound on the total cost of the system rather than minim izi ng it W e can also describ e the GMMCP in the format that w e used to describ e the FVSP and F ASP as follo ws Generalized Maxim um Mean Cycle Problem GMMCP Instance Directed graph G V E p ositiv e in tegers T and M k non negativ e in teger w eigh t tuples w u c u for eac h i k and for eac h u V i i non negativ e in teger w eigh t d e for eac h e E Question Is there a function f V f k g suc h that P w u d u v P f u u v C G max T and c u M f C G f u u V jC j where C denotes cycles in G This problem can still b e generalized further b y using an in terv al for the cycle p erio d requiremen t T Ho w ev er this general case can b e reduced to the ab o v e problem as follo ws Supp ose the required in terv al is T l T uT Then subtracting l T from ev ery arc w eigh t will decrease the cycle mean b y l T Hence w e obtain a GMMCP with a cycle p erio d requiremen t of uT l T Complexit y of GMMCP Unfortunately b oth decision problem v ersions of the GMMCP are NP complete as the follo wing theorem sho ws Theorem Both versions of the Gener alize d Maximum Me an Cycle Pr oblem the GMMCP and GMMCP ar e NP c omplete Pro of Pro ving that the v ersion without cost constrain ts is NP complete is enough to pro v e this theorem b ecause the other v ersion is a generalization of this v ersion F or the pro of w e sho w that the GMMCP whic h refers to the v ersion without cost constrain ts in this pro of con tains the F ASP as a sp ecial case The pro of pro ceeds as follo ws W e set eac h no de w eigh t to zero and eac h arc w eigh t to T where T is the cycle p erio d requiremen t After this setting ev ery arc in the graph b ecomes critical and the maxim um cycle mean b ecomes equal to T This v alue of course violates the requiremen t T W e next set K in the F ASP to jV j since w e ha v e to select one c hoice for ev ery no de The rest of the pro of follo ws from the observ ation that decreasing the mean of one cycle is not enough to decrease the maxim um cycle mean of the graph w e ha v e to decrease the mean of ev ery cycle T o do that w e need only one arc from eac h cycle th us a solution to the F ASP More Problems Related to GMMCP Consider the GMMCP the v ersion of the GMMCP without cost constrain ts on a digraph G V E Assume that w e ha v e transformed the w eigh t of a no de to all of its outgoing arcs suc h that the w eigh t of eac h outgoing arc no w equals the sum of the dela ys of b oth the no de and the arc Denote the w eigh t of an arc e b y w e Let C b e an y cycle in G with mean C w C jC j Let T b e the cycle p erio d requiremen t on G Then if w e subtract T from ev ery arc w eigh t in G the mean of C decreases b y T since P P P P w u v T w u v T w u v u v C u v C u v C u v C T jC j jC j jC j whic h is equal to C T Note that in this equation w e used the fact that X jC j u v C Since C is an arbitrary cycle in G this result holds for an y cycle in G No w if C T then C satis es T regardless of whether or not C is critical Ho w ev er if C T then C violates T resulting in a timing violation Call C a b ad cycle Before attempting to mo dify these bad cycles so that they will satisfy T w e ha v e to nd them This leads to the follo wing problem whic h w e will refer to as the All P ositiv e Simple Cycles Problem APSCP Giv en a graph G V E w with an arc w eigh t function w E N and a p ositiv e in teger T nd all the p ositiv e simple cycles in G V E w T where w T e w e T for eac h e E If w e negate the w eigh t of ev ery arc in G V E w T the ab o v e problem asks to nd all the negativ e simple cycles in this graph T o the b est of our kno wledge w e are the rst to ask this problem and w e are not a w are of an y algorithms to en umerate all the negativ e simple cycles of a giv en graph A simple solution to this problem is rst to nd all the simple cycles of the giv en graph and then to select those that ha v e a negativ e w eigh t An algorithm to nd all the simple cycles of a graph with n no des and m arcs is giv en in This algorithm runs in time O n m where is the n um b er of the simple cycles in the input graph Note that the reason for using only simple cycles is due to Theorem Ev en if w e ha v e a fast algorithm to nd all the negativ e or p ositiv e simple cycles of a giv en graph w e are not quite done with solving the problem of debugging the timing violations in the graph since w e should also nd a fast means of mo difying the w eigh ts of these cycles so that the graph will ha v e the required maxim um cycle mean This leads to another problem whic h w e will refer to as the Minim um Arc Set Problem MASP Giv en a graph G V E w with an arc w eigh t function w E N and a p ositiv e in teger T suc h that G T nd the smallest n um b er of arcs whose w eigh t should b e mo di ed usually decreased to ensure that G T i e the timing violation will b e eliminated T o the b est of our kno wledge w e are again the rst to ask this problem and so w e are not a w are of an y algorithms to solv e this problem This problem is related to the F ASP and there are a few algorithms for the F ASP in the literature e g see Note that the MASP is more di cult than the F ASP b ecause the w eigh t of ev ery arc cannot b e c hanged arbitrarily but it m ust b e c hanged using the dela ys of the comp onen ts a v ailable for eac h no de in the graph In other w ords there are a nite n um b er of p ossibilities for eac h arc w eigh t Algorithms for GMMCP No w consider the GMMCP the v ersion with the cost constrain ts on a digraph G V E Assume that w e ha v e transformed the w eigh t of a no de u to all of its outgoing arcs th us for an y curren t c hoice assignmen t f let w u v w u d u v f f u for eac h u v in E Also assume that k comp onen t c hoices for a giv en no de u can b e ordered as w u c u w u c u w u c u k k suc h that w u w u w u and c u c u c u k k whic h implies that w e will not consider a comp onen t c hoice o v er another one if the former is more exp ensiv e and slo w er than the latter F or a simple cycle C denote its w eigh t under the assignmen t f b y w C and de ne it as f X w C w u v f f u v C so that the mean of C under f whic h is C b ecomes f w C f C f jC j W e no w giv e b elo w an appro ximation algorithm called GREED Y for the GMMCP whose running time is O n m where is the n um b er of the simple cycles in G Since can b e exp onen tial in the size of the graph this algorithm ma y not run in p olynomial time The algorithm GREED Y w orks as follo ws Start with f u for all u V That is w e start with the c heap est comp onen t at eac h no de Generate all the simple cycles in the graph G using F or eac h simple cycle C generated if C T put C in S f If S is empt y exit De ne the curren t excess E to b e f X E C T f f C S F or eac h no de v de ne the incremen tal b ene t B of using the next exp ensiv e v comp onen t for v as follo ws a F or an y pair v j suc h that f v j de ne f to b e v j f u for u v f u v j j for u v b The incremen tal b ene t for switc hing to comp onen t j for no de v is essen tially the amoun t b y whic h the excess decreases divided b y the extra cost of the more exp ensiv e comp onen t E E f f v j B u c v c v j f v Pic k the pair v j with the largest incremen tal b ene t Let f f v j Up date S if there is a circuit C suc h that C T remo v e C from S f Go to step Consider the assignmen t where the c heap est comp onen ts are used at eac h no de in the graph Let b e the n um b er of simple cycles whic h exceed the threshold under this assignmen t Let b e the maxim um o v er all no des v of w v w v Let b e the W k C maxim um o v er all no des v of c v c v k Theorem The c ost incurr e d by GREED Y is within a factor of O log of W C the optimal Pro of The pro of follo ws from a generalization of the appro ximation factors for the greedy algorithm for Set Co v er giv en in F uture W ork and Observ ations The biggest question left op en here is naturally whether there is an algorithm whose running time is p olynomial in the size of the input for whic h there is a pro v able ap pro ximation factor for the GMMCP F ailing that can w e at least try and eliminate the dep endence on the n um b er of simple cycles in the en tire graph That is supp ose w e ha v e a graph with man y simple cycles but the n um b er of simple cycles whic h violate the timing requiremen t when the c heap est comp onen ts are used at eac h no de is m uc h smaller The GREED Y algorithm describ ed ab o v e ma y b ecome feasible in this case if there w ere a w a y to generate only the violating cycles under the c heap est assignmen t This problem is exactly the APSCP Man y of the algorithms in the literature for generating the simple cycles of a graph run through all the no des in the graph from to n and for eac h i generate the simple cycles in the graph whic h con tain no de i and con tain only no des in fi i ng F urthermore they guaran tee that the time whic h elapses b et w een the generation of t w o cycles is at most p olynomial in the size of the graph A fundamen tally di eren t approac h will b e required here b ecause it is NP complete to answ er the question is there a negativ e simple cycle whic h con tained a giv en no de i This can b e pro v ed b y reducing it to the Hamiltonian cycle problem Although curiously it is not NP complete to determine whether there is an y simple cycle in a graph Another in teresting question is whether there are some constrain ts imp osed b y the graph whic h can b e exploited Once the bad cycles ha v e b een iden ti ed in steps and of the algorithm the cycles and no des are basically treated as a general family of sets That is ev ery no de represen ts a subset of the cycles The subset whic h v represen ts are all those cycles whic h pass through v The greedy algorithm whic h w e p erform ab o v e is essen tially a generalized w eigh ted v ersion of the greedy algorithm for the Minim um Set Co v er problem Minim um Set Co v er Giv en a family of sets F fS S S g nd the smallest l subset S of F suc h that the union of the sets in S is the same as the union of the sets in F The greedy algorithm for set co v er pro ceeds b y rep eatedly c ho osing the set S whic h i co v ers the most elemen ts whic h ha v e not b een co v ered b y previously c hosen sets No w consider the sp ecial case in our con text where the bad cycles only exceed the threshold b y a v ery small amoun t so that it is only necessary to pic k a more exp ensiv e comp onen t for one no de in eac h cycle Supp ose also that the incremen tal cost of a more exp ensiv e comp onen t is the same for ev ery no de Then the GREED Y algorithm for the GMMCP is exactly the greedy algorithm for Set Co v er w e are simply pic king the no de set whic h co v ers the most cycles elemen ts There is not m uc h hop e in obtaining a b etter appro ximation algorithm for a generalization of Set Co v er The reasoning is that the greedy algorithm for the un w eigh ted set co v er problem is kno wn to ac hiev e an appro ximation factor of O log n where n is the n um b er of elemen ts Note that in our case n is F urthermore it is also kno wn that no p olynomial time algorithm can ac hiev e an appro ximation factor of o log n unless P N P This implies that as long as w e are not using an y sp ecial structure among these cycles w e can not hop e to ac hiev e an appro ximation factor whic h is o log Ho w ev er in our con text the family of subsets is not necessarily a completely general family of subsets There are restrictions on the family of subsets since it is obtained from a graph in a sp eci c w a y Do es the hardness of appro ximation results for Set Co v er hold for instances of Set Co v er generated b y cycles in graphs or is there some sp ecial structure here whic h can b e exploited to get a b etter appro ximation b ound Summary In this c hapter w e ha v e presen ted the issues related to debugging timing violations in a cyclic system The main timing violation problem that w e ha v e considered happ ens when the system do es not satisfy its cycle p erio d requiremen t x has de ned the problem called the generalized maxim um mean cycle problem and its v ersions x has determined the complexit y of this problem b y sho wing that this problem is NP complete x has in tro duced t w o related problems that are simpler than GMMCP but whose solutions can b e useful in solving GMMCP x has giv en algorithms for this problem including an appro ximation algorithm Finally x has prop osed some future w ork and observ ations regarding faster algorithms for this problem The con tributions of this c hapter are the problem form ulation and the algorithms Chapter Implemen tation and Applications This c hapter rst presen ts the impleme n tation details of the to ol RADHA RA T AN It then sho ws the use of our deriv ation and v alidation algorithms in t w o imp ortan t phases of the timing driv en co design metho dology sho wn in Figure These t w o phases are lab eled b y and in this gure and are task structuring and hardw are soft w are parti tioning After that this c hapter sho ws the use of our algorithms for timing sim ulation whic h pro vides a fast protot yping of the system at the requiremen ts sp eci cation phase for sim ulation In these sections a dash b oard con troller from the literature is used as an example Implemen tation Details The to ol RADHA RA T AN w as implem en te d in appro ximately lines of C co de It reads its input GTG whic h is sp eci ed using a simple sp eci cation language The external timing constrain ts are also sp eci ed on the input GTG as linear constrain ts on its no des The to ol outputs another GTG in whic h all the prop erties of the tasks and c hannels are deriv ed using the algorithms discussed in this dissertation It also out puts the v alidation results an y violations and the reasons for them The input and output les that w e used in RADHA RA T AN for the dash b oard con troller example are giv en in the app endix The source co de for RADHA RA T AN is a v ailable under http www ics uc i e du i esa g The Dash b oard Con troller Example In the sequel w e will illustrate our con tributions using the dash b oard con troller for a high end car giv en in W e no w brie y discuss the description of this con troller The con troller con tains t w o parts the sp eedometer part and the o dometers part There are one sp eedometer and t w o o dometers the lifetim e o dometer and the trip o dometer The sp eedometer registers car sp eed in the range of km h where for the sak e of simplicit y w e regard an y sp eed v alue less than km h as zero The o dometers register distance tra v eled at incremen ts of km starting from km The trip o dometer can sometimes b e reset b y the driv er The dash b oard con troller gets four pulses from the sensors placed on one of the wheel shafts so that ev ery rotation of the corresp onding tire pro duces four pulses eac h of whic h corresp onds to of a rotation The tire tra v els m p er rotation The timing constrain ts on the dash b oard con troller are all in the form of rate con strain ts In the gure these requiremen ts are expressed as required p erio d in terv als for easy reference later The sp eedometer consists of t w o coils and a magnetized needle It m ust get its inputs at a rate of at least Hz to driv e these coils The o dometers m ust b e so fast that the time it tak es to displa y an distance incremen t of km m ust b e less than the time it tak es for the car to tra v el km a T = [228, 11880] RT <= 1000 Wheel Read Filter Speedometer d RT = RT = [138000, 7200000] Pulses 2 Speed Speed i a b c d Lifetime Compute Odometer 1 j 660 Total km 1 i Accumulate f LCD Display Pulses Driver Compute e h Partial km Resettable Trip Odometer g j Figure The dash b oard con troller example Timing driv en T ask Structuring Recall that the system is rst mo deled using a data o w con trol o w diagram This diagram a graph mo dels the system as a collection of concurren t data and or con trol o w transformations its no des that in teract using data and or con trol o ws its arcs It should b e noted that a con trol transformation consists of a nite state mac hine and a data transformation a function that pro cesses its input data once enabled T ask structuring is the phase where the system s tasks are de ned It c hanges the gran ularit y of the data o w con trol o w diagram so that the diagram b ecomes more manageable This is b ecause task structuring reduces the complexit y of the system s description b y grouping related transformations in to the same task using certain cri teria The task structuring criteria are v ery w ell explained in so w e will not discuss them in this pap er T ask structuring criteria address ho w transformations for ph ysical device I O e g de ning a task to p oll a passiv e I O device and those for in ternal transformations e g de ning a task for a p erio dic transformation or a task for user in teraction are mapp ed to tasks They also address whether and ho w transformations should b e group ed in to concurren t tasks e g grouping functionally related transformations in to the same task or those that execute sequen tially in to the same task The curren t practice for task structuring is curren tly not timing driv en in that timing decisions during task structuring is made in an ad ho c manner moreo v er they are not v alidated as b eing made T ask structuring itself seems di cult to automate but w e can help the designers during task structuring b y p erforming analysis and v alidation of timing tradeo s made b y them F or example consider the determination of the frequency or rate of a n um b er of tasks that get their input from a sensor task with a kno wn rate W e can systematically determine using RADHA RA T AN ho w fast the rate of eac h task should b e W e can also determine ho w fast the rate of eac h of the other tasks in the system should b e in order for their rates to b e consisten t with the rates of the tasks reading from the sensor task It is also p ossible to extend RADHA RA T AN to p erform a bac kw ard analysis in whic h the rate of the sensor task is deriv ed from the throughput requiremen ts on the en tire system A similar reasoning applies to the case of grouping a set of sequen tial tasks in the task graph in to the same task This grouping is lik ely to c hange the rates of the tasks in the set Th us if an y task in the set has a rate constrain t this grouping can lead to a rate constrain t violation Using RADHA RA T AN w e can deriv e the rate of the resulting task after grouping as w ell as v alidate the rate constrain t of an y task in the set automatically The simple iterativ e algorithm to use during task structuring is as follo ws Algorithm Timing Dri ve n T ask S tru ctu rin g Perform task structuri ng Run RADHA RATA N on the resulting task graph If there are any timing violations then Goto step Example T ask Structuring of the Dash b oard Con troller W e no w illustrate timing driv en task structuring using the dash b oard con troller of x as an example Consider the task graphs in Figure These graphs represen t a functional structuring of the system that w e think the designers w ould do The input and output les in the app endix supp ort the discussion b elo w these les can b e examined to see ho w w e sp ecify the task graph and its prop erties as an input to RADHA RA T AN and what RADHA RA T AN returns as its output Initial T ask Structuring Stage Consider Figure a This gure sho ws the t w o parts of the system as men tioned in x RADHA RA T AN requires that the rate of task a b e giv en since this rate is an input to the system W e as the designers and users of RADHA RA T AN compute the rate of task a as follo ws T ask a generates a pulse for ev ery rotation of the tire whic h means a pulse for ev ery m As the sp eed of the car ranges b et w een km h and km h the smallest separation b et w een the times of t w o consecutiv e pulses is m km h ms whereas the largest one is m km h ms Hence the in tegral p erio d in terv al for task a is T the unit of whic h is a x ms This unit will b e used for all the p erio d in terv als in the sequel The p erio d in terv als for the other tasks in Figure a are as follo ws The sp eedome ter part m ust read at least t w o pulses from task a to compute the sp eed of the car so w e deriv e the p erio d in terv al of D T T The o dometers part bcd a needs at least b km m c pulses to register a distance incremen t of km that the car tra v els Hence for the o dometers part w e deriv e p erio d in terv al of D T T When w e v alidate the resulting p erio d in terv als ef g hij a w e see that the o dometers part satisfy its rate requiremen t b ecause it tak es at least km km h s and at most km km h s for the car to tra v el km i e the required p erio d in terv al is RT W e see ho w ev er ef g hij that the sp eedometer part violates its rate requiremen t of Hz whic h corresp ond to a p erio d requiremen t of RT This conclusion assumes that the sp eedometer bcd whic h is within the sp eedometer part m ust pro duce outputs at the same rate Re ned T ask Structuring Stage W e go from a to b in Figure b ecause of t w o reasons there is a rate violation in the sp eedometer part and eac h part of the system has a large gran ularit y The re nemen t consists of exp osing the sp eedometer and the o dometers They are connected to task a the input task of the system b y t w o generic tasks called pro cess pulses W e kno w the rate of task a and the rate requiremen ts on the output tasks the sp eedometer and the o dometers W e use them to deriv e a p erio d in terv al for all the tasks in the task graph as follo ws The p erio d in terv al for the pro cess pulses task is the same as the one w e deriv ed for task ef g hij i e D T b ecause ef g h the same reasoning applies Similarly the p erio d in terv al for the pro cess pulses task is D T Ho w ev er the rate requiremen t on the sp eedometer leads to a bc p erio d in terv al of D T for the sp eedometer so that it can satisfy its rate c requiremen t This p erio d in terv al means that task bc m ust pro duce sp eed v alues for the sp eedometer for ev ery c hange in the car s sp eed As a matter of fact this is done in to enable a smo other mo v em en t of the sp eedometer s needle The imp ortan t thing to note here is that RADHA RA T AN has deriv ed what is man ually required and done in Finally the p erio d in terv al for eac h o dometer is the same as that of task ef g h b ecause eac h o dometer displa ys ev ery distance v alue sen t b y task ef g h as so on as they arriv e W e no w see that the output tasks thereb y the system satisfy their rate requiremen ts Final T ask Structuring Stage The task graph in b is not the nal one b ecause w e should detail the generic pro cess pulses tasks This leads to the task graph in c in Figure This task graph is actually the one giv en for the dash b oard con troller in The structuring of the pro cess pulses tasks is the c hoice of the original designers of the dash b oard con troller so w e will not question it w e will ho w ev er deriv e the rates of all the tasks in the task graph and c hec k to see if the rate requiremen ts are still satis ed In the sp eedometer part the pro cess pulses task is structured in to tasks b and c T ask b reads the pulses and computes the sp eed of the car whereas task c reads one sp eed v alue and pro duces sp eed v alues b et w een the curren t one and the previous one F or example if the sp eed c hanges from to the sp eedometer will get v alues This is done to smo oth out the mo v eme n t of the sp eedometer s needle W e no w see that the deriv ed p erio d in terv als for tasks b and c are the same as that of the pro cess pulses task In the o dometers part the pro cess pulses task is structured in to tasks e f g and h This is done in suc h a w a y that the distance tra v eled to displa y on the o dometers is computed b y di eren t tasks one task for eac h o dometer T ask h com bines the distances computed and sends them to the resp ectiv e o dometers Since eac h of these tasks gets one v alue and pro duces one v alue the deriv ed p erio d in terv als for eac h task is the same and is equal to that of the pro cess pulses task In the p erio d in terv al of task b is xed at ms Fixing the p erio d in terv al means that task b will read di eren t n um b er of pulses from task a to compute the sp eed This do es not violate the functionalit y it ma y ho w ev er lead to a v erage rather than instan taneous sp eed v alues in short in terv als Using this xed v alue w e can see that the new deriv ed p erio d in terv al for task c is also ms The p erio d in terv als for the other tasks do not c hange W e can no w v alidate the rate requiremen ts of the system Since the rates of the output tasks ha v e not b een c hanged b y the nal structuring stage the rate requiremen ts are still satis ed The system do es not ha v e an y resp onse time requiremen ts but if it had w e could also v alidate them The imp ortance of this v alidations stems from the fact that eac h structuring stage ab o v e increases the resp onse time of the system Summary of T ask Structurin g One imp ortan t fact to note in the ab o v e discussion is that w e ha v e not assumed that w e kno w the in ternals of an y task w e assume only that w e kno w their functionalit y Note that kno wing the functionalit y of a task means kno wing ho w it in teracts with other tasks in the task graph it do es not mean kno wing what sp eci c v alues it pro duces or consumes and ho w it generates these v alues F or example w e do not kno w ho w the lter sp eed task actually lters the sp eed v alue that it gets from task b w e kno w only that it gets one sp eed v alue from task b and m ust generate sp eed v alues so that the sp eedometer satis es its rate requiremen t Note that the functionalit y of input and output tasks is sp eci ed in the requiremen ts sp eci cation whereas that of the other tasks is assigned b y the designers during task structuring In the ab o v e structuring stages RADHA RA T AN only exp ects to kno w the rate of the input task task a and some imp ortan t details related to the functionalit y of the tasks suc h as there m ust b e at least t w o pulses to compute a distance v alue and thereb y a sp eed v alue W e should men tion that RADHA RA T AN handles all the other deriv ations and v alidations automatically The deriv ations and v alidations in the ab o v e discussion whic h ma y seem to b e carried out man ually b y the designers and are actually carried out man ually in are to illustrate ho w RADHA RA T AN w orks in ternally Timing driv en Hardw are Soft w are P artitioning Giv en a task graph usually acyclic area and timing costs for soft w are and hardw are mappings of all no des and comm unication costs sub ject to resource capacit y and p er formance constrain ts on the en tire task graph hardw are soft w are HW SW partitioning determines for eac h no de the hardw are or soft w are mapping suc h that the p erformance constrain ts are satis ed and the total hardw are area resulting after mapping is minim um This is called the binary partitioning problem in If there are n tasks the n um b er n of p ossible partitions in the searc h space is The binary partitioning problem do es not address the HW SW partitioning problem accurately The reason as noted in the same reference is the presence of m ultiple design options for eac h task suc h as di eren t algorithms resources etc Eac h particular v ector of c hoices for a task is called its impleme n tation bin This observ ation motiv ates the de nition of the extended partitioning problem EPP in whic h an implem en tation bin is also considered during partitioning No w if there are N impleme n tation bins for n eac h task the n um b er of p ossible partitions in the searc h space is N In this section w e sho w ho w RADHA RA T AN enhances t w o recen t comprehensiv e partitioning approac hes so that they can tak e care of timing constrain ts b etter and can run faster W e ha v e c hosen the partitioning approac hes in for discussion b e cause their problem form ulation is v ery comprehensiv e e g prop oses the extended partitioning problem and an algorithm for its solution and prop oses an algorithm to solv e the binary partitioning problem using in teger linear programming ILP Both approac hes consider timing constrain ts in their form ulation W e will refer to the rst approac h as the EPP approac h and the second as the ILP approac h Other partitioning approac hes can b e found in and in the references therein W e will illustrate the enhancemen t using the dash b oard con troller in order to sa v e space Because of the reasons only kno wn to the original dev elop ers of these partitioning approac hes w e ha v e not b een able to get their partitioning programs so that w e could also quan tify the actual reduction in their running times W e ho w ev er b eliev e that our discussion b elo w will con vincingly sho w the p oten tial reduction in their running times The algorithm to use in this case is as follo ws Algorithm Timing Dri ve n H W S W Par tit ion in g Run RADHA RATA N on the task graph Perform HW SW partitioni ng using the derived bounds from step If no valid partition is possible then Restructur e the task graph Goto step Step in the ab o v e algorithm is p erformed b y the designers and it is out of our scop e Impro ving the EPP Approac h This approac h assumes that there is a throughput constrain t an output rate con strain t on the system Assuming a non pip elined implem e n tation this constrain t is translated to a deadline constrain t a resp onse time constrain t This is the only p erfor mance requiremen t used b y this approac h F or the binary partitioning problem the EPP approac h uses the follo wing algorithm A t a giv en step in partitioning some tasks are mapp ed to hardw are or soft w are and some are unmapp ed This approac h rst maps all the unmapp ed tasks to soft w are and computes the resulting resp onse time of the task graph If the deadline constrain t is violated then certain tasks from soft w are are selected using a certain priorit y function and mo v ed to hardw are to increase concurrency This pro cess con tin ues un til the deadline constrain t is satis ed F or the extended partitioning problem the EPP approac h w orks as follo ws First a solution is found using the ab o v e algorithm b y using median area as a safe guess and execution time estimates for the tasks Then the solution is extended b y selecting an implem e n tation bin for eac h task The de ciencies of the EPP approac h in terms of its treatmen t of timing constrain ts are as follo ws i The system can ha v e resp onse time constrain ts in addition to output rate constrain ts ii The system can ha v e resp onse time constrain ts b et w een every pair of input and output tasks iii A mixed impleme n tation i e hardw are and soft w are implies pip elining at the task lev el so assuming a non pip elined impleme n tation ma y not b e v alid iv Some mappings of a group of tasks ma y not b e v alid at all e g they ma y violate certain rate constrain ts but the EPP approac h has no w a y of kno wing that b efore computing the latency estimates for eac h task in the group using v ery time consuming hardw are and soft w are syn thesis pro cesses as w ell as doing the actual mapping Similarly some implem en tation bins ma y not b e v alid for some tasks but the EPP approac h again has no w a y of kno wing that b efore actually trying them out during partitioning The help that w e o er is based on the fact that w e can deriv e the timing budget on eac h task suc h that if a task do es not satisfy its timing budget the system s external constrain ts resp onse time and output rate will not b e satis ed This means that w e can p erform most of the analysis at task lev el rather than system lev el In particular our approac h easily handles the problems asso ciated with i and ii F or iii and iv w e can analyze the task graph and determine the timing budgets b y assuming a pip elined or non pip elined implem en tation whic h corresp onds to a serialization of the tasks in v olv ed Recall that b y default w e assume a pip elined implem e n tation at the task lev el during rate deriv ation since w e assume that the tasks are concurren t This is done to giv e maxim um exibilit y to the designers b ecause non pip elined impleme n tation is an implem e n tation c hoice W e can also c hec k to see some mappings will satisfy their corresp onding resp onse time and rate constrain ts Similarly w e can eliminate the in v alid implem e n tation bins from the start b y comparing their latency to the deriv ed timing budgets Supp ose w e eliminate half of the N implem en tation bins for eac h task this w a y then the size of the n searc h space b ecomes N an exp onen tial reduction in size W e will illustrate these using the dash b oard con troller example later in this section Impro ving the ILP Approac h This approac h basically form ulates the binary partitioning problem as an in teger linear programming problem It considers a h uge n um b er of constrain ts in the form ulation suc h as resource design timing hardw are sharing in terfacing sc heduling etc the solution found is optimal under these constrain ts The ILP approac h uses only one external timing constrain t called the global design timing constrain t This timing constrain t is regarded as the resp onse time of the system Although not clearly explained it is apparen t from the exp erimen tal results in that this timing constrain t is deriv ed from the output rate constrain t of the system exactly the same w a y as the EPP approac h do es In the ILP form ulation a constrain t is de ned suc h that the nish time of ev ery task is less than the global design timing constrain t The de ciencies of the EPP approac h also apply to the ILP approac h and our solution similarly helps the ILP approac h to o F or example the ILP approac h tries to do a resource constrained sc heduling of eac h task As this is a NP complete problem the ILP approac h uses the follo wing heuristic approac h First solv e an IP mo del e g an ILP form ulation of the problem for the HW SW mapping with the help of appro ximate time v alues on the tasks Second solv e an IP mo del for calculating a v alid sc hedule with no des mapp ed to hardw are or soft w are deriving an exact resp onse time Third if the exact resp onse time violates the system s resp onse time rep eat the rst t w o steps with tigh ter appro ximate time v alues As y ou can see t w o ILP problems are solv ed in eac h iteration eac h of whic h is a v ery time consuming pro cess With our approac h the designers already kno w the timing budgets on eac h task hence they kno w the latency b ound on the sc hedule of eac h task if mapp ed to hardw are or the execution time b ound on eac h task if mapp ed to soft w are What remains to do is to try to nd a sc hedule under these b ounds to minimi ze the resource usage Consequen tly our approac h eliminates exp ensiv e iterations in the ILP approac h Example P artitioning the Dash b oard Con troller W e no w illustrate using the task graph in Figure c the use of our approac h in a t ypical HW SW partitioning approac h The rst thing to do is to deriv e b ounds on the required latency of eac h task It is easy to see that the lo w er b ound of the p erio d in terv al of a task is also the upp er b ound on the latency of that task Hence for tasks b and c the latency b ound is ms and for the tasks in the o dometers part the latency b ound is s These b ounds should b e used for co ding these tasks or doing op eration sc heduling for them T o test these ideas w e actually syn thesized the tasks c and g in hardw are one from the sp eedometer part and one from the o dometer part from their b eha vioral lev el V erilog co de using Synopsys Beha vioral Compiler with its lo w e ort option W e used IBM CMOS S SC library for b oth tasks F or task g w e used its timing budget of s as its sc hedule latency and a clo c k of MHz The resulting sc hedule length is cycle sho wing that the task is sc hedulable and the resulting hardw are impleme n tation has a total cell area of using p orts nets and cells F or task c w e used its timing budget of ms as its sc hedule length and a clo c k of MHz The resulting sc hedule length is cycles sho wing that the task is sc hedulable and the resulting hardw are implem en tation has a total cell area of using p orts nets and cells W e can no w p erform some partitioning scenarios on the dash b oard con troller Supp ose w e w an t to implem en t the tasks e through h on a single pro cessor i e in soft w are This means that these tasks will b e serialized Assuming that all of these tasks are fast enough i e they satisfy their latency b ound of s the resp onse time through these tasks will b e s This means that the o dometers will get a distance v alue ev ery s This clearly violates their rate constrain t when the car go es faster than km km h Note that w e do this analysis without ev en running a partitioning algorithm y et it can also b e done within a partitioning algorithm and without ev en ha ving the co de for the tasks Considering the w ork needed to reac h similar conclusions in w e b eliev e that that our approac h is v ery useful for timing analysis b efore or within HW SW partitioning Timing Sim ulation RADHA RA T AN deriv es a timing budget for eac h task in the task graph Hence w e kno w the timing constrain ts that eac h task should ob ey Also from the task graph w e kno w the input output c haracteristics of eac h task in terms of tok en usage These t w o can b e com bined to de ne a high lev el timing mo del for the system in order to p erform a high lev el sim ulation of the system to ev aluate its p erformance c haracteristics whic h w e call timing simulation Timing sim ulation can b e used to gain insigh t in to the timing b eha vior of the system as w ell as to v alidate man y timing tradeo s done during task structuring and HW SW partitioning It is basically a fast protot yping of the system in a v ery early phase in its design o w F or timing sim ulation w e represen t the high lev el timing mo del of the system using V erilog HDL although an y other language with similar c haracteristics can b e used F or our exp erimen ts w e wrote the dash b oard con troller in V erilog HDL and used a com mercially a v ailable V erilog HDL sim ulator for its functional and timing sim ulation The functional sim ulation assumes that the in ternals of the tasks are kno wn whereas the tim ing sim ulation do es not The functional sim ulation is done only to presen t v alid sp eed and distance v alues b ecause for the timing sim ulation F or the timing sim ulation the actual sp eed and distance v alues are not imp ortan t as long as there are suc h v alues comm unicated timing sim ulation will run Timing Sim ulation Scenarios Note that a timing budget for a task is a p erio d in terv al and it giv es the smallest and largest p erio d p ossible for the task F or example the wheel pulses task has a p erio d in terv al of T ms whic h is deriv ed b y kno wing that the car tra v els at a a sp eed in the range of km h The rate deriv ation algorithm deriv es the p erio d in terv al for the other tasks using T a As w e all kno w the t ypical sp eed of the car is not near its lo w er and upp er sp eed b ounds This motiv ates the use of timing sim ulation to get an idea in to the system s t ypical b eha vior F or example during timing sim ulation w e assume that the car s driv er decides b et w een acceleration deceleration and not c hanging the curren t sp eed randomly but in a uniformly distributed manner The acceleration and deceleration p erio ds are normally distributed with a mean of s and a standard deviation of s W e assume that the acceleration or deceleration of the car is suc h that it tak es s for the car to ha v e a sp eed incremen t of km h They are actually normally distributed suc h that the time to get this sp eed incremen t has a mean of s and a standard deviation of s Thinking that the car will not accelerate and decelerate constan tly w e assume that it will not c hange its sp eed for t wice as long as the acceleration deceleration p erio d W e also prev en t the car going ab o v e km h W e think that these v alues are t ypical so timing sim ulation with these v alues giv es us the t ypical or a v erage b eha vior of the car These v alues can b e c hanged v ery easily b y the designers W e no w describ e t w o scenarios with these sim ulation parameters F rom our analysis results w e kno w that tasks f and g will ha v e a p erio d in terv al of s so their latency should b e at most s T o v alidate this with timing sim ulation w e c hose their latency from their p erio d in terv als assuming that it is uniformly distributed within the in terv al A timing sim ulation of the system rev eals that these tasks are slo w er than required b ecause the system drops almost of the tok ens that should reac h the o dometers F rom our analysis results w e kno w that task c will ha v e a p erio d of ms Since it ma y tak e at most s for task b to pro duce a tok en for task c an y latency of less than s for task c will result in loss of tok ens W e c hose its latency as uniformly distributed within s and sa w that the system actually drops man y tok ens Related W ork More information ab out the imp ortance of task structuring as w ell as its criteria and related issues are giv en b y Gomaa and Hatley and Pirbhai T o the b est of our kno wledge our approac h is the rst systematic treatmen t of timing driv en task struc turing One related approac h is giv en b y Hou and W olf Their approac h presen ts a heuristic algorithm to partition the real time soft w are system s data o w graph in to a task graph under deadline and size constrain ts Due to its assumptions e g it assumes that it is p ossible to determine the cost of a pro cess in terms of its execution time and monetary v alue b efore partitioning it is not useful at the lev el where task structuring is done b ecause task structuring is p erformed ev en b efore the lev el where the in ternals of tasks are designed In this c hapter w e ha v e used the hardw are soft w are partitioning approac hes b y Kala v ade and Lee and Niemann and Marw edel These approac hes are dis cussed in detail in x Other partitioning approac hes can b e found in and in the references therein Summary In this c hapter w e ha v e rst presen ted the implem en tation details of the to ol RADHA RA T AN and its use in v arious phases of our co design metho dology x has giv en the impleme n tation details of the to ol RADHA RA T AN x has discussed the dash b oard con troller example x x and x ha v e resp ectiv ely describ ed the use of our algorithms in task structuring and hardw are soft w are partitioning phases of our co design metho dology and timing sim ulation of the system at the requiremen ts sp eci cation phase These sections illustrate the use of our algorithms using the dash b oard con troller example T = [228, 11880] a bcd RT <= 1000 Wheel bcd Speedometer part Pulses a RT = [138000, 7200000] (a) Odometers part efghij efghij bc DT = [456, 23760] DT = [19, 990] bc d Wheel Process pulses 1 Speedometer d Pulses a Process pulses 2 Lifetime i Odometer (b) efgh Resettable Trip j Odometer DT = DT = DT = [138168, 7199280] efgh i j DT = DT = [456, 23760] b c Wheel Read Filter Speedometer Pulses Speed Speed a b c d Lifetime Compute Odometer Total km i (c) Accumulate f LCD Display Pulses Driver Compute e h Partial km Resettable Trip Odometer g j DT = DT = DT = DT = [138168, 7199280] e f g h Figure T ask structuring for the dash b oard con troller in three stages lab eled a c The lab els for the p erio d in terv als are T for giv en RT for required and D T for deriv ed p erio d in terv als Chapter Case Studies W e presen t rate and separation deriv ation and v alidation on three case studies that w e ha v e tak en from The descriptions of these applications are also from this reference These applications are real applications from whic h the references are giv en in W e ha v e also applied RADHA RA T AN to t w o applications from the airline reserv ation query serv er application and the audio video m ultim e dia application In order to sa v e some space w e ha v e not included these applications in this dissertation It is enough to kno w that our deriv ations matc h those in Syn thetic Ap erture Radar Application The rst application that w e will consider is the Syn thetic Ap erture Radar SAR b enc h mark application from the ARP A Rapid Protot yping of Application Sp eci c Signal Pro cessors RASSP pro ject The SAR system can b e used to iden tify man made ob jects on the ground or in the air b y pro ducing high resolution all w eather images in real time The full SAR b enc hmark cannot execute in real time on a single pro cessor so the RASSP pro ject allo cates p ortions of the full SAR application to individual pro cessors The task graph in Figure sho ws one p ortion This p ortion w as originally created to test to ols T=3.6ms 118 118 256 256 256 256 256 256 Zero YRange Window Range RCS E Fill Data FFT Mult Range Fill Window RFFT 256 A B C D RCS J I H G 256*64 128 128 128 128 Kernel 128 128 Azimuth 128 256*128 Corner Output Azimuth F IFFT Mult FFT Turn Image Mult AFFT Azimuth Figure The SAR application dev elop ed b y the RASSP pro ject It p erforms the range and azim uth compression pro cessing in the formation of an image that has resolution one eigh th of that formed b y the full SAR b enc hmark A brief description of the pro cessing p erformed b y eac h task in the task graph of Figure is giv en in F or our analysis the actual pro cessing information is im material all the prop erties that w e need are giv en in the task graph in Figure In this gure eac h circle represen ts a task and eac h arc represen ts a c hannel Eac h task is an AND u task The name of eac h task is written inside its circle for ease of reference w e renamed these tasks b y letters A through J The t w o n um b ers on eac h c hannel are its tok en n um b ers the n um b er close to the tail of the arc is the pro duce n um b er of the corresp onding c hannel and the one close to the head of the arc is the consume n um b er of the corresp onding c hannel F or instance task F Corner T urn pro duces T ok ens p er execution and task G Azim uth consumes tok ens p er execution T ask A is the input task and task J is the output task T ask A pro duces one tok en ev ery ms The SAR application in Figure has a resp onse time requiremen t of less than one second W e no w sim ulate a run of the acyclic rate deriv ation algorithm D P er iodAcy c from Chapter on the SAR b enc hmark The sim ulation in terms of the rate equations pro ceeds as follo ws Con v ert the p erio d of the input task task A to an in teger b y m ultiplyi ng it b y un til the decimal p oin t b ecomes not signi can t so T A Eac h c hannel b et w een the tasks from A to E all has the same pro duce and consume n um b er so eac h c hannel b eha v es lik e one with a pro duce n um b er of and a consume n um b er of Y et using the actual tok en n um b ers w e ha v e the follo wing set of rate equations T D T A B D T D T B C and D T D T C D D T D T D E from whic h w e can see that the deriv ed p erio d of eac h of these tasks is equal to the p erio d of the input task i e D T D T D T D T T B C D E A The p erio d of task F is deriv ed from the follo wing rate equation D T D T F E D T D T E F The p erio d of task F is deriv ed from the follo wing rate equation D T F D T G D T D T F G Eac h c hannel b et w een the tasks from G to J all has the same pro duce and consume n um b er so eac h c hannel b eha v es lik e one with a pro duce n um b er of and a consume n um b er of Y et using the actual tok en n um b ers w e ha v e the follo wing set of rate equations D T D T G H and D T D T H I D T D T I J from whic h w e can see that the deriv ed p erio d of eac h of these tasks is equal to the deriv ed p erio d of task G i e D T D T D T D T H I J G The p erio ds that w e ha v e deriv ed ab o v e are exactly the same as those deriv ed in The resp onse time of the SAR application is computed using the algorithm D er iv eS epF or O neP air from Chapter Ho w ev er since the task graph in Figure is a linear c hain of tasks w e can do the same computation man ually to giv e more in tuition Using Equation w e deriv e the relativ e time separations b et w een eac h pair of pro ducers and consumers as follo ws Since the pro duce and consume n um b ers are equal for eac h c hannel from task A through E and G through J the time separation b et w een the pro ducer and consumer of eac h of these c hannels is equal to the deriv ed p erio d of the pro ducer F or the tasks E and F w e ha v e ms and for the tasks F and G w e ha v e ms where eac h equation is Equation with the v alues of the parameters plugged in Th us the resp onse time of the SAR application can b e at most ms In the ab o v e deriv ations it is assumed that the c hannel dela y is zero and eac h pro ducer pro duces all of its tok ens righ t b efore it terminates Since ms s the SAR appli cation satis es its resp onse time constrain t pro vided that the c hannels do not in tro duce an y additional dela ys In the deriv ed w orst case resp onse time is equal to ms whic h is less that what w e ha v e deriv ed In our case the execution sequence realizing the ab o v e resp onse time is suc h that ev ery task except E executes once but E executes times In the resp onse time is deriv ed from the equation ms whic h seems to ignore the p erio ds of the tasks near the b eginning and end of the linear c hain Mobile Satellite Receiv er Application The second application that w e will consider is the INMARSA T mobile receiv er applica tion The INMARSA T system has b een o ering mobile satellite comm unications service since to the commerci al shipping industry It is a global satellite constellation of sev en geostationary satellites pro viding comm unicati ons in the L band frequencies The INMARSA T B mobile terminal pro vides digital comm unic ations supp orting facsimile and data transmissions Its high sp eed data option also pro vides video teleconferencing and compressed or dela y ed video transmission services to remote lo cations on land or at sea Figure sho ws the task graph for this application The notation of this graph follo ws that of the task graph for the SAR application In this task graph the input no des I and I represen t the input devices receiving the satellite signal and the output no de O represen ts the terminal accepting the pro cessed signal Eac h task is an AND u task In the gure the tok en n um b ers that are not sho wn are all equal to unit y W e no w sim ulate a run of the acyclic rate deriv ation algorithm D P er iodAcy c from Chapter on the INMARSA T task graph The sim ulation in terms of the rate equations pro ceeds as follo ws The p erio ds of the input no des are the same but they are not sp eci ed in Th us as in this reference w e will use X for their p erio ds and p erform a sym b olic deriv ation based on that v alue Matched 4 11 11 Receiver Decimator Demux Channel Linear Filter Estimator Interp. I1 A B C 10 G H I2 D E F K L Matched 4 11 11 Receiver Decimator Demux Channel Linear Filter Estimator Interp. 10 11 M 11 10 I Q N 240 De- 240 Decimator 10 interleaver Complex Division J O1 W R Decimator P 240 De- 240 Terminal Viterbi Decoder interleaver S V U 240 De- 240 Square interleaver Root T Figure The INMARSA T application F or c hannels I A and I D D T D T X A D X D T A F or c hannels A B and D E D T D T X B E X D T B F or c hannels B C and E F D T D T X C F X D T C F or c hannels C G G H F K and K L D T D T D T D T X G K H L X D T G F or c hannels H I and L M D T D T X I M X D T I F or c hannels M N and I J D T D T X N J X D T N F or c hannels N S and J T D T D T X S T X D T S F or task P D T X with resp ect to c hannel C P P X D T P D T X with resp ect to c hannel F P P X D T P D T X with resp ect to c hannel N P and P X D T P D T X with resp ect to c hannel J P P X D T P Since D T is the same for ev ery one of its input c hannels there is no inconsistency P here Th us D T X P F or task U D T X with resp ect to c hannel S U and S X D T S D T X with resp ect to c hannel T U S X D T S Since D T is the same for ev ery one of its input c hannels there is no inconsistency U here Th us D T X U F or c hannels P Q P R and U V D T D T D T X Q R V X D T Q F or task W D T X with resp ect to c hannel Q W W X D T W D T X with resp ect to c hannel R W and W X D T W D T X with resp ect to c hannel V W W X D T W Since D T is the same for ev ery one of its input c hannels there is no inconsistency W here Th us D T X W Finally for c hannel W O D T X O X D T O The resp onse time of this application is equal to X X X X X X In the deriv ed w orst case resp onse time is X whic h is less than what w e ha v e deriv ed The reason for this is similar to the one for the SAR application Directed Lo w F requency Analysis and Record ing Acoustic Signals Application The third application that w e will consider is an application from an an ti submarine w ar fare system The application is referred to as the Directed Lo w F requency Analysis and Recording DIF AR Acoustic Signals Application and is actually from the Airb orne Lo w F requency Sonar ALFS subsystem of the LAMPS MK I I I an ti submarine helicopter The ALFS system pro cesses lo w frequency signals receiv ed b y sonobuo ys sensors in the w ater Its primary function is to detect submarines and to calculate range and b earing estimates to eac h target The actual pro cessing p erformed b y the application is classi ed b y the U S Go v ernmen t y et it is irrelev an t for our purp oses Figure giv es the task graph for the DIF AR application The frequency sp ectrum of data receiv ed b y the DIF AR system is usually partitioned in to bands and the system can b e con gured to pro cess from one to eigh t bands The task graph in this gure is an abstract represen tation of a one band DIF AR system The notation of this graph follo ws those of the previous applications In the gure the tok en n um b ers that are not sho wn are equal to unit y Eac h task is an AND u task The DIF AR task graph is cyclic and there are t w o strongly connected comp onen ts in the graph In Figure eac h strongly connected comp onen t is enclosed with dashed lines In the graph no des F and C are sup erno des at the top lev el The no des inside eac h strongly connected comp onen t are in the b ottom lev el of the task graph W e no w sim ulate a run of the acyclic rate deriv ation algorithm D P er iodAcy c from Chapter on the DIF AR application The sim ulation in terms of the rate equations pro ceeds as follo ws The p erio d of the input task is giv en and is equal to ms F or c hannel A B D T B D T B F or c hannel B C D T C D T C Note that due to the results of Chapter ev ery task in C has the same p erio d and this p erio d m ust b e equal to that of C as C is the sup erno de at the top lev el Th us the tasks in C ha v e a p erio d of F or c hannel C D and D E D T D T D E D T D F or c hannel C F D T F D T F As in C all the tasks in F except V ernFilter V ernSp ec and V ernDet ha v e a p erio d of These three exceptions ha v e a p erio d of zero since the pro duce n um b er from DD AD is equal to zero Also note that the task CRdetect do es not use unit y tok en n um b ers so its p erio d is equal to Its p erio d do es not violate those of its pro ducer and consumer F or task G D T with resp ect to c hannel C G and G D T G D T with resp ect to c hannel F G G D T G Th us D T G F or c hannel G H D T H D T H F or c hannel F I D T I D T I F or task J D T with resp ect to c hannel I J and J D T G D T with resp ect to c hannel F J J D T G Th us D T J F or task K D T with resp ect to c hannel C K and K D T K D T with resp ect to c hannel J K K D T K Th us D T K F or c hannel K L D T L D T L F or c hannel C N D T N D T N F or task M D T with resp ect to c hannel N M M D T M D T with resp ect to c hannel J M and M D T M D T with resp ect to c hannel F M M D T M Th us D T M F or task O D T with resp ect to c hannel C O and O D T G D T with resp ect to c hannel M O O D T G Th us D T O F or c hannel O P D T P D T P F or task Q D T with resp ect to c hannel C Q and Q D T G D T with resp ect to c hannel M Q Q D T G Th us D T Q F or task S D T with resp ect to c hannel C S and S D T G D T with resp ect to c hannel M S S D T G Th us D T S F or c hannels Q R and S T D T D T R T D T R Summary In this c hapter w e ha v e presen ted the application of RADHA RA T AN on three applica tions from the literature B A 32 16 FlowCntl Source T=625ms C D 0 BDF MstrMCS MnsMrg F DDAD MnsOut 0 SlvMCS E CRfilter VernFilter GramData VernSpec CRspec GramMrg G VernDet SAD GramOut 2 2 H CRdetect BndMrg BBC I 8 8 8 K BrgAngle BrgMrg J 8 24 3 BrgOut 8 L AliScale AutoDet 3 24 N M O BinMrg BinOut P 24 R Q AutoDeOut AutoDeMrg 8 AliOut AliMrg T S Figure The DIF AR application Chapter Conclusions and F uture W ork W e ha v e addressed the problems of timing constrain t deriv ation and v alidation for re activ e and real time em b edded systems Suc h systems con tin uously in teract with their en vironmen t under strict external timing constrain ts and w e ha v e sho wn ho w these ex ternal constrain ts translate to in ternal timing constrain ts on the tasks of these systems T o handle these problems w e ha v e dev elop ed the generalized task graph mo del algo rithms that op erate on this mo del a co design metho dology that extends a traditional co design metho dology with this mo del and algorithms and nally an implem e n tation of these algorithms in the to ol RADHA RA T AN Our con tributions in this dissertation allo w a systematic analysis of timing constrain ts of an em b edded system W e think that the tec hniques and results in this dissertation can b e extended in the follo wing directions W e regard the lo w er b ound of a task s p erio d in terv al as an upp er b ound of the task s latency This b ound can b e lo ose since the latency of a task is usually m uc h smaller than this b ound Hence additional constrain ts on task latencies in order to tigh ten these b ounds can b e found These constrain ts can b e obtained from suc h dep endencies as cyclic and m utual exclusion W e use a single n um b er for a tok en n um b er although the in terv al if deriv ed is stored in the to ol All our deriv ations should b e extended to the case where the tok en n um b ers are in terv als Our deriv ation is carried out in the forw ard direction from the input tasks to w ards the output tasks in the task graph A deriv ation in the bac kw ard direction seems necessary b ecause an y violations detected when the output tasks are reac hed m ust b e propagated bac k to the input tasks W e partially do bac kw ard deriv ation when w e p erform deriv ation with required rates Also bac kw ard deriv ation is done in but this w ork has lots of restricting assumptions Hence our deriv ation can b e extended for the bac kw ard direction It seems that this extension will in v olv e some sym b olic analysis tec hniques as sho wn in Our deriv ation uses a v erage rates no w It can b e extended to w orst case rates It should b e noted that the problem gets m uc h more complicated in this case This extension seems necessary when the system has w orst case requiremen ts W e ha v e not done an y estimation on the c hannel capacities although w e sho w that the c hannels will b e b ounded Our w ork can b e extended to deriv e the c hannel capacities This extension is mostly useful for the arc hitectural design phase rather than for the requiremen t s sp eci cation phase References R K Ah uja T L Magnan ti and J B Orlin Network Flows Pren tice Hall Upp er Saddle Riv er NJ USA J F Allen Main taining kno wledge ab out temp oral in terv als Comm of the A CM T Amon G Borriello T Hu and J Liu Sym b olic timing v eri cation of timing diagrams using presburger form ulas In Pr o c th Design A utomation Conf pages A CM IEEE T o d Amon Sp eci cation sim ulation and v eri cation of timing b eha vior PhD thesis Univ of W ashington G S Avrunin J C Corb ett L K Dillon and J C Wileden Automated deriv a tion of time b ounds in unipro cessor concurren t systems IEEE T r ans Softwar e Eng Septem b er F Bacelli G Cohen G J Olsder and J P Quadrat Synchr onization and Lin e arity John Wiley Sons New Y ork NY USA F Balarin M Chio do P Giusto H Hsieh A Jurecsk a L La v agno C P asserone A Sangio v anni Vincen telli E Sen to vic h K Suzuki and B T abbara Har dwar e Softwar e Co Design of Emb e dde d Systems The POLIS Appr o ach Klu w er Aca demic Publ Boston MA USA G Borriello A new in terface sp eci cation metho dology and its applications to transducer syn thesis PhD Thesis T ec h Rep UCB CSD Univ ersit y of California Berk eley J A Brzozo wski T Gahlinger and F Ma v addat Consistency and satis abilit y of w a v eform timing sp eci cations Networks J T Buc k Sc heduling dynamic data o w graphs with b ounded memory using the tok en o w mo del PhD thesis Univ of California at Berk eley J T Buc k and E A Lee The tok en o w mo del In L Bic G Gao and J Gaudiot editors A dvanc e d T opics in Data ow Computing and Multithr e ading IEEE T M Burks and K A Sak allah Min max linear programming and the timing analysis of digital circuits In Pr o c Int Conf Computer A ide d Design pages IEEE A CM S M Burns P erformance analysis and optimization of async hronous circuits PhD thesis California Institute of T ec hnology C G Cassandras Discr ete Event Systems Mo deling and Performanc e A nalysis Aksen Asso ciates Inc and Irwin Inc Homew o o d IL USA C G Cassandras S Lafortune and G J Olsder In tro duction to the mo del ing con trol and optimization of discrete ev en t systems T ec h Rep Delft Univ ersit y of T ec hnology S Chakrab ort y and D L Dill Appro ximate algorithms for time separation of ev en ts In Pr o c Int Conf Computer A ide d Design pages IEEE A CM No v em b er S Chatterjee Distributed pip eline sc heduling A framew ork for design of large scale distributed heterogeneous real time systems PhD thesis Carnegie Mellon Univ S Chatterjee and J Strosnider Distributed pip eline sc heduling A framew ork for distributed heterogeneous real time system design The Computer J S T Cheng and A K Agra w ala Allo cation and sc heduling of real time p erio dic tasks with relativ e timing constrain ts In Pr o c nd Int Workshop on R e al Time Computing Syst with Applic ations pages IEEE B V Cherk assky and A V Goldb erg Negativ e cycle detection algorithms In Pr o c th Eur op e an Symp on A lgorithms pages P Chou E A W alkup and G Borriello Sc heduling for reactiv e real time systems IEEE Micr o pages August V Ch v atal A greedy heuristic for the set co v ering problem Mathematics of Op er ations R ese ar ch August J Co c het T errasson G Cohen S Gaub ert M McGettric k and J P Quadrat Numerical computation of sp ectral elemen ts in max plus algebra In Pr o c IF A C Conf on Syst Structur e and Contr ol G Cohen D Dub ois J P Quadrat and M Viot A linear system theoretic view of discrete ev en t pro cesses and its use for p erformance ev aluation in man ufacturing IEEE T r an A utomatic Contr ol Marc h T H Cormen C E Leiserson and R L Riv est Intr o duction to A lgorithms MIT Press Cam bridge MA USA R A Cuninghame Green and L Yixun Maxim um cycle means of w eigh ted di graphs Applie d Math JCU B Dasarath y Timing constrain ts of real time systems Constructs for expressing them metho ds of v alidating them IEEE T r ans Softwar e Eng Jan uary A Dasdan and R K Gupta F aster maxim um and minim um mean cycle algorithms for system p erformance analysis IEEE T r ans Computer A ide d Design Octob er A Dasdan and R K Gupta Timing issues in system lev el design in vited pap er In Pr o c IEEE Computer So ciety Workshop on VLSI April A Dasdan S Irani and R K Gupta An exp erimen tal study of minim um mean cycle algorithms T ec h rep Univ ersit y of California Irvine July A Dasdan S Irani and R K Gupta E cien t algorithms for optim um cycle mean and optim um cost to time ratio problems In Pr o c th Design A utomation Conf June A Dasdan A Math ur and R K Gupta RA T AN A to ol for rate analysis and rate constrain t debugging for em b edded systems In Pr o c Eur o Design and T est Conf pages IEEE A Dasdan D Ramanathan and R K Gupta An in teractiv e v alidation metho dol ogy for em b edded systems In Pr o c High L evel Design V alidation and T est Work shop pages IEEE No v em b er A Dasdan D Ramanathan and R K Gupta Rate deriv ation and its applications to reactiv e real time em b edded systems In Pr o c th Design A utomation Conf pages June A Dasdan D Ramanathan and R K Gupta A timing driv en design and v al idation metho dology for em b edded real time systems A CM T r ans on Design A utomation of Ele ctr onic Systems Octob er D Douk as and A S LaP augh CLO VER A timing constrain ts v eri cation system In Pr o c th Design A utomation Conf pages A CM IEEE June K Edw ards R e al Time Structur e d Metho ds John Wiley Sons New Y ork NY USA M R Garey and D S Johnson Computers and Intr actability A Guide to the The ory of NP Completeness W H F reeman and Compan y New Y ork NY USA S Gaub ert Metho ds and applications of max linear algebra T ec h Rep INRIA F rance S Gaub ert and J Guna w ardena A non linear hierarc h y for discrete ev en t dynam ical systems In Pr o c th Workshop on Discr ete Event Syst IEE August R Gerb er S Hong and M Saksena Guaran teeing real time requiremen ts with resource based calibration of p erio dic pro cesses IEEE T r ans Softwar e Eng July R Gerb er W Pugh and M Saksena P arametric dispatc hing of hard real time tasks IEEE T r ans Comput Marc h S H Gerez S M Heemstra de Gro ot and O E Herrmann A p olynomial time algorithm for the computation of the iteration p erio d b ound in recursiv e data o w graphs IEEE T r ans on Cir cuits and Syst Jan uary D W Gillies and J W S Liu Sc heduling tasks with AND OR precedence con strain ts SIAM J Comput August P Giro dias E Cern y and W J Older Solving linear min and max constrain t systems using CLP based on relational in terv al arithmetic The or etic al Computer Scienc e S Go ddard On the managemen t of latency in the syn thesis of real time signal pro cessing systems from pro cessing graphs PhD thesis Univ of North Carolina at Chap el Hill S Go ddard and K Je a y A soft w are syn thesis metho d for building real time systems from pro cessing graphs In Pr o c R e al Time T e chnolo gy and Applic ations Symp IEEE June H Gomaa Softwar e Design Metho ds for Concurr ent and R e al Time Systems Addison W esley Reading MA USA M Gondran and M Minoux Gr aphs and A lgorithms John Wiley and Sons New Y ork NY USA R Go vindara jan and G R Gao A no v el framew ork for m ulti rate sc heduling in DSP applications In Pr o c Int Conf on Applic ation Sp e ci c A rr ay Pr o c essors pages IEEE Octob er J Guna w ardena P erio dic b eha vior in timed systems with AND OR causalit y T ec h Rep ST AN CS Stanford Univ J Guna w ardena Min max functions Discr ete Event Dynamic Systems R K Gupta Sp ecial issue on partitioning metho ds for em b edded systems Design A utomation for Emb e dde d Systems Marc h R K Gupta and G De Mic heli Hardw are soft w are cosyn thesis for digital systems IEEE Design and T est of Computers Septem b er C C Han K J Lin and J W S Liu Sc heduling jobs with temp oral distance constrain ts SIAM J Comput Octob er M Hartmann and J B Orlin Finding minim um cost to time ratio cycles with small in tegral transit times Networks D J Hatley and I A Pirbhai Str ate gies for R e al Time System Sp e ci c ation Dorset House New Y ork NY USA C L Heitmey er R D Je ords and B G Laba w Automated consistency c hec king of requiremen ts sp eci cations A CM T r ans Softwar e Engine ering and Metho dolo gy July J Hou and W W olf Pro cess partitioning for distributed em b edded systems In Pr o c Int Workshop on HW SW Co design pages IEEE H Hulgaard Timing analysis and v eri cation of timed async hronous circuits PhD thesis Univ of W ashington H Hulgaard and S M Burns Bounded dela y timing analysis of a class of csp program F ormal Metho ds in System Design H Hulgaard S M Burns T Amon and G Borriello An algorithm for exact b ounds on the time separation of ev en ts in concurren t systems IEEE T r ans Com put No v em b er R L Jones I I I Design to ol for m ultipro cessor sc heduling and ev aluation of iterativ e data o w algorithms T ec h P ap er NASA April R L Jones I I I Data o w design to ol T ec h Momerandum NASA F ebruary K Ito and K K P arhi Determining the minim um iteration p erio d of an algorithm J VLSI Signal Pr o c essing Decem b er Jr J E Co olahan and N Roussop oulos Timing requiremen ts for time driv e n systems using augmen ted p etri nets IEEE T r ans Softwar e Eng Septem b er F Jahanian V erifying prop erties of systems with v ariable timing constrain ts In Pr o c R e al Time Symp pages IEEE Decem b er F Jahanian and A K L Mok Safet y analysis of timing prop erties in real time systems IEEE T r ans Softwar e Eng Septem b er K Je a y The real time pro ducer consumer paradigm A paradigm for the con struction of e cien t predictable real time systems In Pr o c A CM SIGAPP Symp on Applie d Computing pages F ebruary K Je a y and D Bennett A rate based execution abstraction for m ultim edia com puting In T D C Little and R Gusella editors Pr o c th Int Workshop on Network and Op er ating System Supp ort for Digital A udio and Vide o v olume of L e ctur e Notes in Computer Scienc e pages Spriger V erlag April F Jin H Hulgaard and E Cern y Maxim um time separations of ev en ts in cyclic systems with linear and latest timing constrain ts In Pr o c nd Int Conf on F ormal Metho ds in Computer A ide d Design pages D B Johnson Finding all the elemen tary circuits of a directed graph SIAM J Comput Marc h D S Johnson Appro ximation algorithms for com binatorial problems J of Comp and Syst Scienc es Decem b er A Kala v ade and E A Lee The extended partitioning problem Hardw are soft w are mapping sc heduling and impleme n tation bin selection Design A utomation for Emb e dde d Syst Marc h D Kang R Gerb er and M Saksena P erformance based design of distributed real time systems In Pr o c r d R e al Time T e chnolo gy and Applic ations Symp pages IEEE June B Kao and H Garcia Molina Deadline assignmen t for a distributed soft real time system In Pr o c th Int Conf on Distribute d Computing Syst pages IEEE Ma y B Kao and H Garcia Molina Subtask deadline assignmen t for complex distributed soft real time tasks In Pr o c th Int Conf on Distribute d Computing Syst pages IEEE June R M Karp A c haracterization of the minim um cycle mean in a digraph Discr ete Mathematics R M Karp and R E Miller Prop erties of a mo del for parallel computations Determinacy termination and queueing SIAM J Appl Math No v em b er R M Karp and J B Orlin P arametric shortest path algorithms with an applica tion to cyclic sta ng Discr ete Applie d Mathematics K Khordo c M Dufresne and E Cern y A stim ulus resp onse system based on hierarc hical timing diagrams In Pr o c Int Conf on Computer A ide d Design pages IEEE No v em b er M H Klein T Raly a B P ollak and R Ob enza A Pr actitioner s Handb o ok for R e al Time A nalysis Guide to R ate Monotonic A nalysis for R e al Time Systems Klu w er Academic Publ Boston MA USA H Kop etz R e al Time Systems Klu w er Academic Publ Boston MA USA D Ku and G De Mic heli High L evel Synthesis of ASICs Under Timing and Synchr onization Constr aints Klu w er Academic Publ Boston MA USA S Laftit J Proth and X Xie Optimization of in v arian t criteria for ev en t graphs IEEE T r ans A utomatic Contr ol Ma y E L La wler Combinatorial Optimization Networks and Matr oids Holt Reinhart and Winston New Y ork NY USA E A Lee and D G Messersc hmitt Sync hronous data o w Pr o c IEEE Septem b er T K Lee A general approac h to p erformance analysis and optimization of asyn c hronous circuits PhD thesis CalT ec h B Len t and H Kurmann The OR data o w arc hitecture for a mac hine em b edded con trol system J R e al Time Syst C L Liu and J W La yland Sc heduling algorithms for m ultiprogramm ing in a hard real time en vironmen t J of the A CM J W S Liu and R Ha E cien t metho ds for v alidating real time constrain ts In S Son editor Principles of R e al Time Systems c hapter pages Pren tice Hall L Lo v asz On the ratio of optimal in tegral and fractional co v ers Discr ete Mathe matics Decem b er A R Martello S P Levitan and D M Chiarulli Timing v eri cation using HDTV In Pr o c th Design A utomation Conf pages A CM IEEE June A Math ur A Dasdan and R K Gupta Rate analysis for em b edded systems T ec h Rep UIUCDCS R Univ of Illinois June A Math ur A Dasdan and R K Gupta Rate analysis of em b edded systems A CM T r ans on Design A utomation of Ele ctr onic Systems July K L McMillan and D L Dill Algorithms for in terface timing v eri cation In Pr o c Int Conf on Computer Design pages IEEE N Megiddo Com binatorial optimization with rational ob jectiv e functions Math ematics of Op er ations R ese ar ch No v em b er A K Mok and G Liu Early detection of timing constrain t violation at run time In Pr o c th IEEE R e al Time Systems Symp pages Decem b er T Murata P etri nets Prop erties analysis and applications Pr o c IEEE April C J My ers and T H Y Meng Syn thesis of timed async hronous circuits IEEE T r ans VLSI Syst June R Niemann and P Marw edel An algorithm for hardw are soft w are partitioning using mixed in teger linear programming Design A utomation for Emb e dde d Syst Marc h J B Orlin and R K Ah uja New scaling algorithms for the assignmen t and minim um mean cycle problems Mathematic al Pr o gr amming C Y P ark and A C Sha w Exp erimen ts with a program timing to ol based on source lev el timing sc hema IEEE Computer pages Ma y S P ark and S B Ak ers An e cien t metho d for nding a minimal feedbac k arc set in directed graphs In Pr o c IEEE Symp Cir cuits and Syst pages Ma y D P eng and K G Shin Mo deling of concurren t task execution in a distributed system for real time con trol IEEE T r ans Comput April C Puc hol and A K Mok The in tegration of con trol and data o w structures in distributed hard real time systems In Pr o c nd Workshop on Par al lel and Distribute d R e al Time Syst pages IEEE April S C V Ra ju R Ra jkumar and F Jahanian Monitoring timing constrain ts in distributed real time systems In Pr o c th IEEE R e al Time Systems Symp pages Decem b er C V Ramamo orth y and G S Ho P erformance ev aluation of async hronous concur ren t systems using p etri nets IEEE T r ans Softwar e Eng Septem b er M Ra ynal and M Singhal Capturing causalit y in distributed systems IEEE Computer pages F ebruary M Ryu S Hong and M Saxena Streamlining real time con troller design F rom p erformance sp eci cations to end to end timing constrain ts In Pr o c R e al Time T e chnolo gy and Applic ations Symp pages IEEE June M Saxena and S Hong Resource conscious design of distributed real time systems An end to end approac h In Pr o c Int Conf on Engine ering of Complex Comp Syst pages IEEE Octob er D Seto J P Leho czky L Sha and K G Shin On task sc hedulabilit y in real time computer con trolled systems In Pr o c th IEEE R e al Time Systems Symp pages Decem b er A A Silb erman R TM design and implem en tation PhD thesis Univ of Illinois at Urbana Champaign B T a ylor In tro ducing real time constrain ts in to requiremen ts and high lev el design of op erating systems In Pr o c Nat T ele c ommunic ations Conf v olume pages P V an b ekb ergen G Go ossens and H De Man Sp eci cation and analysis of timing constrain ts in signal transition graphs In Pr o c Eur op e an Design A utomation Conf pages E A W alkup and G Borriello In terface timing v eri cation with applications to syn thesis In Pr o c st Design A utomation Conf pages A CM IEEE June D E W allace and C H Sequin A TV an abstract timing v eri er In Pr o c th Design A utomation Conf pages A CM IEEE June G J Whitro w The Natur al Philosophy of Time Oxford Univ ersit y Press New Y ork NY USA A Xie and P A Beerel Sym b olic tec hniques for p erformance analysis of timed systems based on a v erage time separation of ev en ts In Pr o c r d Int Symp on A dvanc e d R ese ar ch in Asynchr onous Cir cuits and Systems pages April J Xu and D L P arnas On satisfying timing constrain ts in hard real time systems IEEE T r ans Softwar e Eng Jan uary A Y ak o vlev M Kishinevsky A Kondrat y ev L La v agno and M Pietkiewicz Koutn y On the mo dels for async hronous circuit b eha vior with OR causalit y F or mal metho ds in System Design No v em b er T Y Y en Hardw are soft w are co syn thesis of distributed em b edded systems PhD thesis Princeton Univ T Y Y en A Ishii A Casa v an t and W W olf E cien t algorithms for in terface timing v eri cation In Pr o c Eur op e an Design A utomation Conf pages T Y Y en and W W olf P erformance estimation for real time distributed em b edded systems In Pr o c Int Conf on Computer Design pages IEEE N E Y oung R E T arjan and J B Orlin F aster parametric shortest path and minim um balance algorithms Networks App endix A Input and Output Files for RADHA RA T AN This c hapter describ es the format of the input sp eci cation language for RADHA RA T AN The same language is also used for output This section also descib es an example the dash b oard con troller written in this language and the corresp onding output from RADHA RA T AN also in the same language The dash b oard con troller example is de scrib ed in x A RADHA RA T AN Input Sp eci cation Language This is a comment X means X is optional LB is the Lower Bound and UB is the Upper Bound LB UB can be integers floats unknown or infinity The input file should have an extension of gtg Case sensitive Tasks must be defined before defining any relation on them If a property for a task or edge is given more than once the last one will be effective But for the delays the first one will be effective system SYSTEM NA ME required res pon se ti me bou nd s LB UB required rat e b oun ds LB UB max input task s task ID task ID Give at least one of the following given X b ou nds are compulsory The parser will run w o them but RADHA RATAN will complain for their absence given r ate b oun ds LB UB LB UB in fin ity given p eri od bo und s LB UB LB UB i nfi nit y type AND OR AN D O R x s kip ped u nsk ipp ed default AND u latency bo un ds LB UB LB UB in fin ity output ta sks task ID task ID Give at least one of the following type AND u AND s OR u OR s default AND u require d r at e b oun ds LB UB LB UB i nfi nit y require d p er iod bo un ds LB UB LB UB i nfi nit y latency bo un ds LB UB LB UB in fin ity internal tas ks task ID task ID Give at least one of the following type AND u AND s OR u OR s default AND u require d r at e b oun ds LB UB LB U B i nf ini ty require d p er iod bo un ds LB UB LB UB i nfi nit y latency bo un ds LB UB LB UB in fin ity causality re lat ion s from task ID to task ID from task ID to task ID Give at least one of the following type AND u AND s OR u OR s default A ND u produce d t ok ens int implicit consume d t ok ens int implicit delay b oun ds LB UB delay boun ds is given separatio n constrain ts for actual edges separatio n r ela tio ns Strict format at least one is required from task ID start fin is h to task ID start fin ish required sep ara ti on bou nd s LB UB required linear constraints between any two tasks given sep ara tio n bou nds LB UB given linear constrain ts between any two tasks on task ID with bound s LB UB on task ID from task ID to task ID with bou nds LB UB from task A to task B means a bound on tB tA required is the base to test against given will be used when finding a solution with bounds is always required end system A Input File for the Dash b oard Con troller All period bounds are in units of xms Default task type and default relation edge type are AND u system dashboard co nt rol ler input task s task wheel puls es given pe rio d bou nds output tas ks task speedomete r required pe rio d b ou nds task lifetime o dom ete r required pe rio d b ou nds task resettable tr ip od ome ter required pe rio d b ou nds internal t ask s task read speed task filter spe ed task accumulate pu lse s task compute to tal km task compute pa rti al km task lcd driver di spl ay causality rel ati ons from task wheel pulse s to task read speed consumed to ken s from task read speed to task filter spe ed from task filter spee d to task speedomete r we do not know the token usage between filter task and speedomet er from task wheel pulse s to task accumulate pu ls es consumed to ken s from task accumulate pu lse s to task compute to tal k m from task accumulate pu lse s to task compute pa rti al km from task compute tot al km to task lcd driver di sp lay produced to ken s consumed to ken s from task compute par ti al km to task lcd driver di sp lay from task lcd driver di spl ay to task lifetime o dom et er from task lcd driver di spl ay to task resettable tr ip od ome ter end system A Output File for Rate Deriv ation of the Dash b oard Con troller Verifying the SCC with name resettable tri p o dom et er Validating output task number and name resettabl e t ri p o dom ete r Checking lower period bound Required lower period bound Derived lower period bound Status satisfied Checking upper period bound Required upper period bound Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name lifetime od ome ter Validating output task number and name lifetime odo me ter Checking lower period bound Required lower period bound Derived lower period bound Status satisfied Checking upper period bound Required upper period bound Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name lcd driver dis pla y Validating internal task number and name lcd driver d isp lay Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens Derived number of produced tokens Given number of consumed tokens Derived number of consumed tokens Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name compute par tia l k m Validating internal task number and name compute pa rt ial km Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name compute tot al km Validating internal task number and name compute to ta l k m Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name accumulate pul ses Validating internal task number and name accumulate p uls es Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens Derived number of consumed tokens Verifying the SCC with name speedometer Validating output task number and name speedomet er Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name filter spee d Validating internal task number and name filter spe ed Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens unknown Derived number of consumed tokens Verifying the SCC with name read speed Validating internal task number and name read speed Checking lower period bound Required lower period bound unknown Derived lower period bound Status satisfied Checking upper period bound Required upper period bound unknown Derived upper period bound Status satisfied Checking token numbers of its predecessor edges Edge Given number of produced tokens unknown Derived number of produced tokens Given number of consumed tokens Derived number of consumed tokens Verifying the SCC with name wheel pulse s Input task number and name wheel pulse s Given lower period bound Given upper period bound Vita Ali Dasdan receiv ed the B S degree in Computer Engineering from Bogazici Univ ersit y Istan bul T urk ey in and the M S degree in Computer Engineering and Information Science from Bilk en t Univ ersit y Ank ara T urk ey in After one y ear of Ph D study at Bilk en t Univ ersit y he came to the United States and started his graduate study at the Univ ersit y of Illinois at Urbana Champaign UIUC in August In F ebruary he mo v ed to Irvine CA b ecause of his advisor s relo cation to the Univ ersit y of California Irvine UCI He sta y ed at the UCI un til he graduated from the UIUC Ali Dasdan w as supp orted b y a NA TO A Basic Science F ello wship from The Scien ti c and T ec hnical Researc h Council TUBIT AK of T urk ey during t w o In terstate Electronics Corp oration sc holarships during and and a D A C Design Automa tion Graduate sc holarship during He w as also supp orted b y teac hing and researc h assistan tships His researc h assistan tships w ere supp orted b y v arious gran ts from NSF and D ARP A He receiv ed an Outstanding T eac hing Assistan t Aw ard in Ali Dasdan has done researc h in graph and circuit partitioning genetic syn thesis of neural net w ork algorithms recon gurable computer arc hitectures and hardw are soft w are co design of em b edded systems