Skip to content

Commit

Permalink
[edn/dv] Fix failing edn_genbits tests
Browse files Browse the repository at this point in the history
This commit fixes a failing genbits test.
The test sequence was waiting for the SM to reach the Idle state but
the SM was already in SWPortMode. This caused a timeout. Now the
sequence waits for SWPortMode instead, which is effectively the same
since the SM has to go into Idle before it can enter the SWPortMode.

Signed-off-by: Hakim Filali <[email protected]>
  • Loading branch information
Hakim Filali authored and vogelpi committed Jan 22, 2024
1 parent dfe67b0 commit 862b811
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/ip/edn/dv/env/seq_lib/edn_genbits_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ class edn_genbits_vseq extends edn_base_vseq;
ral.ctrl.auto_req_mode.set(MuBi4False);
csr_update(.csr(ral.ctrl));
mode = edn_env_pkg::SwMode;
// Give the hardware time to quiesce
csr_spinwait(.ptr(ral.main_sm_state), .exp_data(edn_pkg::Idle), .backdoor(1'b1));
// Wait until the EDN enters the Idle state and finally the SWPortMode.
csr_spinwait(.ptr(ral.main_sm_state), .exp_data(edn_pkg::SWPortMode), .backdoor(1'b1));
`DV_CHECK_EQ(cfg.m_csrng_agent_cfg.generate_between_reseeds_cnt, num_reqs_between_reseeds)
// If the endpoint agents still expect more data, send another generate command
if (total_glen > cfg.m_csrng_agent_cfg.generate_cnt*cfg.glen_auto_mode) begin
Expand Down

0 comments on commit 862b811

Please sign in to comment.