Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[racl] Add generic RACL testplan #26326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions hw/dv/tools/dvsim/testplans/racl_testplan.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// 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: '''
Precondiiton:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: typo

- Randomize the number of RACL policies and randomize its default policy values.
- Randomoize the policy selection vector of the CSRs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "randomize" typo

- 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 of using a
random RACL role and random CTN UID value.
If the request is allowed:
* No TL-UL error is expected
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this "*"?

else if the request is denied
Verify the error log matches:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand well, if the request is allowed there are 4 main points:

- Verify the error log matches:
- Verify that a write did not show any effect.
- Verify a read returns all 1
- If ErrorRsp = 1:

If yes, can you remove the line jump line 26, and add dashes before to make it more obvious that it's a list of 4 things.

- 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 did not show any effect.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd say (if that's what you meant):
"Verify that a write has no effect."

Verify a read returns all 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand what you mean here. Can you elaborate a bit the description?
Nit: and missing "." ponctuation

If ErrorRsp = 1:
- Verify a TLUL error is returned
'''
stage: V1
tests: ["{name}{intf}_racl_rw"]
}
]
}
Loading