Skip to content

Commit d5eebc5

Browse files
Razer6a-will
authored andcommitted
[ipgen] Return empty dict when uniquified_modules not defined
When rendering an out-of-tree IP with ipgen, the uniquified_modules might not be defined in the IP description. Return an empty dict when this is not defined to not error out. Signed-off-by: Robert Schilling <[email protected]>
1 parent f995b56 commit d5eebc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

util/ipgen/renderer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def get_uniquified_name(self, name: str) -> str:
103103
return self.ip_config.param_values["uniquified_modules"].get(name)
104104

105105
def _replace_uniquified_prefix(self, core_name: str) -> str:
106-
uniquified_modules = self.ip_config.param_values["uniquified_modules"]
106+
uniquified_modules = self.ip_config.param_values.get("uniquified_modules", {})
107107
for name, uniq_name in uniquified_modules.items():
108108
if core_name.startswith(f'{name}_'):
109109
return f'{uniq_name}_{core_name[len(name)+1:]}'

0 commit comments

Comments
 (0)