Fatal: (SIGSEGV) Bad handle or reference at the definition of coverpoint

Dear all,

I am confused with the following error: Fatal: (SIGSEGV) Bad handle or reference.

This error directs me to the line where I define the coverpoint.

covergroup reset_coverage (ref reset_seq_item item);

rst_cp: coverpoint item.rstn { // error seems to be here
option.at_least = 3;
bins low = {0};
bins high = {1};
bins others = default;
}

endgroup : reset_coverage

Any help will be appreciated.

Thank you.
Best regards,
vkantamn

This looks like a run time error - there should be more information in the error message, like a call stack trace. Most likely you failed to construct the covergroup before calling sample().

In reply to dave_59:

Hello Dave,

the stack trace says:

HDL call sequence:
stopped at ./some_path/RESET_IF_coverage.svh 31 Function sample

This is exactly where I defined the coverpoint. Coming to the contructor of the covergroup, I see, I did it in the coverage class.

class coverage extends uvm_subscriber #(item);
uvm_component_utils macro

item item_inst;
reset_coverage cov_group;

function new (string name, uvm_component p);
super.new(name, p);
item_inst = new();
cov_group = new(item_inst);
endfunction

function void write (input item t);
item_inst = t;
cov_group.sample();
endfunction

endclass

Any suggestions please?

In reply to vkantamn:

There should be more information that that one line of error message you showed. There is normally information about the process that the segfault was executing on.

If you can runt interactively, use the tb command after the simulation halts.

In reply to dave_59:

Dave,

thank you very much for your follow-up and inevitable support. I sincerely appreciate this. I am adding entire log for your reference.


UVM_INFO verilog_src/questa_uvm_pkg-1.2/src/questa_uvm_pkg.sv(217) @ 0: reporter [Questa UVM] questa_uvm::init(+struct)

** Warning: NUMERIC_STD.“=”: metavalue detected, returning FALSE

Time: 0 ns Iteration: 0 Instance: /filter_verify_top/DUT_wrapper/filter_seqeuencer_dut_e_i

** Warning: NUMERIC_STD.“=”: metavalue detected, returning FALSE

Time: 0 ns Iteration: 0 Instance: /filter_verify_top/DUT_wrapper/filter_seqeuencer_dut_e_i

UVM_INFO @ 0: reporter [RNTST] Running test test_filter_001…

** Warning: NUMERIC_STD.“=”: metavalue detected, returning FALSE

Time: 0 ns Iteration: 1 Instance: /filter_verify_top/DUT_wrapper/filter_seqeuencer_dut_e_i

** Warning: NUMERIC_STD.“=”: metavalue detected, returning FALSE

Time: 0 ns Iteration: 1 Instance: /filter_verify_top/DUT_wrapper/filter_seqeuencer_dut_e_i

UVM_WARNING ./FILTER_VERIFY_tb/sv/filter_verify_sb/sv//filter_verify_sb_env.svh(49) @ 0: uvm_test_top.tb_env.sb [CFG] Configuration object not initialized from outside. Generating one internally

UVM_INFO ./FILTER_VERIFY_tb/sv/filter_verify_tests/sv//filter_test_001.svh(27) @ 0: uvm_test_top.tb_env.virtual_sequencer@@filter_001_seq. [filter_001_seq] GP_FILT_VAL_I SET

UVM_INFO ./FILTER_VERIFY_tb/sv/filt_sequencer_IF/sv//FILT_SEQUENCER_IF_seq_lib.svh(147) @ 0: uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.sequencer@@filter_001_seq…f_sequence_001 [FILT_SEQUENCER_IF_001_seq] Starting to generate traffic …

UVM_INFO ./FILTER_VERIFY_tb/sv/filt_sequencer_IF/sv//FILT_SEQUENCER_IF_driver.svh(104) @ 0: uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.driver [ITEM]

-------------------------------------------------------------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------------------------------------------------------------

s_item FILT_SEQUENCER_IF_seq_item - @1260

gp_chan_1_i integral 4 'ha

gp_chan_2_i integral 4 'hf

gp_chan_3_i integral 4 'h0

gp_chan_4_i integral 4 'h0

gp_chan_5_i integral 4 'hc

gp_filt_val_i integral 10 'hcd

rd_filt integral 1 'h0

begin_time time 64 0

depth int 32 'd3

parent sequence (name) string 14 f_sequence_001

parent sequence (full name) string 68 uvm_test_top.tb_env.virtual_sequencer.filter_001_seq…f_sequence_001

sequencer string 62 uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.sequencer

-------------------------------------------------------------------------------------------------------------------------------------

UVM_INFO ./FILTER_VERIFY_tb/sv/filt_sequencer_IF/sv//FILT_SEQUENCER_IF_seq_lib.svh(155) @ 10: uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.sequencer@@filter_001_seq…f_sequence_001 [FILT_SEQUENCER_IF_001_seq] Traffic sequences have completed.

