Using utest as test framework
Using utest as test framework
// define test spec in trait trait HasTestChipSpec { import chisel3.tester._ def testChipSpec(dut: TestChip): Unit = { c => // body of the unit test, c is a reference c.io.input.poke(1.U) c.io.output.expect(2.U) } } object SomeCircuitSpecTester extends ChiselUtestTester with HasSomeCircuitSpec { // define test by Tests macro val tests: Tests = Tests { // invoke test with test(""){} test("comments or name to a test"){ // test function runs here testCircuit(new SomeCircuit, Seq(WriteVcdAnnotation))(SomeCircuitSpec) } } }
Base class for regions, akin to Verilog regions for ordering events between threads within the same timestep.
Base class for regions, akin to Verilog regions for ordering events between threads within the same timestep. order is the order regions run in, with 0 being the default, and incrementing regions running later. TODO: have a more extensible ordering than ints.
Provides clock-resolution-specific abstractions on top of getVar/setVar.
Provides clock-resolution-specific abstractions on top of getVar/setVar. For library builders, not top-level test writers.
This is a simple tester that does not require that it be within the scope of a scalatest in order to run.
This is a simple tester that does not require that it be within the scope of a scalatest in order to run. This form is suitable for running in the Jupyter notebook.
Your warranty is now void.
Your warranty is now void.
experimental contains cutting edge features that are, well, experimental, and carry no expectation of long-term support. We may break experimental APIs at any time. These may not work as expected, or may have unforeseen side effects, or may be powerful yet dangerous.
You have been warned.
Basic interfaces and implicit conversions for testers2