Is there a way to declare a $test$plusargs inside uvm class?

Hi,

Is there a way to declare a $test$plusargs inside uvm class?

Thanks

In reply to prpatil:

You don’t declare $test$plusargs, you call it as a function anywhere a procedural expression is allowed.

In reply to dave_59:

Hi Dave

Sorry I was not clear enough. I meant - can we declare commandline +arg inside a class?

I have a scenario where I randomly want to declare or not declare +arg without changing the tb environment.

thanks

In reply to prpatil:

You cannot change the command line used to invoke the simulation after it has been invoked.

You should have used a combination of uvm_cmdline_processor and the uvm_config_db which allows settings from the command line as well as your testchbench to be overwritten.

If you have $test$plusargs deep inside your testbench, the only way to add randomness is in the script that invokes your test.