UVM_INFO ./FILTER_VERIFY_tb/sv/filter_verify_tests/sv//filter_test_001.svh(37) @ 1010: uvm_test_top.tb_env.virtual_sequencer@@filter_001_seq. [filter_001_seq] RESET SET INACTIVE

UVM_INFO ./FILTER_VERIFY_tb/sv/filter_verify_tests/sv//filter_test_001.svh(50) @ 1010: uvm_test_top.tb_env.virtual_sequencer@@filter_001_seq. [filter_001_seq] RD_FILT RAISED HIGH

UVM_INFO ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_seq_lib.svh(121) @ 1010: uvm_test_top.tb_env.reset_IF_inst_env.agent.sequencer@@filter_001_seq…r_sequence_001 [RESET_IF_001_seq] Starting to generate traffic …

UVM_INFO ./FILTER_VERIFY_tb/sv/filt_sequencer_IF/sv//FILT_SEQUENCER_IF_seq_lib.svh(147) @ 1010: uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.sequencer@@filter_001_seq…f_sequence_001 [FILT_SEQUENCER_IF_001_seq] Starting to generate traffic …

UVM_INFO ./FILTER_VERIFY_tb/sv/filt_sequencer_IF/sv//FILT_SEQUENCER_IF_driver.svh(104) @ 1010: uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.driver [ITEM]

-------------------------------------------------------------------------------------------------------------------------------------

Name Type Size Value

-------------------------------------------------------------------------------------------------------------------------------------

s_item FILT_SEQUENCER_IF_seq_item - @1758

gp_chan_1_i integral 4 'hb

gp_chan_2_i integral 4 'hd

gp_chan_3_i integral 4 'h9

gp_chan_4_i integral 4 'h5

gp_chan_5_i integral 4 'h6

gp_filt_val_i integral 10 'h96

rd_filt integral 1 'h1

begin_time time 64 1010

depth int 32 'd3

parent sequence (name) string 14 f_sequence_001

parent sequence (full name) string 68 uvm_test_top.tb_env.virtual_sequencer.filter_001_seq…f_sequence_001

sequencer string 62 uvm_test_top.tb_env.filt_sequencer_IF_inst_env.agent.sequencer

-------------------------------------------------------------------------------------------------------------------------------------

** Fatal: (SIGSEGV) Bad handle or reference.

Time: 1030 ns Iteration: 1 Process: /RESET_IF_pkg::RESET_IF_driver::run_phase/#FORK#74_f61cbb6 File: ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_coverage.svh

Fatal error in Function sample at ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_coverage.svh line 31

HDL call sequence:

Stopped at ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_coverage.svh 31 Function sample

called from ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_coverage.svh 61 Function RESET_IF_pkg/RESET_IF_coverage::write

called from /opt/questasim_10.1c/questasim/linux/…/verilog_src/uvm-1.1b/src/tlm1/uvm_analysis_port.svh 114 Function uvm_pkg/uvm_analysis_imp::write

called from /opt/questasim_10.1c/questasim/linux/…/verilog_src/uvm-1.1b/src/tlm1/uvm_analysis_port.svh 76 Function uvm_pkg/uvm_analysis_port::write

called from ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_driver.svh 94 Task RESET_IF_pkg/RESET_IF_driver::get_and_drive

called from ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_driver.svh 74 Task RESET_IF_pkg/RESET_IF_driver::run_phase

Fatal error reported during simulation. Cannot run ‘fcover’ command. Please look above output for the fatal error message(s).

Fatal error reported during simulation. Cannot run ‘fcover’ command. Please look above output for the fatal error message(s).


The error pops up only when the following line of the code is uncommented: cov_group.sample();

The error closely points to driver where the drive task is defined:

    task drive(REQ req, RSP rsp);
        `uvm_info("DEBUG", {"\n", req.sprint()}, UVM_FULL);

        `uvm_info("ITEM", {"\n", req.sprint()}, UVM_NONE);
        // set signals according to 'req'
        // capture any output (including input) in 'rsp'
        @(posedge vif.clk_i);
		vif.rstn = req.rstn;
    endtask: drive

I dont have good understand about req and rsp. Maybe something wrong with driving the signals?

Thank you and Regards,

In reply to vkantamn:

That stack trace starts where it says

HDL call sequence

You need to look at line 94 of

called from ./FILTER_VERIFY_tb/sv/reset_IF/sv//RESET_IF_driver.svh 94 Task RESET_IF_pkg/RESET_IF_driver::get_and_drive

There is probably a call to ap.write(t) and t is null. This may get very complicated to debug in a forum, I suggest you learn how to interactively debug your code and trace the execution of your code. Try to find someone locally to help you.

BTW, there is no need for the line in your class coverage’s constructor

item_inst = new();

item_inst will be overwritten with another object what write() gets called.