diff options
author | gatecat <gatecat@ds0.me> | 2021-02-17 16:03:03 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-02-17 16:03:03 +0000 |
commit | a8c55728e2f10ef2d92369ee120640b76cbe3ff2 (patch) | |
tree | 8e10cf358eb43aaef617f34ac66b2fa2ca2c75a3 | |
parent | 18113ff43d318047fe166dcff91588bc9a195bd0 (diff) | |
download | nextpnr-a8c55728e2f10ef2d92369ee120640b76cbe3ff2.tar.gz nextpnr-a8c55728e2f10ef2d92369ee120640b76cbe3ff2.tar.bz2 nextpnr-a8c55728e2f10ef2d92369ee120640b76cbe3ff2.zip |
gowin: Fix archcheck errors and add to CI
Signed-off-by: gatecat <gatecat@ds0.me>
-rwxr-xr-x | .cirrus/archcheck.sh | 1 | ||||
-rw-r--r-- | gowin/arch.cc | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/.cirrus/archcheck.sh b/.cirrus/archcheck.sh index 35f115d0..6ff6c043 100755 --- a/.cirrus/archcheck.sh +++ b/.cirrus/archcheck.sh @@ -5,3 +5,4 @@ ${BUILD_DIR}/nextpnr-ice40 --hx8k --package ct256 --test ${BUILD_DIR}/nextpnr-ice40 --up5k --package sg48 --test ${BUILD_DIR}/nextpnr-ecp5 --um5g-25k --package CABGA381 --test ${BUILD_DIR}/nextpnr-nexus --device LIFCL-40-9BG400CES --test +${BUILD_DIR}/nextpnr-gowin --device GW1N-UV4LQ144C6/I5 --test diff --git a/gowin/arch.cc b/gowin/arch.cc index 2e742693..b817dae0 100644 --- a/gowin/arch.cc +++ b/gowin/arch.cc @@ -89,6 +89,16 @@ void Arch::addPip(IdString name, IdString type, IdString srcWire, IdString dstWi if (int(tilePipDimZ[loc.x].size()) <= loc.y) tilePipDimZ[loc.x].resize(loc.y + 1); + // Needed to ensure empty tile bel locations + if (int(bels_by_tile.size()) <= loc.x) + bels_by_tile.resize(loc.x + 1); + if (int(bels_by_tile[loc.x].size()) <= loc.y) + bels_by_tile[loc.x].resize(loc.y + 1); + if (int(tileBelDimZ.size()) <= loc.x) + tileBelDimZ.resize(loc.x + 1); + if (int(tileBelDimZ[loc.x].size()) <= loc.y) + tileBelDimZ[loc.x].resize(loc.y + 1); + gridDimX = std::max(gridDimX, loc.x + 1); gridDimY = std::max(gridDimY, loc.y + 1); tilePipDimZ[loc.x][loc.y] = std::max(tilePipDimZ[loc.x][loc.y], loc.z + 1); @@ -124,7 +134,7 @@ void Arch::addBel(IdString name, IdString type, Loc loc, bool gb) tileBelDimZ[loc.x].resize(loc.y + 1); gridDimX = std::max(gridDimX, loc.x + 1); - gridDimY = std::max(gridDimY, loc.x + 1); + gridDimY = std::max(gridDimY, loc.y + 1); tileBelDimZ[loc.x][loc.y] = std::max(tileBelDimZ[loc.x][loc.y], loc.z + 1); } |