Skip to content

Commit

Permalink
[entropy_src/dv] Add assertion for rng_fips_o
Browse files Browse the repository at this point in the history
This commit adds an assertion for rng_fips_o.
rng_fips_o should only request high quality entropy if mubi_rng_fips
is equal to Mubi4True.

Signed-off-by: Hakim Filali <[email protected]>
  • Loading branch information
Hakim Filali authored and vogelpi committed Aug 6, 2024
1 parent e4c5daa commit 3e2548e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hw/ip/entropy_src/rtl/entropy_src_core.sv
Original file line number Diff line number Diff line change
Expand Up @@ -3096,6 +3096,11 @@ module entropy_src_core import entropy_src_pkg::*; #(
`ifdef INC_ASSERT
`include "prim_macros.svh"

// Assert that we request high quality entropy only when the rng_fips field of the conf register
// is set to Mubi4True.
`ASSERT(RngFipsOutputHighInFipsMode_A,
prim_mubi_pkg::mubi4_test_true_loose(mubi4_t'(reg2hw.conf.rng_fips.q)) === rng_fips_o)

// Count number of disables since last reset.
logic [63:0] disable_cnt_d, disable_cnt_q;
always_comb begin
Expand Down

0 comments on commit 3e2548e

Please sign in to comment.