Search code examples
chisel

Chisel testbenches: controlling multiple ports independently


I have a module with multiple DecoupledIO inputs and outputs. Is there a way to supply stimuli and gather responses to/from each port independently?

I can "emulate" this behaviour in a PeekPokeTest by iterating over all ports at every cycle, but the code quickly becomes unmanageable if ports behave in different ways (inputs and outputs, at least, are likely to behave differently).

In VHDL, this would be easily implemented by having separate processes for each input/output.


Solution

  • If you are interested in living on the bleeding edge, I would suggest checking out chisel-testers2. It's an experimental project right now but it is planned to make it the default chisel unit testing environment as soon as possible. It has support for independent tests through controlled fork and join mechanism specifically designed for ready valid interfaces. Its basic semantics are considerably better than the current mainstream chisel-testers also.