Will add a TargetDirAnnotation with defaultDir with "test_run_dir" path prefix to the annotations if there is not a TargetDirAnnotation already present
Will add a TargetDirAnnotation with defaultDir with "test_run_dir" path prefix to the annotations if there is not a TargetDirAnnotation already present
a default directory
annotations to add it to, unless one is already there
If there are any failures, reports them and end the test now.
If there are any failures, reports them and end the test now.
Constructs a unit test harness for the Chisel Module generated by dutGen.
Constructs a unit test harness for the Chisel Module generated by dutGen. General use looks like
test(new PlusOne) { c => // body of the unit test, c is a a reference c.io.input.poke(1.U) c.io.output.expect(2.U) }
If you need to add options to this unit test you can tack on .withAnnotations modifier
or a .withFlags modifier. These modifiers can be used together.
You must add import chisel3.tester.experimental.TestOptionBuilder._
to use .withAnnotations
For example:
test(new TestModule).withAnnotations(Seq(WriteVcdAnnotation)) { c => // body of the unit test }
The DUT type, must be a subclass of MultiIOModule
A generator of a Chisel Module
This API is experimental and forward compatibility is not yet guaranteed
src/test/scala/chisel3/tests/OptionsBackwardCompatibilityTest for examples
Expect a specific value on a wire, calling testerFail if the expectation isn't met.
Expect a specific value on a wire, calling testerFail if the expectation isn't met. Failures queued until the next checkpoint.
Logs a tester failure at this point.
Logs a tester failure at this point. Failures queued until the next checkpoint.