[topgen] Support custom external name format
Current Inter-module signal has fixed naming rule for every inter-module
signals. It creates weird naming format for external ports. External
ports doesn't have `_o`, `_i` suffixes and also it always has the
instance name in front of the signal name such as `clkmgr_clk_main`.
This commit is to support custom top signal name for external type
(other type will be addressed in following PRs). To support it,
top_earlgrey.hjson format is slightly revised. Please see the
`inter_module`.`external` data field.
This is related to Issue #3095
Signed-off-by: Eunchan Kim <eunchan@opentitan.org>
diff --git a/hw/top_earlgrey/data/top_earlgrey.hjson b/hw/top_earlgrey/data/top_earlgrey.hjson
index d7a6277..d6949c7 100644
--- a/hw/top_earlgrey/data/top_earlgrey.hjson
+++ b/hw/top_earlgrey/data/top_earlgrey.hjson
@@ -372,7 +372,12 @@
],
// ext is to create port in the top.
- 'external': ['clkmgr.clk_main', 'clkmgr.clk_io', 'clkmgr.clk_usb', 'clkmgr.clk_aon'],
+ 'external': {
+ 'clkmgr.clk_main': 'clk_main',
+ 'clkmgr.clk_io': 'clk_io',
+ 'clkmgr.clk_usb': 'clk_usb',
+ 'clkmgr.clk_aon': 'clk_aon'
+ },
},
debug_mem_base_addr: "0x1A110000",