From 5e567752df528ce1e8aa609c8c72d67948f92cfe Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sun, 4 Oct 2026 21:37:55 +0700 Subject: [PATCH 1/2] ci(fpga): search 32 seeds for gf10-sub, not 8 ax7203-gf10-sub went red when regymm/openxc7:latest moved to sha256:35c91073. Every seed from 1 to 10 fails nextpnr's post-placement validity check, and the search stopped at 8. Measured on that image, seeds 1-40, default flags: 11 are clean (11 12 20 21 30 31 32 35 37 39 40). The old image placed 2 of seeds 1-8. So the design is a seed lottery at roughly 1 in 4 on both images, and the image change only moved which seeds win. Most failing seeds stop within ~10 s, so 32 seeds cost little and the search still stops at the first clean one. Refs #856 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ax7203-gf10-sub.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ax7203-gf10-sub.yml b/.github/workflows/ax7203-gf10-sub.yml index 8cb8dfd2f9..c66c38e52b 100644 --- a/.github/workflows/ax7203-gf10-sub.yml +++ b/.github/workflows/ax7203-gf10-sub.yml @@ -37,7 +37,9 @@ jobs: docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 bash -c "cd /nextpnr-xilinx && python3 xilinx/python/bbaexport.py --device xc7a200tfbg484-2 --bba /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bba /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search) run: | - CLEAN=0; for s in 1 2 3 4 5 6 7 8; do + # Measured (#856): 11 of seeds 1-40 place this design, and seeds 1-10 all fail on + # regymm/openxc7 sha256:35c91073. Most failing seeds stop within ~10 s, so a wide search is cheap. + CLEAN=0; for s in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do rm -f build/gf10_sub/gf10_sub_ax7203.fasm docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ --chipdb /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bin \ From a78f2b5e206348721eacee06495c17aefe5b3679 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Sun, 4 Oct 2026 22:04:33 +0700 Subject: [PATCH 2/2] ci(fpga): place gf10-sub with HeAP instead of searching SA seeds The previous commit widened the seed search to 32 because only 11 of seeds 1-40 placed this design under --placer sa. The failures carry the signature openXC7/nextpnr-xilinx#162 documents as an SA-placer bug on xc7: SA leaves an invalid tile, and the post-placement validity check reports its first Bel ("SLICE_.../A5FF (no cell)"). Measured with --placer heap (run 37210944365), every seed placed: regymm/openxc7 sha256:35c91073 (current latest) seeds 1-16 16/16 4-7 s each regymm/openxc7 sha256:eced1cdd (July) seeds 1-8 8/8 4-7 s each Clean SA runs took 36-113 s per seed. Fmax under HeAP was 64.9-71.6 MHz against the 50 MHz constraint. This workflow checks conformance and does not record Fmax, so the placer is not part of a measurement here. The seed list goes back to the eight it had on main. Refs #856 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ax7203-gf10-sub.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ax7203-gf10-sub.yml b/.github/workflows/ax7203-gf10-sub.yml index c66c38e52b..506ad00630 100644 --- a/.github/workflows/ax7203-gf10-sub.yml +++ b/.github/workflows/ax7203-gf10-sub.yml @@ -37,9 +37,10 @@ jobs: docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 bash -c "cd /nextpnr-xilinx && python3 xilinx/python/bbaexport.py --device xc7a200tfbg484-2 --bba /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bba /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search) run: | - # Measured (#856): 11 of seeds 1-40 place this design, and seeds 1-10 all fail on - # regymm/openxc7 sha256:35c91073. Most failing seeds stop within ~10 s, so a wide search is cheap. - CLEAN=0; for s in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do + # --placer heap, not sa (#856). SA leaves invalid tiles on this design ("post-placement validity + # check failed for Bel 'SLICE_.../A5FF'", openXC7/nextpnr-xilinx#162) and placed 11 of seeds 1-40. + # HeAP placed 24 of 24 (seeds 1-16 on regymm/openxc7 sha256:35c91073, 1-8 on eced1cdd), 4-7 s each. + CLEAN=0; for s in 1 2 3 4 5 6 7 8; do rm -f build/gf10_sub/gf10_sub_ax7203.fasm docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ --chipdb /work/build/gf10_sub/chipdb/xc7a200tfbg484-2.bin \ @@ -47,7 +48,7 @@ jobs: --json /work/build/gf10_sub/gf10_sub_ax7203.json \ --write /work/build/gf10_sub/gf10_sub_ax7203_routed.json \ --fasm /work/build/gf10_sub/gf10_sub_ax7203.fasm \ - --freq 50.0 --seed $s --placer sa --router router1 --timing-allow-fail > /tmp/np_$s.log 2>&1 || true + --freq 50.0 --seed $s --placer heap --router router1 --timing-allow-fail > /tmp/np_$s.log 2>&1 || true if grep -q "Failed to find a route" /tmp/np_$s.log || [ ! -f build/gf10_sub/gf10_sub_ax7203.fasm ]; then continue; fi cp /tmp/np_$s.log /tmp/np.log; CLEAN=$s; break done; [ "$CLEAN" = "0" ] && { echo "::error::no clean seed"; exit 1; }; echo "seed=$CLEAN"