diff options
author | gatecat <gatecat@ds0.me> | 2021-02-12 09:53:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-12 09:53:50 +0000 |
commit | 5dfbe703ae26e6af2a1a687c06f001b6788d6fc8 (patch) | |
tree | 85a04ec931762d61c0ef668bc404d00bd4c699bc /generic/arch.cc | |
parent | e376f950fe683b9a744437301a9e09eae1895efa (diff) | |
parent | 99e397000c2bc8a80354c31ef259c6715dd142ff (diff) | |
download | nextpnr-5dfbe703ae26e6af2a1a687c06f001b6788d6fc8.tar.gz nextpnr-5dfbe703ae26e6af2a1a687c06f001b6788d6fc8.tar.bz2 nextpnr-5dfbe703ae26e6af2a1a687c06f001b6788d6fc8.zip |
Merge pull request #581 from litghost/add_isbelhidden
Add getBelHidden and add some missing "override" statements.
Diffstat (limited to 'generic/arch.cc')
-rw-r--r-- | generic/arch.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index 912f8a53..b54a8b65 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -91,7 +91,7 @@ void Arch::addPip(IdStringList name, IdString type, IdStringList srcWire, IdStri tilePipDimZ[loc.x][loc.y] = std::max(tilePipDimZ[loc.x][loc.y], loc.z + 1); } -void Arch::addBel(IdStringList name, IdString type, Loc loc, bool gb) +void Arch::addBel(IdStringList name, IdString type, Loc loc, bool gb, bool hidden) { NPNR_ASSERT(bels.count(name) == 0); NPNR_ASSERT(bel_by_loc.count(loc) == 0); @@ -102,6 +102,7 @@ void Arch::addBel(IdStringList name, IdString type, Loc loc, bool gb) bi.y = loc.y; bi.z = loc.z; bi.gb = gb; + bi.hidden = hidden; bel_ids.push_back(name); bel_by_loc[loc] = name; @@ -319,6 +320,8 @@ const std::vector<BelId> &Arch::getBels() const { return bel_ids; } IdString Arch::getBelType(BelId bel) const { return bels.at(bel).type; } +bool Arch::getBelHidden(BelId bel) const { return bels.at(bel).hidden; } + const std::map<IdString, std::string> &Arch::getBelAttrs(BelId bel) const { return bels.at(bel).attrs; } WireId Arch::getBelPinWire(BelId bel, IdString pin) const |