diff options
author | Clifford Wolf <clifford@clifford.at> | 2018-05-23 14:53:55 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2018-05-23 14:53:55 +0200 |
commit | daa48858201d1f4851efcb6754e44b95e8fae656 (patch) | |
tree | f2c623eadced52286db223e7d4c9e50443d1279f /apidraft.h | |
parent | 960bb65b1579ccadb8f00fa32f685c4a71967539 (diff) | |
download | nextpnr-daa48858201d1f4851efcb6754e44b95e8fae656.tar.gz nextpnr-daa48858201d1f4851efcb6754e44b95e8fae656.tar.bz2 nextpnr-daa48858201d1f4851efcb6754e44b95e8fae656.zip |
Minor API draft edits
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'apidraft.h')
-rw-r--r-- | apidraft.h | 25 |
1 files changed, 17 insertions, 8 deletions
@@ -55,25 +55,34 @@ struct GuiLine struct Chip { + // ... + Chip(std::string cfg); + void setBelActive(ObjId bel, bool active); + bool getBelActive(ObjId bel); + ObjId getObjByName(IdString name) const; IdString getObjName(ObjId obj) const; - IdString getBelType(ObjId obj) const; + + ObjRange getBels() const; ObjRange getBelsByType(IdString type) const; + IdString getBelType(ObjId bel) const; void getObjPosition(ObjId obj, float &x, float &y) const; vector<GuiLine> getGuiLines(ObjId obj) const; ObjRange getWires() const; - ObjRange getWiresUphillWire(ObjId wire) const; - ObjRange getWiresDownhillWire(ObjId wire) const; - ObjRange getWiresBidirWire(ObjId wire) const; + ObjRange getWiresUphill(ObjId wire) const; + ObjRange getWiresDownhill(ObjId wire) const; + ObjRange getWiresBidir(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; - BelPin getBelPinUphillWire(ObjId wire) const; - BelPinRange getBelPinsDownhillWire(ObjId wire) const; + BelPin getBelPinUphill(ObjId wire) const; + BelPinRange getBelPinsDownhill(ObjId wire) const; }; #endif @@ -93,7 +102,7 @@ struct NetInfo vector<PortRef> users; dict<IdString, std::string> attrs; - // wire objid -> signal delay + // wire -> delay dict<ObjId, float> wires; }; @@ -117,7 +126,7 @@ struct CellInfo dict<IdString, std::string> attrs, params; ObjId bel; - // port_name -> pin_name + // cell_port -> bel_pin dict<IdString, IdString> pins; }; |