diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/arch.cc | 24 | ||||
-rw-r--r-- | generic/arch.h | 3 |
2 files changed, 23 insertions, 4 deletions
diff --git a/generic/arch.cc b/generic/arch.cc index b3854401..60874e1e 100644 --- a/generic/arch.cc +++ b/generic/arch.cc @@ -19,6 +19,8 @@ #include <math.h> #include "nextpnr.h" +#include "placer1.h" +#include "router1.h" NEXTPNR_NAMESPACE_BEGIN @@ -110,30 +112,31 @@ void Arch::addBelInout(IdString bel, IdString name, IdString wire) void Arch::addDecalGraphic(DecalId decal, const GraphicElement &graphic) { decal_graphics[decal].push_back(graphic); + refreshUi(); } void Arch::setFrameDecal(DecalXY decalxy) { frame_decalxy = decalxy; - frameGraphicsReload = true; + refreshUiFrame(); } void Arch::setWireDecal(WireId wire, DecalXY decalxy) { wires.at(wire).decalxy = decalxy; - wireGraphicsReload.insert(wire); + refreshUiWire(wire); } void Arch::setPipDecal(PipId pip, DecalXY decalxy) { pips.at(pip).decalxy = decalxy; - pipGraphicsReload.insert(pip); + refreshUiPip(pip); } void Arch::setBelDecal(BelId bel, DecalXY decalxy) { bels.at(bel).decalxy = decalxy; - belGraphicsReload.insert(bel); + refreshUiBel(bel); } // --------------------------------------------------------------- @@ -315,6 +318,19 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const // --------------------------------------------------------------- +bool Arch::place() +{ + return placer1(getCtx()); +} + +bool Arch::route() +{ + return router1(getCtx()); +} + +// --------------------------------------------------------------- + + const std::vector<GraphicElement> &Arch::getDecalGraphics(DecalId decal) const { return decal_graphics.at(decal); } DecalXY Arch::getFrameDecal() const { return frame_decalxy; } diff --git a/generic/arch.h b/generic/arch.h index c73bbf3f..85f469f9 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -158,6 +158,9 @@ struct Arch : BaseCtx float getDelayNS(delay_t v) const { return v; } uint32_t getDelayChecksum(delay_t v) const { return 0; } + bool place(); + bool route(); + const std::vector<GraphicElement> &getDecalGraphics(DecalId decal) const; DecalXY getFrameDecal() const; DecalXY getBelDecal(BelId bel) const; |