Skip to content

Commit f22c78e

Browse files
timboettigerclaude
andcommitted
savestate incr.2: fix memory-path timing (SDC multicycle)
The savestate DMA's psram input muxes worsened the (pre-existing) 85.9 MHz mem-clock slack from ~-4.0 to -5.5 ns; the failing paths are cram-dominated. Root cause: the SDRAM multicycle constraint used `ic|nes|sdram` but the wrapper is `snes` (stale NES-template name) -> it was silently ignored, so the whole memory subsystem was analyzed single-cycle. Fix the name and add the same multicycle for the PSRAM (wram/aram). These crossings are functionally multicycle (SNES holds the request across the 4:1 clk_sys:clk_mem ratio). Verify: the CI fit log should drop the "Ignored filter ... ic|nes|sdram" warning and the worst-case slack should recover. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8269c9f commit f22c78e

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

‎target/pocket/core_constraints.sdc‎

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,25 @@ set_clock_groups -asynchronous \
1717

1818
derive_clock_uncertainty
1919

20-
set_multicycle_path -from {ic|nes|sdram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -setup 2
21-
set_multicycle_path -from {ic|nes|sdram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -hold 1
20+
# SNES <-> SDRAM is accessed across the 4:1 clk_sys:clk_mem ratio with the request
21+
# held stable, so the crossing is multicycle. NOTE: the SNES wrapper is `snes`
22+
# (MAIN_SNES); the previous `ic|nes|sdram` was a stale NES-template name that
23+
# silently matched nothing (Quartus "Ignored filter" warning), leaving SDRAM
24+
# analyzed single-cycle. Fixed to `snes`.
25+
set_multicycle_path -from {ic|snes|sdram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -setup 2
26+
set_multicycle_path -from {ic|snes|sdram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -hold 1
2227

23-
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|nes|sdram|*} -setup 2
24-
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|nes|sdram|*} -hold 1
28+
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|snes|sdram|*} -setup 2
29+
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|snes|sdram|*} -hold 1
30+
31+
# PSRAM (WRAM = cram0, ARAM = cram1) is accessed the same way (clk_sys -> clk_mem,
32+
# request held stable). The savestate DMA adds an input mux on these clk_mem paths;
33+
# without multicycle they are analyzed single-cycle and dominate the negative slack.
34+
set_multicycle_path -from {ic|snes|wram|* ic|snes|aram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -setup 2
35+
set_multicycle_path -from {ic|snes|wram|* ic|snes|aram|*} -to [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -start -hold 1
36+
37+
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|snes|wram|* ic|snes|aram|*} -setup 2
38+
set_multicycle_path -from [get_clocks {ic|mp1|mf_pllbase_inst|altera_pll_i|*[1].*|divclk}] -to {ic|snes|wram|* ic|snes|aram|*} -hold 1
2539

2640
set_false_path -from {ic|nes|mapper_flags*}
2741
#set_false_path -from {ic|nes|downloading*}

0 commit comments

Comments
 (0)