aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.cirrus/Dockerfile.ubuntu16.042
-rw-r--r--nexus/arch.cc23
-rw-r--r--nexus/arch.h2
3 files changed, 8 insertions, 19 deletions
diff --git a/.cirrus/Dockerfile.ubuntu16.04 b/.cirrus/Dockerfile.ubuntu16.04
index e8de4ed9..a62cf4c6 100644
--- a/.cirrus/Dockerfile.ubuntu16.04
+++ b/.cirrus/Dockerfile.ubuntu16.04
@@ -59,6 +59,6 @@ RUN set -e -x ;\
cd /usr/local/src ;\
git clone --recursive https://github.com/daveshah1/prjoxide.git ;\
cd prjoxide ;\
- git reset --hard bd5122fab12c1a517588365bd95cbfaa47eff25c ;\
+ git reset --hard 72dbb7973f31a30c3b9d18f3bac97caaea9a7f33 ;\
cd libprjoxide ;\
PATH=$PATH:$HOME/.cargo/bin cargo install --path prjoxide
diff --git a/nexus/arch.cc b/nexus/arch.cc
index f5edaeb9..f222a5ad 100644
--- a/nexus/arch.cc
+++ b/nexus/arch.cc
@@ -202,24 +202,13 @@ BelId Arch::getBelByName(IdString name) const
return BelId();
}
-BelRange Arch::getBelsByTile(int x, int y) const
+std::vector<BelId> Arch::getBelsByTile(int x, int y) const
{
- BelRange br;
- NPNR_ASSERT(x >= 0 && x < chip_info->width);
- NPNR_ASSERT(y >= 0 && y < chip_info->height);
- br.b.cursor_tile = y * chip_info->width + x;
- br.e.cursor_tile = y * chip_info->width + x;
- br.b.cursor_index = 0;
- br.e.cursor_index = db->loctypes[chip_info->grid[br.b.cursor_tile].loc_type].num_bels;
- br.b.chip = chip_info;
- br.b.db = db;
- br.e.chip = chip_info;
- br.e.db = db;
- if (br.e.cursor_index == -1)
- ++br.e.cursor_index;
- else
- ++br.e;
- return br;
+ std::vector<BelId> bels;
+ for (auto bel : tileStatus.at(y * chip_info->width + x).bels_by_z)
+ if (bel != BelId())
+ bels.push_back(bel);
+ return bels;
}
WireId Arch::getBelPinWire(BelId bel, IdString pin) const
diff --git a/nexus/arch.h b/nexus/arch.h
index 1d0d38b5..d4d4799e 100644
--- a/nexus/arch.h
+++ b/nexus/arch.h
@@ -1050,7 +1050,7 @@ struct Arch : BaseCtx
return t.bels_by_z.at(loc.z);
}
- BelRange getBelsByTile(int x, int y) const;
+ std::vector<BelId> getBelsByTile(int x, int y) const;
bool getBelGlobalBuf(BelId bel) const { return false; }