Add conflicting=false argument to bind getters

Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
Clifford Wolf 2018-06-11 19:46:03 +02:00
parent 17fae4c9e1
commit f63eec034f
3 changed files with 11 additions and 9 deletions

View File

@ -34,7 +34,7 @@ void Chip::unbindBel(BelId bel) {}
bool Chip::checkBelAvail(BelId bel) const { return false; } bool Chip::checkBelAvail(BelId bel) const { return false; }
IdString Chip::getBelCell(BelId bel) const { return IdString(); } IdString Chip::getBelCell(BelId bel, bool conflicting) const { return IdString(); }
const vector<BelId> &Chip::getBels() const const vector<BelId> &Chip::getBels() const
{ {
@ -72,7 +72,7 @@ void Chip::unbindWire(WireId wire) {}
bool Chip::checkWireAvail(WireId wire) const { return false; } bool Chip::checkWireAvail(WireId wire) const { return false; }
IdString Chip::getWireNet(WireId wire) const { return IdString(); } IdString Chip::getWireNet(WireId wire, bool conflicting) const { return IdString(); }
const vector<WireId> &Chip::getWires() const const vector<WireId> &Chip::getWires() const
{ {
@ -92,7 +92,7 @@ void Chip::unbindPip(PipId pip) {}
bool Chip::checkPipAvail(PipId pip) const { return false; } bool Chip::checkPipAvail(PipId pip) const { return false; }
IdString Chip::getPipNet(PipId pip) const { return IdString(); } IdString Chip::getPipNet(PipId pip, bool conflicting) const { return IdString(); }
const vector<PipId> &Chip::getPips() const const vector<PipId> &Chip::getPips() const
{ {

View File

@ -74,7 +74,7 @@ struct Chip
void bindBel(BelId bel, IdString cell); void bindBel(BelId bel, IdString cell);
void unbindBel(BelId bel); void unbindBel(BelId bel);
bool checkBelAvail(BelId bel) const; bool checkBelAvail(BelId bel) const;
IdString getBelCell(BelId bel) const; IdString getBelCell(BelId bel, bool conflicting=false) const;
const vector<BelId> &getBels() const; const vector<BelId> &getBels() const;
const vector<BelId> &getBelsByType(BelType type) const; const vector<BelId> &getBelsByType(BelType type) const;
BelType getBelType(BelId bel) const; BelType getBelType(BelId bel) const;
@ -87,7 +87,7 @@ struct Chip
void bindWire(WireId wire, IdString net); void bindWire(WireId wire, IdString net);
void unbindWire(WireId wire); void unbindWire(WireId wire);
bool checkWireAvail(WireId wire) const; bool checkWireAvail(WireId wire) const;
IdString getWireNet(WireId wire) const; IdString getWireNet(WireId wire, bool conflicting=false) const;
const vector<WireId> &getWires() const; const vector<WireId> &getWires() const;
PipId getPipByName(IdString name) const; PipId getPipByName(IdString name) const;
@ -95,7 +95,7 @@ struct Chip
void bindPip(PipId pip, IdString net); void bindPip(PipId pip, IdString net);
void unbindPip(PipId pip); void unbindPip(PipId pip);
bool checkPipAvail(PipId pip) const; bool checkPipAvail(PipId pip) const;
IdString getPipNet(PipId pip) const; IdString getPipNet(PipId pip, bool conflicting=false) const;
const vector<PipId> &getPips() const; const vector<PipId> &getPips() const;
WireId getPipSrcWire(PipId pip) const; WireId getPipSrcWire(PipId pip) const;
WireId getPipDstWire(PipId pip) const; WireId getPipDstWire(PipId pip) const;
@ -107,6 +107,7 @@ struct Chip
void getBelPosition(BelId bel, float &x, float &y) const; void getBelPosition(BelId bel, float &x, float &y) const;
void getWirePosition(WireId wire, float &x, float &y) const; void getWirePosition(WireId wire, float &x, float &y) const;
void getPipPosition(PipId pip, float &x, float &y) const; void getPipPosition(PipId pip, float &x, float &y) const;
vector<GraphicElement> getBelGraphics(BelId bel) const; vector<GraphicElement> getBelGraphics(BelId bel) const;
vector<GraphicElement> getWireGraphics(WireId wire) const; vector<GraphicElement> getWireGraphics(WireId wire) const;
vector<GraphicElement> getPipGraphics(PipId pip) const; vector<GraphicElement> getPipGraphics(PipId pip) const;

View File

@ -449,7 +449,7 @@ struct Chip
return bel_to_cell[bel.index] == IdString(); return bel_to_cell[bel.index] == IdString();
} }
IdString getBelCell(BelId bel) const IdString getBelCell(BelId bel, bool conflicting=false) const
{ {
assert(bel != BelId()); assert(bel != BelId());
return bel_to_cell[bel.index]; return bel_to_cell[bel.index];
@ -539,7 +539,7 @@ struct Chip
return wire_to_net[wire.index] == IdString(); return wire_to_net[wire.index] == IdString();
} }
IdString getWireNet(WireId wire) const IdString getWireNet(WireId wire, bool conflicting=false) const
{ {
assert(wire != WireId()); assert(wire != WireId());
return wire_to_net[wire.index]; return wire_to_net[wire.index];
@ -596,7 +596,7 @@ struct Chip
return !switches_locked[chip_info.pip_data[pip.index].switch_index]; return !switches_locked[chip_info.pip_data[pip.index].switch_index];
} }
IdString getPipNet(PipId pip) const IdString getPipNet(PipId pip, bool conflicting=false) const
{ {
assert(pip != PipId()); assert(pip != PipId());
return pip_to_net[pip.index]; return pip_to_net[pip.index];
@ -668,6 +668,7 @@ struct Chip
void getBelPosition(BelId bel, float &x, float &y) const; void getBelPosition(BelId bel, float &x, float &y) const;
void getWirePosition(WireId wire, float &x, float &y) const; void getWirePosition(WireId wire, float &x, float &y) const;
void getPipPosition(PipId pip, float &x, float &y) const; void getPipPosition(PipId pip, float &x, float &y) const;
vector<GraphicElement> getBelGraphics(BelId bel) const; vector<GraphicElement> getBelGraphics(BelId bel) const;
vector<GraphicElement> getWireGraphics(WireId wire) const; vector<GraphicElement> getWireGraphics(WireId wire) const;
vector<GraphicElement> getPipGraphics(PipId pip) const; vector<GraphicElement> getPipGraphics(PipId pip) const;