Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinct run_genus synthesis step, ICV LVS blackbox support, and Virtuoso netlist export support #879

Merged
merged 3 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hammer/lvs/icv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ def generate_lvs_args_file(self) -> bool:
config_rs = self.get_setting("lvs.icv.config_runset") # type: Optional[str]
if config_rs is not None:
f.write(" -runset_config " + config_rs)

# Equivalence files
equiv_files = self.get_setting("lvs.icv.equiv_files") # type: Optional[str]
if equiv_files is not None:
f.write(" -e " + equiv_files)
return True

@property
Expand Down
14 changes: 7 additions & 7 deletions hammer/synthesis/genus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ def steps(self) -> List[HammerToolStep]:
self.add_tieoffs,
self.write_regs,
self.generate_reports,
self.write_outputs
self.write_outputs,
self.run_genus
]
if self.get_setting("synthesis.inputs.retime_modules"):
steps_methods.insert(1, self.retime_modules)
Expand All @@ -112,8 +113,7 @@ def do_between_steps(self, prev: HammerToolStep, next: HammerToolStep) -> bool:

def do_post_steps(self) -> bool:
assert super().do_post_steps()
return self.run_genus()

return True
@property
def mapped_v_path(self) -> str:
return os.path.join(self.run_dir, "{}.mapped.v".format(self.top_module))
Expand Down Expand Up @@ -477,7 +477,7 @@ def write_outputs(self) -> bool:
self.ran_write_outputs = True

return True

def run_genus(self) -> bool:
verbose_append = self.verbose_append

Expand All @@ -486,13 +486,13 @@ def run_genus(self) -> bool:
verbose_append("quit")

# Create synthesis script.
syn_tcl_filename = os.path.join(self.run_dir, "syn.tcl")
self.write_contents_to_path("\n".join(self.output), syn_tcl_filename)
self.syn_tcl_filename = os.path.join(self.run_dir, "syn.tcl")
self.write_contents_to_path("\n".join(self.output), self.syn_tcl_filename)

# Build args.
args = [
self.get_setting("synthesis.genus.genus_bin"),
"-f", syn_tcl_filename,
"-f", self.syn_tcl_filename,
"-no_gui"
]

Expand Down
2 changes: 1 addition & 1 deletion hammer/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ def get_filetype(filename: str) -> HammerFiletype:
if len(split) == 1:
return HammerFiletype.NONE
extension = split[-1]
if extension in ["sp", "spi", "nl", "cir", "spice", "cdl"]:
if extension in ["sp", "spi", "nl", "cir", "spice", "cdl", "net"]:
return HammerFiletype.SPICE
elif extension in ["v", "sv", "vh"]:
return HammerFiletype.VERILOG
Expand Down
Loading