archapi: Add new API for global constant routing

Signed-off-by: gatecat <[email protected]>
This commit is contained in:
gatecat
2023-11-07 09:00:03 +01:00
committed by myrtle
parent e3c44dd20a
commit fe52840054
8 changed files with 424 additions and 79 deletions
+7
View File
@@ -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;
+2
View File
@@ -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;
}