Knobs for UVM components

A lot of articles on UVM refer about control knobs to be provided in components like driver, monitors.
Do these need to be through API or they need to be provided through transaction class (seq_item).
I assume it has to be through API as putting knob related variables in the transaction class can pollute transaction classes unnecessarily.

Please let me know your comments. A few examples will help me.

In reply to verif_learner:
Control knobs are mostly used in sequences. I did not see them in UVM components, because the structure is fixed at the end of runtime 0.

In reply to chr_sue:

Sure. Thanks.

I see two issues in using sequences to communicate any decision bits which are not specific to that protocol that driver is handling:

  1. firstly, we tend to pollute/dilute/bloat what could have been a clean protocol specific class
  2. these variables are used probably a few times in simulation but are randomized or initialized for every transaction

For example, if there is a mode in a driver, its not that i change it very often.
I would never use a sequence for such cases.

Probably, the following thread gives some hint about what I am talking about.
https://verificationacademy.com/forums/uvm/can-test-class-control-knobs-driver

In reply to verif_learner:
Finally it depends what you have to do.
It might be a good approach to run a configuration sequence to configure eitheer you UVM environment or/and your DUT.
If you need only a very few values you can use the config_db to set certain values from the test and retrieve the corresponding values in a UVM component.

In reply to verif_learner:

Hi All,

What is control knob in uvm, can any one plesae explain it with example

In reply to Verif_Learner_PJ:

A control knob is a variable you set in one place that alters the behavior of code in another place. In the UVM, these variables are usually set through the uvm_config_db. The use of the term “knob” distinguishes it from other kinds of settings like handle to a virtual interface which is just passed through and inconsequential to your code.

In reply to dave_59:

Hi Dave, But I have an issue, How can the outside world communicate with UVM env? I mean to change the dut configurations without toucning testcases and uvm env?

Also In case I have an equation which can be change between different project, How can I change it inside the UVM env without touching the env itself, I mean to configure it with minimum updates?