Add Arch::getBelPinType() and Arch::getWireBelPins() in generic arch
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
62b66e0208
commit
bfa83b3bfd
@ -90,6 +90,7 @@ void Arch::addBelInput(IdString bel, IdString name, IdString wire)
|
|||||||
pi.type = PORT_IN;
|
pi.type = PORT_IN;
|
||||||
|
|
||||||
wires.at(wire).downhill_bel_pins.push_back(BelPin{bel, name});
|
wires.at(wire).downhill_bel_pins.push_back(BelPin{bel, name});
|
||||||
|
wires.at(wire).bel_pins.push_back(BelPin{bel, name});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arch::addBelOutput(IdString bel, IdString name, IdString wire)
|
void Arch::addBelOutput(IdString bel, IdString name, IdString wire)
|
||||||
@ -101,6 +102,7 @@ void Arch::addBelOutput(IdString bel, IdString name, IdString wire)
|
|||||||
pi.type = PORT_OUT;
|
pi.type = PORT_OUT;
|
||||||
|
|
||||||
wires.at(wire).uphill_bel_pin = BelPin{bel, name};
|
wires.at(wire).uphill_bel_pin = BelPin{bel, name};
|
||||||
|
wires.at(wire).bel_pins.push_back(BelPin{bel, name});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arch::addBelInout(IdString bel, IdString name, IdString wire)
|
void Arch::addBelInout(IdString bel, IdString name, IdString wire)
|
||||||
@ -112,6 +114,7 @@ void Arch::addBelInout(IdString bel, IdString name, IdString wire)
|
|||||||
pi.type = PORT_INOUT;
|
pi.type = PORT_INOUT;
|
||||||
|
|
||||||
wires.at(wire).downhill_bel_pins.push_back(BelPin{bel, name});
|
wires.at(wire).downhill_bel_pins.push_back(BelPin{bel, name});
|
||||||
|
wires.at(wire).bel_pins.push_back(BelPin{bel, name});
|
||||||
}
|
}
|
||||||
|
|
||||||
void Arch::addGroupBel(IdString group, IdString bel) { groups[group].bels.push_back(bel); }
|
void Arch::addGroupBel(IdString group, IdString bel) { groups[group].bels.push_back(bel); }
|
||||||
@ -217,6 +220,8 @@ BelType Arch::getBelType(BelId bel) const { return bels.at(bel).type; }
|
|||||||
|
|
||||||
WireId Arch::getBelPinWire(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).wire; }
|
WireId Arch::getBelPinWire(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).wire; }
|
||||||
|
|
||||||
|
PortType Arch::getBelPinType(BelId bel, PortPin pin) const { return bels.at(bel).pins.at(pin).type; }
|
||||||
|
|
||||||
BelPin Arch::getBelPinUphill(WireId wire) const { return wires.at(wire).uphill_bel_pin; }
|
BelPin Arch::getBelPinUphill(WireId wire) const { return wires.at(wire).uphill_bel_pin; }
|
||||||
|
|
||||||
const std::vector<BelPin> &Arch::getBelPinsDownhill(WireId wire) const { return wires.at(wire).downhill_bel_pins; }
|
const std::vector<BelPin> &Arch::getBelPinsDownhill(WireId wire) const { return wires.at(wire).downhill_bel_pins; }
|
||||||
@ -267,6 +272,8 @@ IdString Arch::getBoundWireNet(WireId wire) const { return wires.at(wire).bound_
|
|||||||
|
|
||||||
IdString Arch::getConflictingWireNet(WireId wire) const { return wires.at(wire).bound_net; }
|
IdString Arch::getConflictingWireNet(WireId wire) const { return wires.at(wire).bound_net; }
|
||||||
|
|
||||||
|
const std::vector<BelPin> &Arch::getWireBelPins(WireId wire) const { return wires.at(wire).bel_pins; }
|
||||||
|
|
||||||
const std::vector<WireId> &Arch::getWires() const { return wire_ids; }
|
const std::vector<WireId> &Arch::getWires() const { return wire_ids; }
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
@ -43,6 +43,7 @@ struct WireInfo
|
|||||||
std::vector<PipId> downhill, uphill, aliases;
|
std::vector<PipId> downhill, uphill, aliases;
|
||||||
BelPin uphill_bel_pin;
|
BelPin uphill_bel_pin;
|
||||||
std::vector<BelPin> downhill_bel_pins;
|
std::vector<BelPin> downhill_bel_pins;
|
||||||
|
std::vector<BelPin> bel_pins;
|
||||||
DecalXY decalxy;
|
DecalXY decalxy;
|
||||||
int x, y;
|
int x, y;
|
||||||
};
|
};
|
||||||
@ -146,8 +147,9 @@ struct Arch : BaseCtx
|
|||||||
const std::vector<BelId> &getBelsByType(BelType type) const;
|
const std::vector<BelId> &getBelsByType(BelType type) const;
|
||||||
BelType getBelType(BelId bel) const;
|
BelType getBelType(BelId bel) const;
|
||||||
WireId getBelPinWire(BelId bel, PortPin pin) const;
|
WireId getBelPinWire(BelId bel, PortPin pin) const;
|
||||||
BelPin getBelPinUphill(WireId wire) const;
|
PortType getBelPinType(BelId bel, PortPin pin) const;
|
||||||
const std::vector<BelPin> &getBelPinsDownhill(WireId wire) const;
|
BelPin getBelPinUphill(WireId wire) const NPNR_DEPRECATED;
|
||||||
|
const std::vector<BelPin> &getBelPinsDownhill(WireId wire) const NPNR_DEPRECATED;
|
||||||
|
|
||||||
WireId getWireByName(IdString name) const;
|
WireId getWireByName(IdString name) const;
|
||||||
IdString getWireName(WireId wire) const;
|
IdString getWireName(WireId wire) const;
|
||||||
@ -159,6 +161,7 @@ struct Arch : BaseCtx
|
|||||||
IdString getConflictingWireNet(WireId wire) const;
|
IdString getConflictingWireNet(WireId wire) const;
|
||||||
DelayInfo getWireDelay(WireId wire) const { return DelayInfo(); }
|
DelayInfo getWireDelay(WireId wire) const { return DelayInfo(); }
|
||||||
const std::vector<WireId> &getWires() const;
|
const std::vector<WireId> &getWires() const;
|
||||||
|
const std::vector<BelPin> &getWireBelPins(WireId wire) const;
|
||||||
|
|
||||||
PipId getPipByName(IdString name) const;
|
PipId getPipByName(IdString name) const;
|
||||||
IdString getPipName(PipId pip) const;
|
IdString getPipName(PipId pip) const;
|
||||||
|
Loading…
Reference in New Issue
Block a user