Synergistic Verification of Hardware Peripherals through Virtual Prototype Aided Cross-Level Methodology Leveraging Coverage-Guided Fuzzing and Co-Simulation
Abstract
:1. Introduction
2. Related Work
3. Preliminaries
3.1. Platform-Level Interrupt Controller (PLIC)
3.2. SystemC
3.3. RTL-TLM Transactors
4. Hardware Peripheral Verification Methodology
4.1. Overview
4.2. Cross-Level Environment for Coverage-Guided Fuzzing
4.3. Input Mapping & Test Scenarios
4.4. Application Driven Co-Simulation Environment
5. Evaluation
- (a)
- handling bus transactions,
- (b)
- timing specific behavior (e.g., incoming interrupts have a specified maximum delay to reach the processor), and
- (c)
- handling I/Os with configurations (e.g., enable, priorities, etc.).
5.1. Verification via Coverage-Guided Fuzzing
- 1.
- Two mismatches in the claim/complete behavior of the PLIC;
- 2.
- The order of the interrupt priority is handled wrong.
5.2. Verification via Application Driven Co-Simulation
6. Conclusions and Future Work
- Investigate more peripherals as well as combinations of peripherals under verification in additional case studies in order to investigate the scalability and efficiency of our approach more quantitatively.
- Investigate how additional software-based verification methods (e.g., formal methods such as symbolic execution) can be utilized to fill the coverage gap that usually exist with simulation-based verification methods like CGF.
- Additionally, we envision to offer guidelines for verification and design engineers for challenges along the development cycle. These considerations should cover how to deal with various system-level aspects like system buses and their abstractions between RTL and TLM.
Author Contributions
Funding
Conflicts of Interest
References
- IEEE Std. 1666. IEEE Standard SystemC Language Reference Manual. 2011. Available online: https://paginas.fe.up.pt/~ee07166/lib/exe/fetch.php?media=1666-2011.pdf (accessed on 3 July 2023).
- De Schutter, T. Better Software. Faster!: Best Practices in Virtual Prototyping; Synopsys Press: Sunnyvale, CA, USA, 2014. [Google Scholar]
- Herdt, V.; Große, D.; Drechsler, R. Enhanced Virtual Prototyping: Featuring RISC-V Case Studies; Springer: Berlin/Heidelberg, Germany, 2020. [Google Scholar]
- Bruns, N.; Herdt, V.; Drechsler, R. Unified HW/SW Coverage: A Novel Metric to Boost Coverage-guided Fuzzing for Virtual Prototype based HW/SW Co-Verification. In Proceedings of the 2022 Forum on Specification & Design Languages (FDL), Linz, Austria, 14–16 September 2022; pp. 1–8. [Google Scholar] [CrossRef]
- Trippel, T.; Shin, K.G.; Chernyakhovsky, A.; Kelly, G.; Rizzo, D.; Hicks, M. Fuzzing Hardware Like Software. In Proceedings of the 31st USENIX Security Symposium (USENIX Security 22), Boston, MA, USA, 10–12 August 2022; USENIX Association: Berkeley, CA, USA, 2022. [Google Scholar]
- Bruns, N.; Herdt, V.; Große, D.; Drechsler, R. Efficient Cross-Level Processor Verification Using Coverage-Guided Fuzzing. In Proceedings of the Great Lakes Symposium on VLSI 2022 GLSVLSI ’22, New York, NY, USA, 6–8 June 2022; pp. 97–103. [Google Scholar] [CrossRef]
- libFuzzer—A Library for Coverage-Guided Fuzz Testing. 2022. Available online: https://llvm.org/docs/LibFuzzer.html (accessed on 7 September 2023).
- Pixley, C.; Chittor, A.; Meyer, F.; McMaster, S.; Benua, D. Functional verification 2003: Technology, tools and methodology. In Proceedings of the ASIC 5th International Conference, Beijing, China, 21–24 October 2003; Volume 1, pp. 1–5. [Google Scholar] [CrossRef]
- Bavonparadon, P.; Chongstitvatana, P. RTL formal verification of embedded processors. In Proceedings of the 2002 IEEE International Conference on Industrial Technology IEEE ICIT ’02, Bankok, Thailand, 11–14 December 2002; Volume 1, pp. 667–672. [Google Scholar] [CrossRef]
- Deng, S.; Wu, W.; Bian, J. Bounded Model Checking for RTL Circuits Based on Algorithm Abstraction Refinement. In Proceedings of the 2006 8th International Conference on Solid-State and Integrated Circuit Technology Proceedings, Shanghai, China, 23–26 October 2006; pp. 2082–2084. [Google Scholar] [CrossRef]
- Goel, A.; Sakallah, K. Model Checking of Verilog RTL Using IC3 with Syntax-Guided Abstraction. In Proceedings of the NASA Formal Methods, Houston, TX, USA, 7–9 May 2019; Badger, J.M., Rozier, K.Y., Eds.; Lecture Notes in Computer Science. Springer: Cham, Switzerland; 2019; Volume 11460, pp. 166–185. [Google Scholar] [CrossRef]
- Clarke, E.M.; Klieber, W.; Nováček, M.; Zuliani, P. Model Checking and the State Explosion Problem. In Tools for Practical Software Verification: LASER, International Summer School 2011, Elba Island, Italy, Revised Tutorial Lectures; Meyer, B., Nordio, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2012; pp. 1–30. [Google Scholar] [CrossRef]
- Bergeron, J. Writing Testbenches: Functional Verification of HDL Models; Springer: New York, NY, USA, 2003. [Google Scholar] [CrossRef]
- Hamed, E.M.; Salah, K.; Madian, A.H.; Radwan, A.G. An Automated Lightweight UVM Tool. In Proceedings of the 2018 30th International Conference on Microelectronics (ICM), Sousse, Tunisia, 16–19 December 2018. [Google Scholar] [CrossRef]
- Dwivedi, P.; Mishra, N.; Singh-Rajput, A. Assertion & Functional Coverage Driven Verification of AMBA Advance Peripheral Bus Protocol Using System Verilog. In Proceedings of the 2021 International Conference on Advances in Electrical, Computing, Communication and Sustainable Technologies (ICAECT), Bhilai, India, 19–20 February 2021; pp. 1–6. [Google Scholar] [CrossRef]
- Laeufer, K.; Koenig, J.; Kim, D.; Bachrach, J.; Sen, K. RFUZZ: Coverage-Directed Fuzz Testing of RTL on FPGAs. In Proceedings of the 2018 IEEE/ACM International Conference on Computer-Aided Design (ICCAD), San Diego, CA, USA, 5–8 November 2018; pp. 1–8. [Google Scholar] [CrossRef]
- Canakci, S.; Delshadtehrani, L.; Eris, F.; Taylor, M.B.; Egele, M.; Joshi, A. DirectFuzz: Automated Test Generation for RTL Designs using Directed Graybox Fuzzing. In Proceedings of the 2021 58th ACM/IEEE Design Automation Conference (DAC), San Francisco, CA, USA, 5–9 December 2021; pp. 529–534. [Google Scholar] [CrossRef]
- Hur, J.; Song, S.; Kwon, D.; Baek, E.; Kim, J.; Lee, B. DifuzzRTL: Differential Fuzz Testing to Find CPU Bugs. In Proceedings of the 2021 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 24–27 May 2021. [Google Scholar] [CrossRef]
- Mathur, A.; Krishnaswamy, V. Design for Verification in System-level Models and RTL. In Proceedings of the 2007 44th ACM/IEEE Design Automation Conference, San Diego, CA, USA, 4–8 June 2007. [Google Scholar]
- You, M.K.; Oh, Y.J.; Song, G.Y. Implementation of a hardware functional verification system using SystemC infrastructure. In Proceedings of the TENCON 2009-2009 IEEE Region 10 Conference, Singapore, 23–26 January 2009; pp. 1–5. [Google Scholar] [CrossRef]
- Jain, A.; Gupta, H.; Jana, S.; Kumar, K. Early Development of UVM based Verification Environment of Image Signal Processing Designs using TLM Reference Model of RTL. Int. J. Adv. Comput. Sci. Appl. 2014, 5, 1–6. [Google Scholar] [CrossRef]
- Große, D.; Groß, M.; Kühne, U.; Drechsler, R. Simulation-Based Equivalence Checking between SystemC Models at Different Levels of Abstraction. In Proceedings of the 21st Edition of the Great Lakes Symposium on Great Lakes Symposium on VLSI, Lausanne, Switzerland, 2–6 May 2011; pp. 223–228. [Google Scholar] [CrossRef]
- SLEC. 2022. Available online: https://eda.sw.siemens.com/en-US/ic/catapult-high-level-synthesis/hls-verification/slec/ (accessed on 7 September 2023).
- Veripool, C.A. Verilator—Your Big 4th Simulator: 2019 Intro & Roadmap. 2019. Available online: https://www.veripool.org/papers/Verilator_Roadmap_CHIPS2019b.pdf (accessed on 7 September 2023).
- RISC-V International. RISC-V Platform-Level Interrupt Controller Specification. 2022. Available online: https://github.com/riscv/riscv-plic-spec/ (accessed on 7 September 2023).
- Waterman, A.; Asanović, K. (Eds.) Volume II: Privileged Architecture. In The RISC-V Instruction Set Manual; RISC-V International: Santa Clara, CA, USA, 2019. [Google Scholar]
- Open SystemC Initiative (OSCI). OSCI TLM-2.0 Language Reference Manual. 2009. Available online: https://www.accellera.org/images/downloads/standards/systemc/TLM_2_0_LRM.pdf (accessed on 3 July 2023).
- Herdt, V.; Große, D.; Le, H.M.; Drechsler, R. Extensible and Configurable RISC-V based Virtual Prototype. In Proceedings of the Forum on Specification and Design Languages, Garching, Germany, 10–12 September 2018; pp. 5–16. [Google Scholar]
- Klees, G.; Ruef, A.; Cooper, B.; Wei, S.; Hicks, M. Evaluating Fuzz Testing. In Proceedings of the CCS ’18: 2018 ACM SIGSAC Conference on Computer and Communications Security, New York, NY, USA, 15–19 October 2018; pp. 2123–2138. [Google Scholar] [CrossRef]
- Böhme, M.; Szekeres, L.; Metzman, J. On the Reliability of Coverage-Based Fuzzer Benchmarking. In Proceedings of the ICSE ’22: 44th International Conference on Software Engineering, New York, NY, USA, 8–27 May 2022; pp. 1621–1633. [Google Scholar] [CrossRef]
- Fioraldi, A.; Maier, D.; Eißfeldt, H.; Heuse, M. AFL++: Combining Incremental Steps of Fuzzing Research. In Proceedings of the 14th USENIX Workshop on Offensive Technologies (WOOT 20), Boston, MA, USA, 10–11 August 2020; USENIX Association: Berkeley, CA, USA, 2020. [Google Scholar]
PLIC | ID-IRQ | Priority | Masked Priority | Order of Trigger |
---|---|---|---|---|
TLM | 1 | 17 | 1 | 0 |
2 | 45 | 5 | 1 | |
RTL | 2 | 45 | 5 | 0 |
1 | 17 | 1 | 1 |
Coverage Metric | TLM PLIC | RTL PLIC | ||||
---|---|---|---|---|---|---|
Hit | Available | Coverage | Hit | Available | Coverage | |
Line coverage | 119 | 121 | 98.3% | 3212 | 3721 | 86.3% |
Function coverage | 13 | 13 | 100% | 20 | 24 | 83.3% |
Branch coverage | 72 | 118 | 61.0% | 1056 | 1432 | 73.7% |
Timestamp/s | Actor | Event | ||
---|---|---|---|---|
TLM | RTL ( 10 ) | RTL ( 100,000 ) | ||
74 | 74 | 80 | Task 1 | Context switch on CPU 0 to Task 1 |
165 | 165 | 175 | #WFR | Context switch on CPU 0 to WFR |
165 | 165 | 175 | #WFR | xSemaphoreGiveFromISR(0x800545DC) |
165 | 165 | 175 | #WFR | Actor Ready: Task 2 |
165 | 165 | 177 | Task 2 | Context switch on CPU 0 to Task 2 |
165 | 165 | 177 | Task 2 | xSemaphoreTake(0x800545DC, 100) |
167 | 167 | 179 | Task 2 | xSemaphoreTake(0x800545DC, 100) blocks |
167 | 167 | - | Task 1 | Context switch on CPU 0 to Task 1 |
173 | 173 | 179 | Task 1 | Actor Ready: TzCtrl |
173 | 173 | 180 | Task 1 | Context switch on CPU 0 to Task 1 |
265 | 265 | 275 | #WFR | Context switch on CPU 0 to WFR |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ahmadi-Pour, S.; Logemann, M.; Herdt, V.; Drechsler, R. Synergistic Verification of Hardware Peripherals through Virtual Prototype Aided Cross-Level Methodology Leveraging Coverage-Guided Fuzzing and Co-Simulation. Chips 2023, 2, 195-208. https://doi.org/10.3390/chips2030012
Ahmadi-Pour S, Logemann M, Herdt V, Drechsler R. Synergistic Verification of Hardware Peripherals through Virtual Prototype Aided Cross-Level Methodology Leveraging Coverage-Guided Fuzzing and Co-Simulation. Chips. 2023; 2(3):195-208. https://doi.org/10.3390/chips2030012
Chicago/Turabian StyleAhmadi-Pour, Sallar, Mathis Logemann, Vladimir Herdt, and Rolf Drechsler. 2023. "Synergistic Verification of Hardware Peripherals through Virtual Prototype Aided Cross-Level Methodology Leveraging Coverage-Guided Fuzzing and Co-Simulation" Chips 2, no. 3: 195-208. https://doi.org/10.3390/chips2030012
APA StyleAhmadi-Pour, S., Logemann, M., Herdt, V., & Drechsler, R. (2023). Synergistic Verification of Hardware Peripherals through Virtual Prototype Aided Cross-Level Methodology Leveraging Coverage-Guided Fuzzing and Co-Simulation. Chips, 2(3), 195-208. https://doi.org/10.3390/chips2030012