uvm获取simulation option

发布时间 2023-11-02 10:32:33作者: lybinger

获取sim option的传统方式是用 $test$plusargs(), 和$value$plusargs().

UVM提供了uvm_cmdline_processor来获取sim opt.

用法如下:

uvm_cmdline_processor clp = uvm_cmdline_processor::get_inst();

string val_q[$];

clp.get_arg_values("+val=",val_q);

uvm_cmdline_processor常用的function有:

function void get_args(output string args[$]);

function void get_plusargs(output string args[$]);

function void get_uvm_args(output string args[$]);

function int get_arg_matches(string match, ref string args[$]);

function int get_arg_value(string match, ref string value);

function int get_arg_values(string match, ref string values[$]);

function string get_tool_name();

function string get_tull_version();