Skip to content

Commit

Permalink
Merge pull request openhwgroup#2180 from silabs-robin/max_outstanding
Browse files Browse the repository at this point in the history
Asserts - OBI Max Outstanding
  • Loading branch information
silabs-robin authored Sep 5, 2023
2 parents c82b94e + 7b125ff commit c7892b1
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
34 changes: 32 additions & 2 deletions cv32e40s/tb/uvmt/uvmt_cv32e40s_integration_assert.sv
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ module uvmt_cv32e40s_integration_assert
input [31:0] mtvec_addr_i,

input alert_major_o,
input scan_cg_en_i
input scan_cg_en_i,

uvmt_cv32e40s_support_logic_module_o_if_t support_if
);

default clocking @(posedge clk_i); endclocking
Expand Down Expand Up @@ -125,10 +127,38 @@ module uvmt_cv32e40s_integration_assert
rvfi_if.rvfi_trap.trap
) else `uvm_error(info_tag, "Divide instruction is not illegal when M_EXT = M_NONE");


end: gen_m_none_assert


// Maximum Outstanding OBI Transactions

a_maximum_outstanding_instr: assert property (
support_if.instr_bus_v_addr_ph_cnt inside {0, 1, 2}
) else `uvm_error(info_tag, "More than 2 outstanding OBI transactions");

a_maximum_outstanding_data: assert property (
support_if.data_bus_v_addr_ph_cnt inside {0, 1, 2}
) else `uvm_error(info_tag, "More than 2 outstanding OBI transactions");

covergroup cg_outstanding @(posedge clk_i);
option.per_instance = 1;

cp_instr: coverpoint support_if.instr_bus_v_addr_ph_cnt {
bins zero = {0};
bins one = {1};
bins two = {2};
}

cp_data: coverpoint support_if.data_bus_v_addr_ph_cnt {
bins zero = {0};
bins one = {1};
bins two = {2};
}

x_instr_data: cross cp_instr, cp_data;
endgroup

cg_outstanding outstanding_cg = new;


endmodule : uvmt_cv32e40s_integration_assert
3 changes: 2 additions & 1 deletion cv32e40s/tb/uvmt/uvmt_cv32e40s_tb.sv
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,8 @@ module uvmt_cv32e40s_tb;

bind cv32e40s_wrapper
uvmt_cv32e40s_integration_assert integration_assert_i (
.rvfi_if (dut_wrap.cv32e40s_wrapper_i.rvfi_instr_if),
.rvfi_if (dut_wrap.cv32e40s_wrapper_i.rvfi_instr_if),
.support_if (support_logic_module_o_if.slave_mp),
.*
);

Expand Down

0 comments on commit c7892b1

Please sign in to comment.