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, create_svunit.pl + 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… create_svunit.pl && make)
  • All your options are specified on the command line or indirectly via a ‘-f <file>’. There is no svunit.mk 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.

-neil

Share/Bookmark

About nosnhojn

I've been working in ASIC and FPGA development for more than 13 years at various IP and product development companies and now as a consultant with XtremeEDA Corp. In 2008 I took an interest in agile software development. I've found a massive amount of material out there related to agile development, all of it is interesting and most of it is applicable to hardware development in one form or another. So I'm here to find what agile concepts will work for hardware development and to help other developers use them successfully. I've been fortunate to have the chance to speak about agile hardware development at various conferences like Agile2011, Agile2012, Intel Lean/Agile Conference 2013 and SNUG. I also do lunch-n-learn talks for small groups and enjoy talking to anyone with an agile hardware story to tell! You can find me at neil.johnson@agilesoc.com.
This entry was posted in Functional Verification and tagged . Bookmark the permalink.

4 Responses to SVUnit Scripting Proposal

  1. LeRoss Calnek says:

    I don’t see modelsim as a simulator option, did you integrate it with questa?

  2. nosnhojn says:

    Oops… it’s in the the script but not in the usage. Need to update that.

    -neil

  3. 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 testsuite.sv and testrunner.sv files. Can I do that with the new script?

    • nosnhojn says:

      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.

      -neil

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>