Class uvm_pkg::uvm_cmdline_processor
Constructors
- new(string name = "")
constructor
- Parameters:
name (string)
Functions
- get_inst()
Function
get_inst
Returns the singleton instance of the UVM command line processor.
- Return type:
- get_args(string args)
Function
get_args
This function returns a queue with all of the command line arguments that were used to start the simulation. Note that element 0 of the array will always be the name of the executable which started the simulation.
- Parameters:
args (string)
- get_plusargs(string args)
Function
get_plusargs
This function returns a queue with all of the plus arguments that were used to start the simulation. Plusarguments may be used by the simulator vendor, or may be specific to a company or individual user. Plusargs never have extra arguments (i.e. if there is a plusarg as the second argument on the command line, the third argument is unrelated); this is not necessarily the case with vendor specific dash arguments.
- Parameters:
args (string)
- get_uvm_args(string args)
Function
get_uvmargs
This function returns a queue with all of the uvm arguments that were used to start the simulation. A UVM argument is
-
taken to be any argument that starts with a
-
or + and uses the keyword UVM (case insensitive) as the first three letters of the argument.
- Parameters:
args (string)
-
- get_arg_matches(string match, string args)
Function
get_arg_matches
This function loads a queue with all of the arguments that match the input expression and returns the number of items that matched. If the input expression is bracketed with //, then it is taken as an extended regular expression otherwise, it is taken as the beginning of an argument to match. For example:
string myargs[$] initial begin void'(uvm_cmdline_proc.get_arg_matches("+foo",myargs)); //matches +foo, +foobar //doesn't match +barfoo void'(uvm_cmdline_proc.get_arg_matches("/foo/",myargs)); //matches +foo, +foobar, //foo.sv, barfoo, etc. void'(uvm_cmdline_proc.get_arg_matches("/^foo.*\.sv",myargs)); //matches foo.sv //and foo123.sv, //not barfoo.sv.
- Parameters:
match (string)
args (string)
- get_arg_value(string match, string value)
Function
get_arg_value
This function finds the first argument which matches the match arg and returns the suffix of the argument. This is similar to the $value$plusargs system task, but does not take a formatting string. The return value is the number of command line arguments that match the match string, and value is the value of the first match.
- Parameters:
match (string)
value (string)
- get_arg_values(string match, string values)
Function
get_arg_values
This function finds all the arguments which matches the match arg and returns the suffix of the arguments in a list of values. The return value is the number of matches that were found (it is the same as values.size() ). For example if '+foo=1,yes,on +foo=5,no,off' was provided on the command line and the following code was executed:
string foo_values[$] initial begin void'(uvm_cmdline_proc.get_arg_values("+foo=",foo_values));
The foo_values queue would contain two entries. These entries are shown here:
-
0
-
"1,yes,on"
-
1
-
"5,no,off"
- Parameters:
match (string)
values (string)
-
- get_tool_name()
Function
get_tool_name
Returns the simulation tool that is executing the simulation. This is a vendor specific string.
- get_tool_version()
Function
get_tool_version
Returns the version of the simulation tool that is executing the simulation. This is a vendor specific string.
Class
uvm_cmdline_processor
This class provides an interface to the command line arguments that were provided for the given simulation. The class is intended to be used as a singleton, but that isn't required. The generation of the data structures which hold the command line argument information happens during construction of the class object. A global variable called uvm_cmdline_proc is created at initialization time and may be used to access command line information.
The uvm_cmdline_processor class also provides support for setting various UVM variables from the command line such as components' verbosities and configuration settings for integral types and strings. Each of these capabilities is described in the Built-in UVM Aware Command Line Arguments section.