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

Retiming #89

Merged
merged 3 commits into from
Feb 28, 2023
Merged
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
22 changes: 20 additions & 2 deletions hammer/synthesis/genus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,18 @@ def get_tool_hooks(self) -> List[HammerToolHookAction]:

@property
def steps(self) -> List[HammerToolStep]:
return self.make_steps_from_methods([
steps_methods = [
self.init_environment,
self.syn_generic,
self.syn_map,
self.add_tieoffs,
self.write_regs,
self.generate_reports,
self.write_outputs
])
]
if self.get_setting("synthesis.inputs.retime_modules"):
steps_methods.insert(1, self.retime_modules)
return self.make_steps_from_methods(steps_methods)

def do_pre_steps(self, first_step: HammerToolStep) -> bool:
assert super().do_pre_steps(first_step)
Expand Down Expand Up @@ -264,6 +267,21 @@ def init_environment(self) -> bool:

return True

def retime_modules(self) -> bool:
retime_mods = self.get_setting("synthesis.inputs.retime_modules")

if retime_mods:
rt_tcl = (
f"set rt_mods [get_designs \"{' '.join(retime_mods)}\"]\n" \
"foreach rt_mod $rt_mods {\n" \
" set_db $rt_mod .retime true\n" \
"}\n" \
"set_db / .retime_verification_flow true"
)
self.append(rt_tcl)

return True

def syn_generic(self) -> bool:
self.verbose_append("syn_generic")
return True
Expand Down