Add getWireType()/getPipType() API
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
6a59b8522c
commit
467e0926f9
@ -538,6 +538,8 @@ struct Arch : BaseCtx
|
||||
return id(name.str());
|
||||
}
|
||||
|
||||
IdString getWireType(WireId wire) const { return IdString(); }
|
||||
|
||||
uint32_t getWireChecksum(WireId wire) const { return wire.index; }
|
||||
|
||||
void bindWire(WireId wire, IdString net, PlaceStrength strength)
|
||||
@ -616,6 +618,8 @@ struct Arch : BaseCtx
|
||||
PipId getPipByName(IdString name) const;
|
||||
IdString getPipName(PipId pip) const;
|
||||
|
||||
IdString getPipType(PipId pip) const { return IdString(); }
|
||||
|
||||
uint32_t getPipChecksum(PipId pip) const { return pip.index; }
|
||||
|
||||
void bindPip(PipId pip, IdString net, PlaceStrength strength)
|
||||
|
@ -24,22 +24,24 @@
|
||||
|
||||
NEXTPNR_NAMESPACE_BEGIN
|
||||
|
||||
void Arch::addWire(IdString name, int x, int y)
|
||||
void Arch::addWire(IdString name, IdString type, int x, int y)
|
||||
{
|
||||
NPNR_ASSERT(wires.count(name) == 0);
|
||||
WireInfo &wi = wires[name];
|
||||
wi.name = name;
|
||||
wi.type = type;
|
||||
wi.x = x;
|
||||
wi.y = y;
|
||||
|
||||
wire_ids.push_back(name);
|
||||
}
|
||||
|
||||
void Arch::addPip(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay)
|
||||
void Arch::addPip(IdString name, IdString type, IdString srcWire, IdString dstWire, DelayInfo delay)
|
||||
{
|
||||
NPNR_ASSERT(pips.count(name) == 0);
|
||||
PipInfo &pi = pips[name];
|
||||
pi.name = name;
|
||||
wi.type = type;
|
||||
pi.srcWire = srcWire;
|
||||
pi.dstWire = dstWire;
|
||||
pi.delay = delay;
|
||||
@ -49,11 +51,12 @@ void Arch::addPip(IdString name, IdString srcWire, IdString dstWire, DelayInfo d
|
||||
pip_ids.push_back(name);
|
||||
}
|
||||
|
||||
void Arch::addAlias(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay)
|
||||
void Arch::addAlias(IdString name, IdString type, IdString srcWire, IdString dstWire, DelayInfo delay)
|
||||
{
|
||||
NPNR_ASSERT(pips.count(name) == 0);
|
||||
PipInfo &pi = pips[name];
|
||||
pi.name = name;
|
||||
wi.type = type;
|
||||
pi.srcWire = srcWire;
|
||||
pi.dstWire = dstWire;
|
||||
pi.delay = delay;
|
||||
@ -266,6 +269,8 @@ WireId Arch::getWireByName(IdString name) const
|
||||
|
||||
IdString Arch::getWireName(WireId wire) const { return wire; }
|
||||
|
||||
IdString Arch::getWireType(WireId wire) const { return wires.at(wire).type; }
|
||||
|
||||
uint32_t Arch::getWireChecksum(WireId wire) const
|
||||
{
|
||||
// FIXME
|
||||
@ -316,6 +321,8 @@ PipId Arch::getPipByName(IdString name) const
|
||||
|
||||
IdString Arch::getPipName(PipId pip) const { return pip; }
|
||||
|
||||
IdString Arch::getPipType(PipId pip) const { return pips.at(pip).type; }
|
||||
|
||||
uint32_t Arch::getPipChecksum(PipId wire) const
|
||||
{
|
||||
// FIXME
|
||||
|
@ -31,7 +31,7 @@ struct WireInfo;
|
||||
|
||||
struct PipInfo
|
||||
{
|
||||
IdString name, bound_net;
|
||||
IdString name, type, bound_net;
|
||||
WireId srcWire, dstWire;
|
||||
DelayInfo delay;
|
||||
DecalXY decalxy;
|
||||
@ -39,7 +39,7 @@ struct PipInfo
|
||||
|
||||
struct WireInfo
|
||||
{
|
||||
IdString name, bound_net;
|
||||
IdString name, type, bound_net;
|
||||
std::vector<PipId> downhill, uphill, aliases;
|
||||
BelPin uphill_bel_pin;
|
||||
std::vector<BelPin> downhill_bel_pins;
|
||||
@ -96,9 +96,9 @@ struct Arch : BaseCtx
|
||||
|
||||
float grid_distance_to_delay;
|
||||
|
||||
void addWire(IdString name, int x, int y);
|
||||
void addPip(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay);
|
||||
void addAlias(IdString name, IdString srcWire, IdString dstWire, DelayInfo delay);
|
||||
void addWire(IdString name, IdString type, int x, int y);
|
||||
void addPip(IdString name, IdString type, IdString srcWire, IdString dstWire, DelayInfo delay);
|
||||
void addAlias(IdString name, IdString type, IdString srcWire, IdString dstWire, DelayInfo delay);
|
||||
|
||||
void addBel(IdString name, IdString type, Loc loc, bool gb);
|
||||
void addBelInput(IdString bel, IdString name, IdString wire);
|
||||
@ -157,6 +157,7 @@ struct Arch : BaseCtx
|
||||
|
||||
WireId getWireByName(IdString name) const;
|
||||
IdString getWireName(WireId wire) const;
|
||||
IdString getWireType(WireId wire) const;
|
||||
uint32_t getWireChecksum(WireId wire) const;
|
||||
void bindWire(WireId wire, IdString net, PlaceStrength strength);
|
||||
void unbindWire(WireId wire);
|
||||
@ -169,6 +170,7 @@ struct Arch : BaseCtx
|
||||
|
||||
PipId getPipByName(IdString name) const;
|
||||
IdString getPipName(PipId pip) const;
|
||||
IdString getPipType(PipId pip) const;
|
||||
uint32_t getPipChecksum(PipId pip) const;
|
||||
void bindPip(PipId pip, IdString net, PlaceStrength strength);
|
||||
void unbindPip(PipId pip);
|
||||
|
@ -567,6 +567,7 @@ void DesignWidget::onItemSelectionChanged()
|
||||
QtProperty *topItem = addTopLevelProperty("Wire");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", c.c_str(ctx));
|
||||
addProperty(topItem, QVariant::String, "Type", ctx->getWireType(wire).c_str(ctx));
|
||||
addProperty(topItem, QVariant::Bool, "Available", ctx->checkWireAvail(wire));
|
||||
addProperty(topItem, QVariant::String, "Bound Net", ctx->getBoundWireNet(wire).c_str(ctx), ElementType::NET);
|
||||
addProperty(topItem, QVariant::String, "Conflicting Net", ctx->getConflictingWireNet(wire).c_str(ctx),
|
||||
@ -618,6 +619,7 @@ void DesignWidget::onItemSelectionChanged()
|
||||
QtProperty *topItem = addTopLevelProperty("Pip");
|
||||
|
||||
addProperty(topItem, QVariant::String, "Name", c.c_str(ctx));
|
||||
addProperty(topItem, QVariant::String, "Type", ctx->getPipType(pip).c_str(ctx));
|
||||
addProperty(topItem, QVariant::Bool, "Available", ctx->checkPipAvail(pip));
|
||||
addProperty(topItem, QVariant::String, "Bound Net", ctx->getBoundPipNet(pip).c_str(ctx), ElementType::NET);
|
||||
addProperty(topItem, QVariant::String, "Conflicting Net", ctx->getConflictingPipNet(pip).c_str(ctx),
|
||||
|
@ -469,6 +469,8 @@ struct Arch : BaseCtx
|
||||
return id(chip_info->wire_data[wire.index].name.get());
|
||||
}
|
||||
|
||||
IdString getWireType(WireId wire) const { return IdString(); }
|
||||
|
||||
uint32_t getWireChecksum(WireId wire) const { return wire.index; }
|
||||
|
||||
void bindWire(WireId wire, IdString net, PlaceStrength strength)
|
||||
@ -611,6 +613,8 @@ struct Arch : BaseCtx
|
||||
|
||||
IdString getPipName(PipId pip) const;
|
||||
|
||||
IdString getPipType(PipId pip) const { return IdString(); }
|
||||
|
||||
uint32_t getPipChecksum(PipId pip) const { return pip.index; }
|
||||
|
||||
WireId getPipSrcWire(PipId pip) const
|
||||
|
Loading…
Reference in New Issue
Block a user