On Retiming Synchronous Data-Flow Graphs

Many commoniterative or recursi ve DSP applicationscan be representedby synchronousdata-flow graphs(SDFGs). A greatdealof researchhasbeendoneattemptingto optimizesuchapplicationsthrough retiming. However, despiteits proveneffectivenessin transformingsingle-ratedata-flow graphsto equivalentDFGswith smallerclock periods,theuseof retiming for attemptingto reducethe executiontime of synchronousDFGshasneverbeenexplored.In this paper , we do just this. We developthebasicdefinitions andresultsnecessaryfor expressingandstudyingSDFGs.We review theproblemsfacedwhenattempting to retimea SDFGin order to minimize clock period, thenpresentalgorithmsfor doing this. Finally, we demonstratetheeffectivenessof ourmethodsonseveralexamples. EDICS Class: 5-PROG Thiswork is partially supportedby NSFgrantsMIP95-01006andMIP97-04276,andby theA. J.SchmittFoundation. 1 Intr oduction Sincethemosttime-criticalpartsof DSPapplicationsareloops,we mustexploretheparallelismembeddedin the repetitive patternof a loop. Oneof themostusefulmodelsfor representingDSPapplicationshasproven to bethemultirateor synchronousdata-flowgraph (SDFG) first proposedby Lee[14]. Thenodesof a SDFG representfunctionalelements,while edgesbetweennodesrepresentconnectionsbetweenthem. Eachnode consumesandproducesa predeterminedfixednumberof delays(i.e., datatokens)on eachinvocation. Additionally, eachedgemaycontainsomeinitial numberof delays.Thismodelhasprovenpopularwith designersof signalprocessingprogrammingenvironments[10,12,19,25] with its useleadingto numerousimportantresults regardingthe scheduling[8], hierarchization[22], vectorization[21] andmultiprocessorallocation[9, 14] of DSPprograms. A greatdealof researchhasbeendoneattemptingto optimizevariousaspectsof anapplication’ s execution by applyingvariousgraphtransformationtechniquesto theapplication’ s SDFG.Oneof themoreeffective of thesetechniquesis retiming[16,17], wheredelaysareredistributedamongtheedgessothathardwareis optimizedwhile theapplication’ s functionremainsunchanged. Retimingwasinitially appliedto single-rateDFGs to optimizetheapplication’ s scheduleof taskssothat theclock periodof thegraph(i.e., thetotal computation timeof thelongestzero-delaypath)wasdecreasedin orderfor theapplicationto bemoreefficiently scheduled for executionon multiprocessors[3–5]. It was later extendedto the moregeneralSDFGmodel in order to extendvectorizationcapabilities[27] or minimizethetotaldelaycountof aSDFG[26]. However, theproblem of usingretimingto minimizetheclock periodof a multirateDFG hasremainedunexplored. In this paper , we will discussthisproblemandproposeamethodfor accomplishingthis task. To illustratethebenefitsof the retiming transformation,considerthesingle-rateDFG in Figure1(a). The numbersabove thenodesrepresent computationtimesof individual tasks,while theshortbar-linescuttingthe edgesarethedelays.We canseethatour clock periodin this caseis dueto thezero-delayedgefrom to , hereafterreferredto as . Retimingallows usto removeadelayfrom andplaceit on to createthe retimedgraphin Figure1(b) with clock period . The functionof thetwo graphsis thesame,with the only complicationbeingthat we will have to provide thefirst valueof whenwe begin execution. The costsof doingthis areminisculewhenwe considerthatwe will besaving a clock cycle eachtime we execute theloop. An additionalbenefit is that schedulingalonemay yield a schedulerequiring more resourcesthan the scheduleproducedby retimingfirst. To illustratethis,considerthesingle-ratedata-flow graphin Figure2(a). If we applytheDFG SchedulingAlgorithm from [4], we derive theschedulein Figure2(b). Sincetherepeating partof thisscheduleof tasksrepeatsevery clockcycles,wesaythatthis is astaticschedulewith cycleperiod . Notethat this schedulerequiresa minimumof 5 processingunits to executebecauseof thework calledfor at any time-stepgreaterthanzerowhich is amultiple of 4.