From ced14ede1064ec913905367c642c96fc2062ab1b Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Wed, 25 Dec 2024 10:14:31 +0100 Subject: [PATCH] [hw,racl_ctrl,rtl] Rename policy vector and add intermodule sigs Signed-off-by: Robert Schilling --- .../racl_ctrl/data/racl_ctrl.hjson.tpl | 29 ++++++++++++++++--- .../racl_ctrl/rtl/racl_ctrl.sv.tpl | 7 +++-- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/hw/ip_templates/racl_ctrl/data/racl_ctrl.hjson.tpl b/hw/ip_templates/racl_ctrl/data/racl_ctrl.hjson.tpl index f05cb244f3c0e..d4053a13b0bd1 100644 --- a/hw/ip_templates/racl_ctrl/data/racl_ctrl.hjson.tpl +++ b/hw/ip_templates/racl_ctrl/data/racl_ctrl.hjson.tpl @@ -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: [ diff --git a/hw/ip_templates/racl_ctrl/rtl/racl_ctrl.sv.tpl b/hw/ip_templates/racl_ctrl/rtl/racl_ctrl.sv.tpl index 48473b4a37cb8..7f3cad9a97721 100644 --- a/hw/ip_templates/racl_ctrl/rtl/racl_ctrl.sv.tpl +++ b/hw/ip_templates/racl_ctrl/rtl/racl_ctrl.sv.tpl @@ -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 @@ -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 @@ -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;