upf: add supply-net commands, upf_version, and supply options (#5617)#10720
upf: add supply-net commands, upf_version, and supply options (#5617)#10720saurav-fermions wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for UPF supply ports, supply nets, and versioning in OpenROAD. Since the odb schema lacks dedicated objects for these constructs, they are persisted as string properties on the block, power domain, or isolation strategy. The changes include new C++ functions, SWIG/Tcl bindings, and integration tests. Feedback is provided regarding connect_supply_net, which currently overwrites the connection property with the last port specified; it should instead append ports to support connecting a supply net to multiple supply ports.
| } | ||
| } | ||
|
|
||
| setStringProperty(block, kSupplyNetConnPrefix + net, port); |
There was a problem hiding this comment.
Currently, connect_supply_net overwrites the connection property kSupplyNetConnPrefix + net with the last port specified. In UPF, a supply net can be connected to multiple supply ports (e.g., via -ports {VDD1 VDD2}). To support multiple port connections correctly, we should append the port to the existing space-separated list of ports instead of overwriting it.
const std::string conn_prop = kSupplyNetConnPrefix + net;
odb::dbStringProperty* prop = odb::dbStringProperty::find(block, conn_prop.c_str());
if (prop != nullptr) {
std::string existing = prop->getValue();
if (!existing.empty() && !port.empty()) {
existing += " " + port;
} else if (existing.empty()) {
existing = port;
}
prop->setValue(existing.c_str());
} else {
odb::dbStringProperty::create(block, conn_prop.c_str(), port.c_str());
}|
Code should be formatted with clang-format |
729faec to
2958413
Compare
…enROAD-Project#5617) Implements a conservative, tested subset of the missing UPF surface from issue The-OpenROAD-Project#5617 that maps onto existing odb structures without a schema bump: New commands: - upf_version (validate known versions, store as block property) - create_supply_port (store as block string-property) - create_supply_net (store as block property, supports -domain/-reuse) - connect_supply_net (validate net/port refs, store connection) New options on existing commands: - create_power_domain -include_scope (maps to '.' element) and -supply (stored as a property on the domain) - set_isolation -isolation_supply / -source / -sink (stored as properties on the dbIsolation object) Supply-net/port constructs have no dedicated odb object, so they are persisted via the generic dbStringProperty mechanism, keeping them queryable and round-trippable through DB save/load without new schema. PST, create_supply_set, set_port_attributes, and add_port_state are deferred (they require new odb schema). See AGENT_REPORT.md. Adds src/upf/test/supply.tcl exercising all new commands/options and asserting the resulting odb state, registered in both CMake and Bazel. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
2958413 to
4d18841
Compare
connect_supply_net is invoked once per port (the tcl loops over -ports), so overwriting the connection property kept only the last port and silently dropped earlier ones. Store the ports as a space-separated, de-duplicated list instead, and extend supply.tcl to cover the multi-port case. Addresses gemini-code-assist review on The-OpenROAD-Project#10720. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
|
Both addressed: clang-format is clean now, and |
|
Needs a tclfmt as well. @LucasYuki I'll leave the functional review to you. |
Apply tclfmt (spaces-in-braces) to the test per repo Tcl style. Addresses @maliberty review on The-OpenROAD-Project#10720. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
|
Done — ran |
Summary
Adds a coherent, tested subset of the UPF supply-net commands,
upf_version, and supply options that the UPF reader was missing, mapped onto existing ODB structures. Scoped conservatively: anything requiring new ODB schema is explicitly deferred.Type of Change
Impact
UPF scripts using the added commands now parse and apply instead of erroring; existing flows unaffected.
Verification
ctest -R '^upf\.'5/5.Related Issues
Fixes #5617
Developed with SAIGE, Fermions' autonomous RTL/EDA debugging agent; root-caused, tested, and signed off by the submitter (@saurav-fermions).