I have the following Code ::
string str ;
string foo_values[$] ;
string reg_q [$] = '{"abc","qwe","hjk","zxc"} ;
uvm_cmdline_processor uvm_cmdline_proc ;
initial
begin
uvm_cmdline_proc = uvm_cmdline_processor::get_inst();
void'(uvm_cmdline_proc.get_arg_values("+SKIP_REG=",foo_values)) ;
foreach(foo_values[i])
$display("foo_values[%0d] is %0s",i,foo_values[i]);
end
initial begin
if ( $value$plusargs("SKIP_REG=%0s",str) )
begin
$display("str is %0s",str) ;
end
end
initial begin
if($test$plusargs("SKIP_REG"))
begin
foreach(reg_q[j])
begin
if($test$plusargs($sformatf("SKIP_REG=%s", reg_q[j] )))
begin
$display("SKIP_REG is %0s",reg_q[j] ) ;
end
end
end
end
So when I run along run-time arguments like +SKIP_REG=abc +SKIP_REG=zxc , I see the following output ::
foo_values[0] is abd
foo_values[1] is zxc
str is abd
SKIP_REG is zxc
[1] So uvm_cmdline_processor gets all arguments passed but why $value$plusargs and $test$plusrags output differs ?
[1] Is it always expected that $value$plusargs gets the 1st argument ( +SKIP_REG=abc ) passed ( incase of multiple run-time arguments ) ?