Skip to main content
Log in

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

  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Beauvais J-R et al (1997) A translation of Statecharts to signal/DC+. Technical report, IRISA

  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–148

  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–232

  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–145

  5. Gordon M (2002) Relating event and trace semantics of hardware description languages. Comput J 45(1):27–36

    Google Scholar 

  6. Harel D (1987) Statecharts: a visual formalism for complex systems. Sci Comput Program 8(3):231–274

    Google Scholar 

  7. Harel D (1988) On visual formalisms. Commun ACM 31(5):541–530

    Google Scholar 

  8. Harel D, Naamad A (1996) The STATEMATE semantics of Statecharts. ACM Trans Softw Eng Methodol 5(4):293–333

    Google Scholar 

  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 York

  10. He J, Page I, Bowen J (1993) A provable hardware implementation of Occam. Lecture notes in computer science, vol 711, pp 693–703

  11. He J, Bowen J (1994) Specification, verification and prototyping of an optimised compiler. Formal Asp Comput 6:643–658

    Google Scholar 

  12. He J et al (1994) Provably correct systems. Lecture notes in computer science, vol 863. Springer, Berlin Heidelberg New York, pp 288–335

  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 Vegas

  14. He J, Zhu H (2000) Formalising Verilog. In: Proceedings of ICECS 2000. IEEE Computer Society Press, Lebanon, pp 412–415

  15. Hoare CAR, He J (1998) Unifying theories of programming. Prentice Hall, Englewood Cliffs, NJ

  16. Hooman JJM, Ramesh S, de Roever WP (1992) A compositional axiomatization of Statecharts. Theor Comput Sci 101:289–335

    Google Scholar 

  17. IEEE Computer Society (1995) IEEE standard hardware description language based on the Verilog hardware description language (IEEE std 1364–1995)

  18. Iyoda J, He J (2001) Towards an algebraic synthesis of Verilog. In: Proceedings of ERSA'2001, Las Vegas

  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-12

  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–702

  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, DC

  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–283

  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–264

  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–276

  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–316

  26. Sampaio A (1997) An algebraic approach to compiler design. World Scientific, Singapore

  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–144

  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–1007

  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–643

  30. Sowmya A, Ramesh S (1998) Extending Statecharts with temporal logic. IEEE Trans Softw Eng 24(3):216–231

    Google Scholar 

  31. Zhu H (2005) Linking the semantics of a multithreaded discrete event simulation language. PhD thesis, London South Bank University, UK

  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–184

  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–464

  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–432

  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–612

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Shengchao Qin.

Additional information

Part of the work appeared earlier in FME03 and ICFEM02. Wei-Ngan Chin is supported by Singapore Research Grant R-252-000-151-112. Jifeng He is supported by China 973 Project 2002CB312001. Zongyan Qiu is supported by NNSFC 60173003 and 60573081.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Qin, S., Chin, WN., He, J. et al. From Statecharts to Verilog: a formal approach to hardware/software co-specification. Innovations Syst Softw Eng 2, 17–38 (2006). https://doi.org/10.1007/s11334-005-0020-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-005-0020-2

Keywords

Navigation