diff options
author | Xiretza | 2022-06-01 11:55:58 +0200 |
---|---|---|
committer | Xiretza | 2022-06-01 11:57:50 +0200 |
commit | 9b8ac2de5a3561cdc790db6a474d9a3eac7bd57b (patch) | |
tree | 8ec2a5ecf82210ec74e2b273b1064655fb129de0 | |
parent | 342d6a792c3f1760ea69db97fc2aeefba7736a5d (diff) | |
download | aur-9b8ac2de5a3561cdc790db6a474d9a3eac7bd57b.tar.gz |
Rename to f4pga-arch-defs-nightly-bin, update
-rw-r--r-- | .SRCINFO | 128 | ||||
-rw-r--r-- | 0001-Fix-PLLE2_BASE-techmap.patch | 16 | ||||
-rw-r--r-- | 0002-fix-make-utils-fix_xc7_carry.py-executable.patch | 25 | ||||
-rw-r--r-- | 0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch | 25 | ||||
-rw-r--r-- | PKGBUILD | 87 | ||||
-rw-r--r-- | fix_xc7_carry.patch (renamed from fix_xc7_carry.py.patch) | 2 | ||||
-rw-r--r-- | synth.tcl-disable-abc9.patch | 13 | ||||
-rw-r--r-- | synth.tcl.patch | 13 | ||||
-rw-r--r-- | wrappers.patch | 582 |
9 files changed, 167 insertions, 724 deletions
@@ -1,88 +1,100 @@ -pkgbase = symbiflow-arch-defs-nightly-bin +pkgbase = f4pga-arch-defs-nightly-bin pkgdesc = Documentation of various FPGA architectures - latest binary snapshot - pkgver = 20210324.200.1c7a3d1e + pkgver = 20220523.934b12d pkgrel = 1 - url = https://github.com/SymbiFlow/symbiflow-arch-defs + url = https://github.com/SymbiFlow/f4pga-arch-defs-nightly-bin arch = any license = ISC - provides = symbiflow-arch-defs - conflicts = symbiflow-arch-defs + provides = f4pga-arch-defs + conflicts = f4pga-arch-defs noextract = COPYING - noextract = fix_xc7_carry.py.patch - noextract = synth.tcl.patch - noextract = wrappers.patch - noextract = synth.tcl-disable-abc9.patch noextract = 0001-Fix-PLLE2_BASE-techmap.patch - noextract = symbiflow-arch-defs-install-1c7a3d1e.tar.xz - noextract = symbiflow-arch-defs-xc7a50t_test-1c7a3d1e.tar.xz - noextract = symbiflow-arch-defs-xc7a100t_test-1c7a3d1e.tar.xz - noextract = symbiflow-arch-defs-xc7a200t_test-1c7a3d1e.tar.xz - noextract = symbiflow-arch-defs-xc7z010_test-1c7a3d1e.tar.xz - noextract = symbiflow-arch-defs-xc7z020_test-1c7a3d1e.tar.xz - source = https://raw.githubusercontent.com/SymbiFlow/symbiflow-arch-defs/1c7a3d1e/COPYING - source = fix_xc7_carry.py.patch - source = synth.tcl.patch - source = wrappers.patch - source = synth.tcl-disable-abc9.patch + noextract = 0002-fix-make-utils-fix_xc7_carry.py-executable.patch + noextract = 0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch + noextract = symbiflow-arch-defs-install-934b12d.tar.xz + noextract = symbiflow-arch-defs-xc7a50t_test-934b12d.tar.xz + noextract = symbiflow-arch-defs-xc7a100t_test-934b12d.tar.xz + noextract = symbiflow-arch-defs-xc7a200t_test-934b12d.tar.xz + noextract = symbiflow-arch-defs-xc7z010_test-934b12d.tar.xz + noextract = symbiflow-arch-defs-xc7z020_test-934b12d.tar.xz + source = https://raw.githubusercontent.com/SymbiFlow/f4pga-arch-defs/934b12d/COPYING source = 0001-Fix-PLLE2_BASE-techmap.patch - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-install-1c7a3d1e.tar.xz - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-xc7a50t_test-1c7a3d1e.tar.xz - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-xc7a100t_test-1c7a3d1e.tar.xz - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-xc7a200t_test-1c7a3d1e.tar.xz - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-xc7z010_test-1c7a3d1e.tar.xz - source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/200/20210324-020513/symbiflow-arch-defs-xc7z020_test-1c7a3d1e.tar.xz + source = 0002-fix-make-utils-fix_xc7_carry.py-executable.patch + source = 0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-install-934b12d.tar.xz + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-xc7a50t_test-934b12d.tar.xz + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-xc7a100t_test-934b12d.tar.xz + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-xc7a200t_test-934b12d.tar.xz + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-xc7z010_test-934b12d.tar.xz + source = https://storage.googleapis.com/symbiflow-arch-defs/artifacts/prod/foss-fpga-tools/symbiflow-arch-defs/continuous/install/20220523-230829/symbiflow-arch-defs-xc7z020_test-934b12d.tar.xz sha256sums = 0726ddf229165179fe21da0c97884eeddf88be32dcfc13abf9b2eced0dbafad6 - sha256sums = b6657ddbce1ba8ef0c24666223fefa758ced8619811608b9c4e89ce4904bb96f - sha256sums = 26cdf26b9adabd375b426d83d170a2376fbc8a9ad1d5c7a97f559646c341bc80 - sha256sums = badf095978ca0d828972a7b487b235e3f6970bdb43a0b3c710abaa261cd5f10a - sha256sums = 9822a26f45ac0bfa556f1f3d550aad03225802740c21d0fa8c750c2358a76e04 - sha256sums = b030be41442550e87e75b1cda575ed52e5334314c5e19219870e77c0edaaa8c9 - sha256sums = 095d6660d4da4869b11c38a69725a7252b1a31fe0f108c025d4d1a710dceb676 - sha256sums = f3982ada4e7d6eb01e2fa0f26060ecb25b1eda4bd3a4c5e7d136d77e9aff30d5 - sha256sums = e646c7f89cd1ad883cc662529ea88d2ef2559c4ca356b42d5b0c03bbf62d8039 - sha256sums = a35be25b4dd752b1ca0f8a0cfb915034673d9c208b350cb20afe94b28abe42c7 - sha256sums = d6d11b66ddcb66fc2a0697a814e0a9f4f92a5587ec0c4dd3ecd6a2f2e289cb29 - sha256sums = af0f04c538f2772b99c67b227a5057b7dcb5041ebb2dfe72d939fb32be45226c + sha256sums = f1a3dd4030fb4a8173bd57e72b29ea48c858cc9531ad4fec23d73ef607198f6f + sha256sums = 511bb5658955a8bb649aa45f13c949f35f4962e7f79f84b23a546d26bb309565 + sha256sums = ae5ab7d35dd9d30ca9bb6216ce4ec6f4726692e4fb5f30d4a54ddad758940a9d + sha256sums = 274d2022c630efb8f07f07bc4dde59551fbf2b145d3528849a1ee47adada9b10 + sha256sums = 3e8a0e560534e20feda4a620a4b5d8d18091c088b4df8a128ea959f29253c842 + sha256sums = 37c119e46957098b9e973b0b2a194723e11e6175a429fc5f514d2c708f7d6246 + sha256sums = 54aa5bce9708c1d044ce9bb20a7111613364c2201a426ba2d228136e7c697d3c + sha256sums = ef1ed6fa27ac37d1afff4e355b82fdff834d0fb6fda0fec0d303780099bb1ea8 + sha256sums = ce5b3f3aa4f7cfae31563958d0dffb7f34377e6d4b6289d31361a5ebf6b2da71 -pkgname = symbiflow-arch-defs-nightly-bin-toolchain - pkgdesc = Scripts to invoke the SymbiFlow toolchain +pkgname = f4pga-arch-defs-nightly-bin-toolchain + pkgdesc = Supporting scripts and data for the F4PGA toolchain depends = vtr>8.0.0 depends = yosys - depends = yosys-symbiflow-plugins + depends = yosys-f4pga-plugins depends = python depends = python-constraint depends = python-xc-fasm depends = prjxray-tools - optdepends = symbiflow-arch-defs-nightly-bin-device-xc7a50t - optdepends = symbiflow-arch-defs-nightly-bin-device-xc7a100t - optdepends = symbiflow-arch-defs-nightly-bin-device-xc7a200t - optdepends = symbiflow-arch-defs-nightly-bin-device-xc7z010 - optdepends = symbiflow-arch-defs-nightly-bin-device-xc7z020 - provides = symbiflow-arch-defs-toolchain - conflicts = symbiflow-arch-defs-toolchain + optdepends = f4pga: toolchain binaries and python interface + optdepends = f4pga-arch-defs-nightly-bin-device-xc7a50t + optdepends = f4pga-arch-defs-nightly-bin-device-xc7a100t + optdepends = f4pga-arch-defs-nightly-bin-device-xc7a200t + optdepends = f4pga-arch-defs-nightly-bin-device-xc7z010 + optdepends = f4pga-arch-defs-nightly-bin-device-xc7z020 + provides = f4pga-arch-defs-toolchain + provides = symbiflow-arch-defs-nightly-bin-toolchain + conflicts = f4pga-arch-defs-toolchain + conflicts = symbiflow-arch-defs-nightly-bin-toolchain + replaces = symbiflow-arch-defs-nightly-bin-toolchain -pkgname = symbiflow-arch-defs-nightly-bin-device-xc7a50t - pkgdesc = SymbiFlow device definitions for xc7a50t +pkgname = f4pga-arch-defs-nightly-bin-device-xc7a50t + pkgdesc = F4PGA device definitions for xc7a50t + provides = f4pga-arch-defs-device-xc7a50t provides = symbiflow-arch-defs-device-xc7a50t + conflicts = f4pga-arch-defs-device-xc7a50t conflicts = symbiflow-arch-defs-device-xc7a50t + replaces = symbiflow-arch-defs-nightly-bin-device-xc7a50t -pkgname = symbiflow-arch-defs-nightly-bin-device-xc7a100t - pkgdesc = SymbiFlow device definitions for xc7a100t +pkgname = f4pga-arch-defs-nightly-bin-device-xc7a100t + pkgdesc = F4PGA device definitions for xc7a100t + provides = f4pga-arch-defs-device-xc7a100t provides = symbiflow-arch-defs-device-xc7a100t + conflicts = f4pga-arch-defs-device-xc7a100t conflicts = symbiflow-arch-defs-device-xc7a100t + replaces = symbiflow-arch-defs-nightly-bin-device-xc7a100t -pkgname = symbiflow-arch-defs-nightly-bin-device-xc7a200t - pkgdesc = SymbiFlow device definitions for xc7a200t +pkgname = f4pga-arch-defs-nightly-bin-device-xc7a200t + pkgdesc = F4PGA device definitions for xc7a200t + provides = f4pga-arch-defs-device-xc7a200t provides = symbiflow-arch-defs-device-xc7a200t + conflicts = f4pga-arch-defs-device-xc7a200t conflicts = symbiflow-arch-defs-device-xc7a200t + replaces = symbiflow-arch-defs-nightly-bin-device-xc7a200t -pkgname = symbiflow-arch-defs-nightly-bin-device-xc7z010 - pkgdesc = SymbiFlow device definitions for xc7z010 +pkgname = f4pga-arch-defs-nightly-bin-device-xc7z010 + pkgdesc = F4PGA device definitions for xc7z010 + provides = f4pga-arch-defs-device-xc7z010 provides = symbiflow-arch-defs-device-xc7z010 + conflicts = f4pga-arch-defs-device-xc7z010 conflicts = symbiflow-arch-defs-device-xc7z010 + replaces = symbiflow-arch-defs-nightly-bin-device-xc7z010 -pkgname = symbiflow-arch-defs-nightly-bin-device-xc7z020 - pkgdesc = SymbiFlow device definitions for xc7z020 +pkgname = f4pga-arch-defs-nightly-bin-device-xc7z020 + pkgdesc = F4PGA device definitions for xc7z020 + provides = f4pga-arch-defs-device-xc7z020 provides = symbiflow-arch-defs-device-xc7z020 + conflicts = f4pga-arch-defs-device-xc7z020 conflicts = symbiflow-arch-defs-device-xc7z020 - + replaces = symbiflow-arch-defs-nightly-bin-device-xc7z020 diff --git a/0001-Fix-PLLE2_BASE-techmap.patch b/0001-Fix-PLLE2_BASE-techmap.patch index 20684fd5cc15..e4622909026d 100644 --- a/0001-Fix-PLLE2_BASE-techmap.patch +++ b/0001-Fix-PLLE2_BASE-techmap.patch @@ -1,17 +1,17 @@ -From 2b3762c85054cfa669558a01a64f43802707f919 Mon Sep 17 00:00:00 2001 +From 28e6cb12568b76ee937c091b82e7884e545903e3 Mon Sep 17 00:00:00 2001 From: Xiretza <xiretza@xiretza.xyz> Date: Fri, 5 Mar 2021 11:13:46 +0100 -Subject: [PATCH] Fix PLLE2_BASE techmap +Subject: [PATCH 1/3] Fix PLLE2_BASE techmap --- xc/xc7/techmap/cells_map.v | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xc/xc7/techmap/cells_map.v b/xc/xc7/techmap/cells_map.v -index c43fb94d..d4d0df45 100644 +index deec01c9..d46fad25 100644 --- a/xc/xc7/techmap/cells_map.v +++ b/xc/xc7/techmap/cells_map.v -@@ -4142,7 +4142,7 @@ endmodule +@@ -4183,7 +4183,7 @@ endmodule module PLLE2_BASE ( input CLKFBIN, @@ -20,7 +20,7 @@ index c43fb94d..d4d0df45 100644 output CLKFBOUT, output CLKOUT0, -@@ -4153,6 +4153,7 @@ output CLKOUT4, +@@ -4194,6 +4194,7 @@ output CLKOUT4, output CLKOUT5, input RST, @@ -28,7 +28,7 @@ index c43fb94d..d4d0df45 100644 output LOCKED ); -@@ -4239,7 +4240,7 @@ output LOCKED +@@ -4280,7 +4281,7 @@ output LOCKED _TECHMAP_REPLACE_ ( .CLKFBIN(CLKFBIN), @@ -37,7 +37,7 @@ index c43fb94d..d4d0df45 100644 .CLKINSEL(1'b1), .CLKFBOUT(CLKFBOUT), -@@ -4250,7 +4251,7 @@ output LOCKED +@@ -4291,7 +4292,7 @@ output LOCKED .CLKOUT4(CLKOUT4), .CLKOUT5(CLKOUT5), @@ -47,5 +47,5 @@ index c43fb94d..d4d0df45 100644 .LOCKED(LOCKED), -- -2.31.0 +2.36.1 diff --git a/0002-fix-make-utils-fix_xc7_carry.py-executable.patch b/0002-fix-make-utils-fix_xc7_carry.py-executable.patch new file mode 100644 index 000000000000..9023b0fc3663 --- /dev/null +++ b/0002-fix-make-utils-fix_xc7_carry.py-executable.patch @@ -0,0 +1,25 @@ +From e85843b4094c9779be797e42f58c8fd3aaaa5ca2 Mon Sep 17 00:00:00 2001 +From: Xiretza <xiretza@xiretza.xyz> +Date: Sun, 29 May 2022 15:59:36 +0200 +Subject: [PATCH 2/3] fix: make utils/fix_xc7_carry.py executable + +Signed-off-by: Xiretza <xiretza@xiretza.xyz> +--- + utils/fix_xc7_carry.py | 1 + + 1 file changed, 1 insertion(+) + mode change 100644 => 100755 utils/fix_xc7_carry.py + +diff --git a/utils/fix_xc7_carry.py b/utils/fix_xc7_carry.py +old mode 100644 +new mode 100755 +index 9b911dcb..8eaef2f3 +--- a/utils/fix_xc7_carry.py ++++ b/utils/fix_xc7_carry.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/env python3 + """ Script for addressing CARRY4 output congestion in elaborated netlists. + + Usage: +-- +2.36.1 + diff --git a/0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch b/0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch new file mode 100644 index 000000000000..035804d04dc1 --- /dev/null +++ b/0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch @@ -0,0 +1,25 @@ +From cdf9496a23197128a33573fb13346ab8a4b35c84 Mon Sep 17 00:00:00 2001 +From: Xiretza <xiretza@xiretza.xyz> +Date: Sun, 29 May 2022 16:24:04 +0200 +Subject: [PATCH 3/3] fix(xc7/synth.tcl): run fix_xc7_carry.py directly + +--- + xc/xc7/yosys/synth.tcl | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/xc/xc7/yosys/synth.tcl b/xc/xc7/yosys/synth.tcl +index 6944fabb..ac858c6d 100644 +--- a/xc/xc7/yosys/synth.tcl ++++ b/xc/xc7/yosys/synth.tcl +@@ -144,7 +144,7 @@ techmap -map $::env(TECHMAP_PATH)/carry_map.v + clean_processes + write_json $::env(OUT_JSON).carry_fixup.json + +-exec $::env(PYTHON3) $::env(UTILS_PATH)/fix_xc7_carry.py < $::env(OUT_JSON).carry_fixup.json > $::env(OUT_JSON).carry_fixup_out.json ++exec $::env(UTILS_PATH)/fix_xc7_carry.py < $::env(OUT_JSON).carry_fixup.json > $::env(OUT_JSON).carry_fixup_out.json + design -push + read_json $::env(OUT_JSON).carry_fixup_out.json + +-- +2.36.1 + @@ -1,81 +1,69 @@ # Maintainer: xiretza <xiretza+aur@xiretza.xyz> -_pkgbase=symbiflow-arch-defs +_pkgbase=f4pga-arch-defs pkgbase="$_pkgbase-nightly-bin" -_buildnum=200 -_builddate=20210324-020513 -_commit=1c7a3d1e -pkgver="${_builddate%%-*}.$_buildnum.$_commit" +_builddate=20220523-230829 +_commit=934b12d +pkgver="${_builddate%%-*}.$_commit" pkgrel=1 pkgdesc="Documentation of various FPGA architectures - latest binary snapshot" arch=(any) -url="https://github.com/SymbiFlow/symbiflow-arch-defs" +url="https://github.com/SymbiFlow/$pkgbase" license=('ISC') provides=("$_pkgbase") conflicts=("$_pkgbase") -_baseurl="https://storage.googleapis.com/$_pkgbase/artifacts/prod/foss-fpga-tools/$_pkgbase/continuous/install/$_buildnum/$_builddate" +_old_pkgbase=symbiflow-arch-defs +_baseurl="https://storage.googleapis.com/$_old_pkgbase/artifacts/prod/foss-fpga-tools/$_old_pkgbase/continuous/install/$_builddate" _devices=(xc7a50t xc7a100t xc7a200t xc7z010 xc7z020) source=("https://raw.githubusercontent.com/SymbiFlow/$_pkgbase/$_commit/COPYING" - "fix_xc7_carry.py.patch" - "synth.tcl.patch" - "wrappers.patch" - "synth.tcl-disable-abc9.patch" - "0001-Fix-PLLE2_BASE-techmap.patch" - "$_baseurl/$_pkgbase-install-$_commit.tar.xz") + '0001-Fix-PLLE2_BASE-techmap.patch' + '0002-fix-make-utils-fix_xc7_carry.py-executable.patch' + '0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch' + "$_baseurl/$_old_pkgbase-install-$_commit.tar.xz") for _d in "${_devices[@]}"; do - source+=("$_baseurl/$_pkgbase-${_d}_test-$_commit.tar.xz") + source+=("$_baseurl/$_old_pkgbase-${_d}_test-$_commit.tar.xz") done noextract=("${source[@]##*/}") sha256sums=('0726ddf229165179fe21da0c97884eeddf88be32dcfc13abf9b2eced0dbafad6' - 'b6657ddbce1ba8ef0c24666223fefa758ced8619811608b9c4e89ce4904bb96f' - '26cdf26b9adabd375b426d83d170a2376fbc8a9ad1d5c7a97f559646c341bc80' - 'badf095978ca0d828972a7b487b235e3f6970bdb43a0b3c710abaa261cd5f10a' - '9822a26f45ac0bfa556f1f3d550aad03225802740c21d0fa8c750c2358a76e04' - 'b030be41442550e87e75b1cda575ed52e5334314c5e19219870e77c0edaaa8c9' - '095d6660d4da4869b11c38a69725a7252b1a31fe0f108c025d4d1a710dceb676' - 'f3982ada4e7d6eb01e2fa0f26060ecb25b1eda4bd3a4c5e7d136d77e9aff30d5' - 'e646c7f89cd1ad883cc662529ea88d2ef2559c4ca356b42d5b0c03bbf62d8039' - 'a35be25b4dd752b1ca0f8a0cfb915034673d9c208b350cb20afe94b28abe42c7' - 'd6d11b66ddcb66fc2a0697a814e0a9f4f92a5587ec0c4dd3ecd6a2f2e289cb29' - 'af0f04c538f2772b99c67b227a5057b7dcb5041ebb2dfe72d939fb32be45226c') + 'f1a3dd4030fb4a8173bd57e72b29ea48c858cc9531ad4fec23d73ef607198f6f' + '511bb5658955a8bb649aa45f13c949f35f4962e7f79f84b23a546d26bb309565' + 'ae5ab7d35dd9d30ca9bb6216ce4ec6f4726692e4fb5f30d4a54ddad758940a9d' + '274d2022c630efb8f07f07bc4dde59551fbf2b145d3528849a1ee47adada9b10' + '3e8a0e560534e20feda4a620a4b5d8d18091c088b4df8a128ea959f29253c842' + '37c119e46957098b9e973b0b2a194723e11e6175a429fc5f514d2c708f7d6246' + '54aa5bce9708c1d044ce9bb20a7111613364c2201a426ba2d228136e7c697d3c' + 'ef1ed6fa27ac37d1afff4e355b82fdff834d0fb6fda0fec0d303780099bb1ea8' + 'ce5b3f3aa4f7cfae31563958d0dffb7f34377e6d4b6289d31361a5ebf6b2da71') pkgname=("$pkgbase-toolchain" "${_devices[@]/#/$pkgbase-device-}") _extract_tarball() { install -dm755 "$pkgdir/usr" - bsdtar -C "$pkgdir/usr" -xof "$_pkgbase-$1-$_commit.tar.xz" + bsdtar -C "$pkgdir/usr" -xof "$_old_pkgbase-$1-$_commit.tar.xz" chmod -R g-ws "$pkgdir" install -Dm644 "$srcdir/COPYING" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } _package-toolchain() { - pkgdesc="Scripts to invoke the SymbiFlow toolchain" - depends=('vtr>8.0.0' 'yosys' 'yosys-symbiflow-plugins' 'python' 'python-constraint' 'python-xc-fasm' 'prjxray-tools') - optdepends=("${_devices[@]/#/$pkgbase-device-}") - provides=("$_pkgbase-toolchain") - conflicts=("$_pkgbase-toolchain") + pkgdesc="Supporting scripts and data for the F4PGA toolchain" + depends=('vtr>8.0.0' 'yosys' 'yosys-f4pga-plugins' 'python' 'python-constraint' 'python-xc-fasm' 'prjxray-tools') + optdepends=( + 'f4pga: toolchain binaries and python interface' + "${_devices[@]/#/$pkgbase-device-}" + ) + provides=("$_pkgbase-toolchain" "$_old_pkgbase-nightly-bin-toolchain") + # conflicts with symbiflow-arch-defs-nightly-bin-toolchain instead of symbiflow-arch-defs-toolchain because f4pga provides the latter, and is actually compatible + conflicts=("$_pkgbase-toolchain" "$_old_pkgbase-nightly-bin-toolchain") + replaces=("$_old_pkgbase-nightly-bin-toolchain") _extract_tarball "install" rm "$pkgdir/usr/environment.yml" - # https://github.com/SymbiFlow/symbiflow-arch-defs/issues/1973, needs patch adjustment - [ ! -f "$pkgdir/usr/bin/symbiflow_write_xml_rr_graph" ] - - patch --no-backup-if-mismatch -d "$pkgdir/usr/bin/" -p1 < "$srcdir/wrappers.patch" - patch -d "$pkgdir/usr/share/symbiflow/scripts/" -p1 < "$srcdir/fix_xc7_carry.py.patch" - patch -d "$pkgdir/usr/share/symbiflow/scripts/xc7/" -p1 < "$srcdir/synth.tcl.patch" - patch -d "$pkgdir/usr/share/symbiflow/scripts/xc7/" -p1 < "$srcdir/synth.tcl-disable-abc9.patch" patch -d "$pkgdir/usr/share/symbiflow/techmaps/xc7_vpr/" -p3 < "$srcdir/0001-Fix-PLLE2_BASE-techmap.patch" - - sed -i "s#source \"[^\"]*/env\"#source /usr/lib/$_pkgbase/env#" "$pkgdir"/usr/bin/* - sed -i 's#SHARE_DIR_PATH=.*#SHARE_DIR_PATH=/usr/share/symbiflow/#' "$pkgdir/usr/bin/env" - sed -i -E 's/^\s*VPR_OPTIONS=(".*")$/read -ra VPR_OPTIONS <<<\1/' "$pkgdir/usr/bin/vpr_common" - - install -dm755 "$pkgdir/usr/lib/$_pkgbase" - chmod a-x "$pkgdir/usr/bin/env" "$pkgdir/usr/bin/vpr_common" - mv "$pkgdir/usr/bin/env" "$pkgdir/usr/bin/vpr_common" "$pkgdir/usr/lib/$_pkgbase" + patch -d "$pkgdir/usr/share/symbiflow/scripts/" -p2 < "$srcdir/0002-fix-make-utils-fix_xc7_carry.py-executable.patch" + patch -d "$pkgdir/usr/share/symbiflow/scripts/xc7/" -p4 < "$srcdir/0003-fix-xc7-synth.tcl-run-fix_xc7_carry.py-directly.patch" } eval "package_$pkgbase-toolchain() { @@ -85,9 +73,10 @@ eval "package_$pkgbase-toolchain() { for _device in "${_devices[@]}"; do eval "package_$pkgbase-device-$_device() { - pkgdesc='SymbiFlow device definitions for $_device' - provides=('$_pkgbase-device-$_device') - conflicts=('$_pkgbase-device-$_device') + pkgdesc='F4PGA device definitions for $_device' + provides=('$_pkgbase-device-$_device' '$_old_pkgbase-device-$_device') + conflicts=('$_pkgbase-device-$_device' '$_old_pkgbase-device-$_device') + replaces=('$_old_pkgbase-nightly-bin-device-$_device') _extract_tarball '${_device}_test' }" diff --git a/fix_xc7_carry.py.patch b/fix_xc7_carry.patch index 42440de332f5..f1c24666445f 100644 --- a/fix_xc7_carry.py.patch +++ b/fix_xc7_carry.patch @@ -1,7 +1,7 @@ diff --git a/fix_xc7_carry.py b/fix_xc7_carry.py old mode 100644 new mode 100755 -index 06241b0c..119b15cf +index 9b911dcb..f457c836 --- a/fix_xc7_carry.py +++ b/fix_xc7_carry.py @@ -1,3 +1,5 @@ diff --git a/synth.tcl-disable-abc9.patch b/synth.tcl-disable-abc9.patch deleted file mode 100644 index 7c42926bcf62..000000000000 --- a/synth.tcl-disable-abc9.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/synth.tcl b/synth.tcl -index 1a73aa66..bd10d2cc 100644 ---- a/synth.tcl -+++ b/synth.tcl -@@ -155,7 +155,7 @@ write_ilang $::env(OUT_JSON).pre_abc9.ilang - if { $::env(USE_ROI) == "TRUE" } { - synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -noiopad -nowidelut -run map_ffs:check - } else { -- synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -nowidelut -run map_ffs:check -+ #synth_xilinx -flatten -abc9 -nosrl -noclkbuf -nodsp -iopad -nowidelut -run map_ffs:check - } - - write_ilang $::env(OUT_JSON).post_abc9.ilang diff --git a/synth.tcl.patch b/synth.tcl.patch deleted file mode 100644 index 6879844f7235..000000000000 --- a/synth.tcl.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/synth.tcl b/synth.tcl -index dc585a76..68104de8 100644 ---- a/synth.tcl -+++ b/synth.tcl -@@ -133,7 +133,7 @@ read_verilog -specify -lib $::env(TECHMAP_PATH)/cells_sim.v - - techmap -map $::env(TECHMAP_PATH)/carry_map.v - write_json $::env(OUT_JSON).carry_fixup.json --exec $::env(PYTHON3) $::env(UTILS_PATH)/fix_xc7_carry.py < $::env(OUT_JSON).carry_fixup.json > $::env(OUT_JSON).carry_fixup_out.json -+exec $::env(UTILS_PATH)/fix_xc7_carry.py < $::env(OUT_JSON).carry_fixup.json > $::env(OUT_JSON).carry_fixup_out.json - design -push - read_json $::env(OUT_JSON).carry_fixup_out.json - diff --git a/wrappers.patch b/wrappers.patch deleted file mode 100644 index c255ad566f50..000000000000 --- a/wrappers.patch +++ /dev/null @@ -1,582 +0,0 @@ -diff --git a/env b/env -index 1e51c5b5..a8c0d483 100644 ---- a/env -+++ b/env -@@ -1,9 +1,29 @@ - #!/bin/bash - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+ENVPATH=$(realpath "${BASH_SOURCE[0]}") -+ENVPATH=$(dirname "${ENVPATH}") - --if [ -z $VPRPATH ]; then -- export VPRPATH=$MYPATH -- export PYTHONPATH=${VPRPATH}/python:${VPRPATH}/python/prjxray:${PYTHONPATH} --fi -+DATABASE_DIR=${DATABASE_DIR:-$(prjxray-config)} -+ -+SHARE_DIR_PATH=$(realpath "${ENVPATH}/../share/symbiflow") -+export SHARE_DIR_PATH -+export TECHMAP_PATH=${SHARE_DIR_PATH}/techmaps/xc7_vpr/techmap -+export UTILS_PATH=${SHARE_DIR_PATH}/scripts -+ -+find_device_from_part() { -+ # Try to find device name. Accept only when exactly one is found -+ -+ local PART=$1 -+ [[ -n ${PART} ]] || return 1 -+ PART_DIRS=("${DATABASE_DIR}"/*/"${PART}") -+ if [[ ${#PART_DIRS[@]} -eq 1 ]]; then -+ basename -- "$(dirname "${PART_DIRS[0]}")" -+ return 0 -+ else -+ echo "Could not determine device from part name alone - please specify a device" -+ return 1 -+ fi -+} -+ -+export VPRPATH=${VPRPATH:-$ENVPATH} -+export PYTHONPATH=${VPRPATH}/python:${VPRPATH}/python/prjxray:${PYTHONPATH:-} -diff --git a/symbiflow_generate_constraints b/symbiflow_generate_constraints -index a973e577..99812c63 100755 ---- a/symbiflow_generate_constraints -+++ b/symbiflow_generate_constraints -@@ -1,10 +1,10 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -- --export SHARE_DIR_PATH=`realpath ${MYPATH}/../share/symbiflow` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") -+# shellcheck source=env -+source "${MYPATH}/env" - - EBLIF=$1 - NET=$2 -@@ -13,17 +13,27 @@ DEVICE=$4 - ARCH_DEF=$5 - PCF=$6 - --if [ ! -z $PCF ]; then -- PCF_OPTS="--pcf $PCF" -+if [[ -n ${PCF} ]]; then -+ PCF_OPTS=(--pcf "${PCF}") - fi - - VPR_GRID_MAP=${SHARE_DIR_PATH}/arch/${DEVICE}/vpr_grid_map.csv - PINMAP=${SHARE_DIR_PATH}/arch/${DEVICE}/${PART}/pinmap.csv - IOGEN=${SHARE_DIR_PATH}/scripts/prjxray_create_ioplace.py - CONSTR_GEN=${SHARE_DIR_PATH}/scripts/prjxray_create_place_constraints.py --PROJECT=$(basename -- "$EBLIF") -+PROJECT=$(basename -- "${EBLIF}") - IOPLACE_FILE="${PROJECT%.*}.ioplace" - --python3 ${IOGEN} --blif $EBLIF --map $PINMAP --net $NET $PCF_OPTS > ${IOPLACE_FILE} --python3 ${CONSTR_GEN} --net $NET --arch ${ARCH_DEF} --blif $EBLIF --vpr_grid_map ${VPR_GRID_MAP} --input ${IOPLACE_FILE} > constraints.place -+python3 "${IOGEN}" \ -+ --blif "${EBLIF}" \ -+ --map "${PINMAP}" \ -+ --net "${NET}" \ -+ "${PCF_OPTS[@]}" > "${IOPLACE_FILE}" -+ -+python3 "${CONSTR_GEN}" \ -+ --net "${NET}" \ -+ --arch "${ARCH_DEF}" \ -+ --blif "${EBLIF}" \ -+ --vpr_grid_map "${VPR_GRID_MAP}" \ -+ --input "${IOPLACE_FILE}" > constraints.place - -diff --git a/symbiflow_pack b/symbiflow_pack -index 9f4371ea..d355fa55 100755 ---- a/symbiflow_pack -+++ b/symbiflow_pack -@@ -1,15 +1,18 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") - --source ${MYPATH}/env --source ${VPRPATH}/vpr_common -+# shellcheck source=env -+source "${MYPATH}/env" - --parse_args "$@" -+OUT_NOISY_WARNINGS=noisy_warnings_pack.log -+ -+# shellcheck source=vpr_common -+source "${VPRPATH}/vpr_common" - --export OUT_NOISY_WARNINGS=noisy_warnings-${DEVICE}_pack.log -+parse_args "$@" - - run_vpr --pack - -diff --git a/symbiflow_place b/symbiflow_place -index 09b10817..574779a6 100755 ---- a/symbiflow_place -+++ b/symbiflow_place -@@ -1,27 +1,30 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") - --source ${MYPATH}/env --source ${MYPATH}/vpr_common -+# shellcheck source=env -+source "${MYPATH}/env" -+ -+OUT_NOISY_WARNINGS=noisy_warnings_place.log -+ -+# shellcheck source=vpr_common -+source "${VPRPATH}/vpr_common" - - parse_args "$@" - --if [ -z $PCF ]; then -+if [[ -z ${PCF} ]]; then - PCF="" - fi - --if [ -z $NET ]; then -+if [[ -z ${NET} ]]; then - echo "Please provide net file name" - exit 1 - fi - --OUT_NOISY_WARNINGS=noisy_warnings-${DEVICE}_place.log -- - echo "Generating coinstrains ..." --symbiflow_generate_constraints $EBLIF $NET $PART $DEVICE $ARCH_DEF $PCF -+symbiflow_generate_constraints "${EBLIF}" "${NET}" "${PART}" "${DEVICE}" "${ARCH_DEF}" "${PCF}" - - run_vpr --fix_clusters constraints.place --place - -diff --git a/symbiflow_route b/symbiflow_route -index ac8ede98..a4c8f4f2 100755 ---- a/symbiflow_route -+++ b/symbiflow_route -@@ -1,15 +1,18 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") - --source ${MYPATH}/env --source ${VPRPATH}/vpr_common -+# shellcheck source=env -+source "${MYPATH}/env" - --parse_args "$@" -+OUT_NOISY_WARNINGS=noisy_warnings_route.log -+ -+# shellcheck source=vpr_common -+source "${VPRPATH}/vpr_common" - --export OUR_NOISY_WARNINGS=noisy_warnings-${DEVICE}_pack.log -+parse_args "$@" - - run_vpr --route - -diff --git a/symbiflow_synth b/symbiflow_synth -index e9c3910e..302991ee 100755 ---- a/symbiflow_synth -+++ b/symbiflow_synth -@@ -1,14 +1,11 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") -+# shellcheck source=env -+source "${MYPATH}/env" - --export SHARE_DIR_PATH=`realpath ${MYPATH}/../share/symbiflow` --export TECHMAP_PATH=${SHARE_DIR_PATH}/techmaps/xc7_vpr/techmap -- -- --export UTILS_PATH=${SHARE_DIR_PATH}/scripts - SYNTH_TCL_PATH=${UTILS_PATH}/xc7/synth.tcl - CONV_TCL_PATH=${UTILS_PATH}/xc7/conv.tcl - SPLIT_INOUTS=${UTILS_PATH}/split_inouts.py -@@ -25,11 +22,9 @@ TOPNAME=0 - DEVICENAME=0 - PARTNAME=0 - --for arg in $@; do -- echo $arg -- case "$arg" in -+for arg in "$@"; do -+ case "${arg}" in - -t|--top) -- echo "adding top" - VERILOGLIST=0 - XDCLIST=0 - TOPNAME=1 -@@ -65,16 +60,16 @@ for arg in $@; do - PARTNAME=1 - ;; - *) -- if [ $VERILOGLIST -eq 1 ]; then -- VERILOG_FILES+=($arg) -- elif [ $XDCLIST -eq 1 ]; then -- XDC_FILES+=($arg) -- elif [ $TOPNAME -eq 1 ]; then -- TOP=$arg -- elif [ $DEVICENAME -eq 1 ]; then -- DEVICE=$arg -- elif [ $PARTNAME -eq 1 ]; then -- PART=$arg -+ if [[ ${VERILOGLIST} -eq 1 ]]; then -+ VERILOG_FILES+=("${arg}") -+ elif [[ ${XDCLIST} -eq 1 ]]; then -+ XDC_FILES+=("${arg}") -+ elif [[ ${TOPNAME} -eq 1 ]]; then -+ TOP=${arg} -+ elif [[ ${DEVICENAME} -eq 1 ]]; then -+ DEVICE=${arg} -+ elif [[ ${PARTNAME} -eq 1 ]]; then -+ PART=${arg} - else - echo "Usage: synth [-t|--top <top module name> -v|--verilog <Verilog files list> [-x|--xdc <XDC files list>]" - echo " [-d|--device <device type (e.g. artix7)>] [-p|--part <part name>]" -@@ -85,26 +80,24 @@ for arg in $@; do - esac - done - --if [ ${#VERILOG_FILES[@]} -eq 0 ]; then -+if [[ ${#VERILOG_FILES[@]} -eq 0 ]]; then - echo "Please provide at least one Verilog file" - exit 1 - fi - --DATABASE_DIR=${DATABASE_DIR:=$(prjxray-config)} -- --export TOP=${TOP} -+export TOP - export USE_ROI="FALSE" - export INPUT_XDC_FILE=${XDC_FILES[*]} --export OUT_JSON=$TOP.json -+export OUT_JSON=${TOP}.json - export OUT_SDC=${TOP}.sdc - export SYNTH_JSON=${TOP}_io.json - export OUT_SYNTH_V=${TOP}_synth.v - export OUT_EBLIF=${TOP}.eblif --export PART_JSON=`realpath ${DATABASE_DIR}/$DEVICE/$PART/part.json` -+PART_JSON=$(realpath "${DATABASE_DIR}/${DEVICE}/${PART}/part.json") -+export PART_JSON - export OUT_FASM_EXTRA=${TOP}_fasm_extra.fasm --export PYTHON3=${PYTHON3:=$(which python3)} - LOG=${TOP}_synth.log - --yosys -p "tcl ${SYNTH_TCL_PATH}" -l $LOG ${VERILOG_FILES[*]} --python3 ${SPLIT_INOUTS} -i ${OUT_JSON} -o ${SYNTH_JSON} --yosys -p "read_json $SYNTH_JSON; tcl ${CONV_TCL_PATH}" -+yosys -p "tcl ${SYNTH_TCL_PATH}" -l "${LOG}" "${VERILOG_FILES[@]}" -+python3 "${SPLIT_INOUTS}" -i "${OUT_JSON}" -o "${SYNTH_JSON}" -+yosys -p "read_json ${SYNTH_JSON}; tcl ${CONV_TCL_PATH}" -diff --git a/symbiflow_write_bitstream b/symbiflow_write_bitstream -index f3ee2e1b..ca970eaf 100755 ---- a/symbiflow_write_bitstream -+++ b/symbiflow_write_bitstream -@@ -1,22 +1,23 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") - --source ${MYPATH}/env -+# shellcheck source=env -+source "${MYPATH}/env" - echo "Writing bitstream ..." - --FRM2BIT="" --if [ ! -z ${FRAMES2BIT} ]; then -- FRM2BIT="--frm2bit ${FRAMES2BIT}" -+FRM2BIT=() -+if [[ -v FRAMES2BIT ]]; then -+ FRM2BIT=(--frm2bit "${FRAMES2BIT}") - fi - - OPTS=d:f:b:p: - LONGOPTS=device:,fasm:,bit:,part: - --PARSED_OPTS=`getopt --options=${OPTS} --longoptions=${LONGOPTS} --name $0 -- $@` --eval set -- ${PARSED_OPTS} -+PARSED_OPTS=$(getopt --options="${OPTS}" --longoptions="${LONGOPTS}" --name "$0" -- "$@") -+eval set -- "${PARSED_OPTS}" - - DEVICE="" - FASM="" -@@ -44,33 +45,37 @@ while true; do - --) - break - ;; -+ *) -+ echo "Usage:" -+ echo "symbiflow_write_bitstream (-f|--fasm) FASM_INPUT_FILE (-b|--bit) BIT_INPUT_FILE" -+ echo " [(-d|--device) DEVICE_TYPE] [(-p|--part) PART_NAME]" -+ exit 1 - esac - done - --DATABASE_DIR=${DATABASE_DIR:=$(prjxray-config)} -- --if [ -z $DEVICE ]; then -- # Try to find device name. Accept only when exactly one is found -- PART_DIRS=(${DATABASE_DIR}/*/${PART}) -- if [ ${#PART_DIRS[@]} -eq 1 ]; then -- DEVICE=$(basename $(dirname "${PART_DIRS[0]}")) -- else -- echo "Please provide device name" -- exit 1 -- fi -+if [[ -z ${DEVICE} ]]; then -+ DEVICE=$(find_device_from_part "${PART}") - fi - --DBROOT=`realpath ${DATABASE_DIR}/${DEVICE}` -+DBROOT=$(realpath "${DATABASE_DIR}/${DEVICE}") - --if [ -z $FASM ]; then -+if [[ -z ${FASM} ]]; then - echo "Please provide fasm file name" - exit 1 - fi - --if [ -z $BIT ]; then -+if [[ -z ${BIT} ]]; then - echo "Please provide bit file name" - exit 1 - fi - --xcfasm --db-root ${DBROOT} --part ${PART} --part_file ${DBROOT}/${PART}/part.yaml --sparse --emit_pudc_b_pullup --fn_in ${FASM} --bit_out ${BIT} ${FRM2BIT} -+xcfasm \ -+ --db-root "${DBROOT}" \ -+ --part "${PART}" \ -+ --part_file "${DBROOT}/${PART}/part.yaml" \ -+ --sparse \ -+ --emit_pudc_b_pullup \ -+ --fn_in "${FASM}" \ -+ --bit_out "${BIT}" \ -+ "${FRM2BIT[@]}" - -diff --git a/symbiflow_write_fasm b/symbiflow_write_fasm -index ec4f8561..d4ea43ba 100755 ---- a/symbiflow_write_fasm -+++ b/symbiflow_write_fasm -@@ -1,26 +1,28 @@ - #!/bin/bash --set -e -+set -eu - --MYPATH=`realpath $0` --MYPATH=`dirname ${MYPATH}` -+MYPATH=$(realpath "$0") -+MYPATH=$(dirname "${MYPATH}") - --source ${MYPATH}/env --source ${VPRPATH}/vpr_common -+# shellcheck source=env -+source "${MYPATH}/env" -+ -+OUT_NOISY_WARNINGS=noisy_warnings_fasm.log -+ -+# shellcheck source=vpr_common -+source "${VPRPATH}/vpr_common" - - parse_args "$@" - - TOP="${EBLIF%.*}" - FASM_EXTRA=${TOP}_fasm_extra.fasm - --export OUT_NOISY_WARNINGS=noisy_warnings-${DEVICE}_fasm.log -- - run_genfasm - --echo "FASM extra: $FASM_EXTRA" --if [ -f $FASM_EXTRA ]; then -+if [[ -f ${FASM_EXTRA} ]]; then - echo "writing final fasm" -- cat ${TOP}.fasm $FASM_EXTRA > tmp.fasm -- mv tmp.fasm ${TOP}.fasm -+ cat "${TOP}.fasm" "${FASM_EXTRA}" > tmp.fasm -+ mv tmp.fasm "${TOP}.fasm" - fi - - mv vpr_stdout.log fasm.log -diff --git a/vpr_common b/vpr_common -index 8a831587..6d540000 100644 ---- a/vpr_common -+++ b/vpr_common -@@ -1,6 +1,8 @@ - #!/bin/bash - --if [ -z $VPR_OPTIONS ]; then -+[[ -v SHARE_DIR_PATH ]] || { echo "Error: env must be sourced before vpr_common"; exit 1; } -+ -+if [[ -z ${VPR_OPTIONS:+} ]]; then - echo "Using default VPR options." - VPR_OPTIONS="@VPR_ARGS@" - fi -@@ -10,7 +12,7 @@ function parse_args { - OPTS=d:e:p:n:P:s:a: - LONGOPTS=device:,eblif:,pcf:,net:,part:,sdc:,additional_vpr_options: - -- PARSED_OPTS=`getopt --options=${OPTS} --longoptions=${LONGOPTS} --name $0 -- "$@"` -+ PARSED_OPTS=$(getopt --options="${OPTS}" --longoptions="${LONGOPTS}" --name "$0" -- "$@") - eval set -- "${PARSED_OPTS}" - - DEVICE="" -@@ -49,66 +51,58 @@ function parse_args { - shift 2 - ;; - -a|--additional_vpr_options) -- ADDITIONAL_VPR_OPTIONS="$2" -+ read -ra ADDITIONAL_VPR_OPTIONS <<<"$2" -+ VPR_OPTIONS+=("${ADDITIONAL_VPR_OPTIONS[@]}") - shift 2 - ;; - --) - break - ;; -+ *) -+ echo "Unknown argument: $1" -+ exit 1 -+ ;; - esac - done - -- if [ -z $DEVICE ] && [ -n $PART ]; then -- # Try to find device name. Accept only when exactly one is found -- PART_DIRS=(${MYPATH}/../share/symbiflow/arch/*/${PART}) -- if [ ${#PART_DIRS[@]} -eq 1 ]; then -- DEVICE=$(basename $(dirname "${PART_DIRS[0]}")) -- fi -- fi -- if [ -z $DEVICE ]; then -- echo "Please provide device name" -- exit 1 -+ if [[ -z ${DEVICE} ]]; then -+ DEVICE=$(find_device_from_part "${PART}") - fi - -- if [ -z $EBLIF ]; then -+ if [[ -z ${EBLIF} ]]; then - echo "Please provide blif file name" - exit 1 - fi - -- export DEVICE=$DEVICE -- export EBLIF=$EBLIF -- export PCF=$PCF -- export NET=$NET -- export SDC=$SDC -- export VPR_OPTIONS="$VPR_OPTIONS $ADDITIONAL_VPR_OPTIONS" -+ export DEVICE EBLIF PCF NET SDC VPR_OPTIONS - -- export ARCH_DIR=`realpath ${MYPATH}/../share/symbiflow/arch/$DEVICE` -+ export ARCH_DIR=${SHARE_DIR_PATH}/arch/${DEVICE} - export ARCH_DEF=${ARCH_DIR}/arch.timing.xml - export LOOKAHEAD=${ARCH_DIR}/rr_graph_${DEVICE}.lookahead.bin - export RR_GRAPH=${ARCH_DIR}/rr_graph_${DEVICE}.rr_graph.real.bin - export RR_GRAPH_XML=${ARCH_DIR}/rr_graph_${DEVICE}.rr_graph.real.xml - export PLACE_DELAY=${ARCH_DIR}/rr_graph_${DEVICE}.place_delay.bin -- export DEVICE_NAME=`echo $DEVICE | sed -n 's/_/-/p'` -+ export DEVICE_NAME=${DEVICE//_/-} - } - - function run_vpr { - set -e - -- SDC_OPTIONS="" -- if [ ! -z $SDC ] -+ SDC_OPTIONS=() -+ if [[ -n ${SDC} ]] - then -- SDC_OPTIONS="--sdc_file $SDC" -+ SDC_OPTIONS=(--sdc_file "${SDC}") - fi - -- vpr ${ARCH_DEF} \ -- ${EBLIF} \ -- --device ${DEVICE_NAME} \ -- ${VPR_OPTIONS} \ -- --read_rr_graph ${RR_GRAPH} \ -- --read_router_lookahead ${LOOKAHEAD} \ -- --read_placement_delay_lookup ${PLACE_DELAY} \ -- ${SDC_OPTIONS} \ -- $@ -+ vpr "${ARCH_DEF}" \ -+ "${EBLIF}" \ -+ --device "${DEVICE_NAME}" \ -+ "${VPR_OPTIONS[@]}" \ -+ --read_rr_graph "${RR_GRAPH}" \ -+ --read_router_lookahead "${LOOKAHEAD}" \ -+ --read_placement_delay_lookup "${PLACE_DELAY}" \ -+ "${SDC_OPTIONS[@]}" \ -+ "$@" - - return $? - } -@@ -116,12 +110,12 @@ function run_vpr { - function run_genfasm { - set -e - -- genfasm ${ARCH_DEF} \ -- ${EBLIF} \ -- --device ${DEVICE_NAME} \ -- ${VPR_OPTIONS} \ -- --read_rr_graph ${RR_GRAPH} \ -- $@ -+ genfasm "${ARCH_DEF}" \ -+ "${EBLIF}" \ -+ --device "${DEVICE_NAME}" \ -+ "${VPR_OPTIONS[@]}" \ -+ --read_rr_graph "${RR_GRAPH}" \ -+ "$@" - - return $? - } -@@ -129,11 +123,11 @@ function run_genfasm { - function run_vpr_xml_rr_graph { - set -e - -- vpr ${ARCH_DEF} \ -- ${EBLIF} \ -- --read_rr_graph ${RR_GRAPH} -- --write_rr_graph ${RR_GRAPH_XML} -- $@ -+ vpr "${ARCH_DEF}" \ -+ "${EBLIF}" \ -+ --read_rr_graph "${RR_GRAPH}" \ -+ --write_rr_graph "${RR_GRAPH_XML}" \ -+ "$@" - - return $? - } |