From a4e63510b446d71d1eb374f58fe12b11ea0ec9af Mon Sep 17 00:00:00 2001 From: Dr Jonathan Richard Robert Kimmitt Date: Tue, 2 Jun 2026 09:36:57 +0100 Subject: [PATCH] virtex7: open-source FASM-path now produces a Y1-mixed-IOB bitstream MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two surgical fixes that together close the FASM -> frames -> bitstream path for designs that use IOB_Y1 (slave) as an input alongside IOB_Y0 (master) as an output in the same LIOB18/RIOB18 tile. Verified end-to-end on VC707 (~/johnson_8bit, 8-bit Johnson counter with LEDs on Y0 and the centre-button input landing on Y1): single `fasm2frames` + `xc7frames2bit` run with no Vivado in the loop, the loaded bitstream advances the ring on each button press. (1) Layer-A — IN_ONLY segbit over-claim. LIOB18.IOB_Y1.LVCMOS..._IN_ONLY rows previously CLEARed bits `!38_32 !38_34`. Those two bits actually belong to INT_L.IOB_COL_BANK_ACTIVE (which SETs them). When a tile has a Y0 OBUF + Y1 IBUF, both features fire and conflict on the same physical bits — fasm2frames stops with FasmInconsistentBits. Drop those two bits from every Y1 IN_ONLY row in LIOB18 and RIOB18; let the bits default-to-zero unless bank-active sets them. Verified that the Y0 IN_ONLY rows are untouched. (2) Layer-B — XRAY_ALLOW_MISSING_FEATURES escape hatch. fasm_assembler.py: parse_fasm_filename() now respects the env var XRAY_ALLOW_MISSING_FEATURES=1. When set, missing-feature lookups become per-line console warnings instead of a FasmLookupError. Three IOB_Y1 features still need fuzzing (IBUF_HP_BANK_GLUE, LVCMOS12_LVCMOS15.IN, LVCMOS12_LVCMOS15_SSTL12_SSTL135_SSTL15.IN_ONLY) — the proper fix is a fuzzer pass that places IBUFs on Y1 sites and merges the captured segbits into segbits_{l,r}iob18.db, but until then the escape hatch keeps the open-source path moving. Co-Authored-By: Claude Opus 4.7 --- prjxray/fasm_assembler.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/prjxray/fasm_assembler.py b/prjxray/fasm_assembler.py index f90cf1e0..7719fe41 100644 --- a/prjxray/fasm_assembler.py +++ b/prjxray/fasm_assembler.py @@ -200,6 +200,21 @@ class FasmAssembler(object): self.add_fasm_line(line, missing_features) if missing_features: + # Allow the assembler to keep going when only a small number of + # niche segbits (e.g. IOB_Y1.IBUF_HP_BANK_GLUE — not yet fuzzed + # for the slave side) are missing. The resulting bitstream is + # missing those bits — Vivado's silicon defaults usually cover + # them — and the user gets a console warning per missing line. + # Set XRAY_ALLOW_MISSING_FEATURES=1 to opt in. + import os + if os.environ.get("XRAY_ALLOW_MISSING_FEATURES") == "1": + import sys + print("WARNING: " + str(len(missing_features)) + + " missing-feature lines suppressed by " + "XRAY_ALLOW_MISSING_FEATURES=1:", file=sys.stderr) + for m in missing_features: + print(" " + m, file=sys.stderr) + return raise FasmLookupError('\n'.join(missing_features)) def mark_roi_frames(self, roi):