Skip to content

Commit 42e8a77

Browse files
committed
Fix SDF extraction to prefer post-PnR over pre-PnR timing
The previous fallback logic used `find | sort -r | head -1` which grabbed a pre-PnR SDF (step 08) alphabetically instead of the post-PnR SDF from STAPostPNR (step 51) that includes interconnect delays. Now explicitly searches for stapostpnr nom_tt SDF first. Co-developed-by: Claude Code v2.1.44 (claude-opus-4-6)
1 parent 3c49dee commit 42e8a77

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/mcu-soc-rebuild.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,22 @@ jobs:
133133
cp "$LAST_NL" tests/mcu_soc/data/6_final_raw.v
134134
fi
135135
136-
# SDF timing (nom corner)
136+
# SDF timing — prefer post-PnR (stapostpnr) over pre-PnR (staprepnr)
137+
# Use nom_tt (typical) corner for simulation
137138
if ls "$RUN_DIR"/final/sdf/*.sdf 1>/dev/null 2>&1; then
138139
cp "$RUN_DIR"/final/sdf/*.sdf tests/mcu_soc/data/6_final.sdf
139140
else
140-
LAST_SDF=$(find "$RUN_DIR" -name '*.sdf' 2>/dev/null | sort -r | head -1)
141-
[ -n "$LAST_SDF" ] && cp "$LAST_SDF" tests/mcu_soc/data/6_final.sdf || true
141+
POSTPNR_SDF=$(find "$RUN_DIR" -path '*stapostpnr*' -name '*nom_tt*.sdf' 2>/dev/null | head -1)
142+
PREPNR_SDF=$(find "$RUN_DIR" -path '*staprepnr*' -name '*nom_tt*.sdf' 2>/dev/null | head -1)
143+
if [ -n "$POSTPNR_SDF" ]; then
144+
echo "Using post-PnR SDF: $POSTPNR_SDF"
145+
cp "$POSTPNR_SDF" tests/mcu_soc/data/6_final.sdf
146+
elif [ -n "$PREPNR_SDF" ]; then
147+
echo "::warning::Post-PnR SDF not found, using pre-PnR SDF: $PREPNR_SDF"
148+
cp "$PREPNR_SDF" tests/mcu_soc/data/6_final.sdf
149+
else
150+
echo "::warning::No SDF files found"
151+
fi
142152
fi
143153
144154
# SDC constraints

0 commit comments

Comments
 (0)