From 4fd1fae5e7d4a6fee4fd6428885f79a9caef56aa Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 5 Oct 2026 00:00:18 +0700 Subject: [PATCH] ci(fpga): place gf6/gf8/gf16-mul-clean and gf24-sub with HeAP, not SA SA hits openXC7/nextpnr-xilinx#162 (post-placement validity check failed for Bel 'SLICE_.../A5FF') on all four designs and placed 3-4 of seeds 1-16. HeAP placed 16 of 16 on each, at 5-10 s per seed and higher Fmax. Measured in run 37215621928 with the same sources, xdc and Yosys flags. The seed-search step goes from 98/80/194/215 s under SA (first clean seed 6/4/8/6) to the first seed under HeAP. The three MUL step names already said 'placer heap' while passing --placer sa; now they are true. Refs #862 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ax7203-gf16-mul-clean.yml | 7 ++++++- .github/workflows/ax7203-gf24-sub.yml | 7 ++++++- .github/workflows/ax7203-gf6-mul-clean.yml | 7 ++++++- .github/workflows/ax7203-gf8-mul-clean.yml | 7 ++++++- 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ax7203-gf16-mul-clean.yml b/.github/workflows/ax7203-gf16-mul-clean.yml index 57f7733f30..a7624a8ba3 100644 --- a/.github/workflows/ax7203-gf16-mul-clean.yml +++ b/.github/workflows/ax7203-gf16-mul-clean.yml @@ -37,6 +37,11 @@ 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/gf16_mul/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf16_mul/chipdb/xc7a200tfbg484-2.bba /work/build/gf16_mul/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search — placer heap + per-seed timeout, lessons from gf20) run: | + # --placer heap, not sa (#862). The step name already said heap; the flag did not. SA leaves invalid + # tiles on this design ("post-placement validity check failed for Bel 'SLICE_.../A5FF'", + # openXC7/nextpnr-xilinx#162) and placed 4 of seeds 1-16 (6, 11, 12, 15; 35-62 s each, Fmax 27.9-37.2 MHz), + # so this loop took 98 s to reach seed 6. HeAP placed 16 of 16, 8-10 s each, Fmax 60.6-66.5 MHz + # (regymm/openxc7 sha256:35c91073, run 37215621928). CLEAN=0; for s in 1 2 3 4 5 6 7 8; do rm -f build/gf16_mul/gf16_mul_ax7203.fasm timeout 20m docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ @@ -45,7 +50,7 @@ jobs: --json /work/build/gf16_mul/gf16_mul_ax7203.json \ --write /work/build/gf16_mul/gf16_mul_ax7203_routed.json \ --fasm /work/build/gf16_mul/gf16_mul_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/gf16_mul/gf16_mul_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" diff --git a/.github/workflows/ax7203-gf24-sub.yml b/.github/workflows/ax7203-gf24-sub.yml index dbf617cfe2..0a75a1f9a5 100644 --- a/.github/workflows/ax7203-gf24-sub.yml +++ b/.github/workflows/ax7203-gf24-sub.yml @@ -37,6 +37,11 @@ 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/gf24_sub/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf24_sub/chipdb/xc7a200tfbg484-2.bba /work/build/gf24_sub/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search) run: | + # --placer heap, not sa (#862). SA leaves invalid tiles on this design ("post-placement validity + # check failed for Bel 'SLICE_.../A5FF'", openXC7/nextpnr-xilinx#162) and placed 3 of seeds 1-16 + # (6, 8, 13; 56-68 s each, Fmax 15.6-16.2 MHz), so this loop took 215 s to reach seed 6. HeAP placed + # 16 of 16, 6-9 s each, Fmax 26.3-28.1 MHz; both are under the 50 MHz target, which --timing-allow-fail + # already accepts (regymm/openxc7 sha256:35c91073, run 37215621928). CLEAN=0; for s in 1 2 3 4 5 6 7 8; do rm -f build/gf24_sub/gf24_sub_ax7203.fasm docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ @@ -45,7 +50,7 @@ jobs: --json /work/build/gf24_sub/gf24_sub_ax7203.json \ --write /work/build/gf24_sub/gf24_sub_ax7203_routed.json \ --fasm /work/build/gf24_sub/gf24_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/gf24_sub/gf24_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" diff --git a/.github/workflows/ax7203-gf6-mul-clean.yml b/.github/workflows/ax7203-gf6-mul-clean.yml index 9c8445b9ad..601558e926 100644 --- a/.github/workflows/ax7203-gf6-mul-clean.yml +++ b/.github/workflows/ax7203-gf6-mul-clean.yml @@ -37,6 +37,11 @@ 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/gf6_mul/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf6_mul/chipdb/xc7a200tfbg484-2.bba /work/build/gf6_mul/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search — placer heap + per-seed timeout, lessons from gf20) run: | + # --placer heap, not sa (#862). The step name already said heap; the flag did not. SA leaves invalid + # tiles on this design ("post-placement validity check failed for Bel 'SLICE_.../A5FF'", + # openXC7/nextpnr-xilinx#162) and placed 4 of seeds 1-16 (8, 10, 11, 15; 43-108 s each, Fmax 42.4-59.1 MHz), + # so this loop took 194 s to reach seed 8, the last one it tries. HeAP placed 16 of 16, 5-6 s each, + # Fmax 146.6-159.2 MHz (regymm/openxc7 sha256:35c91073, run 37215621928). CLEAN=0; for s in 1 2 3 4 5 6 7 8; do rm -f build/gf6_mul/gf6_mul_ax7203.fasm timeout 20m docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ @@ -45,7 +50,7 @@ jobs: --json /work/build/gf6_mul/gf6_mul_ax7203.json \ --write /work/build/gf6_mul/gf6_mul_ax7203_routed.json \ --fasm /work/build/gf6_mul/gf6_mul_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/gf6_mul/gf6_mul_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" diff --git a/.github/workflows/ax7203-gf8-mul-clean.yml b/.github/workflows/ax7203-gf8-mul-clean.yml index 50c37fec90..82b3743ec2 100644 --- a/.github/workflows/ax7203-gf8-mul-clean.yml +++ b/.github/workflows/ax7203-gf8-mul-clean.yml @@ -37,6 +37,11 @@ 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/gf8_mul/chipdb/xc7a200tfbg484-2.bba && bbasm -l /work/build/gf8_mul/chipdb/xc7a200tfbg484-2.bba /work/build/gf8_mul/chipdb/xc7a200tfbg484-2.bin" - name: nextpnr (seed search — placer heap + per-seed timeout, lessons from gf20) run: | + # --placer heap, not sa (#862). The step name already said heap; the flag did not. SA leaves invalid + # tiles on this design ("post-placement validity check failed for Bel 'SLICE_.../A5FF'", + # openXC7/nextpnr-xilinx#162) and placed 4 of seeds 1-16 (4, 10, 11, 12; 32-38 s each, Fmax 42.3-51.4 MHz), + # so this loop took 80 s to reach seed 4. HeAP placed 16 of 16, 5-7 s each, Fmax 102.2-116.0 MHz + # (regymm/openxc7 sha256:35c91073, run 37215621928). CLEAN=0; for s in 1 2 3 4 5 6 7 8; do rm -f build/gf8_mul/gf8_mul_ax7203.fasm timeout 20m docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 timeout --signal=KILL 1800 nextpnr-xilinx \ @@ -45,7 +50,7 @@ jobs: --json /work/build/gf8_mul/gf8_mul_ax7203.json \ --write /work/build/gf8_mul/gf8_mul_ax7203_routed.json \ --fasm /work/build/gf8_mul/gf8_mul_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/gf8_mul/gf8_mul_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"