diff options
Diffstat (limited to 'generic/arch.h')
-rw-r--r-- | generic/arch.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/generic/arch.h b/generic/arch.h index e739cfab..dafbfec3 100644 --- a/generic/arch.h +++ b/generic/arch.h @@ -34,16 +34,16 @@ struct PipInfo IdString name, bound_net; WireId srcWire, dstWire; DelayInfo delay; - std::vector<GraphicElement> graphics; + DecalXY decalxy; }; struct WireInfo { IdString name, bound_net; - std::vector<GraphicElement> graphics; std::vector<PipId> downhill, uphill, aliases; BelPin uphill_bel_pin; std::vector<BelPin> downhill_bel_pins; + DecalXY decalxy; int grid_x, grid_y; }; @@ -58,7 +58,7 @@ struct BelInfo { IdString name, type, bound_cell; std::unordered_map<IdString, PinInfo> pins; - std::vector<GraphicElement> graphics; + DecalXY decalxy; int grid_x, grid_y; bool gb; }; @@ -74,7 +74,9 @@ struct Arch : BaseCtx std::vector<IdString> bel_ids, wire_ids, pip_ids; std::unordered_map<IdString, std::vector<IdString>> bel_ids_by_type; - std::vector<GraphicElement> frame_graphics; + std::unordered_map<DecalId, std::vector<GraphicElement>> decal_graphics; + DecalXY frame_decalxy; + float grid_distance_to_delay; void addWire(IdString name, int x, int y); @@ -86,10 +88,11 @@ struct Arch : BaseCtx void addBelOutput(IdString bel, IdString name, IdString wire); void addBelInout(IdString bel, IdString name, IdString wire); - void addFrameGraphic(const GraphicElement &graphic); - void addWireGraphic(WireId wire, const GraphicElement &graphic); - void addPipGraphic(PipId pip, const GraphicElement &graphic); - void addBelGraphic(BelId bel, const GraphicElement &graphic); + void addDecalGraphic(DecalId decal, const GraphicElement &graphic); + void setFrameDecal(DecalXY decalxy); + void setWireDecal(WireId wire, DecalXY decalxy); + void setPipDecal(PipId pip, DecalXY decalxy); + void setBelDecal(BelId bel, DecalXY decalxy); // --------------------------------------------------------------- // Common Arch API. Every arch must provide the following methods. @@ -155,10 +158,11 @@ struct Arch : BaseCtx float getDelayNS(delay_t v) const { return v; } uint32_t getDelayChecksum(delay_t v) const { return 0; } - const std::vector<GraphicElement> &getFrameGraphics() const; - const std::vector<GraphicElement> &getBelGraphics(BelId bel) const; - const std::vector<GraphicElement> &getWireGraphics(WireId wire) const; - const std::vector<GraphicElement> &getPipGraphics(PipId pip) const; + const std::vector<GraphicElement> &getDecalGraphics(DecalId decal) const; + DecalXY getFrameDecal() const; + DecalXY getBelDecal(BelId bel) const; + DecalXY getWireDecal(WireId wire) const; + DecalXY getPipDecal(PipId pip) const; bool allGraphicsReload = false; bool frameGraphicsReload = false; |