I’m confounded by this. I have a fairly simple sequence/sequencer/driver in my agent. However, my driver seems to be getting something from the seq_item_port that is invalid. Whether the sequencer has sent an item yet, or not, I consistantly get the NULL pointer error. Code is:
Sequence:
...
while(!$feof(pin1_fp)) begin
pin_item= hdr_input_pin_seq_item::type_id::create("pin_item");
...
pin_item.alpha_in = alpha_in;
pin_item.alpha_ch3_2_sel = 'h0; //fix later
`uvm_info("HDR PIN SEQ", "Starting pin_item", UVM_HIGH);
pin_item.print_item();
start_item(pin_item);
finish_item(pin_item);
Driver is:
virtual task run_phase(uvm_phase phase);
// hdr_input_pin_seq_item pin_item;
hdr_input_pin_seq_item pin_seq_item;
wait (pin_if_v.resetn == 1);
repeat (2000) @(posedge pin_if_v.clk);
forever begin
`uvm_info("HDR PIN DRIVER", "Wait for next item", UVM_HIGH);
seq_item_port.get(req);
`uvm_info("HDR PIN DRIVER", "Got next item", UVM_HIGH);
...
Sequencer is unmodified, just a call to new.
Agent:
class hdr_input_pin_agent extends uvm_agent;
`uvm_component_utils(hdr_input_pin_agent);
hdr_input_pin_driver pin_drv;
hdr_input_pin_sequencer pin_seq;
virtual hdr_input_pin_if pin_if_v;
function new(string name="hdr_input_pin_agent", uvm_component parent);
super.new(name, parent);
endfunction // new
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
// if (get_is_active() == UVM_ACTIVE) begin
pin_drv = hdr_input_pin_driver::type_id::create("pin_drv", this);
pin_seq = hdr_input_pin_sequencer::type_id::create("pin_seq", this);
// end
if(!uvm_config_db #(virtual hdr_input_pin_if)::get(this, "", "hdr_input_pin_if", this.pin_if_v))
`uvm_fatal("HDR INPUT PIN AGENT", "Failed to get pin_if_v");
uvm_config_db#(virtual hdr_input_pin_if)::set(this, "*", "hdr_input_pin_if", pin_if_v);
endfunction // void
virtual function void conntect_phase(uvm_phase phase);
super.connect_phase(phase);
// if(get_is_active()==UVM_ACTIVE) begin
pin_drv.seq_item_port.connect(pin_seq.seq_item_export);
// end
endfunction // void
endclass // hdr_input_pin_agent
Error is:
UVM_INFO /proj/media_imx8_dv_backup/b53418/dc_003/blocks/med_dcss_tb/testbench/classes_v/hdr_input_pin_agent/hdr_input_seq_item.sv(62) @ 2241.000ns: reporter@@pin_item [HDR_INPUT_PIN_SEQ_ITEM] alpha_ch3_2_sel = 0
UVM_INFO /proj/media_imx8_dv_backup/b53418/dc_003/blocks/med_dcss_tb/testbench/classes_v/hdr_input_pout_agent/hdr_input_pout_sequence.sv(28) @ 2241.000ns: uvm_test_top.u_hdr_input_env.pout_agent.hdr_input_pout_sequencer@@pout_seq [HDR POUT SEQ] Output sequence started
Open failed on file “…/…/vectors/hdr_input_p1CSCA/hdr_input_pipe2.out”. No such file or directory
Open failed on file “…/…/vectors/hdr_input_p1CSCA/hdr_input_pipe3.out”. No such file or directory
UVM_INFO /proj/media_imx8_dv_backup/b53418/dc_003/blocks/med_dcss_tb/testbench/classes_v/hdr_input_pin_agent/hdr_input_pin_driver.sv(25) @ 4007.000ns: uvm_test_top.u_hdr_input_env.pin_agent.pin_drv [HDR PIN DRIVER] Wait for next item
ncsim: *E,TRNULLID: NULL pointer dereference.
File: /pkg/uvm-/1.1d/src/tlm1/uvm_sqr_connections.svh, line = 45, pos = 50
Scope: worklib.uvm_pkg::uvm_seq_item_pull_port#(hdr_input_pin_seq_item,hdr_input_pin_seq_item)@11004_19.get_next_item
Time: 4007 NS + 1
Verilog Stack Trace:
0: task worklib.uvm_pkg::uvm_seq_item_pull_port#(hdr_input_pin_seq_item,hdr_input_pin_seq_item)@11004_19.get_next_item at /pkg/uvm-/1.1d/src/tlm1/uvm_sqr_connections.svh:45
1: task testbench.top_level_module.hdr_input_pin_driver@10980_6.run_phase at /proj/media_imx8_dv_backup/b53418/dc_003/blocks/med_dcss_tb/testbench/classes_v/hdr_input_pin_agent/hdr_input_pin_driver.sv:26
2: task worklib.uvm_pkg::uvm_run_phase@5038_2945.exec_task at /pkg/uvm-/1.1d/src/base/uvm_common_phases.svh:245
3: process in worklib.uvm_pkg::uvm_task_phase@5038_2945.execute.unmblk1 at /pkg/uvm-/1.1d/src/base/uvm_task_phase.svh:150
/pkg/uvm-/1.1d/src/tlm1/uvm_sqr_connections.svh:45 `UVM_SEQ_ITEM_PULL_IMP(this.m_if, REQ, RSP, t, t)
ncsim>
ncsim>