chipsalliance / rocket-chip

Rocket Chip Generator
Other
3.24k stars 1.13k forks source link

Refactor Rocket Chip test framework #2953

Open sequencer opened 2 years ago

sequencer commented 2 years ago

Most of configurations in RC is untested. Making RC almost impossible to accept RTL changes to new RV extension from community.

  1. Currently Makefile-based testing decoupled Chisel elaboration, FIRRTL lowering, emulator compiling, software test case compiling, simulation into different stages. While that's elegant for the build system maintaining, but it's hard for users to adding more tests. Since RocketChip is basically the Rocket Core generator(in the future, TileLink will be split out), It's reasonable to migrate most of test to Scala TestFramework.

  2. Get rid of dependency to software toolchains, upstream compiler are almost mature for RISC-V now, users don't need to compile their own toolchain at 2022.

  3. Test manifest should be provided via RISC-V official repositories via:

  4. future frameworks for different developers:

So here I wanna request a new test framework.

Type of issue: feature request

Impact: no functional change

Development Phase: request

michael-etzkorn commented 2 years ago

@sequencer this is maybe something we can discuss April 6th, but I believe for (4), it'd be reasonable to consider (and I'd be willing to help develop) UVM-based or generic SystemVerilog testbenches for testing the Verilog IR.

sequencer commented 2 years ago

it'd be reasonable to consider (and I'd be willing to help develop) UVM-based or generic SystemVerilog testbenches for testing the Verilog IR.

Thanks @michael-etzkorn! I think before ventilator(or any other Open-Source high-performance simulator) providing the full UVM support. We should continue sticking in the DPI/VPI for the best compatibility. Maybe testbench can be SystemVerilog, but we have no utility to tap on signals(wishing we can leveraging GrandCentral Annotations from MFC). Currently the RC do support a DPI-based simulation, see LazyModules prefix with Sim(SimJTAG, SimDTM) etc... And it works good with Verilator and VCS, but needs more documentation and standardization.