From 88f6f61d104c5df42ff7995bd94e5ae321237aed Mon Sep 17 00:00:00 2001 From: Dr Jonathan Richard Robert Kimmitt Date: Wed, 27 May 2026 14:27:08 +0100 Subject: [PATCH] =?UTF-8?q?virtex7:=20030-iob18=20process=5Frdb=20?= =?UTF-8?q?=E2=80=94=20guard=20the=20visited-iostandards=20merge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Failed in dbfixup.py:153 add_tag_bits (AssertionError) because the process_rdb name-harmonisation loop folded two distinct-bit Y1 IN groups onto a single feature name. On Virtex-7 IOB_Y1 LVCMOS*.IN has bits {38_00,39_01} but SSTL*.IN has only {38_00}; the visited- iostandard logic forced both onto 'LVCMOS18_SSTL12_SSTL135_SSTL15.IN' (driven by the Y0 grouping where they happened to share bits), emitting two contradictory db lines that dbfixup can't merge. (The existing filter_negbits already expects the un-merged name IOB_Y1.LVCMOS12_LVCMOS15_LVCMOS18.IN, confirming the merge is wrong here.) kintex7's Y1 LVCMOS and SSTL share bits, so it never hits this case. Fix: require identical bits before adopting a visited name; gate via XRAY_DATABASE == virtex7 so kintex7's behaviour is provably unchanged. Adds 'import os' for the env check. Verified: no duplicate tags; Y1 splits correctly into LVCMOS12_LVCMOS15_LVCMOS18.IN + SSTL12_SSTL135_SSTL15.IN. Co-Authored-By: Claude Opus 4.7 --- fuzzers/030-iob18/process_rdb.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/fuzzers/030-iob18/process_rdb.py b/fuzzers/030-iob18/process_rdb.py index 2cacb463..e66199d7 100644 --- a/fuzzers/030-iob18/process_rdb.py +++ b/fuzzers/030-iob18/process_rdb.py @@ -17,6 +17,7 @@ There are couple cases that need to be handled here: can be merged to provide unique "(IOSTANDARD, DRIVE)" bit sets. """ import argparse +import os def get_name(l): @@ -172,6 +173,14 @@ def process_features_sets(iostandard_lines): if enum is not None: common_groups[site][(bits, group)]['enums'].add(enum) + # On Virtex-7 some Y1 IN groups differ from their Y0 counterparts by a + # single bit (e.g. LVCMOS* sets 39_01 while SSTL* does not), so the + # name-harmonisation below must not fold two distinct-bit groups onto one + # feature name -- doing so emits duplicate db lines that break dbfixup. + # Require identical bits before adopting a visited name for virtex7; other + # families never produce two-group Y1 IN splits, so they are unaffected. + require_same_bits = os.environ.get('XRAY_DATABASE') == 'virtex7' + visited_iostandards = list() for site, groups in common_groups.items(): for (bits, group), v in groups.items(): @@ -184,17 +193,19 @@ def process_features_sets(iostandard_lines): # # The following code makes sure that the same set of iostandards # (even if not really present at a site location) appears for each site - for visited_iostandard, visited_group, visited_enums in visited_iostandards: + for visited_iostandard, visited_group, visited_enums, visited_bits in visited_iostandards: same_enum = enums == visited_enums same_group = group == visited_group compatible_iostd = any( x in iostandards for x in visited_iostandard) take_visited_iostd = len(visited_iostandard) > len(iostandards) - if same_enum and same_group and compatible_iostd and take_visited_iostd: + same_bits = bits == visited_bits + if same_enum and same_group and compatible_iostd and take_visited_iostd \ + and (same_bits or not require_same_bits): iostandards = visited_iostandard break - visited_iostandards.append((iostandards, group, enums)) + visited_iostandards.append((iostandards, group, enums, bits)) iostandards_string = '_'.join(sorted(iostandards))