From a5ee3b66e9f5f02927f6c6efb432e92b919a23e1 Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Mon, 18 Apr 2022 11:11:44 +0700 Subject: [PATCH] make the k480T hack for 005-tilegrid conditional on that part Signed-off-by: Hans Baier --- fuzzers/005-tilegrid/util.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/fuzzers/005-tilegrid/util.py b/fuzzers/005-tilegrid/util.py index 8ebbe1fed..f3cb809e0 100644 --- a/fuzzers/005-tilegrid/util.py +++ b/fuzzers/005-tilegrid/util.py @@ -111,6 +111,8 @@ def add_tile_bits( assert offset + words <= 101, ( tile_name, offset + words, offset, words, block_type) + is_xc7k480t = 'xc7k480t' in os.environ['XRAY_PART'] + baseaddr_str = '0x%08X' % baseaddr block = bits.get(block_type, None) if block is not None: @@ -119,11 +121,19 @@ def add_tile_bits( "%s: existing defintion for %s" % (tile_name, block_type)) assert block["baseaddr"] == baseaddr_str assert block["frames"] == frames, (block, frames) - if not block["offset"] == offset: - print("XXX Hack: %s; orig offset %s, new %s" % (tile_name, block["offset"], offset)) - offset = max(block['offset'], offset) - print("XXX Hack: using offset {offset}") - done = False + # TODO: HACK: some of the offsets of the K480T seem to be messed up + # using the maximum offset below seems to make most sense when looking + # at the preceding blocks + if is_xc7k480t: + if not block["offset"] == offset: + print("XXX Hack: %s; orig offset %s, new %s" % (tile_name, block["offset"], offset)) + offset = max(block['offset'], offset) + print("XXX Hack: using offset {offset}") + done = False + else: + assert block["offset"] == offset, "%s; orig offset %s, new %s" % ( +- tile_name, block["offset"], offset) + assert block["words"] == words if done: return