diff options
author | Dan Ravensloft <dan.ravensloft@gmail.com> | 2021-02-04 14:28:39 +0000 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-05-15 14:54:33 +0100 |
commit | 9f2cbe1762387ec38d358fb4c885740de89b5656 (patch) | |
tree | 45c9ec11e012df895a1a6c2cccc267f923b045f9 /cyclonev/arch.h | |
parent | 170d6cffddeec70051b8488933c5adec460e6a81 (diff) | |
download | nextpnr-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.h | 3 |
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 |