How to run chipyard's unittest simulation in verilator?

23 views
Skip to first unread message

Jerry Ho

unread,
Jun 5, 2024, 8:30:59 AMJun 5
to Chipyard
I noticed that there are some unittest facility in chipyard, and in the variable.mk, if you set the default SUB_PROJECT as testchip, chipyard will instantiate the Testharness in chipyard.uniitest package:

class TestHarness(implicit val p: Parameters) extends Module {
  val io = IO(new Bundle { val success = Output(Bool()) })
  io.success := Module(new UnitTestSuite).io.finished
}


However, When I try to run make default in the sims/verilator folder, and it does indeed generated a executable: simulator-chipyard.unittest-TestChipUnitTestConfig, but If I just run it without providing any extra parameters, it will return very quickly, displaying the following:
This emulator compiled with JTAG Remote Bitbang client. To enable, use +jtag_rbb_enable=1.
Listening on port 33373

I actually add lots of chisel printfs in the TestHarness, and none of them are showing here. So, I wonder if any extra parameters needs to be passed to the verilator generated executable(simulator-chipyard.unittest-TestChipUnitTestConfig), so that the UnitTest can actually run?
Any help are very appreciated. Thanks!

Jerry Zhao

unread,
Jun 5, 2024, 2:24:19 PMJun 5
to chip...@googlegroups.com
That should work... you can also try `run-binary BINARY=none`, which should definitely work.

-JErry

--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/5cf04d01-42aa-410d-8427-5ca6d340bf77n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages