Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rom_ctrl,dv] Tweak randomisation of bad mubi4_t values #21335

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,13 @@ class rom_ctrl_corrupt_sig_fatal_chk_vseq extends rom_ctrl_base_vseq;
// module. To test this rom_select_bus_o is forced with any value other than MuBi4True and
// MuBi4False.
MuxMubi: begin
bit [3:0] rand_var;
pick_err_inj_point();
mubi4_test_invalid(prim_mubi_pkg::mubi4_t'(rand_var));
force_sig("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.rom_select_bus_o", rand_var);
force_sig("tb.dut.gen_fsm_scramble_enabled.u_checker_fsm.rom_select_bus_o",
get_invalid_mubi4());
check_for_alert();
dut_init();
pick_err_inj_point();
mubi4_test_invalid(prim_mubi_pkg::mubi4_t'(rand_var));
force_sig("tb.dut.u_mux.sel_bus_q", rand_var);
force_sig("tb.dut.u_mux.sel_bus_q", get_invalid_mubi4());
check_for_alert();
end
// The mux that arbitrates between the checker and the bus gives access to the checker at
Expand Down Expand Up @@ -299,4 +297,10 @@ class rom_ctrl_corrupt_sig_fatal_chk_vseq extends rom_ctrl_base_vseq;
wait_with_bound(wait_clks);
endtask

function prim_mubi_pkg::mubi4_t get_invalid_mubi4();
logic [3:0] val;
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(val, mubi4_test_invalid(mubi4_t'(val));)
return mubi4_t'(val);
endfunction

endclass : rom_ctrl_corrupt_sig_fatal_chk_vseq
Loading