What's the general workflow for testing modifications to BOOM?

72 views
Skip to first unread message

Benjamin Ou

unread,
Aug 18, 2021, 8:16:40 PM8/18/21
to riscv-boom
I'm trying to extend the decoder in BOOM core for a few new toy instructions, so I'd like to be able to instantiate the Decoder and use PeekPokeTester to poke in my instruction and see what signals pop out. It's not really clear how I'd go about that, though; can't seem to find step-by-step instructions for using the testing tools (as in, where should I make a file? What do I need to import? What commands do I run to compile the file and see/pipe test output?)

Benjamin Ou

unread,
Aug 19, 2021, 10:08:37 PM8/19/21
to riscv-boom
Some updates on this:

I now understand some basics about the Scala Built Tool, particularly that it runs tests in src/test with the "test" command. This also readily demonstrates how to import ChiselTest tools like PeekPokeTester, since there are existing tests for boom core that do so.

Problem now is that since the boom repo is not compilable standalone, I'm not sure how to write tests for boom that can actually be run, since a boom core typically needs to be instantiated on the rocket chip, and I can only seem to run rocket-chip tests from that project.

Jerry Zhao

unread,
Aug 23, 2021, 4:06:33 AM8/23/21
to Benjamin Ou, riscv-boom
I generally test by running full binaries in the standard Chipyard simulation flow. Unfortunately, there is no support for unit-level testing in BOOM.

Verifying that all the assembly riscv-tests pass does not take very long, and then I usually write some more directed test binary to test whatever feature I'm adding.


--
You received this message because you are subscribed to the Google Groups "riscv-boom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to riscv-boom+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/riscv-boom/e13b464e-d3b0-424f-a8f4-019439c89999n%40googlegroups.com.

Abraham Gonzalez

unread,
Aug 23, 2021, 1:27:12 PM8/23/21
to Jerry Zhao, Benjamin Ou, riscv-boom
I agree with Jerry on this, running full binaries is the main way that we test things here. In the past, there was some work on integrating ChiselTest functionality into BOOM for the RegFile (https://github.com/riscv-boom/riscv-boom/blob/master/src/test/scala/RegFileTest.scala) but it hasn't been used in a very long time so it might have issues.



--
Abraham J. Gonzalez
Electrical Engineering and Computer Science Ph.D. Student
The University of California at Berkeley
Reply all
Reply to author
Forward
0 new messages