skip to main content
10.1145/2093157.2093161acmotherconferencesArticle/Chapter ViewAbstractPublication PagespppjConference Proceedingsconference-collections
research-article

The Java Virtual Machine in retargetable, high-performance instruction set simulation

Published:24 August 2011Publication History

ABSTRACT

Two main demands on instruction set simulation are portability and high simulation performance. For the testing and benchmarking of ISA prototypes such as in an ASIP design process, simulators are additionally required to offer retargetability for the rapid modeling and revisal of their simulation targets.

In this paper, we present the techniques applied in a full-system instruction set simulation framework that combines these three conflicting demands. Our framework is retargetable, portable and provides high simulation performance. It is entirely implemented in Java and features a two-stage dynamic binary translation (DBT) targeting Java Bytecode in the first stage and employing the Java Virtual Machine as an external code generation back end in the second stage. While the use of state-of-the-art techniques such as DBT generates high simulation performance, the framework is also platform independent and can run on any J2SE-compliant Java Runtime Environment. In spite of this platform independence, the native code generated in the second stage will even profit from the platform-specific optimizations performed by modern JVM implementations. Our second contribution is HPADL, the instruction set description language that provides the retargetability of our framework. HPADL is tailored for the specific needs of dynamically compiling full-system IS simulation. Due to its clean separation of concerns between the instruction decoding and instruction execution, it easily enables DBT. Also, it is not restricted to a specific range of target architectures such as RISC. In this paper, we will compare the modeling effort in HPADL to that of QEMU. For our experiments and in order to show the practicability and flexibility of our approach, we implemented HPADL models of the DLX, 8086, ARMv4 and PowerPC/PowerPC VLE ISA as well as some IO device models in Java. A comparison with the simulation performance of QEMU by reference of the EEMBC AutoBench 1.1 shows that we achieve 78% of the QEMU performance on average.

