【UVM源码学习】uvm_cmdline_processor

简介: 【UVM源码学习】uvm_cmdline_processor

uvm_cmdline_processor,用以处理UVM命令行参数,这些参数用于仿真阶段,而非编译阶段。


序号 方法 描述
1 get_args 返回所有已调用的命令行参数
2 get_plusargs 返回所有通过“+”自定义的命令行参数
3 get_uvm_args 返回所有uvm的命令行参数,uvm参数以+/-开头
4 get_arg_matches 返回所有符合匹配规则的参数,支持通配符

5

get_arg_value

类似于系统函数 v a l u e value valueplusargs,仅返回第一个匹配的值

6 get_arg_values 返回所有匹配成功的值
7 get_tool_name 返回仿真工具的名称
8 get_tool_version 返回仿真工具的版本号
9 new 读取所有命令行参数,遇到“-”就把相关参数删掉
10 m_convert_verb 转换打印信息的验证程度




UVM仿真命令行参数(直接上代码里的注释吧,写得挺全了):
// Variable: +UVM_DUMP_CMDLINE_ARGS
// ~+UVM_DUMP_CMDLINE_ARGS~ allows the user to dump all command line arguments to the
// reporting mechanism. The output in is tree format.
// The implementation of this is in uvm_root.
// Group: Built-in UVM Aware Command Line Arguments
//
// Variable: +UVM_TESTNAME
//
// ~+UVM_TESTNAME=~ allows the user to specify which uvm_test (or
// uvm_component) should be created via the factory and cycled through the UVM phases.
// If multiple of these settings are provided, the first occurrence is used and a warning
// is issued for subsequent settings. For example:
//
//| +UVM_TESTNAME=read_modify_write_test
//
// The implementation of this is in uvm_root since this is procedurally invoked via
// ovm_root::run_test().
// Variable: +UVM_VERBOSITY
//
// ~+UVM_VERBOSITY=~ allows the user to specify the initial verbosity
// for all components. If multiple of these settings are provided, the first occurrence
// is used and a warning is issued for subsequent settings. For example:
//
//| +UVM_VERBOSITY=UVM_HIGH
//
// The implementation of this is in uvm_root since this is procedurally invoked via
// ovm_root::new().
// Variable: +uvm_set_verbosity
//
// ~+uvm_set_verbosity=,,,~ and
// ~+uvm_set_verbosity=,,,time,~ allow the users to manipulate the
// verbosity of specific components at specific phases (and times during the “run” phases)
// of the simulation. The ~id~ argument can be either ~ALL~ for all IDs or a
// specific message id. Wildcarding is not supported for id due to performance concerns.
// Settings for non-“run” phases are executed in order of occurrence on the command line.
// Settings for “run” phases (times) are sorted by time and then executed in order of
// occurrence for settings of the same time. For example:
//
//| +uvm_set_verbosity=uvm_test_top.env0.agent1.,ALL,UVM_FULL,time,800
//
// Variable: +uvm_set_action
//
// ~+uvm_set_action=<comp>,<id>,<severity>,<action>~ provides the equivalent of
// various uvm_report_object’s set_report_action APIs. The special keyword,
// _ALL_, can be provided for both/either the id and/or severity arguments. The
// action can be UVM_NO_ACTION or a | separated list of the other UVM message
// actions. For example:
//
//| +uvm_set_action=uvm_test_top.env0.*,ALL,UVM_ERROR,UVM_NO_ACTION
//
// Variable:+uvm_set_severity
//
// ~+uvm_set_severity=,,,~ provides the
// equivalent of the various uvm_report_object’s set_report_severity_override APIs. The
// special keyword, _ALL_, can be provided for both/either the id and/or
// ~current severity~ arguments. For example:
//
//| +uvm_set_severity=uvm_test_top.env0.,BAD_CRC,UVM_ERROR,UVM_WARNING
//
// Variable:+UVM_TIMEOUT
//
// ~+UVM_TIMEOUT=<timeout>,<overridable>~ allows users to change the global timeout of the UVM
// framework. The argument (‘YES’ or ‘NO’) specifies whether user code can subsequently
// change this value. If set to ‘NO’ and the user code tries to change the global timeout value, an
// warning message will be generated.
//
//| +UVM_TIMEOUT=200000,NO
//
// The implementation of this is in uvm_root.
// Variable: +UVM_MAX_QUIT_COUNT
//
// +UVM_MAX_QUIT_COUNT=<count>,<overridable> allows users to change max quit count for the report
// server. The argument (‘YES’ or ‘NO’) specifies whether user code can subsequently
// change this value. If set to ‘NO’ and the user code tries to change the max quit count value, an
// warning message will be generated.
//
//| +UVM_MAX_QUIT_COUNT=5,NO
//
// Variable: +UVM_PHASE_TRACE
//
// +UVM_PHASE_TRACE turns on tracing of phase executions. Users simply need to put the
// argument on the command line.
// Variable: +UVM_OBJECTION_TRACE
//
// +UVM_OBJECTION_TRACE turns on tracing of objection activity. Users simply need to put the
// argument on the command line.
// Variable: +UVM_RESOURCE_DB_TRACE
//
// +UVM_RESOURCE_DB_TRACE turns on tracing of resource DB access.
// Users simply need to put the argument on the command line.
// Variable: +UVM_CONFIG_DB_TRACE
//
// +UVM_CONFIG_DB_TRACE turns on tracing of configuration DB access.
// Users simply need to put the argument on the command line.
// Variable: +uvm_set_inst_override
// Variable: +uvm_set_type_override
//
// +uvm_set_inst_override=<req_type>,<override_type>,<full_inst_path> and
// +uvm_set_type_override=<req_type>,<override_type>[,<replace>] work
// like the name based overrides in the factory–factory.set_inst_override_by_name()
// and factory.set_type_override_by_name().
// For uvm_set_type_override, the third argument is 0 or 1 (the default is
// 1 if this argument is left off); this argument specifies whether previous
// type overrides for the type should be replaced. For example:
//
//| +uvm_set_type_override=eth_packet,short_eth_packet
//
// The implementation of this is in uvm_root.
// Variable: +uvm_set_config_int
// Variable: +uvm_set_config_string
//
// +uvm_set_config_int=<comp>,<field>,<value> and
// +uvm_set_config_string=<comp>,<field>,<value> work like their
// procedural counterparts: set_config_int() and set_config_string(). For
// the value of int config settings, 'b (0b), 'o, 'd, 'h ('x or 0x)
// as the first two characters of the value are treated as base specifiers
// for interpreting the base of the number. Size specifiers are not used
// since SystemVerilog does not allow size specifiers in string to
// value conversions. For example:
//
//| +uvm_set_config_int=uvm_test_top.soc_env,mode,5
//
// No equivalent of set_config_object() exists since no way exists to pass a
// uvm_object into the simulation via the command line.
//
// The implementation of this is in uvm_root.
// Variable: +uvm_set_default_sequence
//
// The +uvm_set_default_sequence=<seqr>,<phase>,<type> plusarg allows
// the user to define a default sequence from the command line, using the
// typename of that sequence. For example:
//
//| +uvm_set_default_sequence=path.to.sequencer,main_phase,seq_type
//
// This is functionally equivalent to calling the following in your
// test:
//
//| uvm_coreservice_t cs = uvm_coreservice_t::get();
//| uvm_factory f = cs.get_factory();
//| uvm_config_db#(uvm_object_wrapper)::set(this,
//| “path.to.sequencer.main_phase”,
//| “default_sequence”,
//| f.find_wrapper_by_name(“seq_type”));


