Jump to content

use of set and get in sequence


Recommended Posts

  • 2 weeks later...

For reuse, it's always better to control things top-down. If you start using global variables, full hierarchical paths to components, or accessing up to a parent (aside for sequence accessing it's p_sequencer), it will become difficult to reuse the components outside of that environment.

Generally, you'd use the config for static or semi-static controls and sequences or virtual sequences for more dynamic and interactive controls.

Link to comment
Share on other sites

Yes, you can also use uvm_config_db::get() in the run_phase to get values for variables set from a higher-level component. The set() is normally done in the test or the uvm_env before the run_phase (e.g, build_phase) as part of configuring the testbench and "tuning the knobs".

Phuynh,

Do you also suggest users to use uvm_config_db during run phases, if yes, why? if not, is there any suggested alternative for it and thanks!

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