Skip to content

Commit

Permalink
[racl] Add generic RACL testplan
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Schilling <[email protected]>
  • Loading branch information
Razer6 committed Feb 24, 2025
1 parent 455f8fc commit 4b8b9bc
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions hw/dv/tools/dvsim/testplans/racl_testplan.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright lowRISC contributors (OpenTitan project).
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
{
testpoints: [
{
name: racl_rw
desc: '''
Precondition:
- Randomize the number of RACL policies and randomize its default policy values.
- Randomize the policy selection vector of the CSRs.
- Randomize the ErrorRsp parameter.
- Shuffle the list of CSRs first to remove the effect of ordering.

Verify the correct access for each CSR:
- Loop through each CSR and perform a read and write request using a
random RACL role and random CTN UID value.
If the request is allowed:
No TL-UL error is expected.
else if the request is denied:
- Verify the error log matches:
- error_log_o.valid = 1
- error_log_o.overflow = 0
- error_log_o.racl_role = <role that caused the error>
- error_log_o.ctn_uid = <ctn uid that caused the error>
- Verify that a write has no effect.
- Verify a read returns data with 0xFFFFF (all bits set to 1).
- If ErrorRsp = 1:
- Verify a TLUL error is returned.
'''
stage: V1
tests: ["{name}{intf}_racl_rw"]
}
]
}

0 comments on commit 4b8b9bc

Please sign in to comment.