Flow for using UVM VCs to test RTL DUT

55 views
Skip to first unread message

Eric Jackowski

unread,
Jun 27, 2017, 7:04:48 PM6/27/17
to SVUnit User Group
What is the excepted flow for using a UVM VCs to unit test my RTL DUT?

I have an RTL block that needs to take in APB transactions and pass them through or gate them depending on the PPROT settings.

I want to hookup the APB interface to an already verified UVM APB VC.

I've added all the infrastructure to connect to the dut (interfaces, APB agent, etc.)

I'm building them the standard way using the create function in the build task of the Unit Test Template.

In my unit test I create some transaction and put them in the sequencer of the VC.

However, nothing happens.

It appears that the standard UVM phases aren't called by default.


So do I manuall call run to kick off the UVM phases?

Is there more elagant way of doing this?

It appears that I might be able to just call the activate_component function to kick start the VC.

However, the documentation suggests this is for use in testing a VC not using a VC to test an RTL DUT.


neil johnson

unread,
Jun 29, 2017, 12:38:54 PM6/29/17
to SVUnit User Group
hey eric, I think you can use simple_model from the examples directory as a guide. to go through the run phases of your apb you'll need to do all the activate/deactivate, test start/finish in the setup and teardown tasks. those are what control the underlying uvm test and take you through the run phases. there's really not much difference from svunit point of view if your uvm vc is a uut or used as part of the test jig. let me know if that gets you what you need.

-neil

Chad Quickstad

unread,
Jun 29, 2017, 2:25:13 PM6/29/17
to SVUnit User Group
Are you trying to do unit testing? If you're bringing in a UVM VC with RTL, then you have a UVM test bench.  Are you doing integration testing?

The idea of unit testing is to interact with one "unit" of code (such as a class, function, or module), with all of the dependencies faked or mocked.

SVUnit doesn't run all of the UVM Phases for each test.  SVUnit tests should call svunit_ut.setup() from the setup() function in the fixture module generated by the template script. The first time this is called, the uvm phases (build, connect, end_of_elaboration) execute, up to run_phase.  After this, the body of the test starts in the run_phase. Each subsequent test will also start in the run_phase.  UVM phases do not restart for every unit test because subsequent calls to svunit_ut.setup() do not cause build...end_of_elaboration phases to rerun (SVUnit would have a very hard/impossible time trying to do this because UVM has a couple of built-in "obstacles" that prevent the entire phase flow from restarting).  If you need a unit test framework for UVM that restarts the entire UVM phase flow for each test, contact me, I've been playing with some ideas around this concept.
Reply all
Reply to author
Forward
0 new messages