Hi All,
I am running the sample program in cmd_line_procdessor. But i am getting fatel error and also my info is not printed.
my code below…
import uvm_pkg::*;
`include "uvm_macros.svh"
class my_env extends uvm_env;
int value;
string name;
`uvm_component_utils(my_env)
function new (string name="my_env",uvm_component parent);
super.new(name,parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
if(!uvm_config_db #(uvm_bitstream_t) :: get(this,"","value",value))
`uvm_fatal("GET","get method failure in value "); -------------------------->fatel error
if(!uvm_config_db #(string) :: get(this,"","name",name))
`uvm_fatal("GET","get method failure in name");
`uvm_info("INFO",$psprintf("value=%d name=%s",value,name),UVM_LOW);
endfunction
endclass
class my_test extends uvm_test;
`uvm_component_utils(my_test)
int value=5;
string name = "raja";
my_env env;
function new (string name="my_test",uvm_component parent);
super.new(name,parent);
endfunction
function void build_phase(uvm_phase phase);
super.build_phase(phase);
env = my_env::type_id::create("env",this);
uvm_config_db #(uvm_bitstream_t) :: set(this,"env","value",value);
uvm_config_db #(string) :: set(this,"env","name",name);
endfunction
endclass
module top;
initial begin
run_test(/*"my_env"*/);
end
simulation command ==vsim -c top +UVM_TESTNAME=my_env +uvm_set_config_int=uvm_test_top.env,value,6 +uvm_set_config_string=uvm_test_top.env,name,arun
Regards
Raja