10.1145/2432516.2432522acmotherconferencesArticle/Chapter ViewAbstractPublication PagesicpsprocConference Proceedings
research-article

Using the CASM language for simulator synthesis and model verification

ABSTRACT

We present the CASM language, an abstract state machine (ASM) based modeling language originally designed for verifying compiler backends. We demonstrate the expressiveness by describing an instruction set simulator (ISS) for MIPS in approximately 700 lines of code. Further we present a refinement of the models to cycle-accurately describe two implementations of the classic 5-stage MIPS pipeline. Utilizing symbolic execution allows us to prove semantic equivalence of the pipeline implementations and the instruction set description. Finally we compile the models to C++ and provide a small runtime to create a system simulator achieving a performance of approx. 1 MHz in MiBench and SPECInt2000 benchmarks.

References

  1. D. August, J. Chang, S. Girbal, D. Gracia-Perez, G. Mouchard, D. A. Penry, O. Temam, and N. Vachharajani. UNISIM: An open simulation environment and library for complex architecture design and collaborative development. IEEE Computer Architecture Letters, 6(2): 45--48, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. R. Azevedo, S. Rigo, M. Bartholomeu, G. Araujo, C. Araujo, and E. Barros. The ArchC architecture description language and tools. Int. J. Parallel Program., 33(5): 453--484, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. J. Bergin and S. Greenfield. Teaching parameter passing by example using thunks in C and C++. SIGCSE Bull., 25(1): 10--14, Mar. 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Blanqui, C. Helmstetter, V. Joloboff, J.-F. Monin, and X. Shi. Designing a CPU model: from a pseudo-formal document to fast code. CoRR, abs/1109.4351, 2011.Google ScholarGoogle Scholar
  5. E. Börger and J. Schmid. Composition and submachine concepts for sequential ASMs. In Computer Science Logic (Proceedings of CSL 2000), volume 1862 of LNCS, pages 41--60. Springer-Verlag, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. F. Brandner, A. Fellnhofer, A. Krall, and D. Riegler. Fast and accurate simulation using the LLVM compiler framework. In RAPIDO '09: 1st Workshop on Rapid Simulation and Performance Evaluation: Methods and Tools, 2009.Google ScholarGoogle Scholar
  7. F. Brandner, N. Horspool, and A. Krall. DSP instruction set simulation. In S. S. Bhattacharyya, E. Deprettere, R. Leupers, and J. Takala, editors, Handbook of Signal Processing Systems, pages 679--705. Springer, Aug. 2010.Google ScholarGoogle ScholarCross RefCross Ref
  8. E. Börger. Abstract state machines: A method for high-level system design and analysis, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. H. Cassé, J. Barre, R. Vaillant-David, and P. Sainrat. Fast Instruction-Accurate Simulation with SimNML (regular paper). In Workshop on Rapid Simulation and Performance Evaluation: Methods and Tools (RAPIDO), Heraklion, Crète, Grèce, 22/01/11, pages 8--12, http://univ-lille1.fr, janvier 2011. Université de Lille.Google ScholarGoogle Scholar
  10. R. Farahbod, V. Gervasi, and U. Glässer. CoreASM: An extensible ASM execution engine. In Proc. of the 12th International Workshop on Abstract State Machines, pages 153--165, 2005.Google ScholarGoogle Scholar
  11. G. Goos and W. Zimmermann. Verifying compilers and ASMs. In Proceedings of the International Workshop on Abstract State Machines, Theory and Applications, ASM '00, pages 177--202, London, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Y. Gurevich. Evolving algebras 1993: Lipari guide, pages 9--36. Oxford University Press, Inc., New York, NY, USA, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. R. Guthaus, J. S. Ringenberg, D. Ernst, T. M. Austin, T. Mudge, and R. B. Brown. Mibench: A free, commercially representative embedded benchmark suite. In Proceedings of the Workload Characterization, 2001. WWC-4. 2001 IEEE International Workshop, WWC '01, pages 3--14, Washington, DC, USA, 2001. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. J. C. King. Symbolic execution and program testing. Commun. ACM, 19(7): 385--394, July 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Lezuo and A. Krall. A unified processor model for compiler verification and simulation using asm. In ABZ, pages 327--330, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. A. Nohl, G. Braun, O. Schliebusch, R. Leupers, H. Meyr, and A. Hoffmann. A universal technique for fast and flexible instruction-set architecture simulation, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. A. Patterson and J. L. Hennessy. Computer Organization and Design - The Hardware / Software Interface (Revised 4th Edition). The Morgan Kaufmann Series in Computer Architecture and Design. Academic Press, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. V. Rajesh and R. Moona. Processor modeling for hardware software codesign. In in Int. Conf. on VLSI Design, pages 132--137, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Riazanov and A. Voronkov. The design and implementation of VAMPIRE. AI Commun., 15: 91--110, Aug. 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. R. G. Sargent. Verification and validation of simulation models. In Winter Simulation Conference, WSC '09, pages 162--176. Winter Simulation Conference, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. G. Sutcliffe, S. Schulz, K. Claessen, and A. Van Gelder. Using the TPTP language for writing derivations and finite interpretations. In Proceedings of the Third international joint conference on Automated Reasoning, IJCAR'06, pages 67--81, Berlin, Heidelberg, 2006. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Open SystemC Initiative. http://www.systemc.org/home.Google ScholarGoogle Scholar
  23. J. Teich, P. W. Kutter, and R. Weper. Description and simulation of microprocessor instruction sets using ASMs. In Proceedings of the International Workshop on Abstract State Machines, Theory and Applications, ASM '00, pages 266--286, London, UK, 2000. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J. J. Yi and D. J. Lilja. Simulation of computer architectures: Simulators, benchmarks, methodologies, and recommendations. IEEE Trans. Computers, 55(3): 268--280, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Using the CASM language for simulator synthesis and model verification

              Reviews

              Edel M Sherratt

              CASM is a modeling language based on the abstract state machine formalism introduced by Yuri Gurevich under the name “evolving algebras” in the early 1990s and developed by Blass, Gurevich, Börger, and many others. An abstract state machine has a signature, like the signature of an abstract data type. The signature defines a set of variables and functions, and these form the basis from which terms are recursively built up. Each term in an abstract state machine defines a location, and each abstract state associates values from an underlying base set with locations. An abstract state machine has a rule or program, which, given a state, generates a set of changes to be made to the association between locations and values. This set of changes is called an update set, and a state transition occurs when the updates in the update set are applied. An abstract state machine applies its rule repeatedly until an empty or inconsistent set of updates is obtained. This paper presents an application of CASM to model the MIPS pipeline, a five-stage architecture that allows fetch, decode, access memory, and writeback operations to overlap in time. A further model adds no-operation “bubbles” to be inserted into the pipeline. The CASM models were verified by proving the equivalence of pipelined and simpler, high-level models. They were then compiled to C++ to form simulators whose performance was measured using the MiBench and SpecInt2000 benchmarks. Overall, the paper provides a useful overview of abstract state machines and an introduction to the modeling and simulation of pipelined architecture. Online Computing Reviews Service

              Access critical reviews of Computing literature here

              Become a reviewer for Computing Reviews.

              Comments

              Login options

              Check if you have access through your login credentials or your institution to get full access on this article.

              Sign in

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!