From Statecharts to Verilog: a formal approach to hardware/software co-specification

  • Shengchao Qin
  • Wei-Ngan Chin
  • Jifeng He
  • Zongyan Qiu
Article

Abstract

Hardware/software co-specification is a critical phase in co-design. Our co-specification process starts with a high level graphical description in Statecharts and ends with an equivalent parallel composition of hardware and software descriptions in Verilog. In this paper, we first investigate the Statecharts formalism by providing it a formal syntax and a compositional operational semantics. Based on that, a semantics-preserving linking function is designed to compile specifications written in Statecharts into Verilog. The obtained Verilog specifications are then passed to a partitioning process to generate hardware and software subspecifications, where the correctness is guaranteed by algebraic laws of Verilog.

Keywords

Statecharts Verilog Operational semantics Homomorphism Algebraic laws Hardware/software partitioning 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Beauvais J-R et al (1997) A translation of Statecharts to signal/DC+. Technical report, IRISAGoogle Scholar
  2. 2.
    von der Beeck M (1994) A comparison of statecharts Variants. In: de Roever L, Vytopil J (eds) Formal techniques in real-time and fault-tolerant systems. Lecture notes in computer science, vol 863. Springer, Berlin Heidelberg New York, pp 128–148Google Scholar
  3. 3.
    David A, Möller O, Wang Y (2002) Formal verification of UML Statecharts with real-time extensions. In: Proceedings of Fundamental Approaches to Software Engineering (FASE 2002). Lecture notes in computer science, vol 2306. Springer, Berlin Heidelberg New York, pp 218–232Google Scholar
  4. 4.
    Gordon M (1995) The semantic challenge of Verilog HDL. In: Proceedings of the 10th annual IEEE symposium on logic in computer science. IEEE Computer Society Press, Washington, DC, pp 136–145Google Scholar
  5. 5.
    Gordon M (2002) Relating event and trace semantics of hardware description languages. Comput J 45(1):27–36Google Scholar
  6. 6.
    Harel D (1987) Statecharts: a visual formalism for complex systems. Sci Comput Program 8(3):231–274Google Scholar
  7. 7.
    Harel D (1988) On visual formalisms. Commun ACM 31(5):541–530Google Scholar
  8. 8.
    Harel D, Naamad A (1996) The STATEMATE semantics of Statecharts. ACM Trans Softw Eng Methodol 5(4):293–333Google Scholar
  9. 9.
    He J (2002) An algebraic approach to the VERILOG Programming. In: Proceedings of the 10th anniversary colloquium of the United Nations University/International Institute for software technology (UNU/IIST). Springer, Berlin Heidelberg New YorkGoogle Scholar
  10. 10.
    He J, Page I, Bowen J (1993) A provable hardware implementation of Occam. Lecture notes in computer science, vol 711, pp 693–703Google Scholar
  11. 11.
    He J, Bowen J (1994) Specification, verification and prototyping of an optimised compiler. Formal Asp Comput 6:643–658Google Scholar
  12. 12.
    He J et al (1994) Provably correct systems. Lecture notes in computer science, vol 863. Springer, Berlin Heidelberg New York, pp 288–335Google Scholar
  13. 13.
    He J, Xu Q (2000) An operational semantics of a simulator algorithm. In: Proceedings of the 2000 international conference on parallel and distributed processing techniques and applications (PDPTA'2000), 26–29 June 2000, Las VegasGoogle Scholar
  14. 14.
    He J, Zhu H (2000) Formalising Verilog. In: Proceedings of ICECS 2000. IEEE Computer Society Press, Lebanon, pp 412–415Google Scholar
  15. 15.
    Hoare CAR, He J (1998) Unifying theories of programming. Prentice Hall, Englewood Cliffs, NJGoogle Scholar
  16. 16.
    Hooman JJM, Ramesh S, de Roever WP (1992) A compositional axiomatization of Statecharts. Theor Comput Sci 101:289–335Google Scholar
  17. 17.
    IEEE Computer Society (1995) IEEE standard hardware description language based on the Verilog hardware description language (IEEE std 1364–1995)Google Scholar
  18. 18.
    Iyoda J, He J (2001) Towards an algebraic synthesis of Verilog. In: Proceedings of ERSA'2001, Las VegasGoogle Scholar
  19. 19.
    Lüttgen G, von der Beeck M, Cleaveland R (2000) A compositional approach to statecharts semantics. NASA/CR-2000-210086, ICASE Report No.2000-12Google Scholar
  20. 20.
    Maggiolo-Schettini A, Peron A, Tini S (1996) Equivalences of Statecharts. In: 7th international conference on concurrency theory (CONCUR'96), Pisa, Italy. Lecture notes in computer science, vol 1119. Springer, Berlin Heidelberg New York, pp 687–702Google Scholar
  21. 21.
    Mikk E, Lakhnech Y, Siegel M, Holzmann G (1999) Implementing Statecharts in promela/SPIN. In: Proceedings of the 2nd IEEE workshop on industrial-strength formal specification techniques. IEEE Computer Society, Washington, DCGoogle Scholar
  22. 22.
    Page I, Luk W (1991) Compiling occam into FPGAs. In: Moore W, Luk W (eds) FPGAs. Abingdon EE&CS Books, Abingdon, England, pp 271–283Google Scholar
  23. 23.
    Pnueli A, Shalev M What is in a step: on the semantics of Statecharts. In: Proceedings of the symposium on theoretical aspects of computer software. Lecture notes in computer science, vol 526. Springer, Berlin Heidelberg New York, pp 244–264Google Scholar
  24. 24.
    Qin S, He J (2000) An algebraic approach to hardware/software partitioning. In: Proceedings of the 7th IEEE international conference on electronics, circuits and systems (ICECS'2k). IEEE Computer Society Press, Lebanon, pp 273–276Google Scholar
  25. 25.
    Qin S, He J (2001) Partitioning program into hardware and software. In: Proceedings of APSEC 2001, 4–7 December 2001. IEEE Computer Society Press, Macau, pp 309–316Google Scholar
  26. 26.
    Sampaio A (1997) An algebraic approach to compiler design. World Scientific, SingaporeGoogle Scholar
  27. 27.
    Sekerinski E, Zurob R (2002) Translating Statecharts to B. In: Butler B, Petre L, Sere K (eds) Proceedings of the 3rd international conference on integrated formal methods. Turku, Finland. Lecture notes in computer science, vol 2335. Springer, Berlin Heidelberg New York, pp 128–144Google Scholar
  28. 28.
    Seshia S, Shyamasundar R, Bhattacharjee A, Dhodapkar S (1999) A Translation of Statecharts to esterel. In: Wing J, Woodcock J, Davies J (eds) FM99: World Congress on Formal Methods. Lecture notes in computer science, vol 1709. Springer, Berlin Heidelberg New York, pp 983–1007Google Scholar
  29. 29.
    Silva L, Sampaio A, Barros E (1997) A normal form reduction strategy for hardware/software partitioning. Formal Methods Europe (FME) 97. Lecture notes in computer science, vol 1313. Springer, Berlin Heidelberg New York, pp 624–643Google Scholar
  30. 30.
    Sowmya A, Ramesh S (1998) Extending Statecharts with temporal logic. IEEE Trans Softw Eng 24(3):216–231Google Scholar
  31. 31.
    Zhu H (2005) Linking the semantics of a multithreaded discrete event simulation language. PhD thesis, London South Bank University, UKGoogle Scholar
  32. 32.
    Zhu H, Bowen J, He J (2001) Deriving operational semantics from denotational semantics for Verilog. In: Proceedings of APSEC 2001, 4–7 December 2001. IEEE Computer Society Press, Macau, pp 177–184Google Scholar
  33. 33.
    Zhu H, Bowen J, He J (2001) From operational semantics to denotational semantics for Verilog. In: Proceedings of CHARME 2001. Lecture notes in computer science, vol 2144, pp 449–464Google Scholar
  34. 34.
    Zhu H, He J (2000) A DC-based semantics for Verilog. In: Proceedings of the international conference on software: theory and practice (ICS2000), Beijing, 21–24 August 2000, pp 421–432Google Scholar
  35. 35.
    Zhu H, Bowen J, He J (2002) Soundness, completeness and non-redundancy of operational semantics for Verilog based on denotational semantics. In: 4th international conference for formal engineering methods (ICFEM2002). Lecture notes in computer science, vol 2495. Springer, Berlin Heidelberg New York, pp 600–612Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Shengchao Qin
    • 1
  • Wei-Ngan Chin
    • 2
  • Jifeng He
    • 3
  • Zongyan Qiu
    • 4
  1. 1.Department of Computer ScienceDurham UniversityDurhamUK
  2. 2.Department of Computer ScienceNational University of Singapore
  3. 3.Software Engineering InstituteEast China Normal UniversityShanghaiChina
  4. 4.School of Mathematical SciencesPeking UniversityBeijingChina

Personalised recommendations