Hello Everyone, i am new to UVM and commandline processing.
SOrry if the question is silly.
I want to enter a value of field called, ‘Number of transaction’ during runtime.
And the value Num_tx is needed in SEQUENCE.
code for SEQUENCE CLASS is as follows:
//////////////////// SEQUENCE CLASS //////////////////////
ifndef SEQUENCE
define SEQUENCE
`include"transaction.sv"
class my_sequence extends uvm_sequence#(my_trans);
`uvm_object_utils (my_sequence)
int numtx, arg_values;
my_trans my_t;
function new (string name = “”);
super.new(name);
//numtx = 5;
//*************** LOGIC FOR COMMANDLINE PROCESSING STARTS************
uvm_info(get_type_name(),$psprintf(“Previous Value of Numtx is %0d”,numtx),UVM_NONE)
// if(cmdline_proc.get_arg_values(.match(“+enter_numtx=”),.value(arg_values)))
if(cmdline_proc.get_arg_values(“+enter_numtx=”, arg_values))
begin
numtx = arg_values;
end
`uvm_info(get_type_name(),$psprintf("Updated Value of Numtx is %0d",numtx),UVM_NONE)
endfunction: new
//*************** LOGIC FOR COMMANDLINE PROCESSING ENDS***************
virtual task body ();
begin
repeat(numtx)
begin
`uvm_do(my_t)
end
end
endtask: body
endclass: my_sequence
`endif
///////////// SEQUENCE CLASS ENDS ////////////
I get following error
COMPILATION ERROR: ** Error: sequence.sv(17): The actual (this.arg_values) and formal (values) for a ref must be equivalent types.
OPTIMIZATION ERROR:
** Error: (vopt-7052) test.sv(23): Failed to find ‘cmdline_proc’ in hierarchical name ‘/cmdline_proc/get_arg_value’.
** Error: (vopt-7052) test.sv(23): Failed to find ‘get_arg_value’ in hierarchical name ‘/cmdline_proc/get_arg_value’.
I have included uvm_macros.svh also in TOP MODULE…!
Can anyone please help me on this.
Thank you, in Advance.