Skip to content

Commit

Permalink
[dv/kmac] Fix kmac TL integrity error failure
Browse files Browse the repository at this point in the history
When kmac TL integrity error triggers, kmac will lock its internal
states and also lock `cfg_regwen` register. Because the `cfg_regwen` is
a `ro` register, RAL model won't lock its lockable registers
automatically.
So I separate out a task in common sequence, and override it in
kmac_common_seq to lock the lockable regs
immediately after tl integrity error is triggered.

Signed-off-by: Cindy Chen <[email protected]>
  • Loading branch information
cindychip committed Feb 11, 2022
1 parent 5fbb8f7 commit ca221a0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hw/ip/kmac/dv/env/seq_lib/kmac_common_vseq.sv
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ class kmac_common_vseq extends kmac_base_vseq;
end
end
endfunction

virtual task check_tl_intg_error_response();
// For tl integrity fatal error, the kmac `cfg_regwen` register will be set to 0 internally to
// lock all cfg related CSRs. Because it is a `RO` register, the logic below manually locks the
// write access for its lockable register fields. (If the regwen is `W0C` access policy, the
// lockable fields will be updated automatically in `do_predict` function)
ral.cfg_regwen.en.set_lockable_flds_access(.lock(1));
super.check_tl_intg_error_response();
endtask

endclass

0 comments on commit ca221a0

Please sign in to comment.