Is chisel3.tester the same as chiseltest? #2014
-
Is chisel3.tester the same as chiseltest? if i have already support chisel3 in my project, is it okay to ignore chiseltest? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No - chisel3.testers (often used in the chisel3 regression suite) is a pretty basic testharness that provides assertions and failures, but otherwise is just constructing and simulating hardware. So if you needed a counter to drive your DUT, you would have to write one like hardware (as opposed to imperative / straight-line code). Testharnesses are synthesizable (not that there's support for synthesizing them into hardware). ChiselTest, on the other hand, provides an imperative / straight-line code style for writing tests for hardware, with support for user-defined abstractions / test helper libraries and optional threading-style concurrency. The Verilog analogy is support for nonsynthesizable constructs like delays. As a comparison, see the RegNext test in ChiselTest and ShiftTester in chisel3.tester. They're not testing exactly the same thing, but hopefully gives you an idea of the differences. While there are some projects that use chisel3.tester, it's primary an internal testing tool and probably not great for writing more complicated test scenarios. |
Beta Was this translation helpful? Give feedback.
No - chisel3.testers (often used in the chisel3 regression suite) is a pretty basic testharness that provides assertions and failures, but otherwise is just constructing and simulating hardware. So if you needed a counter to drive your DUT, you would have to write one like hardware (as opposed to imperative / straight-line code). Testharnesses are synthesizable (not that there's support for synthesizing them into hardware).
ChiselTest, on the other hand, provides an imperative / straight-line code style for writing tests for hardware, with support for user-defined abstractions / test helper libraries and optional threading-style concurrency. The Verilog analogy is support for nonsynthesiz…