You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f0a31fd
Browse filesBrowse the repository at this point in the historyBrowse files
asap7/mock-cpu: fix fabricated hold budget at async-FIFO macro boundary
Fixes#3850: floorplan__timing__hold__ws reported 1e+42 and
repair_timing reported "No paths found" for mock-cpu.
mock-cpu is a clock-domain-crossing bridge macro: a 1024-stage
pipeline in clk (333 ps) bracketed by two async FIFOs (fifo_in,
fifo_out) that talk to clk_uncore (1000 ps). PR #4170 fixed the
same anti-pattern in sibling single-clock designs by sourcing the
asap7 platform template (set_max_delay -ignore_clock_latency as
optimization targets, no set_input/output_delay). That PR called
out multi-clock designs as needing the idiom written by hand.
The bug in the old SDC: the three set_max_delay 80 calls omitted
-ignore_clock_latency, so the tool treated the fabricated 80 ps
budget as a real hold requirement against the deep clock tree's
insertion delay, producing the 1e+42 sentinel and phantom hold
violations.
The fix:
- fifo1.v: (* keep_hierarchy *) attribute on the module so Yosys
preserves the instance boundary through flattening.
SYNTH_KEEP_MODULES doesn't work here because hierarchy
elaboration specializes fifo1 into $paramod$<hash>\fifo1 before
the flow's keep loop runs.
- mock-cpu/config.mk: OPENROAD_HIERARCHICAL = 1 so link_design
uses -hier and the fifo_in/fifo_out instances remain addressable
by path in OpenSTA.
- mock-cpu/constraint.sdc: rewrite to the PR #4170 idiom:
- set_max_delay -ignore_clock_latency 80 for IO optimization
targets (the core fix — no more fabricated hold budget).
- Surgical port -> fifo_in/<pin> for the input direction (tests
hierarchy preservation through synth and hierarchical
get_pins selection).
- -from [all_registers] for the output direction: instance
output pins are not valid STA start points (STA-1554), so
pick them up via the platform template's idiom.
- set_false_path -to [get_ports rdata*] broadened from the old
clk-only false_path. rdata has no launch FF in the consumer
domain; both wclk (fifomem) and rclk (rbin -> raddr -> mem
mux) paths to rdata are valid-when-not-empty by FIFO
protocol, not single-cycle timing.
- Keep the existing CDC handling (set_clock_groups
-asynchronous -allow_paths, set_max_delay between clocks with
-ignore_clock_latency, set_false_path -hold between clocks)
— this is the right shape for gray-coded 2-FF synchronizer
FIFOs and the actual bug was elsewhere.
- Fix a typo: clk2 waveform was using $clk_period/2 instead of
$clk2_period/2.
- mock-cpu/rules-base.json: regenerated via update_rules_force.
Before / after (finish stage):
floorplan hold WS: 1e+42 ps -> 18.16 ps
finish setup WS: -84.6 ps -> +16.58 ps
finish setup TNS: -2050 ps -> 0 ps
finish hold WS: -16.6 ps -> -0.74 ps (1 noise violation)
finish hold TNS: -66.6 ps -> -0.74 ps
cts hold buffers: 530 ceiling -> 124
STA-1554 warnings: (many) -> 0
All 25 per-design rules pass against the new baseline.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
0 commit comments