Open mithro opened 6 years ago
I don't have a whole lot to say on this / no strong opinion.
But I can add:
@cliffordwolf - Do you have an opinion on how we should be writing unit tests for these models? I'm guessing you are going to say we should be using formal verification? :-P
@awygle - FYI.
I've started to look at demonstrating a simple test using cocotb and VUnit.
I have a branch with a simple test using cocotb (think I found an bug in mux2.sim.v).
VUnit doesn't currently support Icarus Verilog, but people are working on it (see vunit/vunit#188). I haven't had success running this branch yet (getting a segfault during compilation).
Other thoughts:
VUnit is a good choice to drive tesbtenches on an existing codebase. Each testbench needs a few lines added to integrate with VUnit. Running VUnit the output is very similar to many unit test frameworks. It looks like it can be extended to report details to other processes (eg octave) and do additional checks.
cocotb takes a different approach and borrows from UVM. The test cases are written in python which opens all the flexibility of python to how to drive DUTs. It also has a built-in concept for generating tests, but I haven't looked at that yet.
Both support GHDL and integration with Jenkins (which hopefully means easily with travis-ci).
By UVM you mean;
UVM is a methodology for the functional verification of digital hardware, primarily using simulation. The hardware or system to be verified would typically be described using Verilog, SystemVerilog, VHDL or SystemC at any appropriate abstraction level.
?
We want a structured way to write unit tests for the sim.v files (and a way to run them).
We want the unit tests to be compatible with at a minimum;
But making it compatible with commercial simulators would be good too.
I think we want to use Cocotb but I have never used it myself.