mirror of
https://github.com/YosysHQ/nextpnr.git
synced 2026-08-22 14:17:29 +02:00
archapi: Add new API for global constant routing
Signed-off-by: gatecat <[email protected]>
This commit is contained in:
@@ -1170,6 +1170,13 @@ struct Arch : BaseArch<ArchRanges>
|
||||
virtual bool checkWireAvail(WireId wire) const override { return getBoundWireNet(wire) == nullptr; }
|
||||
NetInfo *getBoundWireNet(WireId wire) const override { return tileStatus.at(wire.tile).boundwires.at(wire.index); }
|
||||
|
||||
IdString getWireConstantValue(WireId wire) const override
|
||||
{
|
||||
if (chip_wire_data(db, chip_info, wire).name == ID_LOCAL_VCC)
|
||||
return id_VCC_DRV;
|
||||
else
|
||||
return {};
|
||||
}
|
||||
// -------------------------------------------------
|
||||
|
||||
PipId getPipByName(IdStringList name) const override;
|
||||
|
||||
@@ -325,6 +325,8 @@ struct NexusPacker
|
||||
CellInfo *new_cell = ctx->createCell(ctx->idf("$CONST_%s_DRV_", type.c_str(ctx)), type);
|
||||
new_cell->addOutput(id_Z);
|
||||
new_cell->connectPort(id_Z, new_net);
|
||||
if (type == id_VCC_DRV)
|
||||
new_net->constant_value = id_VCC_DRV;
|
||||
return new_net;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user