Skip to content
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
15 changes: 10 additions & 5 deletions hammer/common/cadence/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,21 @@ def generate_mmmc_script(self) -> str:
def append_mmmc(cmd: str) -> None:
self.verbose_tcl_append(cmd, mmmc_output)

# Add the post-synthesis SDC, if present.
post_synth_sdc = self.post_synth_sdc

sdc_files = self.generate_sdc_files()

# If a post-synthesis SDC is present it already contains clock definitions,
# so drop the Hammer-generated clock fragment to avoid duplicate create_clock.
if post_synth_sdc is not None:
clock_fragment = os.path.join(self.run_dir, "clock_constraints_fragment.sdc")
sdc_files = [f for f in sdc_files if f != clock_fragment]
sdc_files.insert(0, post_synth_sdc)

# Append any custom SDC files.
sdc_files.extend(self.get_setting("vlsi.inputs.custom_sdc_files"))

# Add the post-synthesis SDC, if present.
post_synth_sdc = self.post_synth_sdc
if post_synth_sdc is not None:
sdc_files.append(post_synth_sdc)

# TODO: add floorplanning SDC
if len(sdc_files) > 0:
sdc_files_arg = "-sdc_files [list {sdc_files}]".format(
Expand Down
Loading