Reorder check in icache scoreboard for more helpful error messages

The test is the same, but the reordering means that if we see an error
that we weren't expecting, we'll complain about that, rather than
about the instruction data itself.
This commit is contained in:
Rupert Swarbrick 2020-06-03 11:11:31 +01:00 committed by Rupert Swarbrick
parent 023d86d912
commit 2c195c591e

View file

@ -260,6 +260,15 @@ class ibex_icache_scoreboard
return 1'b1;
end
if (seen_err) begin
if (chatty) begin
`uvm_info(`gfn,
$sformatf("Not seed 0x%08h: got unexpected error flag.", seed),
UVM_MEDIUM)
end
return 0;
end
is_compressed = exp_insn_data[1:0] != 2'b11;
if (is_compressed) begin
if (seen_insn_data[15:0] != exp_insn_data[15:0]) begin
@ -284,15 +293,6 @@ class ibex_icache_scoreboard
end
end
if (seen_err) begin
if (chatty) begin
`uvm_info(`gfn,
$sformatf("Not seed 0x%08h: got unexpected error flag.", seed),
UVM_MEDIUM)
end
return 0;
end
// This seed matches, so we shouldn't have been called with the chatty flag set.
`DV_CHECK_FATAL(!chatty)
return 1'b1;