nexus: Fix db integrity check

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2020-11-26 14:20:14 +00:00
parent bb50b54d80
commit 567166aece
3 changed files with 8 additions and 19 deletions

View File

@ -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

View File

@ -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

View File

@ -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; }