-
Notifications
You must be signed in to change notification settings - Fork 806
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
[hw,tlul_adapter_sram,rtl] Add support for RACL protected SRAM Adapter #26015
Conversation
594717f
to
b21fef3
Compare
b21fef3
to
3b61395
Compare
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
5468cd1
to
b781d24
Compare
dd47e92
to
0585dfb
Compare
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
0585dfb
to
381b2cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks sensible to me. A couple of minor questions before it lands.
assign rd_req = tl_i.a_opcode == tlul_pkg::Get; | ||
assign racl_read_allowed = (|(racl_policies_i[RaclPolicySelVec].read_perm & racl_role_vec)); | ||
assign racl_write_allowed = (|(racl_policies_i[RaclPolicySelVec].write_perm & racl_role_vec)); | ||
assign racl_error_o = (rd_req & ~racl_read_allowed) | (~rd_req & ~racl_write_allowed); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a big deal, but would this be slightly shorter and clearer?
assign racl_error_o = !(rd_req ? racl_read_allowed : racl_write_allowed);
(I realise that this is already in the register adapter, so it would definitely be a follow-up PR if so)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make a follow-up PR on that to unblock the others since CI is green at the moment.
CHANGE AUTHORIZED: hw/ip/tlul/rtl/tlul_adapter_reg_racl.sv The protected files are all new for the RACL feature, so editing them (to make the feature work) doesn't really present any risk to existing designs. |
1 similar comment
CHANGE AUTHORIZED: hw/ip/tlul/rtl/tlul_adapter_reg_racl.sv The protected files are all new for the RACL feature, so editing them (to make the feature work) doesn't really present any risk to existing designs. |
This PR adds a RACL protected SRAM adapter. This works by acting like a shim around the existing TLUL SRAM adapter. In case of a RACL error, the error is responded via the TLUL loopback adapter. Currently, only a single RACL policy is supported, but this will be extended in the future.
This RACL protected SRAM adapter will be used in SPI host and device as well as in the SRAM Control.
The same approach is implemented for the Reg adapter. This circumvents dealing with any flop latencies in the adapter explicitly, since RACL is check for the TLUL request goes into the TLUL adapter.