Skip to content

Commit

Permalink
allow for arbitray fname overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
elamdf committed Jan 27, 2025
1 parent 51de15a commit bf04604
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hammer/tech/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ def override_tech_libraries(self) -> None:
if self.get_setting("vlsi.technology.manually_override_pdk_collateral"):
for lib in self.get_setting("vlsi.technology.override_libraries"):
for key, path in lib['library'].items():
fname = os.path.basename(path)
if isinstance(path, list): # path fname and fname to replace are different
fname = path[1]
path = path[0]
else:
fname = os.path.basename(path)
if (key, fname) in manual_overrides:
self.logger.error("Attempted to add {(key,path)} to overrides when {manual_overrides[(key, fname)]} already exists!")
manual_overrides[(key, fname)] = path
Expand Down
1 change: 1 addition & 0 deletions hammer/technology/sky130/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ technology.sky130:
# WARNING: BREAK GLASS flag to override tech collateral with the paths provided in `override_libraries`
vlsi.technology.manually_override_pdk_collateral: false
vlsi.technology.override_libraries: [] # hacked collateral files to be used instead of default tech files with the same name
# either it's key:path or key:[path,name_to_override] if the path fname is diff than the fname to override

mentor.extra_env_vars_meta: lazydeepsubst # Mentor environment variables
# Override this in project
Expand Down

0 comments on commit bf04604

Please sign in to comment.