2011年7月5日 星期二

uvm_cmdline_processor的使用範例

有點類似$value$plusargs
請參考http://kirenenko-tw.blogspot.com/2011/05/valueplusargs.html

// run shell example

hw_reset:
$(IUS) -incdir ../../../integrated/apb tb_top.sv test.sv \
+UVM_TESTNAME=cmdline_test +UVM_REG_SEQ=uvm_reg_hw_reset_seq
$(CHECK)


//--------------- UVM example code--------------------
uvm_cmdline_processor opts = uvm_cmdline_processor::get_inst();

uvm_reg_sequence seq;
string seq_name;

void'(opts.get_arg_value("+UVM_REG_SEQ=", seq_name));

$display ("\n\n My test = %s\n\n", seq_name);


//--------------- sim result -------------------------
My test = uvm_reg_hw_reset_seq

沒有留言: