Skip to content

Commit

Permalink
[ipgen] Do not render module_instance_name in into BUILD files
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Schilling <[email protected]>
  • Loading branch information
Razer6 committed Jan 8, 2025
1 parent ea3823a commit b941cf3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions util/ipgen/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ def _filename_without_tpl_suffix(self, filepath: Path) -> str:
""" Get the name of the file without a '.tpl' suffix. """
assert filepath.suffix == '.tpl'
filename = filepath.stem
# Do not render the module_instance_name into bazel BUILD file templates
# Leave the filename as it is without the *.tpl suffix
if filename == "BUILD":
return filename
if "module_instance_name" in self.ip_config.param_values:
filename = self.ip_config.param_values[
"module_instance_name"] + filename[len(self.ip_template.name):]
Expand Down

0 comments on commit b941cf3

Please sign in to comment.