-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[entropy_src, dv] Move assertion control code out of sequence
This change fixes a build issue seen when trying to run the entropy_src using VCS simulator. The code to disable assertion from within sequences using XMR doesnt compile.This is because VCS prohibits SV class inside a package to have XMRs to code in module outside The solution implemented in this commit moves the functions containing assert_off tasks to the entropy_src_path_if. These functions are then called as appropriate from the sequences using a handle to the virtual interface Signed-off-by: Venkat Krishnan <venkateswarank.opentitan@gmail.com>
- Loading branch information
1 parent
162d9a3
commit 4b47a96
Showing
3 changed files
with
77 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,13 @@ | |
|
||
// This interface deals with the force paths in ENTROPY_SRC interrupt and error tests | ||
|
||
`define CORE \ | ||
tb.dut.u_entropy_src_core | ||
`define REPCNT \ | ||
u_entropy_src_repcnt_ht.u_prim_max_tree_rep_cntr_max | ||
`define BUCKET \ | ||
u_entropy_src_bucket_ht.u_prim_max_tree_bin_cntr_max | ||
|
||
interface entropy_src_path_if (); | ||
import uvm_pkg::*; | ||
|
||
|
@@ -39,4 +46,70 @@ interface entropy_src_path_if (); | |
end | ||
endcase // case (cntr_name) | ||
endfunction // cntr_err_path | ||
// Disable assertions that we expect to trigger when injecting errors | ||
task assert_off_err(); | ||
Check warning on line 50 in hw/ip/entropy_src/dv/env/entropy_src_path_if.sv GitHub Actions / Verible lint
|
||
$assertoff(0, tb.dut.AlertTxKnownO_A); | ||
$assertoff(0, tb.dut.IntrEsFifoErrKnownO_A); | ||
$assertoff(0, tb.dut.EsHwIfEsAckKnownO_A); | ||
$assertoff(0, tb.dut.EsHwIfEsBitsKnownO_A); | ||
$assertoff(0, tb.dut.EsHwIfEsFipsKnownO_A); | ||
$assertoff(0, tb.dut.EsXhtEntropyBitKnownO_A); | ||
$assertoff(0, tb.dut.IntrEsEntropyValidKnownO_A); | ||
$assertoff(0, tb.dut.IntrEsHealthTestFailedKnownO_A); | ||
$assertoff(0, tb.dut.tlul_assert_device.dKnown_A); | ||
$assertoff(0, tb.dut.tlul_assert_device.gen_device.dDataKnown_A); | ||
$assertoff(0, tb.dut.gen_alert_tx[0].u_prim_alert_sender.AlertPKnownO_A); | ||
$assertoff(0, tb.dut.gen_alert_tx[0].u_prim_alert_sender.gen_async_assert.DiffEncoding_A); | ||
$assertoff(0, `CORE.AtReset_ValidRngBitsPushedIntoEsrngFifo_A); | ||
$assertoff(0, `CORE.Final_ValidRngBitsPushedIntoEsrngFifo_A); | ||
$assertoff(0, `CORE.AtReset_EsrngFifoPushedIntoEsbitOrPosthtFifos_A); | ||
$assertoff(0, `CORE.Final_EsrngFifoPushedIntoEsbitOrPosthtFifos_A); | ||
$assertoff(0, `CORE.AtReset_EsbitFifoPushedIntoPosthtFifo_A); | ||
$assertoff(0, `CORE.Final_EsbitFifoPushedIntoPosthtFifo_A); | ||
$assertoff(0, `CORE.AtReset_PosthtFifoPushedFromEsbitOrEsrngFifos_A); | ||
$assertoff(0, `CORE.Final_PosthtFifoPushedFromEsbitOrEsrngFifos_A); | ||
$assertoff(0, `CORE.AtReset_PosthtFifoPushedIntoDistrFifo_A); | ||
$assertoff(0, `CORE.Final_PosthtFifoPushedIntoDistrFifo_A); | ||
$assertoff(0, `CORE.AtReset_DistrFifoPushedIntoPreconFifo_A); | ||
$assertoff(0, `CORE.Final_DistrFifoPushedIntoPreconFifo_A); | ||
$assertoff(0, `CORE.AtReset_EsfinalFifoPushed_A); | ||
$assertoff(0, `CORE.Final_EsfinalFifoPushed_A); | ||
$assertoff(0, `CORE.AtReset_EsfinalFifoPushedPostStartup_A); | ||
$assertoff(0, `CORE.Final_EsfinalFifoPushedPostStartup_A); | ||
$assertoff(0, `CORE.AtReset_PreconFifoPushedPostStartup_A); | ||
$assertoff(0, `CORE.Final_PreconFifoPushedPostStartup_A); | ||
$assertoff(0, `CORE.u_sha3.FsmKnown_A); | ||
$assertoff(0, `CORE.u_sha3.MuxSelKnown_A); | ||
$assertoff(0, `CORE.u_entropy_src_main_sm.u_state_regs_A); | ||
$assertoff(0, `CORE.u_entropy_src_ack_sm.u_state_regs_A); | ||
$assertoff(0, `CORE.u_prim_fifo_sync_esfinal.DepthKnown_A); | ||
$assertoff(0, `CORE.u_prim_fifo_sync_esfinal.RvalidKnown_A); | ||
$assertoff(0, `CORE.u_prim_fifo_sync_esfinal.WreadyKnown_A); | ||
$assertoff(0, `CORE.u_prim_fifo_sync_esrng.DataKnown_A); | ||
$assertoff(0, `CORE.u_entropy_src_adaptp_ht.u_sum.SumComputation_A); | ||
$assertoff(0, `CORE.u_entropy_src_markov_ht.u_sum.SumComputation_A); | ||
$assertoff(0, `CORE.u_entropy_src_adaptp_ht.u_min.ValidInImpliesValidOut_A); | ||
$assertoff(0, `CORE.u_entropy_src_adaptp_ht.u_max.ValidInImpliesValidOut_A); | ||
$assertoff(0, `CORE.u_entropy_src_markov_ht.u_min.ValidInImpliesValidOut_A); | ||
$assertoff(0, `CORE.u_entropy_src_markov_ht.u_max.ValidInImpliesValidOut_A); | ||
$assertoff(0, `CORE.u_sha3.u_keccak.gen_unmask_st_chk.UnmaskValidStates_A); | ||
$assertoff(0, `CORE.`REPCNT.ValidInImpliesValidOut_A); | ||
$assertoff(0, `CORE.`BUCKET.ValidInImpliesValidOut_A); | ||
endtask | ||
function void disable_entroy_drop_assertions(); | ||
Check warning on line 99 in hw/ip/entropy_src/dv/env/entropy_src_path_if.sv GitHub Actions / Verible lint
|
||
// Disable assertions which expect that no entropy is dropped between the esrng, | ||
// esbit and postht FIFOs. | ||
$assertoff(0, `CORE.AtReset_EsrngFifoPushedIntoEsbitOrPosthtFifos_A); | ||
$assertoff(0, `CORE.Final_EsrngFifoPushedIntoEsbitOrPosthtFifos_A); | ||
$assertoff(0, `CORE.AtReset_EsbitFifoPushedIntoPosthtFifo_A); | ||
$assertoff(0, `CORE.Final_EsbitFifoPushedIntoPosthtFifo_A); | ||
$assertoff(0, `CORE.AtReset_PosthtFifoPushedFromEsbitOrEsrngFifos_A); | ||
$assertoff(0, `CORE.Final_PosthtFifoPushedFromEsbitOrEsrngFifos_A); | ||
// TODO(#24085): Remove this assertoff once the issue is solved. | ||
$assertoff(0, `CORE.FifosEmptyWhenShaProcess_A); | ||
endfunction | ||
endinterface // entropy_src_path_if | ||
|
||
`undef CORE | ||
`undef REPCNT | ||
`undef BUCKET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters