Skip to content

Commit 7f2e68c

Browse files
davidschrammelrswarbrick
authored andcommitted
[racl_ctrl,topgen] Make racl_group an ipgen param.
Signed-off-by: David Schrammel <[email protected]>
1 parent 7c3d858 commit 7f2e68c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

hw/ip_templates/racl_ctrl/data/racl_ctrl.tpldesc.hjson

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,11 @@
5757
type: "object"
5858
default: []
5959
}
60+
{
61+
name: "racl_group"
62+
desc: "The RACL Group"
63+
type: "string"
64+
default: "Null"
65+
}
6066
]
6167
}

hw/top_darjeeling/ip_autogen/racl_ctrl/data/top_darjeeling_racl_ctrl.ipconfig.hjson

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
nr_ctn_uid_bits: 5
1111
nr_policies: 3
1212
nr_subscribing_ips: 11
13+
racl_group: Null
1314
policies:
1415
[
1516
{

util/topgen.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def _get_ac_range_check_params(top: ConfigT) -> ParamsT:
776776
def _get_racl_params(top: ConfigT) -> ParamsT:
777777
"""Extracts parameters for racl_ctrl ipgen."""
778778
module = lib.find_module(top["module"], "racl_ctrl")
779-
racl_group = module.get("racl_group", "Null")
779+
racl_group = module.get("ipgen_params", {}).get("racl_group", "Null")
780780
if len(top["racl"]["policies"]) == 1:
781781
# If there is only one set of policies, take the first one
782782
policies = list(top["racl"]["policies"].values())[0]
@@ -801,6 +801,7 @@ def _get_racl_params(top: ConfigT) -> ParamsT:
801801
"nr_ctn_uid_bits": top["racl"]["nr_ctn_uid_bits"],
802802
"nr_policies": top["racl"]["nr_policies"],
803803
'nr_subscribing_ips': num_subscribing_ips[racl_group],
804+
"racl_group": racl_group,
804805
"policies": policies
805806
})
806807
return ipgen_params

0 commit comments

Comments
 (0)