Minor API draft edits
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
960bb65b15
commit
daa4885820
25
apidraft.h
25
apidraft.h
@ -55,25 +55,34 @@ struct GuiLine
|
|||||||
|
|
||||||
struct Chip
|
struct Chip
|
||||||
{
|
{
|
||||||
|
// ...
|
||||||
|
|
||||||
Chip(std::string cfg);
|
Chip(std::string cfg);
|
||||||
|
|
||||||
|
void setBelActive(ObjId bel, bool active);
|
||||||
|
bool getBelActive(ObjId bel);
|
||||||
|
|
||||||
ObjId getObjByName(IdString name) const;
|
ObjId getObjByName(IdString name) const;
|
||||||
IdString getObjName(ObjId obj) const;
|
IdString getObjName(ObjId obj) const;
|
||||||
IdString getBelType(ObjId obj) const;
|
|
||||||
|
ObjRange getBels() const;
|
||||||
ObjRange getBelsByType(IdString type) const;
|
ObjRange getBelsByType(IdString type) const;
|
||||||
|
IdString getBelType(ObjId bel) const;
|
||||||
|
|
||||||
void getObjPosition(ObjId obj, float &x, float &y) const;
|
void getObjPosition(ObjId obj, float &x, float &y) const;
|
||||||
vector<GuiLine> getGuiLines(ObjId obj) const;
|
vector<GuiLine> getGuiLines(ObjId obj) const;
|
||||||
|
|
||||||
ObjRange getWires() const;
|
ObjRange getWires() const;
|
||||||
ObjRange getWiresUphillWire(ObjId wire) const;
|
ObjRange getWiresUphill(ObjId wire) const;
|
||||||
ObjRange getWiresDownhillWire(ObjId wire) const;
|
ObjRange getWiresDownhill(ObjId wire) const;
|
||||||
ObjRange getWiresBidirWire(ObjId wire) const;
|
ObjRange getWiresBidir(ObjId wire) const;
|
||||||
ObjRange getWireAliases(ObjId wire) const;
|
ObjRange getWireAliases(ObjId wire) const;
|
||||||
|
|
||||||
|
// the following will only operate on / return "active" BELs
|
||||||
|
// multiple active uphill BELs for a wire will cause a runtime error
|
||||||
ObjId getWireBelPin(ObjId bel, IdString pin) const;
|
ObjId getWireBelPin(ObjId bel, IdString pin) const;
|
||||||
BelPin getBelPinUphillWire(ObjId wire) const;
|
BelPin getBelPinUphill(ObjId wire) const;
|
||||||
BelPinRange getBelPinsDownhillWire(ObjId wire) const;
|
BelPinRange getBelPinsDownhill(ObjId wire) const;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -93,7 +102,7 @@ struct NetInfo
|
|||||||
vector<PortRef> users;
|
vector<PortRef> users;
|
||||||
dict<IdString, std::string> attrs;
|
dict<IdString, std::string> attrs;
|
||||||
|
|
||||||
// wire objid -> signal delay
|
// wire -> delay
|
||||||
dict<ObjId, float> wires;
|
dict<ObjId, float> wires;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -117,7 +126,7 @@ struct CellInfo
|
|||||||
dict<IdString, std::string> attrs, params;
|
dict<IdString, std::string> attrs, params;
|
||||||
|
|
||||||
ObjId bel;
|
ObjId bel;
|
||||||
// port_name -> pin_name
|
// cell_port -> bel_pin
|
||||||
dict<IdString, IdString> pins;
|
dict<IdString, IdString> pins;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user