From c3c9dab9f7fa6712c996501ba63301c8c62e6185 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 5 Aug 2018 15:34:16 +0200 Subject: API change: Use CellInfo* and NetInfo* as cell/net handles (generic) Signed-off-by: Clifford Wolf --- generic/arch.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index d3e8f69e..a5b3470f 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -31,7 +31,8 @@ struct WireInfo; struct PipInfo { - IdString name, type, bound_net; + IdString name, type; + NetInfo *bound_net; WireId srcWire, dstWire; DelayInfo delay; DecalXY decalxy; @@ -39,7 +40,8 @@ struct PipInfo struct WireInfo { - IdString name, type, bound_net; + IdString name, type; + NetInfo *bound_net; std::vector downhill, uphill, aliases; BelPin uphill_bel_pin; std::vector downhill_bel_pins; @@ -57,7 +59,8 @@ struct PinInfo struct BelInfo { - IdString name, type, bound_cell; + IdString name, type; + CellInfo *bound_cell; std::unordered_map pins; DecalXY decalxy; int x, y, z; @@ -142,11 +145,11 @@ struct Arch : BaseCtx const std::vector &getBelsByTile(int x, int y) const; bool getBelGlobalBuf(BelId bel) const; uint32_t getBelChecksum(BelId bel) const; - void bindBel(BelId bel, IdString cell, PlaceStrength strength); + void bindBel(BelId bel, CellInfo *cell, PlaceStrength strength); void unbindBel(BelId bel); bool checkBelAvail(BelId bel) const; - IdString getBoundBelCell(BelId bel) const; - IdString getConflictingBelCell(BelId bel) const; + CellInfo *getBoundBelCell(BelId bel) const; + CellInfo *getConflictingBelCell(BelId bel) const; const std::vector &getBels() const; BelType getBelType(BelId bel) const; WireId getBelPinWire(BelId bel, PortPin pin) const; @@ -157,11 +160,11 @@ struct Arch : BaseCtx IdString getWireName(WireId wire) const; IdString getWireType(WireId wire) const; uint32_t getWireChecksum(WireId wire) const; - void bindWire(WireId wire, IdString net, PlaceStrength strength); + void bindWire(WireId wire, NetInfo *net, PlaceStrength strength); void unbindWire(WireId wire); bool checkWireAvail(WireId wire) const; - IdString getBoundWireNet(WireId wire) const; - IdString getConflictingWireNet(WireId wire) const; + NetInfo *getBoundWireNet(WireId wire) const; + NetInfo *getConflictingWireNet(WireId wire) const; DelayInfo getWireDelay(WireId wire) const { return DelayInfo(); } const std::vector &getWires() const; const std::vector &getWireBelPins(WireId wire) const; @@ -170,11 +173,11 @@ struct Arch : BaseCtx IdString getPipName(PipId pip) const; IdString getPipType(PipId pip) const; uint32_t getPipChecksum(PipId pip) const; - void bindPip(PipId pip, IdString net, PlaceStrength strength); + void bindPip(PipId pip, NetInfo *net, PlaceStrength strength); void unbindPip(PipId pip); bool checkPipAvail(PipId pip) const; - IdString getBoundPipNet(PipId pip) const; - IdString getConflictingPipNet(PipId pip) const; + NetInfo *getBoundPipNet(PipId pip) const; + NetInfo *getConflictingPipNet(PipId pip) const; const std::vector &getPips() const; WireId getPipSrcWire(PipId pip) const; WireId getPipDstWire(PipId pip) const; -- cgit v1.2.3 From d0312514bd29fa30d1a214d746ce4f1e176cac32 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Sun, 5 Aug 2018 22:33:14 -0700 Subject: Modify getBudgetOverride for generic and ecp5 too --- generic/arch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'generic/arch.h') diff --git a/generic/arch.h b/generic/arch.h index a5b3470f..59fe8d05 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -200,7 +200,7 @@ struct Arch : BaseCtx delay_t getRipupDelayPenalty() const { return 1.0; } float getDelayNS(delay_t v) const { return v; } uint32_t getDelayChecksum(delay_t v) const { return 0; } - delay_t getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t budget) const; + bool getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const; bool pack() { return true; } bool place(); -- cgit v1.2.3