UVM Report Mock Update

Get the latest version of SVUnit from Sourceforge

I’ve had some good feedback from a couple fellows using the report mock and today I released a new version to start incorporating it. SVUnit v1.4

includes a new UVM report mock.

Two significant changes…

First is that the macros are no longer required. It uses UVM facilities to eventually intercept the global uvm_report_(warning|error|fatal) functions. Logging messages with those globals directly or by using the stock `uvm_* macros both work the same now. Both can be verified using the mock. I’ve expanded the example that’s shipped with SVUnit to demonstrate. Here’s a snapshot of that code that shows our UUT using both the `uvm_error() macro and uvm_report_warning() function:

Screen Shot 2013-05-17 at 10.01.13 AM

…and here’s the 2 tests we use to verify the error and warning are triggered properly:

Screen Shot 2013-05-17 at 10.01.32 AM

Screen Shot 2013-05-17 at 10.01.46 AM

Thanks to my colleague Jean-Marc Tremblay for handling this part of the upgrade.

Second change… with the initial mock, when something went awry and your logging doesn’t match up, the mock told you as much… but only by returning false via the verify_complete(). I didn’t have anything to help people diagnose why, but now I do. In v1.4, when the verify_complete() fails the mock dumps the expected and actual messages it’s logged so far. That dump looks like this:

Screen Shot 2013-05-17 at 9.59.26 AM

You get the expected and actual ID, MSG and severity at each index. So this dump from the mock would tell you, for example, that the error and fatal you were expecting were logged in the wrong order (i.e. you expected fatal then error, but you got error then fatal).

Last change… I had the order of the ID and MSG mixed up in the original so if you simply plugin this new version, I expect you’ll see a lot of failures (in UVM, the argument order is ID then MSG but I had MSG then ID). To clarify, prototypes for the expect functions are now…

Screen Shot 2013-05-17 at 10.13.34 AM Screen Shot 2013-05-17 at 10.13.24 AM Screen Shot 2013-05-17 at 10.13.14 AM

This won’t match what you have now, so unfortunately you’ll have to go back and swap the arg order. Sorry about that :(.

If you’re new to the UVM report mock, you catch up with my original post from a few weeks ago.

Enjoy!

-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 TDD and tagged . Bookmark the permalink.

3 Responses to UVM Report Mock Update

  1. nosnhojn says:

    Oops! I initially had v1.3 in the blog but have replaced with with v1.4. Version v1.3 was bad so it’s gone from sourceforge :)

    -neil

  2. Bryan says:

    I can confirm that it’s working now.

  3. nosnhojn says:

    good to hear. since you’re the guy that asked for the dumped debug output, I’ll leave it to you to judge whether or not it’s done to spec ;)

    -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>