From 25b08397e1d21215612eff6e7fbe3acd893831c3 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 5 Oct 2026 07:07:08 +0700 Subject: [PATCH] fix(ci): read trinet_node_core.v in the TRI-NET baud and node-v2 workflows 5b09159cc (2026-08-02) moved the node logic into fpga/portable/trinet_node_core.v. The fleet and portability workflows were given the new file; ax7203-trinet-baud.yml and ax7203-trinet-node-v2.yml were not, and both have been red on main since 2026-08-02. Neither runs on pull_request, so no PR showed it. - node-v2 golden: iverilog "Unknown module type: trinet_node_core" (exit 3), bitstream skipped. - baud: Yosys printed the ERROR but the step stayed green (tee without pipefail, and the next grep matched the ERROR line). The job then built the chipdb and ran 16 nextpnr attempts on a missing node.json, and failed as "no clean seed across heap+sa x8". Add the core to both workflows' source lists and paths filters, and set pipefail on the six steps that pipe into tee, so a Yosys error stops at Yosys. Their six tee_pipefail_baseline entries are removed (78 -> 72). Local controls, sources from origin/main 57de4a1f5: - iverilog without the core: exit 3, CI's error; with it: vvp prints "SIM RESULT: 6/6 keyed receipts bit-exact (fails=0)", TB PASS. - yosys hierarchy -check (Xilinx cell libs): exit 1 without the core, exit 0 with it. - tools/check_tee_pipefail.py: 72 known, 0 new, exit 0; removing the Yosys step's marker makes it flag the step. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ax7203-trinet-baud.yml | 7 ++++++- .github/workflows/ax7203-trinet-node-v2.yml | 11 +++++++++-- tools/tee_pipefail_baseline.txt | 6 ------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ax7203-trinet-baud.yml b/.github/workflows/ax7203-trinet-baud.yml index d93548b09..cb41a2fa4 100644 --- a/.github/workflows/ax7203-trinet-baud.yml +++ b/.github/workflows/ax7203-trinet-baud.yml @@ -5,6 +5,7 @@ on: branches: [main] paths: - 'fpga/vivado/trinet_node_v2_ax7203.v' + - 'fpga/portable/trinet_node_core.v' - 'fpga/openxc7-synth/trinet_siphash24.v' - '.github/workflows/ax7203-trinet-baud.yml' @@ -51,9 +52,11 @@ jobs: - name: Yosys run: | + set -o pipefail + # tee-pipefail: no shell of its own; -nocarry is a yosys option, not bash -c mkdir -p build/${{ matrix.name }} docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 yosys -p " - read_verilog fpga/openxc7-synth/trinet_siphash24.v fpga/vivado/trinet_node_v2_ax7203.v; + read_verilog fpga/openxc7-synth/trinet_siphash24.v fpga/portable/trinet_node_core.v fpga/vivado/trinet_node_v2_ax7203.v; chparam -set BAUD_DIV_P ${{ matrix.div }} trinet_node_v2_ax7203; synth_xilinx -flatten -abc9 -nocarry -nodsp -arch xc7 -top trinet_node_v2_ax7203; setundef -zero -params; write_json build/${{ matrix.name }}/node.json" 2>&1 | tee /tmp/yosys.log @@ -97,6 +100,8 @@ jobs: - name: fasm2bit run: | + set -o pipefail + # tee-pipefail: the tee is in this shell; bash -c runs fasm2frames && xc7frames2bit with no pipe, and docker returns its status docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 bash -c " source /prjxray/env/bin/activate && fasm2frames --db-root /nextpnr-xilinx/xilinx/external/prjxray-db/artix7 --part xc7a200tfbg484-2 /work/build/${{ matrix.name }}/node.fasm /work/build/${{ matrix.name }}/node.frames && /prjxray/build/tools/xc7frames2bit --part_file /nextpnr-xilinx/xilinx/external/prjxray-db/artix7/xc7a200tfbg484-2/part.yaml --part_name xc7a200tfbg484-2 --frm_file /work/build/${{ matrix.name }}/node.frames --output_file /work/build/${{ matrix.name }}/trinet_${{ matrix.name }}.bit" sha256sum build/${{ matrix.name }}/trinet_${{ matrix.name }}.bit | tee build/${{ matrix.name }}/trinet_${{ matrix.name }}.bit.sha256 diff --git a/.github/workflows/ax7203-trinet-node-v2.yml b/.github/workflows/ax7203-trinet-node-v2.yml index e7cdf75fb..023595dcf 100644 --- a/.github/workflows/ax7203-trinet-node-v2.yml +++ b/.github/workflows/ax7203-trinet-node-v2.yml @@ -5,6 +5,7 @@ on: branches: [main, tri-net-ternary-internet] paths: - 'fpga/vivado/trinet_node_v2_ax7203.v' + - 'fpga/portable/trinet_node_core.v' - 'formal/trinet_node_v2_tb.v' - 'fpga/openxc7-synth/trinet_siphash24.v' - 'formal/trinet_siphash24_tb.v' @@ -23,13 +24,15 @@ jobs: run: python3 conformance/trinet_mac32_conformance_ax7203.py --self-test - name: SipHash core vs the published vectors (iverilog) run: | + set -o pipefail sudo apt-get update -qq && sudo apt-get install -y -qq iverilog iverilog -g2012 -o /tmp/sh.vvp formal/trinet_siphash24_tb.v fpga/openxc7-synth/trinet_siphash24.v vvp /tmp/sh.vvp | tee /tmp/sh.log grep -q "TB PASS" /tmp/sh.log || { echo "::error::the SipHash core does not match the published vectors"; exit 1; } - name: Node v2 keyed receipts vs the Python golden (iverilog) run: | - iverilog -g2012 -o /tmp/v2.vvp formal/trinet_node_v2_tb.v fpga/vivado/trinet_node_v2_ax7203.v fpga/openxc7-synth/trinet_siphash24.v + set -o pipefail + iverilog -g2012 -o /tmp/v2.vvp formal/trinet_node_v2_tb.v fpga/vivado/trinet_node_v2_ax7203.v fpga/portable/trinet_node_core.v fpga/openxc7-synth/trinet_siphash24.v vvp /tmp/v2.vvp | tee /tmp/v2.log grep -q "TB PASS" /tmp/v2.log || { echo "::error::keyed receipts do not match the golden"; exit 1; } @@ -48,9 +51,11 @@ jobs: docker image inspect regymm/openxc7:latest >/dev/null 2>&1 || { echo "::error::docker pull failed after 6 retries"; exit 1; } - name: Yosys run: | + set -o pipefail + # tee-pipefail: no shell of its own; -nocarry is a yosys option, not bash -c mkdir -p build/trinet_node_v2 docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 yosys -p " - read_verilog fpga/openxc7-synth/trinet_siphash24.v fpga/vivado/trinet_node_v2_ax7203.v; + read_verilog fpga/openxc7-synth/trinet_siphash24.v fpga/portable/trinet_node_core.v fpga/vivado/trinet_node_v2_ax7203.v; synth_xilinx -flatten -abc9 -nocarry -nodsp -arch xc7 -top trinet_node_v2_ax7203; setundef -zero -params; write_json build/trinet_node_v2/trinet_node_v2_ax7203.json" 2>&1 | tee /tmp/yosys.log grep -E "Estimated|ERROR" /tmp/yosys.log @@ -94,6 +99,8 @@ jobs: echo "routed with placer/seed = $CLEAN" - name: fasm2bit run: | + set -o pipefail + # tee-pipefail: the tee is in this shell; bash -c runs fasm2frames && xc7frames2bit with no pipe, and docker returns its status docker run --rm -v "$PWD:/work" -w /work regymm/openxc7 bash -c " source /prjxray/env/bin/activate && fasm2frames --db-root /nextpnr-xilinx/xilinx/external/prjxray-db/artix7 --part xc7a200tfbg484-2 /work/build/trinet_node_v2/trinet_node_v2_ax7203.fasm /work/build/trinet_node_v2/trinet_node_v2_ax7203.frames && /prjxray/build/tools/xc7frames2bit --part_file /nextpnr-xilinx/xilinx/external/prjxray-db/artix7/xc7a200tfbg484-2/part.yaml --part_name xc7a200tfbg484-2 --frm_file /work/build/trinet_node_v2/trinet_node_v2_ax7203.frames --output_file /work/build/trinet_node_v2/trinet_node_v2_ax7203.bit" sha256sum build/trinet_node_v2/trinet_node_v2_ax7203.bit | tee build/trinet_node_v2/trinet_node_v2_ax7203.bit.sha256 diff --git a/tools/tee_pipefail_baseline.txt b/tools/tee_pipefail_baseline.txt index 541d661af..e0ffc9926 100644 --- a/tools/tee_pipefail_baseline.txt +++ b/tools/tee_pipefail_baseline.txt @@ -49,8 +49,6 @@ .github/workflows/ax7203-led-onehot.yml :: bitstream :: Yosys synthesis .github/workflows/ax7203-led-onehot.yml :: bitstream :: nextpnr place and route .github/workflows/ax7203-rx-echo-hb.yml :: bitstream :: Yosys synthesis -.github/workflows/ax7203-trinet-baud.yml :: baud :: Yosys -.github/workflows/ax7203-trinet-baud.yml :: baud :: fasm2bit .github/workflows/ax7203-trinet-dna-probe.yml :: bitstream :: Yosys .github/workflows/ax7203-trinet-dna-probe.yml :: bitstream :: fasm2bit .github/workflows/ax7203-trinet-dna-probe.yml :: golden :: DNA read sequence and framing (iverilog) @@ -59,10 +57,6 @@ .github/workflows/ax7203-trinet-mac32.yml :: bitstream :: Yosys .github/workflows/ax7203-trinet-mac32.yml :: bitstream :: fasm2bit .github/workflows/ax7203-trinet-mac32.yml :: golden :: RTL simulation vs golden vectors (iverilog) -.github/workflows/ax7203-trinet-node-v2.yml :: bitstream :: Yosys -.github/workflows/ax7203-trinet-node-v2.yml :: bitstream :: fasm2bit -.github/workflows/ax7203-trinet-node-v2.yml :: golden :: Node v2 keyed receipts vs the Python golden (iverilog) -.github/workflows/ax7203-trinet-node-v2.yml :: golden :: SipHash core vs the published vectors (iverilog) .github/workflows/ax7203-uart-loopback.yml :: bitstream :: Yosys synthesis .github/workflows/ax7203-uart-tx-probe.yml :: bitstream :: Yosys synthesis .github/workflows/bench007-probe-ax7203.yml :: bitstream :: fasm2frames + xc7frames2bit