Abstract
Internet-of-Things (IoT) opens a new world of possibilities for both personal and industrial applications. At the heart of an IoT device, the processor is the core component. Hence, as an open and free instruction set architecture RISC-V is gaining huge popularity for IoT. A large ecosystem is available around RISC-V, including various RTL implementations at one end and high-speed instruction set simulators (ISSs) at the other end. These ISSs facilitate functional verification of RTL implementations as well as early SW development to some extent. However, being designed predominantly for speed, they can hardly be extended to support further system-level use cases such as design space exploration, power/timing/performance validation, or analysis of complex HW/SW interactions. In this paper, we propose and implement the first RISC-V based Virtual Prototype (VP) with the goal of filling this gap. We provide a RISC-V RV32IM core, a PLIC-based interrupt controller, and an essential set of peripherals together with SW debug capabilities. The VP is designed as extensible and configurable platform with a generic bus system and implemented in standard-compliant SystemC and TLM-2.0. The latter point is very important, since it allows to leverage cutting-edge SystemC-based modeling techniques needed for the mentioned use cases. Our VP allows a significantly faster simulation compared to RTL, while being more accurate than existing ISSs. Finally, our RISC-V VP is fully open source to help expanding the RISC-V ecosystem and stimulating further research and development.
Keywords
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
Available at https://github.com/agra-uni-bremen/riscv-vp, for more information and updates also visit www.systemc-verification.org/riscv-vp.
- 2.
Support for integration with the C/C++ library is also available, e.g., by executing the instructions at the beginning of the main function or integrating them directly into the crt0.S file, which is the entry point of the C library and similarly to the bare-metal code also calls the main function after performing some basic initialization tasks.
- 3.
Example based on the newlib port https://github.com/riscv/riscv-newlib.
- 4.
It is also possible to execute a trap handler, similar to the interrupt handler described in the previous section (e.g., essentially, jump to the level-0 interrupt handler with the mcause CSR being set to a syscall number), and then redirect the write to e.g. a terminal component.
References
Bailey, B., Martin, G., & Piziali, A. (2007). ESL design and verification: A prescription for electronic system level methodology. Morgan Kaufmann/Elsevier
Binkert, N., Beckmann, B., Black, G., Reinhardt, S. K., Saidi, A., Basu, A., et al. (2011). The gem5 simulator. SIGARCH Comput. Archit. News, 39(2), 1–7. DOI: https://doi.org/10.1145/2024716.2024718. URL http://doi.acm.org/10.1145/2024716.2024718.
Calling convention. https://riscv.org/wp-content/uploads/2015/01/riscv-calling.pdf. Accessed: 2018-05-13.
Große, D. & Drechsler, R. (2010). Quality-driven SystemC design. Springer
Grüttner, K., Görgen, R., Schreiner, S., Herrera, F., Peñil, P., Medina, J., et al. (2017). CONTREX: Design of embedded mixed-criticality CONTRol systems under consideration of extra-functional properties. Microprocessors and Microsystems, 51, 39–55.
Herdt, V., Le, H. M., Große, D. & Drechsler, R. (2016). On the application of formal fault localization to automated RTL-to-TLM fault correspondence analysis for fast and accurate VP-based error effect simulation - a case study. In FDL (pp. 1–8).
Herdt, V., Le, H. M., Große, D., & Drechsler, R. (2017). Towards early validation of firmware-based power management using virtual prototypes: A constrained random approach. In FDL (pp. 1–8).
Herdt, V., Le, H. M., Große, D., & Drechsler, R. (2018). Verifying SystemC using intermediate verification language and stateful symbolic simulation. TCAD. DOI: https://doi.org/10.1109/TCAD.2018.2846638.
IEEE Std. 1666. (2011). IEEE Standard SystemC Language Reference Manual.
Leupers, R., Schirrmeister, F., Martin, G., Kogel, T., Plyaskin, R., Herkersdorf, A., & Vaupel, M. (2012). Virtual platforms: Breaking new grounds. In DATE (pp. 685–690).
Onnebrink, G., Leupers, R., Ascheid, G., & Schürmans, S. (2016). Black box ESL power estimation for loosely-timed TLM models. In SAMOS (pp. 366–371). DOI: https://doi.org/10.1109/SAMOS.2016.7818374.
RISCV-QEMU. https://github.com/riscv/riscv-qemu. Accessed: 2018-05-13.
RV8. https://rv8.io. Accessed: 2018-05-13.
Schuster, T., Meyer, R., Buchty, R., Fossati, L., & Berekovic, M. (2014). Socrocket - A virtual platform for the European Space Agency’s SoC development. In ReCoSoC (pp. 1–7).
Spike. https://github.com/riscv/riscv-isa-sim. Accessed: 2018-05-13.
Streubühr, M., Rosales, R., Hasholzner, R., Haubelt, C., & Teich, J. (2011). ESL power and performance estimation for heterogeneous MPSoCs using SystemC. In FDL (pp. 1–8)
Waterman, A., & Asanović, K. (2017). The RISC-V Instruction Set Manual; Volume I: User-Level ISA. SiFive Inc. and CS Division, EECS Department, University of California, Berkeley.
Waterman, A., & Asanović, K. (2017). The RISC-V Instruction Set Manual; Volume II: Privileged Architecture. SiFive Inc. and CS Division, EECS Department, University of California, Berkeley.
Acknowledgements
This work was supported in part by the German Federal Ministry of Education and Research (BMBF) within the project CONFIRM under contract no. 16ES0565 and by the University of Bremen’s Central Research Development Fund and by the University of Bremen’s graduate school SyDe, funded by the German Excellence Initiative.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this chapter
Cite this chapter
Herdt, V., Große, D., Le, H.M., Drechsler, R. (2020). Extensible and Configurable RISC-V Based Virtual Prototype. In: Kazmierski, T., Steinhorst, S., Große, D. (eds) Languages, Design Methods, and Tools for Electronic System Design. Lecture Notes in Electrical Engineering, vol 611. Springer, Cham. https://doi.org/10.1007/978-3-030-31585-6_7
Download citation
DOI: https://doi.org/10.1007/978-3-030-31585-6_7
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-31584-9
Online ISBN: 978-3-030-31585-6
eBook Packages: EngineeringEngineering (R0)