1 / 21

SpecC and SpecCharts

SpecC and SpecCharts. Reviewed and Presented by Heemin Park and Eric Kwan EE202A - Fall 2001 Professor Mani Srivastava. Overview. Current problems in embedded systems development The solution – SpecC / SpecCharts Key feature: Program State Machine Highlight of SpecC Conclusion

khoi
Download Presentation

SpecC and SpecCharts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SpecC and SpecCharts Reviewed and Presented by Heemin Park and Eric Kwan EE202A - Fall 2001 Professor Mani Srivastava

  2. Overview • Current problems in embedded systems development • The solution – SpecC / SpecCharts • Key feature: Program State Machine • Highlight of SpecC • Conclusion • Questions

  3. Planning Specification Verification Implementation BIG LOOP!! Prototype Current Design Problem • Prototype debugging occupy 43% of development time • Miscommunication of requirement • Ambiguous specifications • Absence of simulation and synthesis tool HUGE design loop • The reason – lack of a proper specification language

  4. Avoid miscommunication of requirement and incomplete / ambiguous specifications Proper specifications reduce debugging time by 29% Allow development of synthesis and simulation tools Simulate without building a prototype The solution: SpecC & SpecCharts Planning Rapid Prototyping Specification Performance Evaluation Implementation AGILE DESIGN Prototype

  5. System design Algor. IP Capture Communication model Implementation model Architecture model Specification model Architecture exploration Comp. IP Communication synthesis RTOS RTL Proto. IP IP IP Hardware synthesis Interface synthesis Software compilation Backend Design Flow using SpecC Structure / Implementation detail Order / Timing detail SpecC Untimed (causality) Functional Timed (estimated) Structural Bus- functional Timing- accurate Cycle- accurate RTL/IS

  6. Properties of embedded System • VHDL support the following behavior of embedded systems: • Behavior Decomposition (Partial) • Sequential Algorithm • Behavior Completion (Partial) • Not supported: • State Transition • Exceptions

  7. Why did others failed?

  8. SpecCharts and SpecC • Same Idea, different implementation • SpecCharts is an extension to VHDL to tailored for embedded system design • SpecC –”specification description language based on C” • Both implement the idea of a Program State Machine (PSM)

  9. Program State Machine(PSM) • Hierarchical/Concurrent FSM + Programming language • Program-state(PS) • Status • Inactive • Executing • Complete • Computation • Leaf • Concurrent • Sequential • conditional transition arcs on completion or immediately

  10. ... a = 42; while (a<100) { b = b + a; if (b > 50) c = c + d; else c = c + e; a = c; } ... PS1 PS3 PS5 PS2 PS4 Program State Machine(Cont) • SpecCharts • PS described by procedures based on VHDL • SpecC • PS described by procedures in a programming language based on C Sequential Concurrent Leaf PSM model

  11. RemoteOperation hangup=‘1’ CheckCode code_ok=‘0’ code_ok=‘1’ RespondToCmds SpecChart Descriptions behavior CheckCode type leaf is begin code_ok <= true; for (i in 1 to 4) loop wait until tone /= “1111” and tone’event; if (tone /= user_code(i)) then code_on <= false; end if; end loop; end; Graphical-version Textual-version Initial state Transition on Complete(TOC) Complete state Transition immediately(TI) (starts from boundary)

  12. Design Flow using SpecCharts SpecChart Descriptions SpecCharts to VHDL translator VHDL Codes VHDL Verification tool VHDL Simulator VHDL Synthesizer

  13. P1 P2 s1 s2 s3 B1 B2 v1 v2 C1 v3 The SpecC Model • Traditional model • Processes and signals • Mixture of computation and communication • Automatic replacement impossible • SpecC model • Behaviors and channels • Separation of computation and communication • Plug-and-play

  14. The SpecC Language /* HelloWorld.c */ #include <stdio.h> void main(void) { printf(“Hello World!\n”); } • ANSI-C • Program is set of functions • Execution starts fromfunction main() • SpecC • Foundation: ANSI-C • Program is set of behaviors,channels, and interfaces • Execution starts frombehavior Main.main() // HelloWorld.sc #include <stdio.h> behavior Main { void main(void) { printf(“Hello World!\n”); } };

  15. Behavior Ports Channel Interfaces p1 p2 B v1 c1 Variable (wire) Child behaviors b1 b2 The SpecC Language • Basic structure • Top behavior • Child behaviors • Channels • Interfaces • Variables (wires) • Ports

  16. p1 p2 B v1 c1 b1 b2 The SpecC Language • Basic structure interface I1 { bit[63:0] Read(void); void Write(bit[63:0]); }; channel C1 implements I1; behavior B1(inint, I1, outint); behavior B(inint p1, outint p2) { int v1; C1 c1; B1 b1(p1, c1, v1), b2(v1, c1, p2); void main(void) { par { b1.main(); b2.main(); } } };

  17. B_seq B_fsm B_par B_pipe b1 b1 b2 b1 b1 b2 b3 b4 b2 b2 b3 b5 b6 b3 b3 The SpecC Language • Behavioral hierarchy Sequentialexecution FSMexecution Concurrentexecution Pipelinedexecution behavior B_seq { B b1, b2, b3; void main(void) { b1.main(); b2.main(); b3.main(); } }; behavior B_fsm { B b1, b2, b3, b4, b5, b6; void main(void) { fsm { b1:{…} b2:{…} …} } }; behavior B_par { B b1, b2, b3; void main(void) { par{b1.main(); b2.main(); b3.main(); } } }; behavior B_pipe { B b1, b2, b3; void main(void) {pipe{b1.main(); b2.main(); b3.main(); } } };

  18. System design Algor. IP Capture Communication model Implementation model Architecture model Specification model Architecture exploration Comp. IP Communication synthesis RTOS RTL Proto. IP IP IP Hardware synthesis Interface synthesis Software compilation Backend Design Flow using SpecC Structure / Implementation detail Order / Timing detail SpecC Untimed (causality) Functional Timed (estimated) Structural Bus- functional Timing- accurate Cycle- accurate RTL/IS

  19. Conclusion • SpecCharts • PSM: model of computation for embedded system • VHDL base: limited support for embedded software • SpecC • Well-known high-level language with support of PSM • Design environment still developing • Architecture exploration, refinement, communication synthesis,

  20. Questions…

  21. References • Literature • Vahid, F.; Narayan, S.; Gajski, D.D. SpecCharts: a VHDL front-end for embedded systems. IEEE Trans. on CAD, Vol.14(No.6), June 1995. Pp.694-706. • SpecC: Specification Language and Methodology, by Gajski, Zhu, Dömer, Gerstlauer, Zhao, Kluwer Academic Publishers, 2000. • Circuits and Systems, 2001, Tutorial Guide: ISCAS 2001, The IEEE International • The SpecC Language, pp.5.1_1-5.1_12. • Modeling and Design with SpecC, pp.5.2_1-5.2_12. • SpecC Design Environment, pp.5.6_1-5.6_4. • SpecC Open Technology Consortium, pp.5.7_1-5.7_5. • Online • SpecC web pages at UCIhttp://www.cecs.uci.edu/~specc/ • SpecC Open Technology Consortium (STOC)http://www.specc.org/

More Related