diff options
-rw-r--r-- | common/design.h | 13 | ||||
-rw-r--r-- | dummy/chip.h | 13 | ||||
-rw-r--r-- | ice40/chip.h | 11 |
3 files changed, 21 insertions, 16 deletions
diff --git a/common/design.h b/common/design.h index edf7dba1..e87304bf 100644 --- a/common/design.h +++ b/common/design.h @@ -34,6 +34,19 @@ template<typename T> using pool = std::unordered_set<T>; template<typename T, typename U> using dict = std::unordered_map<T, U>; using std::vector; +struct GraphicElement +{ + enum { + G_LINE, + G_BOX, + G_CIRCLE, + G_LABEL + } type; + + float x1, y1, x2, y2, z; + std::string text; +}; + #include "chip.h" struct CellInfo; diff --git a/dummy/chip.h b/dummy/chip.h index cc5013df..f403552f 100644 --- a/dummy/chip.h +++ b/dummy/chip.h @@ -160,11 +160,6 @@ struct BelPinRange BelPinIterator end() const { return e; } }; -struct GuiLine -{ - float x1, y1, x2, y2; -}; - struct ChipArgs { // ... @@ -188,10 +183,10 @@ struct Chip BelRange getBelsByType(BelType type) const; BelType getBelType(BelId bel) const; - void getBelPosition(BelId bel, float &x, float &y) const; - void getWirePosition(WireId wire, float &x, float &y) const; - vector<GuiLine> getBelGuiLines(BelId bel) const; - vector<GuiLine> getWireGuiLines(WireId wire) const; + // void getBelPosition(BelId bel, float &x, float &y) const; + // void getWirePosition(WireId wire, float &x, float &y) const; + // vector<GuiLine> getBelGuiLines(BelId bel) const; + // vector<GuiLine> getWireGuiLines(WireId wire) const; WireRange getWires() const; WireDelayRange getWiresUphill(WireId wire) const; diff --git a/ice40/chip.h b/ice40/chip.h index 7ce1a406..57f0fa99 100644 --- a/ice40/chip.h +++ b/ice40/chip.h @@ -272,11 +272,6 @@ struct BelPinRange // ----------------------------------------------------------------------- -struct GuiLine -{ - float x1, y1, x2, y2; -}; - struct ChipArgs { enum { @@ -346,8 +341,10 @@ struct Chip // FIXME: void getBelPosition(BelId bel, float &x, float &y) const; // FIXME: void getWirePosition(WireId wire, float &x, float &y) const; - // FIXME: vector<GuiLine> getBelGuiLines(BelId bel) const; - // FIXME: vector<GuiLine> getWireGuiLines(WireId wire) const; + // FIXME: vector<GraphicElement> getBelGraphics(BelId bel) const; + // FIXME: vector<GraphicElement> getWireGraphics(WireId wire) const; + // FIXME: vector<GraphicElement> getPipGraphics(WireId src, WireId dst) const; + // FIXME: vector<GraphicElement> getFrameGraphics() const; AllWireRange getWires() const { |