References

  1. The ArchC Architecture Descrition Language. http://archc.sourceforge.net, 2011.Google ScholarGoogle Scholar
  2. ASM. http://asm.ow2.org, 2009.Google ScholarGoogle Scholar
  3. EEMBC AutoBench 1.1 Benchmark Software. http://www.eembc.org/benchmark/automotive_sl.php, 2011.Google ScholarGoogle Scholar
  4. Java DOSBox. http://jdosbox.sourceforge.net, 2011.Google ScholarGoogle Scholar
  5. JPC -- The Pure Java x86 PC Emulator. http://jpc.sourceforge.net, 2011.Google ScholarGoogle Scholar
  6. Jikes RVM. http://jikesrvm.org, 2011.Google ScholarGoogle Scholar
  7. QEMU open source processor emulator. www.qemu.org, 2011.Google ScholarGoogle Scholar
  8. T. Austin, E. Larson, and D. Ernst. Simplescalar: an infrastructure for computer system modeling. Computer, 35(2):59--67, Feb. 2002. ISSN 0018--9162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Baer. Emulating the ARM Architecture Using a Java Dynamic Binary Translator. Master's thesis, University of Manchester, School of Computer Science, 2007.Google ScholarGoogle Scholar
  10. V. Bala, E. Duesterwald, and S. Banerjia. Transparent dynamic optimization: The design and implementation of dynamo. Technical report, 1999.Google ScholarGoogle Scholar
  11. R. A. Baumann. Z80mu. BYTE, 11:203--216, October 1986. ISSN 0360-5280. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. F. Bellard. Qemu, a fast and portable dynamic translator. In Proceedings of the annual conference on USENIX Annual Technical Conference, ATEC '05, pages 41--41, Berkeley, CA, USA, 2005. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. F. Bellard. Tiny code generator. http://svn.savannah.gnu.org/svn/qemu/trunk/tcg/README, 2009.Google ScholarGoogle Scholar
  14. F. Brandner. Precise simulation of interrupts using a rollback mechanism. In SCOPES '09: Proceedings of the International Workshop on Software and Compilers for Embedded Systems, pages 71--80, 2009. ISBN 978-1-60558-696-0. Google ScholarGoogle ScholarCross RefCross Ref
  15. 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, August 2010. ISBN 978-1-4419-6344-4.Google ScholarGoogle Scholar
  16. D. Brooks, V. Tiwari, and M. Martonosi. Wattch: a framework for architectural-level power analysis and optimizations. In Computer Architecture, 2000. Proceedings of the 27th International Symposium on, pages 83--94, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Bruening, T. Garnett, and S. Amarasinghe. An infrastructure for adaptive dynamic optimization. In Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization, CGO '03, pages 265--275, Washington, DC, USA, 2003. IEEE Computer Society. ISBN 0-7695-1913-X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Burger and T. M. Austin. The simplescalar tool set, version 2.0. SIGARCH Comput. Archit. News, 25:13--25, June 1997. ISSN 0163-5964. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Burtscher and I. Ganusov. Automatic synthesis of high-speed processor simulators. In Proceedings of the 37th annual IEEE/ACM International Symposium on Microarchitecture, MICRO 37, pages 55--66, Washington, DC, USA, 2004. IEEE Computer Society. ISBN 0-7695-2126-6. doi: http://dx.doi.org/10.1109/MICRO.2004.7. URL http://dx.doi.org/10.1109/MICRO.2004.7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C. Cifuentes and M. Van Emmerik. Uqbt: adaptable binary translation at low cost. Computer, 33(3):60--66, mar 2000. ISSN 0018-9162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. B. Cmelik and D. Keppel. Shade: a fast instruction-set simulator for execution profiling. In Proceedings of the 1994 ACM SIGMETRICS conference on Measurement and modeling of computer systems, SIG-METRICS '94, pages 128--137, New York, NY, USA, 1994. ACM. ISBN 0-89791-659-X. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Emer, P. Ahuja, E. Borch, A. Klauser, C.-K. Luk, S. Manne, S. Mukherjee, H. Patil, S. Wallace, N. Binkert, R. Espasa, and T. Juan. Asim: a performance model framework. Computer, 35(2):68--76, Feb. 2002. ISSN 0018-9162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Freescale Semiconductor. MPC5510 Microcontroller Family Reference Manual, June 2008. Document Number: MPC5510RM.Google ScholarGoogle Scholar
  24. Freescale Semiconductor. MPC5604P Microcontroller Reference Manual, December 2010. Document Number: MPC560XPRM.Google ScholarGoogle Scholar
  25. A. Halambi, P. Grun, V. Ganesh, and A. Khare. Expression: A language for architecture exploration through compiler/simulator retargetability. In In Proceedings of the European Conference on Design, Automation and Test, pages 485--490, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. D. Jones and N. Topham. High Speed CPU Simulation Using LTU Dynamic Binary Translation. In HiPEAC '09: Proceedings of the 4th International Conference on High Performance Embedded Architectures and Compilers, pages 50--64, Berlin, Heidelberg, 2009. Springer-Verlag. ISBN 978-3-540-92989-5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. M. Kaufmann. Erschließung von Just-in-Time-Compilierungstechniken in der Realisierung eines retargierbaren Architektursimulators. Thesis, Technische Universitat Dresden, Faculty of Computer Science, December 2009.Google ScholarGoogle Scholar
  28. C. keung Luk, R. Cohn, R. Muth, H. Patil, A. Klauser, G. Lowney, S. Wallace, V. Janapa, and R. K. Hazelwood. Pin: Building customized program analysis tools with dynamic instrumentation. In In Programming Language Design and Implementation, pages 190--200. ACM Press, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. Magnusson, M. Christensson, J. Eskilson, D. Forsgren, G. Hallberg, J. Hogberg, F. Larsson, A. Moestedt, and B. Werner. Simics: A full system simulation platform. Computer, 35(2):50--58, Feb. 2002. ISSN 0018-9162. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. C. Mills, S. C. Ahalt, and J. Fowler. Compiled Instruction Set Simulation. Software, Practice and Experience, 21(8):877--889, 1991.Google ScholarGoogle ScholarCross RefCross Ref
  31. P. Mishra and N. Dutt. Processor Description Languages, volume 1. Morgan Kaufmann, 2008. ISBN 0123742870, 9780123742872. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. N. Nethercote and J. Seward. Valgrind: a framework for heavyweight dynamic binary instrumentation. In Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, PLDI '07, pages 89--100, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-633-2. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. V. S. Pai, P. Ranganathan, and S. V. Adve. Rsim: Rice simulator for ilp multiprocessors. SIGARCH Comput. Archit. News, 25:1--, December 1997. ISSN 0163-5964. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. S. Pees, A. Hoffmann, V. Zivojnovic, and H. Meyr. Lisa -- machine description language for cycle-accurate models of programmable dsp architectures. In Proceedings of the 36th annual ACM/IEEE Design Automation Conference, DAC '99, pages 933--938, New York, NY, USA, 1999. ACM. ISBN 1-58113-109-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. M. Reshadi, P. Mishra, and N. Dutt. Instruction set compiled simulation: a technique for fast and flexible instruction set simulation. In DAC '03: Proceedings of the 40th annual Design Automation Conference, pages 758--763, New York, NY, USA, 2003. ACM. ISBN 1-58113-688-9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. I. Rogers and C. Kirkham. JikesNODE and PearColator: A Jikes RVM Operating System and Legacy Code Execution Environment. In 2nd ECOOP Workshop on Programm Languages and Operating Systems (ECOOP-PLOS'05), 2005.Google ScholarGoogle Scholar
  37. M. Vachharajani, N. Vachharajani, D. A. Penry, B. J. A., S. Malik, and D. I. August. The liberty simulation environment: A deliberate approach to high-level system modeling. ACM Trans. Comput. Syst., 24:211--249, August 2006. ISSN 0734-2071. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. A. Yermolovich, A. Gal, and M. Franz. Portable execution of legacy binaries on the java virtual machine. In Proceedings of the 6th international symposium on Principles and practice of programming in Java, PPPJ '08, pages 63--72, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-223-8. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. The Java Virtual Machine in retargetable, high-performance instruction set simulation

      Recommendations

      Comments

      Login options

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

      Sign in
      • Published in

        cover image ACM Other conferences
        PPPJ '11: Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
        August 2011
        186 pages
        ISBN:9781450309356
        DOI:10.1145/2093157

        Copyright © 2011 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 24 August 2011

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate29of58submissions,50%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader