From df23e99e7ffdd06f1d5729cb98238a0c0b940ab7 Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Thu, 14 Jan 2021 20:55:21 +0100 Subject: [PATCH 01/12] database: artix7: Fix wrong device fabric mapping The xc7a35t devices does not use the xc7a50t fabric. Signed-off-by: Daniel Schultz --- database/artix7/mapping/devices.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/artix7/mapping/devices.yaml b/database/artix7/mapping/devices.yaml index afd0c798..59c1efd0 100644 --- a/database/artix7/mapping/devices.yaml +++ b/database/artix7/mapping/devices.yaml @@ -6,4 +6,4 @@ "xc7a50t": fabric: "xc7a50t" "xc7a35t": - fabric: "xc7a50t" + fabric: "xc7a35t" From ef94cf5add8131ea2fdb9dd092f4a8ab4f7daa0a Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sun, 24 Jan 2021 11:37:40 +0100 Subject: [PATCH 02/12] gitignore: Ignore vivado .jou and .log Signed-off-by: Daniel Schultz --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index e1948278..590f0a7b 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ __pycache__ *.pyc *.swp *.egg-info +*vivado*.jou +*vivado*.log From ac308170efa8a511ae5151eea50755ec2d6dd12d Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 6 Feb 2021 10:06:22 +0100 Subject: [PATCH 03/12] Revert "gitignore: Add exceptions for database//mapping" This reverts commit ec04ccba19b5fe304b8141bff1b4914c4cc55b12. Signed-off-by: Daniel Schultz --- .gitignore | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 590f0a7b..0cf4b723 100644 --- a/.gitignore +++ b/.gitignore @@ -2,19 +2,7 @@ env build build_* logs_* -database/* -!database/artix7 -database/artix7/* -!database/artix7/mapping -!database/kintex7 -database/kintex7/* -!database/kintex7/mapping -!database/zynq7 -database/zynq7/* -!database/zynq7/mapping -!database/spartan7 -database/spartan7/* -!database/spartan7/mapping +database .Xil **/specimen_* **/output From 74ba878c25ad0654e7be55e24cc443d58fa72f74 Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sun, 24 Jan 2021 11:35:59 +0100 Subject: [PATCH 04/12] utils: Add new tools to roi all parts * Adds a new tool to update the parts mapping file for a family. * Adds a new tool to update the resource file for a family. * Adds a new tool to roi all parts by calling "make roi_only" with different parts Update the Makefile to update the artix7 files with "make db-update". Signed-off-by: Daniel Schultz --- prjxray/util.py | 34 ++++++++++++++++++ utils/roi_all.py | 48 +++++++++++++++++++++++++ utils/update_parts.py | 74 ++++++++++++++++++++++++++++++++++++++ utils/update_parts.tcl | 14 ++++++++ utils/update_resources.py | 72 +++++++++++++++++++++++++++++++++++++ utils/update_resources.tcl | 25 +++++++++++++ 6 files changed, 267 insertions(+) create mode 100755 utils/roi_all.py create mode 100755 utils/update_parts.py create mode 100644 utils/update_parts.tcl create mode 100755 utils/update_resources.py create mode 100644 utils/update_resources.tcl diff --git a/prjxray/util.py b/prjxray/util.py index a282fad7..6c285795 100644 --- a/prjxray/util.py +++ b/prjxray/util.py @@ -49,6 +49,14 @@ def get_part_information(db_root, part): return part +def set_part_information(db_root, information): + filename = os.path.join(db_root, "mapping", "parts.yaml") + with open(filename, 'w+') as stream: + yaml.dump(information, stream) + assert os.path.isfile(filename), \ + "Mapping file {} does not exists".format(filename) + + def get_part_resources(file_path, part): filename = os.path.join(file_path, "resources.yaml") assert os.path.isfile(filename), \ @@ -60,6 +68,14 @@ def get_part_resources(file_path, part): return res +def set_part_resources(file_path, information): + filename = os.path.join(file_path, "resources.yaml") + with open(filename, 'w+') as stream: + yaml.dump(information, stream) + assert os.path.isfile(filename), \ + "Mapping file {} does not exists".format(filename) + + def get_fabric_for_part(db_root, part): filename = os.path.join(db_root, "mapping", "devices.yaml") assert os.path.isfile(filename), \ @@ -73,6 +89,24 @@ def get_fabric_for_part(db_root, part): return device['fabric'] +def get_devices(db_root): + filename = os.path.join(db_root, "mapping", "devices.yaml") + assert os.path.isfile(filename), \ + "Mapping file {} does not exists".format(filename) + with open(filename, 'r') as stream: + device_mapping = yaml.load(stream, Loader=yaml.FullLoader) + return device_mapping + + +def get_parts(db_root): + filename = os.path.join(db_root, "mapping", "parts.yaml") + assert os.path.isfile(filename), \ + "Mapping file {} does not exists".format(filename) + with open(filename, 'r') as stream: + part_mapping = yaml.load(stream, Loader=yaml.FullLoader) + return part_mapping + + def roi_xy(): x1 = int(os.getenv('XRAY_ROI_GRID_X1', 0)) x2 = int(os.getenv('XRAY_ROI_GRID_X2', 58)) diff --git a/utils/roi_all.py b/utils/roi_all.py new file mode 100755 index 00000000..660f9521 --- /dev/null +++ b/utils/roi_all.py @@ -0,0 +1,48 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2017-2021 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 +import argparse +import yaml +import subprocess +import os +import re +from prjxray import util + + +def main(): + """Rois all parts for a family by calling "make roi_only" over all parts + with the same device as XRAY_PART. + + Example: + prjxray$ ./utils/roi_all.py --db-root database/artix7/ --part xc7a100tfgg676-1 + """ + env = os.environ.copy() + db_root = util.get_db_root() + assert db_root + part = util.get_part() + assert part + + information = util.get_part_information(db_root, part) + + valid_devices = [] + for name, device in util.get_devices(db_root).items(): + if device['fabric'] == information['device']: + valid_devices.append(name) + + for part, data in util.get_parts(db_root).items(): + if data['device'] in valid_devices: + command = "make roi_only" + env['XRAY_PART'] = part + cwd = os.getenv('XRAY_FUZZERS_DIR') + subprocess.run(command.split(' '), check=True, env=env, cwd=cwd) + + +if __name__ == '__main__': + main() diff --git a/utils/update_parts.py b/utils/update_parts.py new file mode 100755 index 00000000..e143b500 --- /dev/null +++ b/utils/update_parts.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2017-2021 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 +import argparse +import yaml +import subprocess +import os +import re +from prjxray import util + + +def main(): + """Tool to update all supported, available parts in a mapping file for the + given family. It will read all parts from Vivado, filter them by the family, + and will only add these where a device exists for. + + Example: + prjxray$ ./utils/update_parts.py artix7 --db-root database/artix7/ + """ + parser = argparse.ArgumentParser( + description="Saves all supported parts for a family.") + + parser.add_argument( + 'family', + help="Name of the device family.", + choices=['artix7', 'kintex7', 'zynq7']) + util.db_root_arg(parser) + + args = parser.parse_args() + env = os.environ.copy() + # Vivado does not use the suffix 7 for zynq + env['FILTER'] = "zynq" if args.family == "zynq7" else args.family + cwd = os.path.dirname(os.path.abspath(__file__)) + information = {} + + # Read all supported devices + supported_devices = util.get_devices(args.db_root).keys() + + # Fetch all parts for a family (FILTER = family) + command = "{} -mode batch -source update_parts.tcl".format( + env['XRAY_VIVADO']) + result = subprocess.run( + command.split(' '), + check=True, + env=env, + cwd=cwd, + stdout=subprocess.PIPE) + parts = result.stdout.decode('utf-8').split('# }\n')[1].splitlines()[:-1] + + # Splits up the part number and checks if the device is supported + for part in parts: + part, device, package, speed = part.split(',') + if device in supported_devices: + information[part] = { + 'device': device, + 'package': package, + 'speedgrade': speed[1:] + } + else: + print("Part {} has an unsupported device {}".format(part, device)) + + # Overwrites the /parts.yaml file completly with new data + util.set_part_information(args.db_root, information) + + +if __name__ == '__main__': + main() diff --git a/utils/update_parts.tcl b/utils/update_parts.tcl new file mode 100644 index 00000000..01cba7b7 --- /dev/null +++ b/utils/update_parts.tcl @@ -0,0 +1,14 @@ +# Copyright (C) 2017-2021 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 +# Writes a JSON5 to filename containing timing for current design. +# This can be used with create_timing_worksheet_db.py to compare prjxray model +# with Vivado timing model outputs. +set parts [get_parts -filter "FAMILY == $::env(FILTER)"] +foreach part $parts { + puts "$part,[get_property DEVICE $part],[get_property PACKAGE $part],[get_property SPEED $part]" +} diff --git a/utils/update_resources.py b/utils/update_resources.py new file mode 100755 index 00000000..275aea6c --- /dev/null +++ b/utils/update_resources.py @@ -0,0 +1,72 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2017-2021 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 +import argparse +import yaml +import subprocess +import os +import re +from prjxray import util + + +def main(): + """Tool to update the used resources by the fuzzers for each available part. + + Example: + prjxray$ ./utils/update_resources.py artix7 --db-root database/artix7/ + """ + parser = argparse.ArgumentParser( + description="Saves all resource information for a family.") + + parser.add_argument( + 'family', + help="Name of the device family.", + choices=['artix7', 'kintex7', 'zynq7']) + util.db_root_arg(parser) + + args = parser.parse_args() + env = os.environ.copy() + cwd = os.path.dirname(os.path.abspath(__file__)) + resource_path = os.path.join( + os.getenv('XRAY_DIR'), 'settings', args.family) + information = {} + + parts = util.get_parts(args.db_root) + for part in parts.keys(): + print("Find pins for {}".format(part)) + env['XRAY_PART'] = part + # Asks with get_package_pins and different filters for pins with + # specific properties. + command = "{} -mode batch -source update_resources.tcl".format( + env['XRAY_VIVADO']) + result = subprocess.run( + command.split(' '), + check=True, + env=env, + cwd=cwd, + stdout=subprocess.PIPE) + # Formats the output and stores the pins + output = result.stdout.decode('utf-8').splitlines() + clk_pins = output[-4].split(' ') + data_pins = output[-2].strip().split(' ') + pins = { + 0: clk_pins[0], + 1: data_pins[0], + 2: data_pins[int(len(data_pins) / 2)], + 3: data_pins[-1] + } + information[part] = {'pins': pins} + + # Overwrites the /resources.yaml file completly with new data + util.set_part_resources(resource_path, information) + + +if __name__ == '__main__': + main() diff --git a/utils/update_resources.tcl b/utils/update_resources.tcl new file mode 100644 index 00000000..a95f1e06 --- /dev/null +++ b/utils/update_resources.tcl @@ -0,0 +1,25 @@ +# Copyright (C) 2017-2021 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 +# Writes a JSON5 to filename containing timing for current design. +# This can be used with create_timing_worksheet_db.py to compare prjxray model +# with Vivado timing model outputs. +link_design -part $::env(XRAY_PART) + +# one pin -> 0 +set clk_pins [get_package_pins -filter "IS_CLK_CAPABLE"] + +# three pins -> 1, 2, 3 on HR banks only +set banks [get_iobanks -filter "BANK_TYPE==BT_HIGH_RANGE"] + +set data_pins "" +foreach bank [split $banks " "] { + append data_pins " " [get_package_pins -filter "IS_GENERAL_PURPOSE && BANK==$bank"] +} + +puts $clk_pins +puts $data_pins From ef350f92168bfb8cd1ea019c311fbf6a9edf776b Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sun, 24 Jan 2021 11:38:37 +0100 Subject: [PATCH 05/12] Makefile: Update to roi all parts for a family Adds a db-extra-X-roi command which will call a Python tool because the part list is some kind of dynamic and Makefiles can't read from a YAML file and iterates over all keys. Also some minor clean-ups with the kintex and zynq extra commands. Signed-off-by: Daniel Schultz --- Makefile | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 602562d5..0fce08b5 100644 --- a/Makefile +++ b/Makefile @@ -138,8 +138,18 @@ define database # $(1) - Database name +db-prepare-$(1): + @echo + @echo "Preparing $(1) files" + @echo "============================" + @mkdir -p database/$(1)/mapping + @cp settings/$(1)/devices.yaml database/$(1)/mapping/ + @+source settings/$(1).sh && $(IN_ENV) ./utils/update_parts.py $(1) + @+source settings/$(1).sh && $(IN_ENV) ./utils/update_resources.py $(1) + db-$(1): +source settings/$(1).sh && $$(MAKE) -C fuzzers + +source settings/$(1).sh && $(IN_ENV) ./utils/roi_all.py db-check-$(1): @echo @@ -154,11 +164,11 @@ db-format-$(1): @$(IN_ENV) cd database/$(1); python3 ../../utils/sort_db.py @if [ -e database/Info.md ]; then $(IN_ENV) ./utils/info_md.py --keep; fi -.PHONY: db-$(1) db-check-$(1) db-format-$(1) db-extras-$(1) db-extras-$(1)-parts db-extras-$(1)-harness +.PHONY: db-prepare-$(1) db-$(1) db-check-$(1) db-format-$(1) db-extras-$(1) db-extras-$(1)-parts db-extra-$(1)-roi db-extras-$(1)-harness -db-extras-$(1): db-extras-$(1)-parts db-extras-$(1)-harness +db-extras-$(1): db-extras-$(1)-parts db-extras-$(1)-roi db-extras-$(1)-harness -db-$(1)-all: db-$(1) db-extras-$(1)-parts +db-$(1)-all: db-$(1) db-extras-$(1)-parts db-extras-$(1)-roi # Build harnesses after database is complete $$(MAKE) db-extras-$(1)-harness @@ -174,7 +184,7 @@ $(foreach DB,$(DATABASES),$(eval $(call database,$(DB)))) ARTIX_PARTS=artix7_50t artix7_200t ZYNQ_PARTS=zynq7010 -KINTEX_PARTS=kintex70t +KINTEX_PARTS= XRAY_PARTS=${ARTIX_PARTS} ${ZYNQ_PARTS} ${KINTEX_PARTS} @@ -185,6 +195,9 @@ define multiple-parts db-part-only-$(1): +source settings/$(1).sh && $$(MAKE) -C fuzzers part_only +db-roi-only-$(1): + +source settings/$(1).sh && $(IN_ENV) ./utils/roi_all.py + endef $(foreach PART,$(XRAY_PARTS),$(eval $(call multiple-parts,$(PART)))) @@ -192,20 +205,14 @@ $(foreach PART,$(XRAY_PARTS),$(eval $(call multiple-parts,$(PART)))) db-extras-artix7-parts: $(addprefix db-part-only-,$(ARTIX_PARTS)) +db-extras-artix7-roi: $(addprefix db-roi-only-,$(ARTIX_PARTS)) + # This explicitly sources each settings script as needed so that # you don't need to worry about manually sourcing the right script before making. # Some of these commands handle additional parts/packages that are *not* fully bonded. # For any pin defined in settings/*.sh that is *not* bonded in this part/package, # override the XRAY_PIN_0X setting below to pick a pin that *is* bonded. db-extras-artix7-harness: - +source settings/artix7.sh && \ - XRAY_PART=xc7a100tcsg324-1 $(MAKE) -C fuzzers roi_only - +source settings/artix7.sh && \ - XRAY_PART=xc7a100tfgg484-2 $(MAKE) -C fuzzers roi_only - +source settings/artix7_50t.sh && \ - XRAY_PART=xc7a35tftg256-1 $(MAKE) -C fuzzers roi_only - +source settings/artix7_200t.sh && \ - XRAY_PART=xc7a200tsbg484-1 $(MAKE) -C fuzzers roi_only +source minitests/roi_harness/basys3-swbut.sh && $(MAKE) -C fuzzers roi_only +source minitests/roi_harness/arty-uart.sh && $(MAKE) -C fuzzers roi_only +source minitests/roi_harness/basys3-swbut.sh && \ @@ -225,17 +232,20 @@ db-extras-artix7-harness: $(MAKE) -C minitests/roi_harness \ HARNESS_DIR=$(XRAY_DATABASE_DIR)/artix7/harness/arty-a7/swbut copy -db-extras-kintex7-parts: - @true +db-extras-kintex7-parts: $(addprefix db-part-only-,$(KINTEX_PARTS)) + +db-extras-kintex7-roi: $(addprefix db-roi-only-,$(KINTEX_PARTS)) db-extras-kintex7-harness: @true db-extras-zynq7-parts: $(addprefix db-part-only-,$(ZYNQ_PARTS)) +db-extras-zynq7-roi: $(addprefix db-roi-only-,$(ZYNQ_PARTS)) + db-extras-zynq7-harness: - +source settings/zynq7.sh && \ - XRAY_PART=xc7z020clg400-1 $(MAKE) -C fuzzers roi_only + @true + db-check: @true @@ -245,6 +255,8 @@ db-format: db-info: $(IN_ENV) ./utils/info_md.py +db-prepare-parts: $(addprefix db-prepare-,$(DATABASES)) + .PHONY: db-check db-format clean: From 7b16929e7d15ee35c3e7300516c8748a23c3dcea Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 30 Jan 2021 15:14:20 +0100 Subject: [PATCH 06/12] README: Add new step to prepare db This step generates all static part information files. Signed-off-by: Daniel Schultz --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4665400f..d7d7741e 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,16 @@ running any other commands: source settings/artix7.sh ### Step 7: ### +Prepare the database with static part information, which are needed by the +fuzzers, either for all device families + + make db-prepare-parts + +or only for a selected one + + make db-prepare-artix7 + +### Step 8: ### (Option 1, recommended) - Download a current stable version (you can use the Python API with a pre-generated database) @@ -99,13 +109,13 @@ Python API with a pre-generated database) cd fuzzers make -j$(nproc) -### Step 8: ### +### Step 9: ### Pick a fuzzer (or write your own) and run: cd fuzzers/010-clb-lutinit make -j$(nproc) run -### Step 9: ### +### Step 10: ### Create HTML documentation: cd htmlgen From a6c54b0b3e480b8b0a18ba07a8733152ccaac94e Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 30 Jan 2021 15:15:49 +0100 Subject: [PATCH 07/12] Remove autogenerated files These files are now autogenerated and not needed to be deployed to the repo. Signed-off-by: Daniel Schultz --- database/artix7/mapping/parts.yaml | 37 ------------- database/kintex7/mapping/parts.yaml | 5 -- database/zynq7/mapping/parts.yaml | 13 ----- settings/artix7/resources.yaml | 82 ----------------------------- settings/kintex7/resources.yaml | 10 ---- settings/zynq7/resources.yaml | 22 -------- 6 files changed, 169 deletions(-) delete mode 100644 database/artix7/mapping/parts.yaml delete mode 100644 database/kintex7/mapping/parts.yaml delete mode 100644 database/zynq7/mapping/parts.yaml delete mode 100644 settings/artix7/resources.yaml delete mode 100644 settings/kintex7/resources.yaml delete mode 100644 settings/zynq7/resources.yaml diff --git a/database/artix7/mapping/parts.yaml b/database/artix7/mapping/parts.yaml deleted file mode 100644 index d37e7cc4..00000000 --- a/database/artix7/mapping/parts.yaml +++ /dev/null @@ -1,37 +0,0 @@ -# part number to device, package and speed grade mapping -"xc7a200tffg1156-1": - device: "xc7a200t" - package: "ffg1156" - speedgrade: "1" -"xc7a200tsbg484-1": - device: "xc7a200t" - package: "sbg484" - speedgrade: "1" -"xc7a100tfgg676-1": - device: "xc7a100t" - package: "fgg676" - speedgrade: "1" -"xc7a100tfgg484-2": - device: "xc7a100t" - package: "fgg484" - speedgrade: "2" -"xc7a100tcsg324-1": - device: "xc7a100t" - package: "csg324" - speedgrade: "1" -"xc7a50tfgg484-1": - device: "xc7a50t" - package: "fgg484" - speedgrade: "1" -"xc7a35tcsg324-1": - device: "xc7a35t" - package: "csg324" - speedgrade: "1" -"xc7a35tftg256-1": - device: "xc7a35t" - package: "ftg256" - speedgrade: "1" -"xc7a35tcpg236-1": - device: "xc7a35t" - package: "cpg236" - speedgrade: "1" diff --git a/database/kintex7/mapping/parts.yaml b/database/kintex7/mapping/parts.yaml deleted file mode 100644 index 7fb18033..00000000 --- a/database/kintex7/mapping/parts.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# part number to device, package and speed grade mapping -"xc7k70tfbg676-2": - device: "xc7k70t" - package: "fbg676" - speedgrade: "2" diff --git a/database/zynq7/mapping/parts.yaml b/database/zynq7/mapping/parts.yaml deleted file mode 100644 index 538f8e0e..00000000 --- a/database/zynq7/mapping/parts.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# part number to device, package and speed grade mapping -"xc7z020clg484-1": - device: "xc7z020s" - package: "clg481" - speedgrade: "1" -"xc7z020clg400-1": - device: "xc7z020s" - package: "clg400" - speedgrade: "1" -"xc7z010clg400-1": - device: "xc7z010s" - package: "clg400" - speedgrade: "1" diff --git a/settings/artix7/resources.yaml b/settings/artix7/resources.yaml deleted file mode 100644 index 2ce6f73e..00000000 --- a/settings/artix7/resources.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# part number to pins -"xc7a200tffg1156-1": - pins: - 0: "R26" - 1: "P26" - 2: "N26" - 3: "M27" - 4: "U25" - 5: "T25" - 6: "P24" -"xc7a200tsbg484-1": - pins: - 0: "V10" - 1: "W10" - 2: "Y11" - 3: "Y12" - 4: "U25" - 5: "T25" - 6: "P24" -"xc7a100tfgg676-1": - pins: - 0: "Y22" - 1: "U17" - 2: "V17" - 3: "V16" - 4: "V14" - 5: "U14" - 6: "U16" -"xc7a100tfgg484-2": - pins: - 0: "J19" - 1: "E14" - 2: "E13" - 3: "U6" - 4: "V4" - 5: "W5" - 6: "V5" -"xc7a100tcsg324-1": - pins: - 0: "N15" - 1: "U17" - 2: "V17" - 3: "V16" - 4: "V14" - 5: "U14" - 6: "U16" -"xc7a50tfgg484-1": - pins: - 0: "E22" - 1: "D22" - 2: "E21" - 3: "D21" - 4: "G21" - 5: "G22" - 6: "F21" -"xc7a35tcsg324-1": - pins: - 0: "G13" - 1: "B11" - 2: "E15" - 3: "U12" - 4: "D13" - 5: "J17" - 6: "U14" -"xc7a35tftg256-1": - pins: - 0: "J13" - 1: "J14" - 2: "K15" - 3: "K16" - 4: "G21" - 5: "G22" - 6: "F21" -"xc7a35tcpg236-1": - pins: - 0: "V17" - 1: "V16" - 2: "W16" - 3: "W17" - 4: "W15" - 5: "V15" - 6: "W14" diff --git a/settings/kintex7/resources.yaml b/settings/kintex7/resources.yaml deleted file mode 100644 index f637aafb..00000000 --- a/settings/kintex7/resources.yaml +++ /dev/null @@ -1,10 +0,0 @@ -# part number to pins -"xc7k70tfbg676-2": - pins: - 0: "K25" - 1: "K26" - 2: "L24" - 3: "L25" - 4: "M19" - 5: "M20" - 6: "M21" diff --git a/settings/zynq7/resources.yaml b/settings/zynq7/resources.yaml deleted file mode 100644 index f4d84cd2..00000000 --- a/settings/zynq7/resources.yaml +++ /dev/null @@ -1,22 +0,0 @@ -# part number to pins -"xc7z020clg484-1": - pins: - 0: "Y9" - 1: "U10" - 2: "N17" - 3: "P18" -"xc7z020clg400-1": - pins: - 0: "T9" - 1: "P14" - 2: "T14" - 3: "R18" -"xc7z010clg400-1": - pins: - 0: "L14" - 1: "L15" - 2: "M14" - 3: "M15" - 4: "K16" - 5: "J16" - 6: "J15" From f8e2c37fe17e7873d4bac450017a3e7cc05f927f Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 30 Jan 2021 16:21:41 +0100 Subject: [PATCH 08/12] kokoro: Generate files during CI runs Signed-off-by: Daniel Schultz --- .github/kokoro/db-full.sh | 9 +++++++++ .github/kokoro/db-quick.sh | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/.github/kokoro/db-full.sh b/.github/kokoro/db-full.sh index af0fd41e..319d3fad 100755 --- a/.github/kokoro/db-full.sh +++ b/.github/kokoro/db-full.sh @@ -29,6 +29,15 @@ echo "----------------------------------------" ) echo "----------------------------------------" +echo +echo "========================================" +echo "Preparing database" +echo "----------------------------------------" +( + make db-prepare-${XRAY_SETTINGS} +) +echo "----------------------------------------" + source settings/$XRAY_SETTINGS.sh echo diff --git a/.github/kokoro/db-quick.sh b/.github/kokoro/db-quick.sh index 6668d573..7f063de5 100755 --- a/.github/kokoro/db-quick.sh +++ b/.github/kokoro/db-quick.sh @@ -29,6 +29,15 @@ echo "----------------------------------------" ) echo "----------------------------------------" +echo +echo "========================================" +echo "Preparing database" +echo "----------------------------------------" +( + make db-prepare-${XRAY_SETTINGS} +) +echo "----------------------------------------" + source settings/$XRAY_SETTINGS.sh echo From 1d1cf3d5e5721e28c158482cd01408bb8ce72fbd Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 6 Feb 2021 10:08:00 +0100 Subject: [PATCH 09/12] Move devices.yaml files Signed-off-by: Daniel Schultz --- database/zynq7/mapping/devices.yaml | 5 ----- {database/artix7/mapping => settings/artix7}/devices.yaml | 2 +- {database/kintex7/mapping => settings/kintex7}/devices.yaml | 0 settings/zynq7/devices.yaml | 5 +++++ 4 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 database/zynq7/mapping/devices.yaml rename {database/artix7/mapping => settings/artix7}/devices.yaml (87%) rename {database/kintex7/mapping => settings/kintex7}/devices.yaml (100%) create mode 100644 settings/zynq7/devices.yaml diff --git a/database/zynq7/mapping/devices.yaml b/database/zynq7/mapping/devices.yaml deleted file mode 100644 index f780df42..00000000 --- a/database/zynq7/mapping/devices.yaml +++ /dev/null @@ -1,5 +0,0 @@ -# device to fabric mapping -"xc7z020s": - fabric: "xc7z020s" -"xc7z010s": - fabric: "xc7z010s" diff --git a/database/artix7/mapping/devices.yaml b/settings/artix7/devices.yaml similarity index 87% rename from database/artix7/mapping/devices.yaml rename to settings/artix7/devices.yaml index 59c1efd0..afd0c798 100644 --- a/database/artix7/mapping/devices.yaml +++ b/settings/artix7/devices.yaml @@ -6,4 +6,4 @@ "xc7a50t": fabric: "xc7a50t" "xc7a35t": - fabric: "xc7a35t" + fabric: "xc7a50t" diff --git a/database/kintex7/mapping/devices.yaml b/settings/kintex7/devices.yaml similarity index 100% rename from database/kintex7/mapping/devices.yaml rename to settings/kintex7/devices.yaml diff --git a/settings/zynq7/devices.yaml b/settings/zynq7/devices.yaml new file mode 100644 index 00000000..e252aecb --- /dev/null +++ b/settings/zynq7/devices.yaml @@ -0,0 +1,5 @@ +# device to fabric mapping +"xc7z020": + fabric: "xc7z020" +"xc7z010": + fabric: "xc7z010" From 43bfaca467f0d02bd8500cae5a5a1a9be0d9ce39 Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Sat, 6 Feb 2021 10:28:29 +0100 Subject: [PATCH 10/12] gitignore: Ignore autogenerated resources.yaml file Signed-off-by: Daniel Schultz --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0cf4b723..b4257487 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ build build_* logs_* database +settings/*/resources.yaml .Xil **/specimen_* **/output From 3b472bd65709c402996fa87349feb9f9b745c59e Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Fri, 12 Mar 2021 22:21:16 +0100 Subject: [PATCH 11/12] Makefile: ROI after all parts are generated Signed-off-by: Daniel Schultz --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0fce08b5..782f2504 100644 --- a/Makefile +++ b/Makefile @@ -168,8 +168,9 @@ db-format-$(1): db-extras-$(1): db-extras-$(1)-parts db-extras-$(1)-roi db-extras-$(1)-harness -db-$(1)-all: db-$(1) db-extras-$(1)-parts db-extras-$(1)-roi +db-$(1)-all: db-$(1) db-extras-$(1)-parts # Build harnesses after database is complete + $$(MAKE) db-extras-$(1)-roi $$(MAKE) db-extras-$(1)-harness db-check: db-check-$(1) From 772c4280ac0a835a4ffe1800fd0f399a1ee1763b Mon Sep 17 00:00:00 2001 From: Daniel Schultz Date: Wed, 17 Mar 2021 19:11:49 +0100 Subject: [PATCH 12/12] fuzzers: 025-bram-config: exclude frame 0 Add an exclusion for frame 0 because this does not contain any bits and the database checks fails. Signed-off-by: Daniel Schultz --- fuzzers/025-bram-config/generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzers/025-bram-config/generate.py b/fuzzers/025-bram-config/generate.py index 9eddc6c4..0c5049a6 100644 --- a/fuzzers/025-bram-config/generate.py +++ b/fuzzers/025-bram-config/generate.py @@ -168,7 +168,7 @@ def run(): def bitfilter(frame, bit): # rw_width_tags() aliasing interconnect on large widths - return frame not in (20, 21) + return frame not in (0, 20, 21) segmk.compile(bitfilter=bitfilter) segmk.write()