aboutsummaryrefslogtreecommitdiffstats
path: root/cyclonev/arch.h
diff options
context:
space:
mode:
authorDan Ravensloft <dan.ravensloft@gmail.com>2021-02-04 14:28:39 +0000
committergatecat <gatecat@ds0.me>2021-05-15 14:54:33 +0100
commit9f2cbe1762387ec38d358fb4c885740de89b5656 (patch)
tree45c9ec11e012df895a1a6c2cccc267f923b045f9 /cyclonev/arch.h
parent170d6cffddeec70051b8488933c5adec460e6a81 (diff)
downloadnextpnr-9f2cbe1762387ec38d358fb4c885740de89b5656.tar.gz
nextpnr-9f2cbe1762387ec38d358fb4c885740de89b5656.tar.bz2
nextpnr-9f2cbe1762387ec38d358fb4c885740de89b5656.zip
build bel list in constructor
Diffstat (limited to 'cyclonev/arch.h')
-rw-r--r--cyclonev/arch.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/cyclonev/arch.h b/cyclonev/arch.h
index 874e4f3e..01b548af 100644
--- a/cyclonev/arch.h
+++ b/cyclonev/arch.h
@@ -54,6 +54,7 @@ struct Arch : BaseCtx
mistral::CycloneV* cyclonev;
std::unordered_map<BelId, BelInfo> bels;
+ std::vector<BelId> bel_list;
Arch(ArchArgs args);
@@ -80,7 +81,7 @@ struct Arch : BaseCtx
bool checkBelAvail(BelId bel) const { return bels.at(bel).bound_cell == nullptr; }
CellInfo *getBoundBelCell(BelId bel) const { return bels.at(bel).bound_cell; }
CellInfo *getConflictingBelCell(BelId bel) const { return nullptr; } // HACK
- std::vector<BelId> getBels() const; // arch.cc
+ const std::vector<BelId>& Arch::getBels() const { return bel_list; }
Loc getBelLocation(BelId bel) const { return Loc(CycloneV::pos2x(bel.pos), CycloneV::pos2y(bel.pos), bel.z); }
BelId getBelByLocation(Loc loc) const { return BelId(CycloneV::xy2pos(loc.x, loc.y), loc.z); }
std::vector<BelId> getBelsByTile(int x, int y) const; // arch.cc