mirror of https://github.com/openXC7/prjxray.git
virtex7: 030-iob18 process_rdb — guard the visited-iostandards merge
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 <noreply@anthropic.com>
This commit is contained in:
parent
48e7996581
commit
88f6f61d10
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue