Skip to content

Commit

Permalink
/synthesis/genus make run_genus a distinct step
Browse files Browse the repository at this point in the history
This is useful/necessary for hooks which
inject behaviors AFTER the syn.tcl file has been generated.
  • Loading branch information
daniellovell committed Oct 17, 2024
1 parent c501945 commit d326d69
Showing 1 changed file with 7 additions and 7 deletions.
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

0 comments on commit d326d69

Please sign in to comment.