Skip to content

Commit f995b56

Browse files
Razer6a-will
authored andcommitted
[topgen] Add GPIO to the list of uniquified ipgen IPs
Signed-off-by: Robert Schilling <[email protected]>
1 parent b0bd645 commit f995b56

27 files changed

+30
-3
lines changed

hw/top_darjeeling/ip_autogen/ac_range_check/data/top_darjeeling_ac_range_check.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
topname: darjeeling
1313
uniquified_modules:
1414
{
15+
gpio: gpio
1516
racl_ctrl: racl_ctrl
1617
ac_range_check: ac_range_check
1718
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/alert_handler/data/top_darjeeling_alert_handler.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@
227227
topname: darjeeling
228228
uniquified_modules:
229229
{
230+
gpio: gpio
230231
racl_ctrl: racl_ctrl
231232
ac_range_check: ac_range_check
232233
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/clkmgr/data/top_darjeeling_clkmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
topname: darjeeling
249249
uniquified_modules:
250250
{
251+
gpio: gpio
251252
racl_ctrl: racl_ctrl
252253
ac_range_check: ac_range_check
253254
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/gpio/data/top_darjeeling_gpio.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
topname: darjeeling
1111
uniquified_modules:
1212
{
13+
gpio: gpio
1314
racl_ctrl: racl_ctrl
1415
ac_range_check: ac_range_check
1516
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/otp_ctrl/data/top_darjeeling_otp_ctrl.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -2007,6 +2007,7 @@
20072007
topname: darjeeling
20082008
uniquified_modules:
20092009
{
2010+
gpio: gpio
20102011
racl_ctrl: racl_ctrl
20112012
ac_range_check: ac_range_check
20122013
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/pinmux/data/top_darjeeling_pinmux.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
topname: darjeeling
2121
uniquified_modules:
2222
{
23+
gpio: gpio
2324
racl_ctrl: racl_ctrl
2425
ac_range_check: ac_range_check
2526
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/pwrmgr/data/top_darjeeling_pwrmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
topname: darjeeling
7676
uniquified_modules:
7777
{
78+
gpio: gpio
7879
racl_ctrl: racl_ctrl
7980
ac_range_check: ac_range_check
8081
alert_handler: alert_handler

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

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
topname: darjeeling
6666
uniquified_modules:
6767
{
68+
gpio: gpio
6869
racl_ctrl: racl_ctrl
6970
ac_range_check: ac_range_check
7071
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/rstmgr/data/top_darjeeling_rstmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@
549549
topname: darjeeling
550550
uniquified_modules:
551551
{
552+
gpio: gpio
552553
racl_ctrl: racl_ctrl
553554
ac_range_check: ac_range_check
554555
alert_handler: alert_handler

hw/top_darjeeling/ip_autogen/rv_plic/data/top_darjeeling_rv_plic.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
topname: darjeeling
1313
uniquified_modules:
1414
{
15+
gpio: gpio
1516
racl_ctrl: racl_ctrl
1617
ac_range_check: ac_range_check
1718
alert_handler: alert_handler

hw/top_earlgrey/ip_autogen/alert_handler/data/top_earlgrey_alert_handler.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@
151151
topname: earlgrey
152152
uniquified_modules:
153153
{
154+
gpio: gpio
154155
alert_handler: alert_handler
155156
rv_plic: rv_plic
156157
}

hw/top_earlgrey/ip_autogen/clkmgr/data/top_earlgrey_clkmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@
263263
topname: earlgrey
264264
uniquified_modules:
265265
{
266+
gpio: gpio
266267
alert_handler: alert_handler
267268
rv_plic: rv_plic
268269
}

hw/top_earlgrey/ip_autogen/flash_ctrl/data/top_earlgrey_flash_ctrl.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
topname: earlgrey
2828
uniquified_modules:
2929
{
30+
gpio: gpio
3031
alert_handler: alert_handler
3132
rv_plic: rv_plic
3233
}

hw/top_earlgrey/ip_autogen/gpio/data/top_earlgrey_gpio.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
topname: earlgrey
1111
uniquified_modules:
1212
{
13+
gpio: gpio
1314
alert_handler: alert_handler
1415
rv_plic: rv_plic
1516
}

hw/top_earlgrey/ip_autogen/otp_ctrl/data/top_earlgrey_otp_ctrl.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,7 @@
19881988
topname: earlgrey
19891989
uniquified_modules:
19901990
{
1991+
gpio: gpio
19911992
alert_handler: alert_handler
19921993
rv_plic: rv_plic
19931994
}

hw/top_earlgrey/ip_autogen/pinmux/data/top_earlgrey_pinmux.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
topname: earlgrey
2121
uniquified_modules:
2222
{
23+
gpio: gpio
2324
alert_handler: alert_handler
2425
rv_plic: rv_plic
2526
}

hw/top_earlgrey/ip_autogen/pwrmgr/data/top_earlgrey_pwrmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
topname: earlgrey
8686
uniquified_modules:
8787
{
88+
gpio: gpio
8889
alert_handler: alert_handler
8990
rv_plic: rv_plic
9091
}

hw/top_earlgrey/ip_autogen/rstmgr/data/top_earlgrey_rstmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@
696696
topname: earlgrey
697697
uniquified_modules:
698698
{
699+
gpio: gpio
699700
alert_handler: alert_handler
700701
rv_plic: rv_plic
701702
}

hw/top_earlgrey/ip_autogen/rv_plic/data/top_earlgrey_rv_plic.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
topname: earlgrey
1313
uniquified_modules:
1414
{
15+
gpio: gpio
1516
alert_handler: alert_handler
1617
rv_plic: rv_plic
1718
}

hw/top_englishbreakfast/ip_autogen/clkmgr/data/top_englishbreakfast_clkmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
topname: englishbreakfast
241241
uniquified_modules:
242242
{
243+
gpio: gpio
243244
rv_plic: rv_plic
244245
}
245246
}

hw/top_englishbreakfast/ip_autogen/flash_ctrl/data/top_englishbreakfast_flash_ctrl.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
topname: englishbreakfast
2828
uniquified_modules:
2929
{
30+
gpio: gpio
3031
rv_plic: rv_plic
3132
}
3233
}

hw/top_englishbreakfast/ip_autogen/gpio/data/top_englishbreakfast_gpio.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
topname: englishbreakfast
1111
uniquified_modules:
1212
{
13+
gpio: gpio
1314
rv_plic: rv_plic
1415
}
1516
}

hw/top_englishbreakfast/ip_autogen/pinmux/data/top_englishbreakfast_pinmux.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
topname: englishbreakfast
2121
uniquified_modules:
2222
{
23+
gpio: gpio
2324
rv_plic: rv_plic
2425
}
2526
}

hw/top_englishbreakfast/ip_autogen/pwrmgr/data/top_englishbreakfast_pwrmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
topname: englishbreakfast
6565
uniquified_modules:
6666
{
67+
gpio: gpio
6768
rv_plic: rv_plic
6869
}
6970
}

hw/top_englishbreakfast/ip_autogen/rstmgr/data/top_englishbreakfast_rstmgr.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@
456456
topname: englishbreakfast
457457
uniquified_modules:
458458
{
459+
gpio: gpio
459460
rv_plic: rv_plic
460461
}
461462
}

hw/top_englishbreakfast/ip_autogen/rv_plic/data/top_englishbreakfast_rv_plic.ipconfig.hjson

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
topname: englishbreakfast
1313
uniquified_modules:
1414
{
15+
gpio: gpio
1516
rv_plic: rv_plic
1617
}
1718
}

util/topgen.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -784,13 +784,14 @@ def generate_racl(top: ConfigT, module: ConfigT, out_path: Path) -> None:
784784

785785
def _get_gpio_params(top: ConfigT) -> ParamsT:
786786
"""Extracts parameters for GPIO ipgen."""
787+
module = lib.find_module(top["module"], "gpio")
788+
uniquified_modules.add_module(module["template_type"], module["type"])
787789

788-
gpio = lib.find_module(top["module"], "gpio")
789790
params = {
790791
# TODO(#26553): Remove the following code once topgen automatically
791792
# incorporates template parameters.
792-
"num_inp_period_counters": gpio.get("ipgen_param", {}).get("num_inp_period_counters", 0),
793-
"module_instance_name": gpio["type"]
793+
"num_inp_period_counters": module.get("ipgen_param", {}).get("num_inp_period_counters", 0),
794+
"module_instance_name": module["type"]
794795
}
795796
return params
796797

0 commit comments

Comments
 (0)