SVUnit Scripting Proposal

I’ve gone through an overhaul of the SVUnit scripting. Specifically, the makefiles are out and a simpler build/run script is in. Most of what’s under the hood is the same (i.e. the construction of the systemverilog code framework). In short, + makefiles are out; runSVUnit is in.

Here’s a dump of the runSVUnit usage. Still subject to change so if you see something you don’t like or you don’t see something you would like, now is the time to bring it up :).

Screen Shot 2014-03-06 at 8.36.47 AM

Some additional notes…

  • Running unit tests is a single step procedure now. runSVUnit generates the systemverilog framework and runs the tests (whereas this required 2 steps before… && make)
  • All your options are specified on the command line or indirectly via a ‘-f <file>’. There is no anymore.
  • You still need to run the same Setup.bsh or Setup.csh but you do not need to set an environment variable for the simulator anymore. You pick the simulator with the ‘-s <ius|questa|vcs>’ switch.
  • For people that used the SIM_ARGS make variable, I think you’ll be able to do the same with the ‘-r <runtime>’ switch. The runtime argument gets passed to the command line just as the SIM_ARGS did before.
  • You can still specify any number of verilog filelists with the ‘-f <file>’. The file svunit.f will still be picked up automatically if it exists. In fact, all files called svunit.f in pwd and it’s child directories will be found and added to the command line. This is for people that have unit tests in multiple directories that want the option of running them independently or all together.
  • Nothing with respect to writing unit tests has changed. The template is the same, the testsuite and testrunner code is also the same. No changes there.

That probably sums it up though it’s guaranteed I’m missing something :). If you have a few minutes, let me know what you think. This code is not live yet but it will be soon unless I’m overwhelmed with new requests. And just to be clear, the old system will be gone; no plans to support two streams.


4 thoughts on “SVUnit Scripting Proposal

  1. 1. How do we specify compile options. For example, I want to add “-suppress 2181” for ModelSim.

    2. Suppose I’m already using a proprietary build flow (instead of make) that compiles everything and takes care of dependencies. And all I need is to generate the and files. Can I do that with the new script?

    1. compile options. good. I need to add that. As for just building the framework and running it yourself, that is still something you can do but it won’t be something I publicize (as an aside, the create_testsuite/create_testrunner scripts won’t change at all so if you’re already using them directly then building the command line/file lists yourself, there’ll be nothing for you to do).

      thanks victor.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.