Skip to content

Commit

Permalink
[hw,racl_ctrl,rtl] Rename policy vector and add intermodule sigs
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Schilling <[email protected]>
  • Loading branch information
Razer6 committed Dec 25, 2024
1 parent a18b3dd commit ced14ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
29 changes: 25 additions & 4 deletions hw/ip_templates/racl_ctrl/data/racl_ctrl.hjson.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,36 @@
},
],
inter_signal_list: [
{ struct: "policies",
{ struct: "racl_policy_vec",
type: "uni",
name: "policies",
name: "racl_policies",
act: "req",
package: "racl_pkg",
package: "top_racl_pkg",
desc: '''
Policy vector distributed to the subscribing RACL IPs.
'''
},
}
{ struct: "logic",
type: "uni",
name: "racl_error",
act: "rcv",
width : "NumSubscribingIps",
desc: '''
Error notification vector collecting errors from all subscribing IPs.
A 1 indicates the corresponding IP raised a RACL error and the error log needs to be collected.
Only one IP can raise an error at a time.
'''
}
{ struct: "racl_error_log",
type: "uni",
name: "racl_error_log",
act: "req",
width: "NumSubscribingIps"
package: "top_racl_pkg",
desc: '''
Error log information from all IPs.
'''
}
],

registers: [
Expand Down
7 changes: 4 additions & 3 deletions hw/ip_templates/racl_ctrl/rtl/racl_ctrl.sv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module ${module_instance_name} import ${module_instance_name}_reg_pkg::*; #(
input prim_alert_pkg::alert_rx_t [NumAlerts-1:0] alert_rx_i,
output prim_alert_pkg::alert_tx_t [NumAlerts-1:0] alert_tx_o,
// Output policy vector for distribution
output top_racl_pkg::racl_policy_vec_t policies_o,
output top_racl_pkg::racl_policy_vec_t racl_policies_o,
// RACL violation information.
input logic [NumSubscribingIps-1:0] racl_error_i,
input top_racl_pkg::racl_error_log_t [NumSubscribingIps-1:0] racl_error_log_i
Expand Down Expand Up @@ -114,7 +114,7 @@ module ${module_instance_name} import ${module_instance_name}_reg_pkg::*; #(

% endfor
// Broadcast all policies via policy vector
assign policies_o = {
assign racl_policies_o = {
% for policy in policies:
policy_${policy['name'].lower()}${',' if not loop.last else ''}
% endfor
Expand All @@ -123,11 +123,12 @@ module ${module_instance_name} import ${module_instance_name}_reg_pkg::*; #(
//////////////////////////////////////////////////////////////////////////////////////////////////
// Error handling
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

// A RACL error can only happen for one IP at a time in one RACL domain. Therefore, it is
// safe to OR all RACL error bits together and no arbitration is needed. This is true also
// for the corresponding RACL role or Write/Read information.
`ASSERT(OneHotRaclError_A, $onehot0(racl_error_i))

logic racl_error;
assign racl_error = |racl_error_i;

Expand Down

0 comments on commit ced14ed

Please sign in to comment.