Running only a single testbench with `apio sim`


#1

I can’t seem to find a way to run just one testbench when using apio sim, without resorting to running iverilog, vvp and gtkwave myself. Is this possible? Probably not the best place to ask, but figured this would be the best way to get a quick/easy response.

Thanks everyone!


#2

After a bit more poking around, it seems clear this isn’t possible. In the source code for the apio sim command there’s no logic for anything other than specifying the project dir, as the help text makes clear (though I’d hoped it was hiding something :disappointed_relieved:).

Will suggest an improvement on the GitHub repo.


#3

Not sure what you are wanting to do. Do you mean you want multiple testbench files and the ability to choose which one to run?

If so, you could put each one in its own subdirectory with an apio.ini file and an SConstruct file and make a small change to the standard SConstruct file to pick up the verilog files from the parent directory.


#4

Yeah - that’s exactly what I’m attempting to do. Is this atypical? One testbench file per module, testing the module on its own? Just seems weird that if this is the expected use case there’s no support to only run one testbench at a time.

I’ll try your idea in the morning. In the mean time, like I mentioned, is this atypical? Is there a different approach I should be taking?


#5

I don’t know. I mainly use Linux and make files to run the separate commands. Apio seems to be designed for simple usage. I think it is common to have testbenches for testing specific modules and not just the whole design, so I don’t think what you are doing is unusual. One of the usages of apio is as a plug-in to the Atom editor, and multiple testbenches would complicate the user interface for that, a bit.