From 084ec3bec4193ed6486716a7475249f04dc16668 Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Tue, 13 Feb 2024 11:58:23 +0000 Subject: [PATCH] [rom_ctrl,dv] Use DV_CHECK around some calls to uvm_hdl_read Fiddly minor change, but it silences a warning from Xcelium at compile time. Signed-off-by: Rupert Swarbrick --- .../seq_lib/rom_ctrl_corrupt_sig_fatal_chk_vseq.sv | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/ip/rom_ctrl/dv/env/seq_lib/rom_ctrl_corrupt_sig_fatal_chk_vseq.sv b/hw/ip/rom_ctrl/dv/env/seq_lib/rom_ctrl_corrupt_sig_fatal_chk_vseq.sv index 949b8e2df0b582..9dd19b88e76278 100644 --- a/hw/ip/rom_ctrl/dv/env/seq_lib/rom_ctrl_corrupt_sig_fatal_chk_vseq.sv +++ b/hw/ip/rom_ctrl/dv/env/seq_lib/rom_ctrl_corrupt_sig_fatal_chk_vseq.sv @@ -94,10 +94,11 @@ class rom_ctrl_corrupt_sig_fatal_chk_vseq extends rom_ctrl_base_vseq; // set the external 'done' signal for pwrmgr to continue boot. To test this start_checker_q // signal from rom_ctrl_fsm is asserted randomly. CompareCtrlFlowConsistency: begin + string start_checker_path = "tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.start_checker_q"; bit rdata; pick_err_inj_point(); do begin - uvm_hdl_read("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.start_checker_q", rdata); + `DV_CHECK(uvm_hdl_read(start_checker_path, rdata)) @(posedge cfg.clk_rst_vif.clk); end while (rdata != 0); force_sig("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.start_checker_q", 1'b1); @@ -262,11 +263,13 @@ class rom_ctrl_corrupt_sig_fatal_chk_vseq extends rom_ctrl_base_vseq; endtask: force_sig task chk_fsm_state(); + string alert_o_path = "tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.alert_o"; + string state_q_path = "tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.state_q"; bit rdata_alert; bit [$bits(rom_ctrl_pkg::fsm_state_e)-1:0] rdata_state; - uvm_hdl_read("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.alert_o", rdata_alert); + `DV_CHECK(uvm_hdl_read(alert_o_path, rdata_alert)) `DV_CHECK_EQ(rdata_alert, 1) - uvm_hdl_read("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.state_q", rdata_state); + `DV_CHECK(uvm_hdl_read(state_q_path, rdata_state)) `DV_CHECK_EQ(rdata_state, rom_ctrl_pkg::Invalid) endtask: chk_fsm_state @@ -274,10 +277,11 @@ class rom_ctrl_corrupt_sig_fatal_chk_vseq extends rom_ctrl_base_vseq; // The task removes all previous states including the one that has been reached afterwards. // Note that this assumes no loops and linear progression through the state enum entries. task wait_for_fsm_state_inside(ref rom_ctrl_pkg::fsm_state_e states_to_visit[$]); + string state_q_path = "tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.state_q"; bit [$bits(rom_ctrl_pkg::fsm_state_e)-1:0] rdata_state; do begin @(negedge cfg.clk_rst_vif.clk); - uvm_hdl_read("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.state_q", rdata_state); + `DV_CHECK(uvm_hdl_read(state_q_path, rdata_state)) end while (!(rdata_state inside {states_to_visit})); `uvm_info(`gfn, $sformatf("reached FSM state %x", rdata_state), UVM_LOW) // Remove previous states from queue, including the one that has been reached.