diff options
author | D. Shah <dave@ds0.me> | 2021-02-05 13:46:56 +0000 |
---|---|---|
committer | D. Shah <dave@ds0.me> | 2021-02-05 19:19:17 +0000 |
commit | 6575bfac3ec6cbf38f4525f997f07ccbaaa043f9 (patch) | |
tree | 9f1d8b5ef22ecbf34627c835376335bb894775dd /gowin/arch.cc | |
parent | c7ef7e1902e002432ffc54ab1aa25ff85f891ac0 (diff) | |
download | nextpnr-6575bfac3ec6cbf38f4525f997f07ccbaaa043f9.tar.gz nextpnr-6575bfac3ec6cbf38f4525f997f07ccbaaa043f9.tar.bz2 nextpnr-6575bfac3ec6cbf38f4525f997f07ccbaaa043f9.zip |
gowin: Switch to BaseArch
Signed-off-by: D. Shah <dave@ds0.me>
Diffstat (limited to 'gowin/arch.cc')
-rw-r--r-- | gowin/arch.cc | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/gowin/arch.cc b/gowin/arch.cc index e266c9b5..d4e17a8a 100644 --- a/gowin/arch.cc +++ b/gowin/arch.cc @@ -736,17 +736,8 @@ Arch::Arch(ArchArgs args) : args(args) } } } - // Dummy for empty decals - decal_graphics[IdString()]; - - std::unordered_set<IdString> bel_types; - for (BelId bel : getBels()) { - bel_types.insert(getBelType(bel)); - } - - for (IdString bel_type : bel_types) { - cell_types.push_back(bel_type); - } + BaseArch::init_cell_types(); + BaseArch::init_bel_buckets(); } void IdString::initialize_arch(const BaseCtx *ctx) @@ -785,8 +776,6 @@ const std::vector<BelId> &Arch::getBelsByTile(int x, int y) const { return bels_ bool Arch::getBelGlobalBuf(BelId bel) const { return bels.at(bel).gb; } -uint32_t Arch::getBelChecksum(BelId bel) const { return bel.index; } - void Arch::bindBel(BelId bel, CellInfo *cell, PlaceStrength strength) { bels.at(bel).bound_cell = cell; @@ -848,12 +837,6 @@ IdString Arch::getWireType(WireId wire) const { return wires.at(wire).type; } const std::map<IdString, std::string> &Arch::getWireAttrs(WireId wire) const { return wires.at(wire).attrs; } -uint32_t Arch::getWireChecksum(WireId wire) const -{ - // FIXME - return 0; -} - void Arch::bindWire(WireId wire, NetInfo *net, PlaceStrength strength) { wires.at(wire).bound_net = net; @@ -902,8 +885,6 @@ IdString Arch::getPipType(PipId pip) const { return pips.at(pip).type; } const std::map<IdString, std::string> &Arch::getPipAttrs(PipId pip) const { return pips.at(pip).attrs; } -uint32_t Arch::getPipChecksum(PipId wire) const { return wire.index; } - void Arch::bindPip(PipId pip, NetInfo *net, PlaceStrength strength) { WireId wire = pips.at(pip).dstWire; @@ -1074,25 +1055,6 @@ bool Arch::route() // --------------------------------------------------------------- -const std::vector<GraphicElement> &Arch::getDecalGraphics(DecalId decal) const -{ - if (!decal_graphics.count(decal)) { - std::cerr << "No decal named " << decal.str(this) << std::endl; - log_error("No decal named %s!\n", decal.c_str(this)); - } - return decal_graphics.at(decal); -} - -DecalXY Arch::getBelDecal(BelId bel) const { return bels.at(bel).decalxy; } - -DecalXY Arch::getWireDecal(WireId wire) const { return wires.at(wire).decalxy; } - -DecalXY Arch::getPipDecal(PipId pip) const { return pips.at(pip).decalxy; } - -DecalXY Arch::getGroupDecal(GroupId group) const { return groups.at(group).decalxy; } - -// --------------------------------------------------------------- - bool Arch::getCellDelay(const CellInfo *cell, IdString fromPort, IdString toPort, DelayInfo &delay) const { if (!cellTiming.count(cell->name)) |