From d197a3ebc9e8797240d4a6aefc4c41bbb4fb208e Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Wed, 6 Apr 2022 05:33:08 +0700 Subject: [PATCH 1/5] add XC7K420T Signed-off-by: Hans Baier --- Makefile | 2 +- settings/kintex7/devices.yaml | 2 ++ settings/kintex7_420t.sh | 40 +++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 settings/kintex7_420t.sh diff --git a/Makefile b/Makefile index acb7f426e..7a10e92af 100644 --- a/Makefile +++ b/Makefile @@ -189,7 +189,7 @@ $(foreach DB,$(DATABASES),$(eval $(call database,$(DB)))) ARTIX_PARTS=artix7_50t artix7_200t ZYNQ_PARTS=zynq7010 -KINTEX_PARTS= +KINTEX_PARTS=kintex7_420t SPARTAN_PARTS= XRAY_PARTS=${ARTIX_PARTS} ${ZYNQ_PARTS} ${KINTEX_PARTS} ${SPARTAN_PARTS} diff --git a/settings/kintex7/devices.yaml b/settings/kintex7/devices.yaml index e889e781e..f4567d706 100644 --- a/settings/kintex7/devices.yaml +++ b/settings/kintex7/devices.yaml @@ -1,3 +1,5 @@ # device to fabric mapping "xc7k70t": fabric: "xc7k70t" +"xc7k420t": + fabric: "xc7k420t" diff --git a/settings/kintex7_420t.sh b/settings/kintex7_420t.sh new file mode 100644 index 000000000..3d51244a5 --- /dev/null +++ b/settings/kintex7_420t.sh @@ -0,0 +1,40 @@ +# Copyright (C) 2017-2020 The Project X-Ray Authors. +# +# Use of this source code is governed by a ISC-style +# license that can be found in the LICENSE file or at +# https://opensource.org/licenses/ISC +# +# SPDX-License-Identifier: ISC +export XRAY_DATABASE="kintex7" +export XRAY_PART="xc7k420tffg1156-2" +export XRAY_ROI_FRAMES="0x00000000:0xffffffff" + +# All CLB's in part, all BRAM's in part, all DSP's in part. +# tcl queries IOB => don't bother adding +export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X153Y349 DSP48_X0Y0:DSP48_X5Y139 RAMB18_X0Y0:RAMB18_X5Y139 RAMB36_X0Y0:RAMB36_X4Y69" + +export XRAY_EXCLUDE_ROI_TILEGRID="" + +# This is used by fuzzers/005-tilegrid/generate_full.py +# (special handling for frame addresses of certain IOIs -- see the script for details). +# This needs to be changed for any new device! +# If you have a FASM mismatch or unknown bits in IOIs, CHECK THIS FIRST. +export XRAY_IOI3_TILES="" + +# These settings must remain in sync +export XRAY_ROI="SLICE_X0Y0:SLICE_X153Y349 DSP48_X0Y0:DSP48_X5Y139 RAMB18_X0Y0:RAMB18_X5Y139 RAMB36_X0Y0:RAMB36_X4Y69" +# Part of CMT X0Y1 +export XRAY_ROI_GRID_X1="-1" +export XRAY_ROI_GRID_X2="-1" +# Include VBRK / VTERM +export XRAY_ROI_GRID_Y1="-1" +export XRAY_ROI_GRID_Y2="-1" + +source $(dirname ${BASH_SOURCE[0]})/../utils/environment.sh + +env=$(python3 ${XRAY_UTILS_DIR}/create_environment.py) +ENV_RET=$? +if [[ $ENV_RET != 0 ]] ; then + return $ENV_RET +fi +eval $env From d567c0917640efe0f077c168f1d159c751114c9e Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 16 Apr 2022 19:04:46 +0700 Subject: [PATCH 2/5] 005-tilegrid/bram_int: Add workaround for vivado bug for xc7k420t Signed-off-by: Hans Baier --- fuzzers/005-tilegrid/bram_int/top.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fuzzers/005-tilegrid/bram_int/top.py b/fuzzers/005-tilegrid/bram_int/top.py index 151ba0e3d..fb662ce36 100644 --- a/fuzzers/005-tilegrid/bram_int/top.py +++ b/fuzzers/005-tilegrid/bram_int/top.py @@ -14,6 +14,7 @@ random.seed(int(os.getenv("SEED"), 16)) from prjxray import util from prjxray.db import Database +import re def gen_brams(): @@ -73,9 +74,20 @@ def run(): params = {} + is_kintex_420t="xc7k420t" in os.environ["XRAY_PART"] + sites = list(gen_brams()) fuzz_iter = iter(util.gen_fuzz_states(len(sites) * 5)) for tile_name, bram_sites, int_tiles in sites: + # this is a workaround for what looks like a bug + # in Vivado 2017: as soon as I try to instantiate + # more than the 140 rows below then Vivado terminates, + # complaining that it is asked to instantiate more block + # RAM than is available. + bram_y = int(re.sub(".*Y", "", bram_sites[0])) + if is_kintex_420t and bram_y > 139: + continue + # Each BRAM tile has 5 INT tiles. # The following feature is used to toggle a one PIP in each INT tile # From cdd7d964b61d397b998b7d5b5de58e8b32a8187d Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 16 Apr 2022 19:14:52 +0700 Subject: [PATCH 3/5] 005-tilegrid/dsp_int: Add workaround for vivado bug for xc7k420t Signed-off-by: Hans Baier --- fuzzers/005-tilegrid/dsp_int/top.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fuzzers/005-tilegrid/dsp_int/top.py b/fuzzers/005-tilegrid/dsp_int/top.py index 3a1307b67..88ad543aa 100644 --- a/fuzzers/005-tilegrid/dsp_int/top.py +++ b/fuzzers/005-tilegrid/dsp_int/top.py @@ -14,6 +14,7 @@ random.seed(int(os.getenv("SEED"), 16)) from prjxray import util from prjxray.db import Database +import re def gen_dsps(): @@ -73,9 +74,20 @@ def run(): params = {} + is_kintex_420t="xc7k420t" in os.environ["XRAY_PART"] + sites = list(gen_dsps()) fuzz_iter = iter(util.gen_fuzz_states(len(sites) * 5)) for tile_name, dsp_sites, int_tiles in sites: + # this is a workaround for what looks like a bug + # in Vivado 2017: as soon as I try to instantiate + # more than the 140 rows below then Vivado terminates, + # complaining that it is asked to instantiate more block + # RAM than is available. + dsp_y = int(re.sub(".*Y", "", dsp_sites[0])) + if is_kintex_420t and dsp_y > 139: + continue + int_tiles.reverse() # Each DSP tile has 5 INT tiles. From d982a8e4f1ed46bd131079ed3ecaf6c9ff008b29 Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 16 Apr 2022 19:24:51 +0700 Subject: [PATCH 4/5] xc7k420t: also should not run orphan-int-column fuzzer Signed-off-by: Hans Baier --- fuzzers/005-tilegrid/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fuzzers/005-tilegrid/Makefile b/fuzzers/005-tilegrid/Makefile index a880d0713..ba6f9811d 100644 --- a/fuzzers/005-tilegrid/Makefile +++ b/fuzzers/005-tilegrid/Makefile @@ -49,8 +49,10 @@ endif # Kintex7 only fuzzers ifeq (${XRAY_DATABASE}, kintex7) +ifneq (${XRAY_PART}, xc7k420tffg1156-2) TILEGRID_TDB_DEPENDENCIES += orphan_int_column/$(BUILD_FOLDER)/segbits_tilegrid.tdb endif +endif BASICDB_TILEGRID=$(BUILD_FOLDER)/basicdb/${XRAY_FABRIC}/tilegrid.json From 1ed301f87db1fcabc88b9c03e3d24335d8edb935 Mon Sep 17 00:00:00 2001 From: Hans Baier Date: Sat, 16 Apr 2022 19:36:16 +0700 Subject: [PATCH 5/5] settings/kintex_420t: need valid package pins for 005-tilegrid/mmcm fuzzer --- settings/kintex7_420t.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/settings/kintex7_420t.sh b/settings/kintex7_420t.sh index 3d51244a5..3638c410f 100644 --- a/settings/kintex7_420t.sh +++ b/settings/kintex7_420t.sh @@ -9,6 +9,11 @@ export XRAY_DATABASE="kintex7" export XRAY_PART="xc7k420tffg1156-2" export XRAY_ROI_FRAMES="0x00000000:0xffffffff" +export XRAY_PIN_00=AL18 +export XRAY_PIN_01=AL19 +export XRAY_PIN_02=AK18 +export XRAY_PIN_03=AK19 + # All CLB's in part, all BRAM's in part, all DSP's in part. # tcl queries IOB => don't bother adding export XRAY_ROI_TILEGRID="SLICE_X0Y0:SLICE_X153Y349 DSP48_X0Y0:DSP48_X5Y139 RAMB18_X0Y0:RAMB18_X5Y139 RAMB36_X0Y0:RAMB36_X4Y69"