目录
相关文章
|
索引
【UVM源码学习】uvm_packer
【UVM源码学习】uvm_packer
961 0
|
存储 C语言
【UVM源码学习】uvm_misc
【UVM源码学习】uvm_misc
139 0
【UVM源码学习】uvm_misc
|
算法
【UVM源码学习】uvm_spell_chkr
【UVM源码学习】uvm_spell_chkr
194 0
【UVM源码学习】uvm_spell_chkr
|
测试技术 数据库 容器
【UVM源码学习】uvm_resource
【UVM源码学习】uvm_resource
181 0
【UVM源码学习】uvm_resource
|
安全
【UVM源码学习】uvm_links
【UVM源码学习】uvm_links
164 0
【UVM源码学习】uvm_links
【UVM源码学习】uvm_recorder
【UVM源码学习】uvm_recorder
259 0
【UVM源码学习】uvm_recorder
【UVM源码学习】uvm_heartbeat
【UVM源码学习】uvm_heartbeat
248 0
【UVM源码学习】uvm_heartbeat
【UVM源码学习】uvm_barrier
【UVM源码学习】uvm_barrier
151 0
【UVM源码学习】uvm_barrier
【UVM源码学习】uvm_event
【UVM源码学习】uvm_event
324 0
【UVM源码学习】uvm_event
【UVM源码学习】uvm_registry
【UVM源码学习】uvm_registry
240 0
【UVM源码学习】uvm_registry