Jump to content

conditionally using uvm_components in a test


Recommended Posts

This seems like it should be a simple question... I have a testbench that includes uvm components A and B. With both instantiated, I'd like to be able to control whether or not either/both are actually used in a given test. What would I have to do to have either of those components ignored during at least the runtime phases?

-neil

Link to comment
Share on other sites

It depends what you mean by "actually used". More specifically, what it means to ignore them, assuming there are already there. Do you simply mean you don't what their run phases to execute? what about the other phases?

At what point do you know that you want to ignore them? If the top-level test knows at the build_phase that they are to be ignored, why build them? You can use the factory to override the component with another whose run_phase it an empty stub.

Link to comment
Share on other sites

dave,

the scenario is a test that goes through a number of restarts. I'm setup to jump back from shut down to reset which is working well. Next is that for a given cycle through the run phases, I'd like to selectively turn off a component. Boiled down, I'd like to go through the common phases for all the components in the testbench, then select which components go through the run phases. The components that are idle don't have their run phase methods invoked.

That enough info?

thanks

-neil

Link to comment
Share on other sites

You can use the factory to override the component with another whose run_phase it an empty stub

Is this something I can do at the beginning of each iteration through the run phases? overriding a component with another that has an empty run phase would be just as good as the original sitting idle.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...