Software Synthesis EE202A Presentation October 18, 2001OutlineBackgroundHW/SW Co-designHW/SW Co-DesignPartitioning High-Level DesignSoftware SynthesisCode GenerationSoftware Synthesis ExampleProgramming ModelsCFSMSW Synthesis with CFSMS-GraphTask SynthesisRTOSCost/Performance EstimationSDFSchedule/MemorySW Synthesis with SDFSummaryRelated ResearchReferencesReferencesOctober 18, 2001 Cho & Kim 1Software Synthesis EE202A PresentationOctober 18, 2001Young H. Cho and Seung Hyun KimOctober 18, 2001 Cho & Kim 2OutlineBackgroundHW/SW Co-designSoftware SynthesisSummaryOctober 18, 2001 Cho & Kim 3BackgroundEmbedded SoftwareConstrained Structure“Simple,” Multiple TasksTarget ArchitectureOctober 18, 2001 Cho & Kim 4HW/SW Co-designReactive Real-time SystemMixed HW/SW SystemSoftware – FlexibilityHardware – PerformanceOctober 18, 2001 Cho & Kim 5HW/SW Co-DesignFormal LanguagesPartitioningHW SynthesisSW SynthesisRTOS Tasks Logic SynthesisCode Optimization Logic OptimizationBoard Level PrototypingCo-SimulationAndFormal VerificationOctober 18, 2001 Cho & Kim 6Partitioning High-Level DesignFormal LanguagesTextual RepresentationGraphical RepresentationDesign PartitioningPlatform ResourceHW/SW SynthesisABCOctober 18, 2001 Cho & Kim 7Software SynthesisGoal: Optimized software from high-level specificationIssues to considerTarget hardware supportRetargetable compilersResult: Efficient code for the target processorABCbegin X1=TaskA(W); X2=TaskA(W); Y=TaskB(X1); result=TaskC(X2,Y);endOctober 18, 2001 Cho & Kim 8Code GenerationStatic CodeStatic (object) code for each tasksLibrary of inline codesCode optimizationTask HandlingResource managementStatic/dynamic scheduling CommunicationOctober 18, 2001 Cho & Kim 9Software Synthesis ExampleTask BDownsample2 to 1Task AUpsample1 to 332High-LevelDescriptionStatic Codefor (i=0;i<3;i++) { Out[i]=In;}Reg=In[0]+In[1];Out=Reg>>1;main(Samples *In) { while() { /* Schedule 2A */ for (j=0;j<2;j++) { /* inline code: Task A */ for (i=0;i<3;i++) { OutA[j*3+i]=InA[j]; } } for (k=0;k<3;k++) { /* inline code: Task B */ Reg=OutA[k*2] +OutA[k*2+1]; OutB[k]=Reg>>1; } }} Code Generation2 (TaskA) 3 (TaskB)& ScheduleOctober 18, 2001 Cho & Kim 10Programming ModelsFSM ModelCo-design Finite State Machine (CFSM)Dataflow ModelsSynchronous Dataflow (SDF)Boolean DataflowDynamic DataflowProcessor NetworkOthersOctober 18, 2001 Cho & Kim 11CFSMExtended FSMGlobally Asynchronous Locally Synchronous (GALS)Unbiased towards HW or SWReactive, control-dominated systemsSize of the systems that can be mappedOctober 18, 2001 Cho & Kim 12SW Synthesis with CFSMSoftware Graph (S-Graph)Task SynthesisReal-Time Operating System (RTOS)Machine Code CompilationOctober 18, 2001 Cho & Kim 13S-GraphControl/Data-Flow DiagramDirected Acyclic Graph (DAG)BEGINpresent_c = 1a = ?ca’ := 0emit_y := 1ENDa’ := a + 1a’ := aemit_y := 0false truefalse truemodule simpleCFSM:input c: integer;output y;var a: integer in loop await c; if a = ?c then a := 0; emit y; else a := a + 1; end if end loopend varend moduleOctober 18, 2001 Cho & Kim 14Task SynthesisConstructionTranslation of transition function of CFSMRecursively built from the reactive functionOptimizationReordering or collapsing test nodesCode-size estimationTranslationTarget language (e.g., C code)October 18, 2001 Cho & Kim 15RTOSSchedulingIndividual CFSMCommunication MechanismsSet of flagsMemory mapped I/O port of the micro-controllerPolling or interruptsSynthesis or Commercial RTOSOctober 18, 2001 Cho & Kim 16Cost/Performance EstimationAccurate and Quick EstimationCode sizeMin/max execution timeConsiderationsCode structuresSystem platformSolutionAssign cost/timing parametersOctober 18, 2001 Cho & Kim 17SDFDigital Signal ProcessingGraphical RepresentationActors/NodesDirected edgesDelaysSynchronyConsume TokensProduce TokensFixed number of Tokensabc12122DDOctober 18, 2001 Cho & Kim 18Schedule/MemoryStatic schedulingDetermine task buffer sizeMemory efficient edge delayDeterministic at compile timeOctober 18, 2001 Cho & Kim 19SW Synthesis with SDFLibrary of actor code blocksDetermine static scheduleOptimal code sizePerformanceInline code using scheduleOctober 18, 2001 Cho & Kim 20SummaryHW/SW Co-designSoftware SynthesisHighly optimized codeTiming constraintsEfficient Resource UsageHighest performance per costControl over implementation costOctober 18, 2001 Cho & Kim 21Related ResearchBerkeley HW/SW Co-Design Grouphttp://www-cad.eecs.berkeley.edu/~polisBerkeley Ptolemy Grouphttp://ptolemy.eecs.berkeley.eduCHINOOKhttp://www.cs.washington.edu/research/chinook/VULCANCadence Cierto VCCJeckle: the JAVA ECL compilerOctober 18, 2001 Cho & Kim 22References 1. A. Sangiovanni-Vincentelli, “What is software synthesis?,” Computer Design Editorial, Department of EECS, UC Berkeley, Berkeley, CA, June 1997.2. Berkeley POLIS Group, “A Framework for Hardware-Software Co-Design of Embedded System,” POLIS Website, Department of EECS, UC Berkeley, Berkeley, CA, 1997.3. F. Thoen, M. Cornero, G. Goosens, and H. DeMan, “Software synthesis for real-time information processing systems,” ACM SIGPLAN, Vol. 30, No. 11, November 1995.4. Linkoping University HW/SW Co-design Course Website, http://www.ida.liu.se/~zebpe/codesign/, 1998.5. EE249 “Design of Embedded Systems: Models, Validations, and Synthesis,” http://www-cad.eecs.berkeley.edu/~polis/class/index.html, UC Berkeley, CA. 2001.6. P. Chou, and G. Borriello, “Software scheduling in the co-synthesis of reactive real-time systems,’ 31st ACM/IEEE Design Automation Conference, San Diego, CA, pp. 1-4, June 1994. ..October 18, 2001 Cho & Kim 23References7. E. Lee, “Embedded software,” UC Berkeley ERL Memorandum M01/26, http://ptolemy.eecs.berkeley.edu/publications/papers/01/embsystems/8. F. Balarin, L. Lavagno, P. Murthy, and A. Sangiovanni-Vincentelli, “Scheduling for embedded real-time systems,” IEEE Design & Test of Computers, Vol. 15, No. 1, pp. 71-82, January-March 1998. http://ielimg.ihs.com/iel3/54/14269/00655185.pdf9. S. Bhattacharyya, R. Leupers, and P. Marwedel, “Software synthesis and code generation for
View Full Document