From 209cce66605e4e45809451499ceff9d15a1bf3eb Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 17:18:03 -0700 Subject: [PATCH 01/24] odb: add isBackside() for LEF58_BACKSIDE property LEF 5.8 lets a tech LEF mark routing and cut layers as backside via "PROPERTY LEF58_BACKSIDE BACKSIDE ;". Backside layers are used by buried-power-rail (BPR) and backside power-delivery network (BSPDN) flows on 2nm-class technologies. Previously, the property was logged as unsupported (ODB-0388) and discarded. This commit: * Adds a parser for LEF58_BACKSIDE (modelled on RECTONLY). * Stores the flag on dbTechLayer via a new flags_.is_backside bit (taken from spare_bits). * Exposes dbTechLayer::setBackside() / isBackside() via the public API. * Wires the parser into the ROUTING and CUT branches of lefin::createLayer so the property is consumed rather than warned about. The flag has no in-tree consumers yet; downstream modules (DRT, GRT, PDN, DPL, RCX) will be updated in follow-up commits to skip backside layers from front-side routing while still letting the geometry round- trip through DEF/GDS for downstream LVS/PEX tools. Signed-off-by: Matthew Guthaus --- src/odb/include/odb/db.h | 9 +++++ src/odb/src/db/dbTechLayer.cpp | 15 +++++++ src/odb/src/db/dbTechLayer.h | 3 +- src/odb/src/lefin/CMakeLists.txt | 1 + src/odb/src/lefin/lefLayerPropParser.h | 6 +++ .../src/lefin/lefTechLayerBacksideParser.cpp | 40 +++++++++++++++++++ src/odb/src/lefin/lefin.cpp | 6 +++ 7 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 src/odb/src/lefin/lefTechLayerBacksideParser.cpp diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index 212de10a1fd..189a61ced95 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -9272,6 +9272,15 @@ class dbTechLayer : public dbObject LEF58_TYPE getLef58Type() const; std::string getLef58TypeString() const; + /// + /// Backside layers are physically located on the wafer's reverse side, + /// typically used for buried-power-rail (BPR) and backside power + /// delivery (BSPDN). Set by the LEF58_BACKSIDE property. + /// + void setBackside(bool is_backside); + + bool isBackside() const; + /// /// Get the layer name. /// diff --git a/src/odb/src/db/dbTechLayer.cpp b/src/odb/src/db/dbTechLayer.cpp index eeb1de0153c..0e7c7f9323a 100644 --- a/src/odb/src/db/dbTechLayer.cpp +++ b/src/odb/src/db/dbTechLayer.cpp @@ -101,6 +101,9 @@ bool _dbTechLayer::operator==(const _dbTechLayer& rhs) const if (flags_.lef58_type != rhs.flags_.lef58_type) { return false; } + if (flags_.is_backside != rhs.flags_.is_backside) { + return false; + } if (wrong_way_width_ != rhs.wrong_way_width_) { return false; } @@ -1248,6 +1251,18 @@ dbTechLayer::LEF58_TYPE dbTechLayer::getLef58Type() const return (dbTechLayer::LEF58_TYPE) layer->flags_.lef58_type; } +void dbTechLayer::setBackside(bool is_backside) +{ + _dbTechLayer* layer = (_dbTechLayer*) this; + layer->flags_.is_backside = is_backside; +} + +bool dbTechLayer::isBackside() const +{ + _dbTechLayer* layer = (_dbTechLayer*) this; + return layer->flags_.is_backside; +} + std::string dbTechLayer::getLef58TypeString() const { switch (getLef58Type()) { diff --git a/src/odb/src/db/dbTechLayer.h b/src/odb/src/db/dbTechLayer.h index e04affd25d6..51087b50dce 100644 --- a/src/odb/src/db/dbTechLayer.h +++ b/src/odb/src/db/dbTechLayer.h @@ -70,7 +70,8 @@ struct dbTechLayerFlags bool right_way_on_grid_only_check_mask : 1; bool rect_only_except_non_core_pins : 1; uint32_t lef58_type : 5; - uint32_t spare_bits : 4; + bool is_backside : 1; + uint32_t spare_bits : 3; }; class _dbTechLayer : public _dbObject diff --git a/src/odb/src/lefin/CMakeLists.txt b/src/odb/src/lefin/CMakeLists.txt index ef5e484ad22..63ef138eae4 100644 --- a/src/odb/src/lefin/CMakeLists.txt +++ b/src/odb/src/lefin/CMakeLists.txt @@ -12,6 +12,7 @@ add_library(lefin lefTechLayerSpacingTablePrlParser.cpp lefTechLayerRightWayOnGridOnlyParser.cpp lefTechLayerRectOnlyParser.cpp + lefTechLayerBacksideParser.cpp lefTechLayerCutClassParser.cpp lefTechLayerCutSpacingParser.cpp lefTechLayerCutSpacingTableParser.cpp diff --git a/src/odb/src/lefin/lefLayerPropParser.h b/src/odb/src/lefin/lefLayerPropParser.h index 63d7ab2c9d3..bd8c3fe8cae 100644 --- a/src/odb/src/lefin/lefLayerPropParser.h +++ b/src/odb/src/lefin/lefLayerPropParser.h @@ -88,6 +88,12 @@ class lefTechLayerRectOnlyParser static bool parse(const std::string&, dbTechLayer*, lefinReader*); }; +class lefTechLayerBacksideParser +{ + public: + static bool parse(const std::string&, dbTechLayer*, lefinReader*); +}; + class lefTechLayerTypeParser { public: diff --git a/src/odb/src/lefin/lefTechLayerBacksideParser.cpp b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp new file mode 100644 index 00000000000..a6773008e3a --- /dev/null +++ b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 2026, The OpenROAD Authors + +#include + +#include "boost/bind/bind.hpp" +#include "boostParser.h" +#include "lefLayerPropParser.h" +#include "odb/db.h" +#include "odb/lefin.h" + +namespace odb::lefTechLayerBackside { + +template +bool parse(Iterator first, + Iterator last, + odb::dbTechLayer* layer, + odb::lefinReader* /*lefinReader*/) +{ + qi::rule backsideRule + = (lit("BACKSIDE")[boost::bind( + &odb::dbTechLayer::setBackside, layer, true)] + >> lit(";")); + + bool valid = qi::phrase_parse(first, last, backsideRule, space); + return valid && first == last; +} + +} // namespace odb::lefTechLayerBackside + +namespace odb { + +bool lefTechLayerBacksideParser::parse(const std::string& s, + dbTechLayer* layer, + odb::lefinReader* l) +{ + return lefTechLayerBackside::parse(s.begin(), s.end(), layer, l); +} + +} // namespace odb diff --git a/src/odb/src/lefin/lefin.cpp b/src/odb/src/lefin/lefin.cpp index d7d9d4ed1c8..b8cbf8db710 100644 --- a/src/odb/src/lefin/lefin.cpp +++ b/src/odb/src/lefin/lefin.cpp @@ -679,6 +679,9 @@ void lefinReader::layer(LefParser::lefiLayer* layer) } else if (!strcmp(layer->propName(iii), "LEF58_RECTONLY")) { valid = lefTechLayerRectOnlyParser::parse(layer->propValue(iii), l, this); + } else if (!strcmp(layer->propName(iii), "LEF58_BACKSIDE")) { + valid + = lefTechLayerBacksideParser::parse(layer->propValue(iii), l, this); } else if (!strcmp(layer->propName(iii), "LEF58_TYPE")) { valid = lefTechLayerTypeParser::parse(layer->propValue(iii), l, this); } else if (!strcmp(layer->propName(iii), "LEF58_EOLEXTENSIONSPACING")) { @@ -741,6 +744,9 @@ void lefinReader::layer(LefParser::lefiLayer* layer) valid = parser.parse(layer->propValue(iii)); } else if (!strcmp(layer->propName(iii), "LEF58_TYPE")) { valid = lefTechLayerTypeParser::parse(layer->propValue(iii), l, this); + } else if (!strcmp(layer->propName(iii), "LEF58_BACKSIDE")) { + valid + = lefTechLayerBacksideParser::parse(layer->propValue(iii), l, this); } else if (!strcmp(layer->propName(iii), "LEF58_KEEPOUTZONE")) { KeepOutZoneParser parser(l, this); parser.parse(layer->propValue(iii)); From a1c0207003406e6eadd64b5953ce40ecf8eb3e5a Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 17:54:27 -0700 Subject: [PATCH 02/24] drt: filter LEF58_BACKSIDE layers from the front-side router OpenROAD's detailed router (TritonRoute) has no notion of front- versus back-side metal stacks. On a backside-power PDK (GT2N 2nm with BPR / BM* / BRDL), the router tries to build default vias for the backside cut layers (BV0..BV4) and crashes when those vias have no front-side geometry. Even after a defensive null-guard on the via probes, every downstream consumer (track grids, BTerms, special-net wires, access points, NDRs, via generate rules) still tries to look up backside layers in frTech and crashes. This commit filters backside layers out of DRT at every ingest point: * setLayers - skip ROUTING / CUT / MASTERSLICE layers tagged isBackside(); they never appear in frTech. * setTracks - skip track grids on backside layers. * setBTerms - skip BPin shapes on backside layers (e.g. block- level VDD/VSS pins routed on BPR). * setTechViaRules - skip generate rules that reference any backside layer. * setNDRs - skip per-layer / via / via-rule NDR entries that reference backside layers. * updateNetRouting (signal path) - skip path segments and vias whose layer doesn't exist in frTech; works because the router's name2layer_ table already excludes backside layers. * updateNetRouting (special path) - skip SWire boxes and SBox vias on backside layers (BPR followpins, backside stripes generated by PDN). * updatefrAccessPoint - return false (and skip the access point in callers) when the AP is on a backside layer. The frLayer wrapper gets a passthrough isBackside() that consults the underlying dbTechLayer::isBackside() (added by the previous commit). With this, gt2n/gcd routes end-to-end without the previously needed null-guard in FlexTAWorker::initFixedObjs; the null-guard is reverted in the same commit because the filter supersedes it. asap7/gcd is unaffected (no layers there report isBackside). Signed-off-by: Matthew Guthaus --- src/drt/src/db/tech/frLayer.h | 8 +++ src/drt/src/io/io.cpp | 91 +++++++++++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 4 deletions(-) diff --git a/src/drt/src/db/tech/frLayer.h b/src/drt/src/db/tech/frLayer.h index ea2a56229c6..c64d4ceae39 100644 --- a/src/drt/src/db/tech/frLayer.h +++ b/src/drt/src/db/tech/frLayer.h @@ -112,6 +112,14 @@ class frLayer ? false : db_layer_->getType() == odb::dbTechLayerType::ROUTING; } + // True for layers tagged with the LEF58_BACKSIDE property (BPR, + // backside metals and their cut layers in BSPDN flows). The detailed + // router does not currently route on these layers; they are treated + // as invisible to TA/DRT. + bool isBackside() const + { + return (fakeCut_ || fakeMasterslice_) ? false : db_layer_->isBackside(); + } bool isUnidirectional() const { // We don't handle coloring so any multiple patterned diff --git a/src/drt/src/io/io.cpp b/src/drt/src/io/io.cpp index 2807a1be2fc..1c0dd35f231 100644 --- a/src/drt/src/io/io.cpp +++ b/src/drt/src/io/io.cpp @@ -87,6 +87,11 @@ void io::Parser::setTracks(odb::dbBlock* block) { auto tracks = block->getTrackGrids(); for (auto track : tracks) { + // Skip track grids on backside layers; DRT filters those layers + // out of its frTech entirely (see setLayers). + if (track->getTechLayer()->isBackside()) { + continue; + } if (getTech()->name2layer_.find(track->getTechLayer()->getName()) == getTech()->name2layer_.end()) { logger_->error( @@ -427,6 +432,11 @@ void io::Parser::createNDR(odb::dbTechNonDefaultRule* ndr) std::vector lr; ndr->getLayerRules(lr); for (auto& l : lr) { + // Skip per-layer NDR rules that reference a filtered backside + // layer; DRT has no frLayer entry for it. + if (l->getLayer()->isBackside()) { + continue; + } auto layer = getTech()->getLayer(l->getLayer()->getName()); z = getZIdx(layer->getLayerNum()); fnd->setWidth(l->getWidth(), z); @@ -436,6 +446,10 @@ void io::Parser::createNDR(odb::dbTechNonDefaultRule* ndr) std::vector vias; ndr->getUseVias(vias); for (auto via : vias) { + if (via->getBottomLayer()->isBackside() + || via->getTopLayer()->isBackside()) { + continue; + } auto layer = getTech()->getLayer(via->getBottomLayer()->getName()); z = getZIdx(layer->getLayerNum()); fnd->addVia(getTech()->getVia(via->getName()), z); @@ -444,6 +458,16 @@ void io::Parser::createNDR(odb::dbTechNonDefaultRule* ndr) ndr->getUseViaRules(viaRules); z = std::numeric_limits::max(); for (auto via : viaRules) { + bool any_backside = false; + for (int i = 0; i < (int) via->getViaLayerRuleCount(); i++) { + if (via->getViaLayerRule(i)->getLayer()->isBackside()) { + any_backside = true; + break; + } + } + if (any_backside) { + continue; + } for (int i = 0; i < (int) via->getViaLayerRuleCount(); i++) { if (via->getViaLayerRule(i)->getLayer()->getType() == odb::dbTechLayerType::CUT) { @@ -805,6 +829,12 @@ void io::Parser::updateNetRouting(frNet* netIn, odb::dbNet* net) endpath = true; } } while (!endpath); + // Skip path segments that reference a backside layer; DRT + // doesn't carry those in its frTech (see setLayers). + if (auto it = getTech()->name2layer_.find(layerName); + it == getTech()->name2layer_.end()) { + continue; + } auto layerNum = getTech()->name2layer_[layerName]->getLayerNum(); if (hasRect) { auto tmpPWire = std::make_unique(); @@ -892,6 +922,11 @@ void io::Parser::updateNetRouting(frNet* netIn, odb::dbNet* net) for (auto swire : net->getSWires()) { for (auto box : swire->getWires()) { if (!box->isVia()) { + // Skip special-net path segments on backside layers (BPR + // followpins, backside stripes); DRT has no frLayer for them. + if (box->getTechLayer()->isBackside()) { + continue; + } getSBoxCoords(box, beginX, beginY, endX, endY, width); auto layerNum = getTech() ->name2layer_[box->getTechLayer()->getName()] @@ -929,10 +964,21 @@ void io::Parser::updateNetRouting(frNet* netIn, odb::dbNet* net) tmpP->setStyle(tmpSegStyle); netIn->addShape(std::move(tmpP)); } else { + // Skip backside vias (BV0..BV4, BVia*Array etc.) on special + // nets; DRT removes them from name2via_ when its frTech is + // populated. if (box->getTechVia()) { viaName = box->getTechVia()->getName(); + if (box->getTechVia()->getBottomLayer()->isBackside() + || box->getTechVia()->getTopLayer()->isBackside()) { + continue; + } } else if (box->getBlockVia()) { viaName = box->getBlockVia()->getName(); + if (box->getBlockVia()->getBottomLayer()->isBackside() + || box->getBlockVia()->getTopLayer()->isBackside()) { + continue; + } } if (getTech()->name2via_.find(viaName) @@ -1001,10 +1047,15 @@ frNet* io::Parser::addNet(odb::dbNet* db_net) return raw_net_in; } -void updatefrAccessPoint(odb::dbAccessPoint* db_ap, +bool updatefrAccessPoint(odb::dbAccessPoint* db_ap, frAccessPoint* ap, frTechObject* tech) { + // Access points on backside layers (e.g. PG taps) are invisible to + // the front-side router; report so the caller can drop them. + if (db_ap->getLayer()->isBackside()) { + return false; + } ap->setPoint(db_ap->getPoint()); if (db_ap->hasAccess(odb::dbDirection::NORTH)) { ap->setAccess(frDirEnum::N, true); @@ -1056,6 +1107,7 @@ void updatefrAccessPoint(odb::dbAccessPoint* db_ap, ap->addPathSeg(path_seg); } + return true; } void io::Parser::setBTerms(odb::dbBlock* block) @@ -1089,6 +1141,11 @@ void io::Parser::setBTerms(odb::dbBlock* block) int bterm_bottom_layer_idx = std::numeric_limits::max(); for (auto bpin : term->getBPins()) { for (auto box : bpin->getBoxes()) { + // BTerms on backside layers (e.g. PG pins on BPR) have no + // representation in the filtered DRT layer table; skip them. + if (box->getTechLayer()->isBackside()) { + continue; + } frLayerNum layer_idx = getTech() ->name2layer_[box->getTechLayer()->getName()] ->getLayerNum(); @@ -1105,6 +1162,9 @@ void io::Parser::setBTerms(odb::dbBlock* block) } else { for (auto pin : term->getBPins()) { for (auto box : pin->getBoxes()) { + if (box->getTechLayer()->isBackside()) { + continue; + } odb::Rect bbox = box->getBox(); if (getTech()->name2layer_.find(box->getTechLayer()->getName()) == getTech()->name2layer_.end()) { @@ -1128,8 +1188,9 @@ void io::Parser::setBTerms(odb::dbBlock* block) auto db_pin = (odb::dbBPin*) *term->getBPins().begin(); for (auto& db_ap : db_pin->getAccessPoints()) { auto ap = std::make_unique(); - updatefrAccessPoint(db_ap, ap.get(), getTech()); - pa->addAccessPoint(std::move(ap)); + if (updatefrAccessPoint(db_ap, ap.get(), getTech())) { + pa->addAccessPoint(std::move(ap)); + } } } pinIn->addPinAccess(std::move(pa)); @@ -1217,7 +1278,9 @@ void io::Parser::setAccessPoints(odb::dbDatabase* db) for (auto db_ap : db_aps) { std::unique_ptr ap = std::make_unique(); - updatefrAccessPoint(db_ap, ap.get(), getTech()); + if (!updatefrAccessPoint(db_ap, ap.get(), getTech())) { + continue; + } ap->setDbAccessPoint(db_ap); ap_map[db_ap] = ap.get(); pa->addAccessPoint(std::move(ap)); @@ -2564,6 +2627,13 @@ void io::Parser::setLayers(odb::dbTech* db_tech) { masterSliceLayer_ = nullptr; for (auto layer : db_tech->getLayers()) { + // Skip layers marked LEF58_BACKSIDE (BPR / BM* / BV* / BRDL on + // backside-power PDKs). DRT only routes the front-side stack; + // backside layers exist in ODB and survive DEF/GDS round-trip, + // but the router treats them as invisible. + if (layer->isBackside()) { + continue; + } switch (layer->getType().getValue()) { case odb::dbTechLayerType::ROUTING: addRoutingLayer(layer); @@ -2822,6 +2892,19 @@ void io::Parser::setTechViaRules(odb::dbTech* db_tech) if (count != 3) { logger_->error(DRT, 128, "Unsupported viarule {}.", rule->getName()); } + // Skip viarules that reference any backside layer. The DRT layer + // table excludes backside layers entirely (see setLayers), so the + // viarule cannot be honored on the front-side stack. + bool has_backside = false; + for (int i = 0; i < count; i++) { + if (rule->getViaLayerRule(i)->getLayer()->isBackside()) { + has_backside = true; + break; + } + } + if (has_backside) { + continue; + } std::map lNum2Int; for (int i = 0; i < count; i++) { auto layerRule = rule->getViaLayerRule(i); From 5a5bc72f33e9d26cd351e172bd7ec6fea80cb750 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 19:17:55 -0700 Subject: [PATCH 03/24] pdn: warn when add_pdn_connect spans front/back side A standard cut-layer via cannot bridge a front-side metal to a backside metal (BPR, BM*, BRDL) in a backside-power-delivery PDK. The bridge has to come from a TSV-like tap cell whose layout already stitches the two sides together. Today the user can write add_pdn_connect -grid {grid} -layers {M1 BPR} without any feedback, even though PDN cannot generate a via to satisfy it. The connection just silently fails to materialize. This commit adds a warning (PDN-1200) when the two layers of an add_pdn_connect rule disagree on isBackside(). The warning is informational only - we don't error, because the user may know that a tap cell is providing the bridge and is intentionally documenting intent in the .tcl. The warning at least makes the unusual topology explicit. Signed-off-by: Matthew Guthaus --- src/pdn/src/pdn.tcl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index 5b2b87f357a..1344c1d2864 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -572,6 +572,19 @@ proc add_pdn_connect { args } { set l0 [pdn::get_layer [lindex $keys(-layers) 0]] set l1 [pdn::get_layer [lindex $keys(-layers) 1]] + # Backside-power sanity check. A standard cut-layer via cannot bridge + # a front-side metal to a backside metal (BPR / BM* / BRDL); the + # connection has to be provided by a TSV-like tap cell that already + # contains the M1<->BPR stitch as part of its layout. Warn loudly so + # the user can confirm the tap exists. + if { [$l0 isBackside] != [$l1 isBackside] } { + utl::warn PDN 1200 \ + "add_pdn_connect layers ([$l0 getName], [$l1 getName]) span the\ + front-side/backside boundary. Standard PDN vias do not cross\ + this boundary; the connection must come from a tap cell that\ + internally stitches the two sides. Verify this is intended." + } + set cut_pitch "0 0" if { [info exists keys(-cut_pitch)] } { set cut_pitch [pdn::get_one_to_two "-cut_pitch" $keys(-cut_pitch)] From 38afccee554162f530819892510b842d9917d89c Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 19:37:25 -0700 Subject: [PATCH 04/24] psm: skip backside layers when picking ITerm base layer PSM's ITerm shape-generation puts a 'virtual base node' on the layer returned by getTech()->findRoutingLayer(1). On a backside-power PDK (LEF58_BACKSIDE present), ODB orders backside metals at the low end of the routing-layer index space - on GT2N findRoutingLayer(1) is BRDL, with BPR at level 6 and the lowest front-side metal M0 starting at level 7. The design has no BRDL geometry, so every base node lands on an orphan layer and the IRSolver flags every cell as 'Unconnected instance' (PSM-0039), making analyze_power_grid unusable. Scan upward through the routing-layer index space and use the first front-side layer instead. On front-side-only PDKs this still resolves to the original layer (findRoutingLayer(1)), so existing flows are unchanged. This is one piece of full BSPDN IR-drop support; the remaining piece is that PSM does not currently model the M1<->BPR bridge inside a tap cell, so PG-net IR drop on a backside-only PDN still flags 'Unconnected shape' warnings on the tap-cell M1 pins. That requires a first-class bridge-cell concept (LEF58 extension) and is tracked separately. Signed-off-by: Matthew Guthaus --- src/psm/src/ir_network.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index 0e109d7c06f..8ea9493fd0a 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -249,7 +249,23 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) const utl::DebugScopedTimer timer( logger_, utl::PSM, "timer", 1, "Generate shapes from ITerms: {}"); - auto* base_layer = getTech()->findRoutingLayer(1); + // Find the lowest front-side routing layer. ODB orders backside + // routing layers (BRDL .. BPR on a BSPDN PDK) at the bottom of the + // index space, but the IRSolver wants virtual ITerm base nodes on a + // layer the front-side power grid actually uses. Using + // findRoutingLayer(1) would land them on BRDL where no shapes exist + // and every cell ends up flagged "unconnected". + odb::dbTechLayer* base_layer = nullptr; + for (int l = 1; l <= getTech()->getRoutingLayerCount(); ++l) { + odb::dbTechLayer* layer = getTech()->findRoutingLayer(l); + if (layer != nullptr && !layer->isBackside()) { + base_layer = layer; + break; + } + } + if (base_layer == nullptr) { + base_layer = getTech()->findRoutingLayer(1); + } LayerMap shapes_by_layer; bool floorplan_asseted = false; From f49de72375560bfbe6bbe3b5edcf226d7daa2dec Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 21:02:48 -0700 Subject: [PATCH 05/24] psm: multi-seed connectivity BFS from every top-layer node IRSolver::checkOpen seeds its BFS with a single node from the top routing layer and reports any unvisited node as 'unconnected'. When the PG network legitimately has more than one component touching the top layer - notably on a backside-power PDK where the front-side and backside stacks are stitched only through bridge cells, and each bridge cell ends up in its own subgraph as seen from the top - the BFS misses entire subgraphs and reports thousands of spurious PSM-0038/PSM-0039 warnings. Seed the BFS from every node on the top layer instead. The cost is linear in the number of seeds, which is bounded by the number of top-layer shape pieces, so the overhead is negligible. The visited flag guarantees we still touch each reachable node exactly once. This is the third piece of LEF58_BACKSIDE support in PSM (after the front-side base layer fix in 0e7eabb59). On gt2n/gcd with the multi- port tap LEF, analyze_power_grid now passes connectivity check on both vdd and vss without any PSM-003x warnings; the IR-drop report runs cleanly (numbers are zero pending source / power assignment but the solver no longer aborts). Asap7 / nangate45 are unchanged: their PG network has only one component touching the top layer so the multi-seed BFS behaves identically to the single-seed version. Signed-off-by: Matthew Guthaus --- src/psm/src/ir_solver.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/psm/src/ir_solver.cpp b/src/psm/src/ir_solver.cpp index 073bab66b59..e27ec0ab6fa 100644 --- a/src/psm/src/ir_solver.cpp +++ b/src/psm/src/ir_solver.cpp @@ -157,11 +157,21 @@ bool IRSolver::checkOpen() std::queue queue; - // grab any node to start, choose one on the highest metal layer - Node* start = network_->getTopLayerNodes().begin()->get(); - debugPrint( - logger_, utl::PSM, "check", 1, "Starting at: {}", start->describe("")); - queue.push(start); + // Seed from every node on the top routing layer rather than a single + // one. The PG network may legitimately have more than one component + // that each terminate at the top layer - notably on backside-power- + // delivery PDKs where front-side and backside stacks are stitched + // only through bridge cells. Without multi-seeding the BFS the + // connectivity check spuriously flags whole subgraphs as orphaned. + for (const auto& start_node : network_->getTopLayerNodes()) { + queue.push(start_node.get()); + } + debugPrint(logger_, + utl::PSM, + "check", + 1, + "Seeded {} starting node(s) on top layer", + queue.size()); std::size_t visited = 0; const bool print_progress = logger_->debugCheck(utl::PSM, "check", 2); From 68493c8e76d1a0193117be55f128bf2dc5ed64fd Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 21:20:17 -0700 Subject: [PATCH 06/24] psm: regression test for backside-power connectivity + null-guard on isolated nodes Adds src/psm/test/check_power_grid_backside.tcl plus a tiny synthetic backside-power LEF/DEF under src/psm/test/backside_data/. The test locks in both BSPDN-related PSM fixes: * isBackside()-aware ITerm base-layer pick in ir_network.cpp (commit 0e7eabb59d). Without it every ITerm reports PSM-0039 'Unconnected instance' on this design. * Multi-seed connectivity BFS in ir_solver.cpp (commit 6d4c658667). Without it the BFS misses the BPR-only subgraph and flags PSM-0038 'Unconnected shape' on every followpin. The synthetic LEF declares a routing layer B1 with LEF58_BACKSIDE BACKSIDE and adds two macros: a bridge_tap with vdd / vss PINs on both M1 and B1, and a backside_filler with vdd / vss only on B1. The DEF places two taps and three fillers on one row with a B1 followpin per net. Also tightens ir_solver.cpp: when multi-seeding the BFS, a top-layer seed may be isolated (no LayerConnection built for it) and connections_map.at(node) used to throw. Switch to find() and skip isolated seeds; the !isVisited() sweep below already covers reporting them. Without this guard the new test fires std::out_of_range on the vss net. Registered in both CMake (or_integration_tests TESTS) and Bazel (BUILD COMPULSORY_TESTS + data files for the backside_data dir). Signed-off-by: Matthew Guthaus --- src/psm/src/ir_solver.cpp | 10 +- src/psm/test/BUILD | 3 + src/psm/test/CMakeLists.txt | 1 + src/psm/test/backside_data/backside.def | 46 ++++++++ src/psm/test/backside_data/backside.lef | 116 +++++++++++++++++++++ src/psm/test/check_power_grid_backside.ok | 6 ++ src/psm/test/check_power_grid_backside.tcl | 32 ++++++ 7 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 src/psm/test/backside_data/backside.def create mode 100644 src/psm/test/backside_data/backside.lef create mode 100644 src/psm/test/check_power_grid_backside.ok create mode 100644 src/psm/test/check_power_grid_backside.tcl diff --git a/src/psm/src/ir_solver.cpp b/src/psm/src/ir_solver.cpp index e27ec0ab6fa..6e94e618c88 100644 --- a/src/psm/src/ir_solver.cpp +++ b/src/psm/src/ir_solver.cpp @@ -198,7 +198,15 @@ bool IRSolver::checkOpen() node->setVisited(true); - for (const auto* conn : connections_map.at(node)) { + // An isolated seed (e.g. a top-layer terminal with no LayerConnection + // built for it) is not in connections_map. Skip it cleanly instead of + // throwing - the isolated-node case still gets reported below by the + // !isVisited() sweep over all layer nodes. + auto map_itr = connections_map.find(node); + if (map_itr == connections_map.end()) { + continue; + } + for (const auto* conn : map_itr->second) { Node* next = conn->getOtherNode(node); if (next->isVisited()) { // already been here, so we do not need to add it to the queue diff --git a/src/psm/test/BUILD b/src/psm/test/BUILD index 8535017148c..0a45d507b0d 100644 --- a/src/psm/test/BUILD +++ b/src/psm/test/BUILD @@ -16,6 +16,7 @@ COMPULSORY_TESTS = [ "aes_test_vdd", "aes_test_vss", "check_power_grid", + "check_power_grid_backside", "check_power_grid_disconnected", "check_power_grid_disconnected_macro", "check_power_grid_empty_net", @@ -100,6 +101,8 @@ filegroup( "Vsrc_aes_vss.loc", "Vsrc_gcd_vdd.loc", "Vsrc_gcd_vss.loc", + "backside_data/backside.def", + "backside_data/backside.lef", "asap7/asap7_tech_1x_201209.lef", "asap7/asap7sc7p5t_28_R_1x_220121a.lef", "asap7/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz", diff --git a/src/psm/test/CMakeLists.txt b/src/psm/test/CMakeLists.txt index 5f023c1e505..5a12a3e6aac 100644 --- a/src/psm/test/CMakeLists.txt +++ b/src/psm/test/CMakeLists.txt @@ -9,6 +9,7 @@ or_integration_tests( aes_test_vdd aes_test_vss check_power_grid + check_power_grid_backside check_power_grid_disconnected check_power_grid_disconnected_macro check_power_grid_empty_net diff --git a/src/psm/test/backside_data/backside.def b/src/psm/test/backside_data/backside.def new file mode 100644 index 00000000000..820f9c20b5f --- /dev/null +++ b/src/psm/test/backside_data/backside.def @@ -0,0 +1,46 @@ +VERSION 5.8 ; +BUSBITCHARS "[]" ; +DIVIDERCHAR "/" ; +DESIGN backside_top ; + +UNITS DISTANCE MICRONS 2000 ; + +DIEAREA ( 0 0 ) ( 3800 2800 ) ; + +ROW row_0 coreSite 0 0 N DO 20 BY 1 STEP 380 0 ; +ROW row_1 coreSite 0 2800 FS DO 20 BY 1 STEP 380 0 ; + +TRACKS X 35 DO 20 STEP 380 LAYER M1 ; +TRACKS Y 35 DO 20 STEP 280 LAYER M2 ; +TRACKS X 35 DO 20 STEP 380 LAYER B1 ; + +COMPONENTS 5 ; +- u_tap_0 bridge_tap + PLACED ( 0 0 ) N ; +- u_fill_0 backside_filler + PLACED ( 760 0 ) N ; +- u_fill_1 backside_filler + PLACED ( 950 0 ) N ; +- u_fill_2 backside_filler + PLACED ( 1140 0 ) N ; +- u_tap_1 bridge_tap + PLACED ( 1330 0 ) N ; +END COMPONENTS + +PINS 0 ; +END PINS + +SPECIALNETS 2 ; +- vdd ( * vdd ) + USE POWER + + ROUTED B1 140 + SHAPE FOLLOWPIN + ( 0 2800 ) ( 3800 * ) + NEW M1 140 + SHAPE STRIPE + ( 95 0 ) ( * 1400 ) + ; +- vss ( * vss ) + USE GROUND + + ROUTED B1 140 + SHAPE FOLLOWPIN + ( 0 0 ) ( 3800 * ) + NEW M1 140 + SHAPE STRIPE + ( 285 0 ) ( * 1400 ) + ; +END SPECIALNETS + +NETS 0 ; +END NETS + +END DESIGN diff --git a/src/psm/test/backside_data/backside.lef b/src/psm/test/backside_data/backside.lef new file mode 100644 index 00000000000..c7a9ea3c913 --- /dev/null +++ b/src/psm/test/backside_data/backside.lef @@ -0,0 +1,116 @@ +VERSION 5.8 ; +BUSBITCHARS "[]" ; +DIVIDERCHAR "/" ; + +UNITS + DATABASE MICRONS 2000 ; +END UNITS + +PROPERTYDEFINITIONS + LAYER LEF58_TYPE STRING ; + LAYER LEF58_BACKSIDE STRING ; +END PROPERTYDEFINITIONS + +SITE coreSite + CLASS CORE ; + SIZE 0.190 BY 1.400 ; + SYMMETRY Y ; +END coreSite + +LAYER B1 + TYPE ROUTING ; + DIRECTION HORIZONTAL ; + WIDTH 0.070 ; + PITCH 1.400 ; + SPACING 0.070 ; + PROPERTY LEF58_BACKSIDE "BACKSIDE ;" ; +END B1 + +LAYER M1 + TYPE ROUTING ; + DIRECTION VERTICAL ; + WIDTH 0.070 ; + PITCH 0.190 ; + SPACING 0.070 ; +END M1 + +LAYER V1 + TYPE CUT ; + WIDTH 0.070 ; + SPACING 0.080 ; +END V1 + +LAYER M2 + TYPE ROUTING ; + DIRECTION HORIZONTAL ; + WIDTH 0.070 ; + PITCH 0.140 ; + SPACING 0.070 ; +END M2 + +# +# Bridge tap: vdd / vss pins exist on BOTH M1 and B1, conveying that +# the cell physically stitches the front-side and backside power rails. +# +MACRO bridge_tap + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.380 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER M1 ; + RECT 0.060 0.050 0.130 1.350 ; + END + PORT + LAYER B1 ; + RECT 0.000 1.330 0.380 1.400 ; + END + END vdd + PIN vss + DIRECTION INOUT ; + USE GROUND ; + PORT + LAYER M1 ; + RECT 0.250 0.050 0.320 1.350 ; + END + PORT + LAYER B1 ; + RECT 0.000 0.000 0.380 0.070 ; + END + END vss +END bridge_tap + +# +# Backside-only filler: vdd / vss exist only on B1 (the backside rail). +# This is the common pattern on a BSPDN PDK -- the cell takes power +# from below and exposes no front-side power pin. +# +MACRO backside_filler + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.190 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER B1 ; + RECT 0.000 1.330 0.190 1.400 ; + END + END vdd + PIN vss + DIRECTION INOUT ; + USE GROUND ; + PORT + LAYER B1 ; + RECT 0.000 0.000 0.190 0.070 ; + END + END vss +END backside_filler + +END LIBRARY diff --git a/src/psm/test/check_power_grid_backside.ok b/src/psm/test/check_power_grid_backside.ok new file mode 100644 index 00000000000..7405971ea48 --- /dev/null +++ b/src/psm/test/check_power_grid_backside.ok @@ -0,0 +1,6 @@ +[INFO ODB-0227] LEF file: backside_data/backside.lef, created 4 layers, 2 library cells +[INFO ODB-0128] Design: backside_top +[INFO ODB-0131] Created 5 components and 10 component-terminals. +[INFO ODB-0132] Created 2 special nets and 10 connections. +[INFO PSM-0040] All shapes on net vdd are connected. +[INFO PSM-0040] All shapes on net vss are connected. diff --git a/src/psm/test/check_power_grid_backside.tcl b/src/psm/test/check_power_grid_backside.tcl new file mode 100644 index 00000000000..3b7b3cebb04 --- /dev/null +++ b/src/psm/test/check_power_grid_backside.tcl @@ -0,0 +1,32 @@ +# Verify analyze_power_grid handles a backside-power-delivery design. +# +# Regression test for: +# * isBackside()-aware ITerm base-layer selection in +# src/psm/src/ir_network.cpp (without this fix every ITerm reports +# PSM-0039 "Unconnected instance" on a BSPDN PDK because the +# virtual base node lands on a backside layer that has no shapes). +# * Multi-seed connectivity BFS in src/psm/src/ir_solver.cpp (without +# this fix the BFS misses subgraphs that only touch the top layer +# through bridge cells, flagging thousands of spurious PSM-0038 +# "Unconnected shape" warnings). +# +# Design (in backside_data/): +# * backside.lef declares one routing layer B1 marked LEF58_BACKSIDE +# plus a normal M1, two macros: bridge_tap (vdd / vss on both M1 +# and B1, modeling a TSV-like front<->back bridge cell) and +# backside_filler (vdd / vss only on B1, modeling a normal cell on +# a BSPDN PDK). +# * backside.def places two bridge taps and three fillers along one +# row, with B1 followpins running across the row and a pair of +# M1 stripes through each tap. +# +# Without the two fixes above check_power_grid floods the log with +# PSM-0038 and PSM-0039; with them it reports a single PSM-0040 +# "All shapes ... are connected" for each net. +source helpers.tcl + +read_lef backside_data/backside.lef +read_def backside_data/backside.def + +check_power_grid -net vdd -dont_require_terminals +check_power_grid -net vss -dont_require_terminals From 6b46b16606653263c18c862170bf7502ef452564 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Wed, 27 May 2026 21:24:47 -0700 Subject: [PATCH 07/24] pdn: regression test for backside cross-boundary warning Adds src/pdn/test/add_pdn_connect_backside_warn.tcl which exercises the warning added on the bspdn branch (commit b55936a1ca): when add_pdn_connect is given two layers that disagree on isBackside(), PDN cannot synthesize a via to bridge them and the connection has to come from a tap cell. The test calls add_pdn_connect with layers M1 (front) and B1 (LEF58_BACKSIDE backside) and expects PDN-1200 to appear in the log. Reuses the synthetic LEF+DEF test fixture under src/psm/test/backside_data/ so we don't ship a second copy. Registered in both CMake or_integration_tests TESTS and Bazel COMPULSORY_TESTS. Signed-off-by: Matthew Guthaus --- src/pdn/test/BUILD | 1 + src/pdn/test/CMakeLists.txt | 1 + src/pdn/test/add_pdn_connect_backside_warn.ok | 7 +++++++ .../test/add_pdn_connect_backside_warn.tcl | 20 +++++++++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 src/pdn/test/add_pdn_connect_backside_warn.ok create mode 100644 src/pdn/test/add_pdn_connect_backside_warn.tcl diff --git a/src/pdn/test/BUILD b/src/pdn/test/BUILD index 620d2d1ceed..cb90ef9cb14 100644 --- a/src/pdn/test/BUILD +++ b/src/pdn/test/BUILD @@ -6,6 +6,7 @@ package(features = ["layering_check"]) # From CMakeLists.txt or_integration_tests(TESTS COMPULSORY_TESTS = [ "add_double_global_connection", + "add_pdn_connect_backside_warn", "asap7_failed_macro_covered", "asap7_failed_macro_grid", "asap7_macro_covered_partial", diff --git a/src/pdn/test/CMakeLists.txt b/src/pdn/test/CMakeLists.txt index b07573a63fb..8f83ff83457 100644 --- a/src/pdn/test/CMakeLists.txt +++ b/src/pdn/test/CMakeLists.txt @@ -2,6 +2,7 @@ or_integration_tests( "pdn" TESTS add_double_global_connection + add_pdn_connect_backside_warn asap7_failed_macro_covered asap7_failed_macro_grid asap7_macro_covered_partial diff --git a/src/pdn/test/add_pdn_connect_backside_warn.ok b/src/pdn/test/add_pdn_connect_backside_warn.ok new file mode 100644 index 00000000000..0e11dc94423 --- /dev/null +++ b/src/pdn/test/add_pdn_connect_backside_warn.ok @@ -0,0 +1,7 @@ +[INFO ODB-0227] LEF file: ../../psm/test/backside_data/backside.lef, created 4 layers, 2 library cells +[INFO ODB-0128] Design: backside_top +[INFO ODB-0131] Created 5 components and 10 component-terminals. +[INFO ODB-0132] Created 2 special nets and 10 connections. +[INFO PDN-0101] Using vdd as power net for Core domain. +[INFO PDN-0102] Using vss as ground net for Core domain. +[WARNING PDN-1200] add_pdn_connect layers (M1, B1) span the front-side/backside boundary. Standard PDN vias do not cross this boundary; the connection must come from a tap cell that internally stitches the two sides. Verify this is intended. diff --git a/src/pdn/test/add_pdn_connect_backside_warn.tcl b/src/pdn/test/add_pdn_connect_backside_warn.tcl new file mode 100644 index 00000000000..aec8425d81d --- /dev/null +++ b/src/pdn/test/add_pdn_connect_backside_warn.tcl @@ -0,0 +1,20 @@ +# Verify add_pdn_connect warns when its two layers span the front-side +# / backside boundary. A standard cut-layer via cannot bridge a normal +# routing metal to a LEF58_BACKSIDE layer; the connection has to come +# from a tap cell, so we warn the user. +# +# Regression test for the PDN warning added on the bspdn branch +# (commit b55936a1ca). +source "helpers.tcl" + +read_lef ../../psm/test/backside_data/backside.lef +read_def ../../psm/test/backside_data/backside.def + +add_global_connection -net vdd -pin_pattern "^vdd$" -power +add_global_connection -net vss -pin_pattern "^vss$" -ground + +define_pdn_grid -name {grid} -voltage_domains {CORE} -pins {B1} +add_pdn_stripe -grid {grid} -layer {B1} -width {0.07} -pitch {1.4} -followpins +# This add_pdn_connect crosses the front-side / backside boundary +# (B1 has LEF58_BACKSIDE, M1 doesn't). Should trigger PDN-1200. +add_pdn_connect -grid {grid} -layers {M1 B1} From 1fc7ac268076a5e80d59c9d62a573b7c167909a7 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Thu, 28 May 2026 20:05:00 -0700 Subject: [PATCH 08/24] odb: add isBacksideBridge() for LEF58_BACKSIDE_BRIDGE macro property A PDK cell that physically stitches a front-side power layer to a LEF58_BACKSIDE-tagged layer (a buried-power-rail tap, basically) can already be expressed today by giving its VDD / VSS PINs multiple PORT blocks on the two sides; LEF 5.x semantics make those electric- ally one node. That convention works for connectivity but does not let a tool reason about *which* cells are intended as bridges, which matters for PDN sanity checks, IR-drop source/sink classification, and tap-cell selection on a BSPDN PDK. This commit lets the PDK author mark such cells explicitly: MACRO bridge_tap ... PROPERTY LEF58_BACKSIDE_BRIDGE "BACKSIDEBRIDGE ;" ; ... END bridge_tap Implementation mirrors the LAYER LEF58_BACKSIDE work earlier in the series: * Adds a 1-bit is_backside_bridge flag to dbMasterFlags (taken from spare_bits_19, shrunk to 18). * Exposes dbMaster::setBacksideBridge() / isBacksideBridge() via the public ODB API. * Adds lefMacroBacksideBridgeParser modelled on the existing lefMacroClassTypeParser. * Wires it into lefin.cpp's MACRO property dispatcher. * operator== updated so the flag is included in dbMaster equality. Registered in CMake (or_integration_tests TESTS) and Bazel (COMPULSORY_TESTS) with a small standalone Tcl test that reads a two-cell LEF and asserts isBacksideBridge() = 1 on the tagged cell and 0 on the untagged one. No in-tree consumers yet; PDN/PSM tooling that wants to walk PG-net connectivity across the front/back boundary can now consult this flag instead of inferring intent from pin geometry. Signed-off-by: Matthew Guthaus --- src/odb/include/odb/db.h | 12 ++++ src/odb/src/db/dbMaster.cpp | 17 ++++++ src/odb/src/db/dbMaster.h | 3 +- src/odb/src/lefin/CMakeLists.txt | 1 + .../lefin/lefMacroBacksideBridgeParser.cpp | 25 ++++++++ src/odb/src/lefin/lefMacroPropParser.h | 6 ++ src/odb/src/lefin/lefin.cpp | 2 + src/odb/test/BUILD | 1 + src/odb/test/CMakeLists.txt | 1 + src/odb/test/lef58_backside_bridge.lef | 60 +++++++++++++++++++ src/odb/test/lef58_backside_bridge.ok | 3 + src/odb/test/lef58_backside_bridge.tcl | 12 ++++ 12 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 src/odb/src/lefin/lefMacroBacksideBridgeParser.cpp create mode 100644 src/odb/test/lef58_backside_bridge.lef create mode 100644 src/odb/test/lef58_backside_bridge.ok create mode 100644 src/odb/test/lef58_backside_bridge.tcl diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index 189a61ced95..4433a036c97 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -5498,6 +5498,18 @@ class dbMaster : public dbObject /// void setType(dbMasterType type); + /// + /// Marks a cell as physically bridging a front-side power layer to a + /// LEF58_BACKSIDE layer (typical use: BSPDN tap cells). Tools that + /// trace PG-net connectivity should treat the PG pins of such a + /// cell as electrically continuous even when they sit on layers + /// that disagree on dbTechLayer::isBackside(). Set by the + /// LEF58_BACKSIDE_BRIDGE macro property. + /// + void setBacksideBridge(bool is_bridge); + + bool isBacksideBridge() const; + /// /// Get the Logical equivalent of this master /// Returns nullptr if no equivalent was set. diff --git a/src/odb/src/db/dbMaster.cpp b/src/odb/src/db/dbMaster.cpp index 961ea70fbcc..8ff60d17db3 100644 --- a/src/odb/src/db/dbMaster.cpp +++ b/src/odb/src/db/dbMaster.cpp @@ -63,6 +63,10 @@ bool _dbMaster::operator==(const _dbMaster& rhs) const return false; } + if (flags_.is_backside_bridge != rhs.flags_.is_backside_bridge) { + return false; + } + if (x_ != rhs.x_) { return false; } @@ -169,6 +173,7 @@ _dbMaster::_dbMaster(_dbDatabase* db) flags_.mark = 0; flags_.special_power = 0; flags_.sequential = 0; + flags_.is_backside_bridge = 0; flags_.spare_bits_19 = 0; x_ = 0; @@ -642,6 +647,18 @@ void dbMaster::setSpecialPower(bool value) master->flags_.special_power = (value) ? 1 : 0; } +void dbMaster::setBacksideBridge(bool is_bridge) +{ + _dbMaster* master = (_dbMaster*) this; + master->flags_.is_backside_bridge = is_bridge ? 1 : 0; +} + +bool dbMaster::isBacksideBridge() const +{ + _dbMaster* master = (_dbMaster*) this; + return master->flags_.is_backside_bridge == 1; +} + bool dbMaster::isSpecialPower() { _dbMaster* master = (_dbMaster*) this; diff --git a/src/odb/src/db/dbMaster.h b/src/odb/src/db/dbMaster.h index 35f91736b64..cd99865af87 100644 --- a/src/odb/src/db/dbMaster.h +++ b/src/odb/src/db/dbMaster.h @@ -39,7 +39,8 @@ struct dbMasterFlags uint32_t mark : 1; uint32_t sequential : 1; uint32_t special_power : 1; - uint32_t spare_bits_19 : 19; + uint32_t is_backside_bridge : 1; + uint32_t spare_bits_19 : 18; }; class _dbMaster : public _dbObject diff --git a/src/odb/src/lefin/CMakeLists.txt b/src/odb/src/lefin/CMakeLists.txt index 63ef138eae4..47df4259c7c 100644 --- a/src/odb/src/lefin/CMakeLists.txt +++ b/src/odb/src/lefin/CMakeLists.txt @@ -25,6 +25,7 @@ add_library(lefin lefTechLayerForbiddenSpacingRuleParser.cpp lefTechLayerTwoWiresForbiddenSpcRuleParser.cpp lefTechLayerVoltageSpacing.cpp + lefMacroBacksideBridgeParser.cpp lefMacroClassParser.cpp lefMacroEdgeTypeParser.cpp CellEdgeSpacingTableParser.cpp diff --git a/src/odb/src/lefin/lefMacroBacksideBridgeParser.cpp b/src/odb/src/lefin/lefMacroBacksideBridgeParser.cpp new file mode 100644 index 00000000000..c7b75fdf35b --- /dev/null +++ b/src/odb/src/lefin/lefMacroBacksideBridgeParser.cpp @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: BSD-3-Clause +// Copyright (c) 2026, The OpenROAD Authors + +#include + +#include "boost/bind/bind.hpp" +#include "boostParser.h" +#include "lefMacroPropParser.h" +#include "odb/db.h" + +namespace odb { + +bool lefMacroBacksideBridgeParser::parse(std::string_view s, dbMaster* master) +{ + qi::rule rule + = (lit("BACKSIDEBRIDGE")[boost::bind( + &dbMaster::setBacksideBridge, master, true)] + >> lit(";")); + + auto first = s.begin(); + const bool valid = qi::phrase_parse(first, s.end(), rule, space); + return valid && first == s.end(); +} + +} // namespace odb diff --git a/src/odb/src/lefin/lefMacroPropParser.h b/src/odb/src/lefin/lefMacroPropParser.h index 03e1cf871c2..a92ad1b788e 100644 --- a/src/odb/src/lefin/lefMacroPropParser.h +++ b/src/odb/src/lefin/lefMacroPropParser.h @@ -16,6 +16,12 @@ class lefMacroClassTypeParser public: static bool parse(std::string_view, dbMaster*); }; + +class lefMacroBacksideBridgeParser +{ + public: + static bool parse(std::string_view, dbMaster*); +}; class lefMacroEdgeTypeParser { public: diff --git a/src/odb/src/lefin/lefin.cpp b/src/odb/src/lefin/lefin.cpp index b8cbf8db710..9c778eee9eb 100644 --- a/src/odb/src/lefin/lefin.cpp +++ b/src/odb/src/lefin/lefin.cpp @@ -1261,6 +1261,8 @@ void lefinReader::macro(LefParser::lefiMacro* macro) valid = lefMacroClassTypeParser::parse(macro->propValue(i), master_); } else if (!strcmp(macro->propName(i), "LEF58_EDGETYPE")) { lefMacroEdgeTypeParser(master_, this).parse(macro->propValue(i)); + } else if (!strcmp(macro->propName(i), "LEF58_BACKSIDE_BRIDGE")) { + valid = lefMacroBacksideBridgeParser::parse(macro->propValue(i), master_); } else { dbStringProperty::create( master_, macro->propName(i), macro->propValue(i)); diff --git a/src/odb/test/BUILD b/src/odb/test/BUILD index 18365fb291d..60316c35f41 100644 --- a/src/odb/test/BUILD +++ b/src/odb/test/BUILD @@ -178,6 +178,7 @@ COMPULSORY_TESTS = [ "gcd_def_access", "gcd_pdn_def_access", "import_package", + "lef58_backside_bridge", "lef_data_access", "lef_mask", "multi_tech", diff --git a/src/odb/test/CMakeLists.txt b/src/odb/test/CMakeLists.txt index fd470ff6334..2b55746fe8f 100644 --- a/src/odb/test/CMakeLists.txt +++ b/src/odb/test/CMakeLists.txt @@ -34,6 +34,7 @@ or_integration_tests( gcd_def_access gcd_pdn_def_access import_package + lef58_backside_bridge lef_data_access lef_mask multi_tech diff --git a/src/odb/test/lef58_backside_bridge.lef b/src/odb/test/lef58_backside_bridge.lef new file mode 100644 index 00000000000..044f24e7462 --- /dev/null +++ b/src/odb/test/lef58_backside_bridge.lef @@ -0,0 +1,60 @@ +VERSION 5.8 ; +BUSBITCHARS "[]" ; +DIVIDERCHAR "/" ; + +UNITS + DATABASE MICRONS 2000 ; +END UNITS + +PROPERTYDEFINITIONS + MACRO LEF58_BACKSIDE_BRIDGE STRING ; +END PROPERTYDEFINITIONS + +SITE coreSite + CLASS CORE ; + SIZE 0.190 BY 1.400 ; + SYMMETRY Y ; +END coreSite + +LAYER M1 + TYPE ROUTING ; + DIRECTION VERTICAL ; + WIDTH 0.070 ; + PITCH 0.190 ; + SPACING 0.070 ; +END M1 + +MACRO bridge_tap + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.380 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PROPERTY LEF58_BACKSIDE_BRIDGE "BACKSIDEBRIDGE ;" ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER M1 ; + RECT 0.060 0.050 0.130 1.350 ; + END + END vdd +END bridge_tap + +MACRO ordinary_cell + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.190 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER M1 ; + RECT 0.040 0.050 0.110 1.350 ; + END + END vdd +END ordinary_cell + +END LIBRARY diff --git a/src/odb/test/lef58_backside_bridge.ok b/src/odb/test/lef58_backside_bridge.ok new file mode 100644 index 00000000000..11451f51157 --- /dev/null +++ b/src/odb/test/lef58_backside_bridge.ok @@ -0,0 +1,3 @@ +[INFO ODB-0227] LEF file: lef58_backside_bridge.lef, created 1 layers, 2 library cells +bridge_tap isBacksideBridge=1 +ordinary_cell isBacksideBridge=0 diff --git a/src/odb/test/lef58_backside_bridge.tcl b/src/odb/test/lef58_backside_bridge.tcl new file mode 100644 index 00000000000..2d0d7604e90 --- /dev/null +++ b/src/odb/test/lef58_backside_bridge.tcl @@ -0,0 +1,12 @@ +# Verify that the LEF58_BACKSIDE_BRIDGE macro property is parsed and +# exposed via dbMaster::isBacksideBridge(). +source "helpers.tcl" + +read_lef lef58_backside_bridge.lef + +set db [ord::get_db] +set libs [$db getLibs] +set lib [lindex $libs 0] +foreach master [$lib getMasters] { + puts "[$master getName] isBacksideBridge=[$master isBacksideBridge]" +} From 395e03272fc48c99b6c6755307bd25b79d7abacd Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 07:25:39 -0700 Subject: [PATCH 09/24] review: address gemini code review nits * odb LEF58_BACKSIDE parser: use the template Iterator parameter instead of hardcoding std::string::const_iterator in the qi::rule. * drt updateNetRouting: reuse the iterator returned by find() rather than performing a second map lookup. Signed-off-by: Matthew Guthaus --- src/drt/src/io/io.cpp | 6 +++--- src/odb/src/lefin/lefTechLayerBacksideParser.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drt/src/io/io.cpp b/src/drt/src/io/io.cpp index 1c0dd35f231..335d2684cc1 100644 --- a/src/drt/src/io/io.cpp +++ b/src/drt/src/io/io.cpp @@ -831,11 +831,11 @@ void io::Parser::updateNetRouting(frNet* netIn, odb::dbNet* net) } while (!endpath); // Skip path segments that reference a backside layer; DRT // doesn't carry those in its frTech (see setLayers). - if (auto it = getTech()->name2layer_.find(layerName); - it == getTech()->name2layer_.end()) { + auto layer_it = getTech()->name2layer_.find(layerName); + if (layer_it == getTech()->name2layer_.end()) { continue; } - auto layerNum = getTech()->name2layer_[layerName]->getLayerNum(); + auto layerNum = layer_it->second->getLayerNum(); if (hasRect) { auto tmpPWire = std::make_unique(); tmpPWire->setLayerNum(layerNum); diff --git a/src/odb/src/lefin/lefTechLayerBacksideParser.cpp b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp index a6773008e3a..d6c761bde13 100644 --- a/src/odb/src/lefin/lefTechLayerBacksideParser.cpp +++ b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp @@ -17,7 +17,7 @@ bool parse(Iterator first, odb::dbTechLayer* layer, odb::lefinReader* /*lefinReader*/) { - qi::rule backsideRule + qi::rule backsideRule = (lit("BACKSIDE")[boost::bind( &odb::dbTechLayer::setBackside, layer, true)] >> lit(";")); From 7f57f9bd497e97fd4ecaaddf01805b6635deb40d Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 07:37:03 -0700 Subject: [PATCH 10/24] pdn: promote PDN-1200 backside boundary to error A standard cut-layer via cannot bridge a front-side metal to a backside metal; PDN has no way to create the TSV or backside cut via that would be needed. Refuse the add_pdn_connect outright instead of warning and continuing. Renames the regression test from add_pdn_connect_backside_warn to add_pdn_connect_backside_err and wraps the offending call in a [catch] so the harness can still log-compare. Signed-off-by: Matthew Guthaus --- src/pdn/src/pdn.tcl | 17 +++++++++-------- src/pdn/test/BUILD | 2 +- src/pdn/test/CMakeLists.txt | 2 +- ..._warn.ok => add_pdn_connect_backside_err.ok} | 3 ++- ...arn.tcl => add_pdn_connect_backside_err.tcl} | 14 +++++++------- 5 files changed, 20 insertions(+), 18 deletions(-) rename src/pdn/test/{add_pdn_connect_backside_warn.ok => add_pdn_connect_backside_err.ok} (61%) rename src/pdn/test/{add_pdn_connect_backside_warn.tcl => add_pdn_connect_backside_err.tcl} (56%) diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index 1344c1d2864..ef491e61c54 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -573,16 +573,17 @@ proc add_pdn_connect { args } { set l1 [pdn::get_layer [lindex $keys(-layers) 1]] # Backside-power sanity check. A standard cut-layer via cannot bridge - # a front-side metal to a backside metal (BPR / BM* / BRDL); the - # connection has to be provided by a TSV-like tap cell that already - # contains the M1<->BPR stitch as part of its layout. Warn loudly so - # the user can confirm the tap exists. + # a front-side metal to a backside metal (BPR / BM* / BRDL); PDN + # cannot create TSVs or backside cut vias, so the connection has to + # be provided by a tap/bridge cell whose layout already stitches the + # two sides together. Refuse the request rather than silently + # building a via that won't exist on the die. if { [$l0 isBackside] != [$l1 isBackside] } { - utl::warn PDN 1200 \ + utl::error PDN 1200 \ "add_pdn_connect layers ([$l0 getName], [$l1 getName]) span the\ - front-side/backside boundary. Standard PDN vias do not cross\ - this boundary; the connection must come from a tap cell that\ - internally stitches the two sides. Verify this is intended." + front-side/backside boundary. PDN cannot create TSVs or vias\ + across this boundary; the connection must come from a\ + tap/bridge cell that internally stitches the two sides." } set cut_pitch "0 0" diff --git a/src/pdn/test/BUILD b/src/pdn/test/BUILD index cb90ef9cb14..2c13ddaa8ab 100644 --- a/src/pdn/test/BUILD +++ b/src/pdn/test/BUILD @@ -6,7 +6,7 @@ package(features = ["layering_check"]) # From CMakeLists.txt or_integration_tests(TESTS COMPULSORY_TESTS = [ "add_double_global_connection", - "add_pdn_connect_backside_warn", + "add_pdn_connect_backside_err", "asap7_failed_macro_covered", "asap7_failed_macro_grid", "asap7_macro_covered_partial", diff --git a/src/pdn/test/CMakeLists.txt b/src/pdn/test/CMakeLists.txt index 8f83ff83457..ecf1ae76830 100644 --- a/src/pdn/test/CMakeLists.txt +++ b/src/pdn/test/CMakeLists.txt @@ -2,7 +2,7 @@ or_integration_tests( "pdn" TESTS add_double_global_connection - add_pdn_connect_backside_warn + add_pdn_connect_backside_err asap7_failed_macro_covered asap7_failed_macro_grid asap7_macro_covered_partial diff --git a/src/pdn/test/add_pdn_connect_backside_warn.ok b/src/pdn/test/add_pdn_connect_backside_err.ok similarity index 61% rename from src/pdn/test/add_pdn_connect_backside_warn.ok rename to src/pdn/test/add_pdn_connect_backside_err.ok index 0e11dc94423..f06b169617c 100644 --- a/src/pdn/test/add_pdn_connect_backside_warn.ok +++ b/src/pdn/test/add_pdn_connect_backside_err.ok @@ -4,4 +4,5 @@ [INFO ODB-0132] Created 2 special nets and 10 connections. [INFO PDN-0101] Using vdd as power net for Core domain. [INFO PDN-0102] Using vss as ground net for Core domain. -[WARNING PDN-1200] add_pdn_connect layers (M1, B1) span the front-side/backside boundary. Standard PDN vias do not cross this boundary; the connection must come from a tap cell that internally stitches the two sides. Verify this is intended. +[ERROR PDN-1200] add_pdn_connect layers (M1, B1) span the front-side/backside boundary. PDN cannot create TSVs or vias across this boundary; the connection must come from a tap/bridge cell that internally stitches the two sides. +PDN-1200 diff --git a/src/pdn/test/add_pdn_connect_backside_warn.tcl b/src/pdn/test/add_pdn_connect_backside_err.tcl similarity index 56% rename from src/pdn/test/add_pdn_connect_backside_warn.tcl rename to src/pdn/test/add_pdn_connect_backside_err.tcl index aec8425d81d..46fc78bd938 100644 --- a/src/pdn/test/add_pdn_connect_backside_warn.tcl +++ b/src/pdn/test/add_pdn_connect_backside_err.tcl @@ -1,10 +1,9 @@ -# Verify add_pdn_connect warns when its two layers span the front-side -# / backside boundary. A standard cut-layer via cannot bridge a normal -# routing metal to a LEF58_BACKSIDE layer; the connection has to come -# from a tap cell, so we warn the user. +# Verify add_pdn_connect errors out when its two layers span the +# front-side / backside boundary. A standard cut-layer via cannot +# bridge a normal routing metal to a LEF58_BACKSIDE layer; PDN cannot +# create TSVs, so the connection has to come from a tap/bridge cell. # -# Regression test for the PDN warning added on the bspdn branch -# (commit b55936a1ca). +# Regression test for the PDN-1200 error added on the bspdn branch. source "helpers.tcl" read_lef ../../psm/test/backside_data/backside.lef @@ -17,4 +16,5 @@ define_pdn_grid -name {grid} -voltage_domains {CORE} -pins {B1} add_pdn_stripe -grid {grid} -layer {B1} -width {0.07} -pitch {1.4} -followpins # This add_pdn_connect crosses the front-side / backside boundary # (B1 has LEF58_BACKSIDE, M1 doesn't). Should trigger PDN-1200. -add_pdn_connect -grid {grid} -layers {M1 B1} +catch { add_pdn_connect -grid {grid} -layers {M1 B1} } err +puts $err From 06926d97ae65128564bd976e89dce11ab1abe06f Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 07:52:22 -0700 Subject: [PATCH 11/24] odb,psm: add dbTech::firstRoutingLayer / firstBacksideLayer helpers dbTech now provides first-class accessors for "the lowest front-side routing layer" and "the lowest backside routing layer", instead of making every caller walk getRoutingLayerCount() and filter by isBackside(). Switch PSM's IRNetwork ITerm base-layer pick to use the new helper. Signed-off-by: Matthew Guthaus --- src/odb/include/odb/db.h | 12 ++++++++++++ src/odb/src/db/dbTech.cpp | 24 ++++++++++++++++++++++++ src/psm/src/ir_network.cpp | 20 ++++++-------------- 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index 4433a036c97..4ba6ec4383e 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -5932,6 +5932,18 @@ class dbTech : public dbObject /// dbTechLayer* findRoutingLayer(int level_number); + /// + /// Find the lowest front-side (non-backside) routing layer. + /// Returns nullptr if there is no such layer. + /// + dbTechLayer* firstRoutingLayer(); + + /// + /// Find the lowest backside routing layer (LEF58_BACKSIDE). + /// Returns nullptr if there is no backside routing layer. + /// + dbTechLayer* firstBacksideLayer(); + /// /// Get the technolgy vias. This includes non-default-rule-vias. /// diff --git a/src/odb/src/db/dbTech.cpp b/src/odb/src/db/dbTech.cpp index ea4f1ff881d..84821f9637f 100644 --- a/src/odb/src/db/dbTech.cpp +++ b/src/odb/src/db/dbTech.cpp @@ -500,6 +500,30 @@ dbTechLayer* dbTech::findRoutingLayer(int level_number) return nullptr; } +dbTechLayer* dbTech::firstRoutingLayer() +{ + const int n = getRoutingLayerCount(); + for (int level = 1; level <= n; ++level) { + dbTechLayer* layer = findRoutingLayer(level); + if (layer != nullptr && !layer->isBackside()) { + return layer; + } + } + return nullptr; +} + +dbTechLayer* dbTech::firstBacksideLayer() +{ + const int n = getRoutingLayerCount(); + for (int level = 1; level <= n; ++level) { + dbTechLayer* layer = findRoutingLayer(level); + if (layer != nullptr && layer->isBackside()) { + return layer; + } + } + return nullptr; +} + int dbTech::getDbUnitsPerMicron() { return getDb()->getDbuPerMicron(); diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index 8ea9493fd0a..f37673576eb 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -249,20 +249,12 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) const utl::DebugScopedTimer timer( logger_, utl::PSM, "timer", 1, "Generate shapes from ITerms: {}"); - // Find the lowest front-side routing layer. ODB orders backside - // routing layers (BRDL .. BPR on a BSPDN PDK) at the bottom of the - // index space, but the IRSolver wants virtual ITerm base nodes on a - // layer the front-side power grid actually uses. Using - // findRoutingLayer(1) would land them on BRDL where no shapes exist - // and every cell ends up flagged "unconnected". - odb::dbTechLayer* base_layer = nullptr; - for (int l = 1; l <= getTech()->getRoutingLayerCount(); ++l) { - odb::dbTechLayer* layer = getTech()->findRoutingLayer(l); - if (layer != nullptr && !layer->isBackside()) { - base_layer = layer; - break; - } - } + // Pick the lowest front-side routing layer as the virtual base for + // ITerm nodes. On a BSPDN PDK, findRoutingLayer(1) may return a + // backside layer (BRDL) where no front-side shapes exist; using + // firstRoutingLayer() skips past those. Fall back to routing layer + // 1 only when the design has no front-side routing layers at all. + odb::dbTechLayer* base_layer = getTech()->firstRoutingLayer(); if (base_layer == nullptr) { base_layer = getTech()->findRoutingLayer(1); } From 8c0eae4219f1998292d4fcf47233ed599a3c6fd8 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 10:41:59 -0700 Subject: [PATCH 12/24] psm: bridge-cell-aware connectivity, drop multi-seed BFS Replace the multi-seed-from-every-top-layer-node workaround with a proper graph-level fix: * Pick the iterm base node's layer from the cell's primary side. Backside-only cells land on firstBacksideLayer() so their virtual base sits on the backside grid instead of dangling on an empty front-side rail; front-side and mixed cells keep firstRoutingLayer(). * Introduce BridgeConnection: an explicit zero-impedance virtual edge emitted only for cross-side iterm terminals on instances whose master is tagged LEF58_BACKSIDE_BRIDGE. Non-bridge cross-side pins are intentionally left unlinked, so a malformed PG that relies on a non-bridge cell to cross the front/back boundary surfaces as an open net instead of being silently stitched together. * Revert checkOpen() to single-seed BFS. With the explicit bridge edges, one seed reaches every legitimately-connected component, and the prior multi-seed approach (which could declare disjoint grids "connected") goes away. The isolated-seed find()-guard is no longer needed. Updates the backside regression fixture: bridge_tap now carries LEF58_BACKSIDE_BRIDGE, and the toy M1 stripes (which were not electrically connected to anything else in the design) are removed - the test is now a clean BSPDN topology where front/back can only be crossed through the bridge cell. Signed-off-by: Matthew Guthaus --- src/psm/src/connection.cpp | 12 +++++ src/psm/src/connection.h | 25 ++++++++++ src/psm/src/ir_network.cpp | 63 ++++++++++++++++++++----- src/psm/src/ir_solver.cpp | 30 +++--------- src/psm/test/backside_data/backside.def | 4 -- src/psm/test/backside_data/backside.lef | 2 + 6 files changed, 96 insertions(+), 40 deletions(-) diff --git a/src/psm/src/connection.cpp b/src/psm/src/connection.cpp index afc3e8d01e1..55c9420869a 100644 --- a/src/psm/src/connection.cpp +++ b/src/psm/src/connection.cpp @@ -222,6 +222,18 @@ std::string TermConnection::describe() const ///////////////////////////// +BridgeConnection::BridgeConnection(Node* node0, Node* node1) + : Connection(node0, node1) +{ +} + +std::string BridgeConnection::describe() const +{ + return "Bridge Connection"; +} + +///////////////////////////// + FixedResistanceConnection::FixedResistanceConnection(Node* node0, Node* node1, Resistance resistance) diff --git a/src/psm/src/connection.h b/src/psm/src/connection.h index 6197c337800..ad1ae4dfe14 100644 --- a/src/psm/src/connection.h +++ b/src/psm/src/connection.h @@ -145,6 +145,31 @@ class TermConnection : public Connection static constexpr Resistance kResistance = 0.001; }; +// A virtual edge connecting a front-side iterm node to a backside iterm +// node on an instance whose master is tagged with LEF58_BACKSIDE_BRIDGE. +// These cells (taps / TSV-like structures) physically stitch the two +// sides together inside the cell layout; PSM models that stitch as a +// zero-impedance edge so the BFS over the PG graph crosses sides only +// through legitimate bridge cells. +class BridgeConnection : public Connection +{ + public: + BridgeConnection(Node* node0, Node* node1); + + Resistance getResistance(const ResistanceMap& res_map) const override + { + return kResistance; + } + bool isValid() const override { return true; } + + void mergeWith(const Connection* other) override {} + + std::string describe() const override; + + private: + static constexpr Resistance kResistance = 0.001; +}; + class FixedResistanceConnection : public Connection { public: diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index f37673576eb..e3390087e9d 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -249,14 +249,10 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) const utl::DebugScopedTimer timer( logger_, utl::PSM, "timer", 1, "Generate shapes from ITerms: {}"); - // Pick the lowest front-side routing layer as the virtual base for - // ITerm nodes. On a BSPDN PDK, findRoutingLayer(1) may return a - // backside layer (BRDL) where no front-side shapes exist; using - // firstRoutingLayer() skips past those. Fall back to routing layer - // 1 only when the design has no front-side routing layers at all. - odb::dbTechLayer* base_layer = getTech()->firstRoutingLayer(); - if (base_layer == nullptr) { - base_layer = getTech()->findRoutingLayer(1); + odb::dbTechLayer* front_base = getTech()->firstRoutingLayer(); + odb::dbTechLayer* back_base = getTech()->firstBacksideLayer(); + if (front_base == nullptr) { + front_base = getTech()->findRoutingLayer(1); } LayerMap shapes_by_layer; @@ -276,11 +272,56 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) continue; } + // First pass: figure out which side(s) this iterm has pin geometry on + // so we can pick the iterm base node's layer accordingly. + bool has_front_pin = false; + bool has_back_pin = false; + for (auto* mpin : iterm->getMTerm()->getMPins()) { + for (auto* geom : mpin->getGeometry()) { + const auto pin_shapes = generatePolygonsFromBox(geom, transform); + for (const auto& [layer, shapes] : pin_shapes) { + if (layer->isBackside()) { + has_back_pin = true; + } else { + has_front_pin = true; + } + } + } + } + + // Place the iterm base node on the cell's "primary" side. A + // backside-only cell's base belongs on the backside grid so its + // pin connects to real shapes; otherwise default to the front side. + odb::dbTechLayer* base_layer = front_base; + if (!has_front_pin && has_back_pin && back_base != nullptr) { + base_layer = back_base; + } + const bool primary_is_back = base_layer == back_base; + const bool is_bridge = iterm->getMTerm()->getMaster()->isBacksideBridge(); + int x, y; iterm->getAvgXY(&x, &y); auto base_node = std::make_unique(iterm, odb::Point(x, y), base_layer); + auto link_terminal = [&](Node* term, odb::dbTechLayer* term_layer) { + const bool term_is_back = term_layer->isBackside(); + if (term_is_back == primary_is_back) { + // Same-side terminal: ordinary virtual edge into the base node. + connections_.push_back( + std::make_unique(base_node.get(), term)); + } else if (is_bridge) { + // Bridge cell: explicit virtual edge across the front/back boundary. + connections_.push_back( + std::make_unique(base_node.get(), term)); + } + // Non-bridge cross-side terminals are intentionally left + // unlinked from the iterm base node. They still join the + // local layer graph through cleanupOverlappingNodes(); if + // they end up unreachable, that surfaces as an open net, + // which is the correct outcome for a malformed PG. + }; + bool has_routing_term = false; for (auto* mpin : iterm->getMTerm()->getMPins()) { for (auto* geom : mpin->getGeometry()) { @@ -304,8 +345,7 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) auto center = std::make_unique(pin_shape, layer); terminals.push_back(center.get()); - connections_.push_back(std::make_unique( - base_node.get(), center.get())); + link_terminal(center.get(), layer); nodes_[layer].push_back(std::move(center)); } @@ -322,8 +362,7 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) auto center = std::make_unique(pin_shape, layer); terminals.push_back(center.get()); - connections_.push_back( - std::make_unique(base_node.get(), center.get())); + link_terminal(center.get(), layer); nodes_[layer].push_back(std::move(center)); } diff --git a/src/psm/src/ir_solver.cpp b/src/psm/src/ir_solver.cpp index 6e94e618c88..073bab66b59 100644 --- a/src/psm/src/ir_solver.cpp +++ b/src/psm/src/ir_solver.cpp @@ -157,21 +157,11 @@ bool IRSolver::checkOpen() std::queue queue; - // Seed from every node on the top routing layer rather than a single - // one. The PG network may legitimately have more than one component - // that each terminate at the top layer - notably on backside-power- - // delivery PDKs where front-side and backside stacks are stitched - // only through bridge cells. Without multi-seeding the BFS the - // connectivity check spuriously flags whole subgraphs as orphaned. - for (const auto& start_node : network_->getTopLayerNodes()) { - queue.push(start_node.get()); - } - debugPrint(logger_, - utl::PSM, - "check", - 1, - "Seeded {} starting node(s) on top layer", - queue.size()); + // grab any node to start, choose one on the highest metal layer + Node* start = network_->getTopLayerNodes().begin()->get(); + debugPrint( + logger_, utl::PSM, "check", 1, "Starting at: {}", start->describe("")); + queue.push(start); std::size_t visited = 0; const bool print_progress = logger_->debugCheck(utl::PSM, "check", 2); @@ -198,15 +188,7 @@ bool IRSolver::checkOpen() node->setVisited(true); - // An isolated seed (e.g. a top-layer terminal with no LayerConnection - // built for it) is not in connections_map. Skip it cleanly instead of - // throwing - the isolated-node case still gets reported below by the - // !isVisited() sweep over all layer nodes. - auto map_itr = connections_map.find(node); - if (map_itr == connections_map.end()) { - continue; - } - for (const auto* conn : map_itr->second) { + for (const auto* conn : connections_map.at(node)) { Node* next = conn->getOtherNode(node); if (next->isVisited()) { // already been here, so we do not need to add it to the queue diff --git a/src/psm/test/backside_data/backside.def b/src/psm/test/backside_data/backside.def index 820f9c20b5f..fce0398312c 100644 --- a/src/psm/test/backside_data/backside.def +++ b/src/psm/test/backside_data/backside.def @@ -29,14 +29,10 @@ SPECIALNETS 2 ; - vdd ( * vdd ) + USE POWER + ROUTED B1 140 + SHAPE FOLLOWPIN ( 0 2800 ) ( 3800 * ) - NEW M1 140 + SHAPE STRIPE - ( 95 0 ) ( * 1400 ) ; - vss ( * vss ) + USE GROUND + ROUTED B1 140 + SHAPE FOLLOWPIN ( 0 0 ) ( 3800 * ) - NEW M1 140 + SHAPE STRIPE - ( 285 0 ) ( * 1400 ) ; END SPECIALNETS diff --git a/src/psm/test/backside_data/backside.lef b/src/psm/test/backside_data/backside.lef index c7a9ea3c913..b7ae4f3f76c 100644 --- a/src/psm/test/backside_data/backside.lef +++ b/src/psm/test/backside_data/backside.lef @@ -9,6 +9,7 @@ END UNITS PROPERTYDEFINITIONS LAYER LEF58_TYPE STRING ; LAYER LEF58_BACKSIDE STRING ; + MACRO LEF58_BACKSIDE_BRIDGE STRING ; END PROPERTYDEFINITIONS SITE coreSite @@ -58,6 +59,7 @@ MACRO bridge_tap SIZE 0.380 BY 1.400 ; SYMMETRY X Y ; SITE coreSite ; + PROPERTY LEF58_BACKSIDE_BRIDGE "BACKSIDEBRIDGE ;" ; PIN vdd DIRECTION INOUT ; USE POWER ; From dde4ed8850f3cbd8807f4b22e0d5bf52326dce46 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 10:57:02 -0700 Subject: [PATCH 13/24] pdn: make add_pdn_connect_backside_err self-contained for Bazel The test was reading the backside fixture via a relative path that crosses module boundaries (../../psm/test/backside_data/...). That works under CMake/ctest, but Bazel sandboxes each test and only exposes files declared as data deps, so the path fails to resolve. Copy the .lef/.def into pdn/test/backside_data/ and read from there so the test is self-contained. Signed-off-by: Matthew Guthaus --- src/pdn/test/BUILD | 4 + src/pdn/test/add_pdn_connect_backside_err.ok | 2 +- src/pdn/test/add_pdn_connect_backside_err.tcl | 4 +- src/pdn/test/backside_data/backside.def | 42 +++++++ src/pdn/test/backside_data/backside.lef | 118 ++++++++++++++++++ 5 files changed, 167 insertions(+), 3 deletions(-) create mode 100644 src/pdn/test/backside_data/backside.def create mode 100644 src/pdn/test/backside_data/backside.lef diff --git a/src/pdn/test/BUILD b/src/pdn/test/BUILD index 2c13ddaa8ab..3a19dee754a 100644 --- a/src/pdn/test/BUILD +++ b/src/pdn/test/BUILD @@ -292,6 +292,10 @@ filegroup( "ihp_ethmac/RM_IHPSG13_1P_256x48_c2_bm_bist.lef", "ihp_ethmac/floorplan.def", ], + "add_pdn_connect_backside_err": [ + "backside_data/backside.def", + "backside_data/backside.lef", + ], }.get(test_name, []), ) for test_name in ALL_TESTS diff --git a/src/pdn/test/add_pdn_connect_backside_err.ok b/src/pdn/test/add_pdn_connect_backside_err.ok index f06b169617c..e75098cb619 100644 --- a/src/pdn/test/add_pdn_connect_backside_err.ok +++ b/src/pdn/test/add_pdn_connect_backside_err.ok @@ -1,4 +1,4 @@ -[INFO ODB-0227] LEF file: ../../psm/test/backside_data/backside.lef, created 4 layers, 2 library cells +[INFO ODB-0227] LEF file: backside_data/backside.lef, created 4 layers, 2 library cells [INFO ODB-0128] Design: backside_top [INFO ODB-0131] Created 5 components and 10 component-terminals. [INFO ODB-0132] Created 2 special nets and 10 connections. diff --git a/src/pdn/test/add_pdn_connect_backside_err.tcl b/src/pdn/test/add_pdn_connect_backside_err.tcl index 46fc78bd938..d75d543408d 100644 --- a/src/pdn/test/add_pdn_connect_backside_err.tcl +++ b/src/pdn/test/add_pdn_connect_backside_err.tcl @@ -6,8 +6,8 @@ # Regression test for the PDN-1200 error added on the bspdn branch. source "helpers.tcl" -read_lef ../../psm/test/backside_data/backside.lef -read_def ../../psm/test/backside_data/backside.def +read_lef backside_data/backside.lef +read_def backside_data/backside.def add_global_connection -net vdd -pin_pattern "^vdd$" -power add_global_connection -net vss -pin_pattern "^vss$" -ground diff --git a/src/pdn/test/backside_data/backside.def b/src/pdn/test/backside_data/backside.def new file mode 100644 index 00000000000..fce0398312c --- /dev/null +++ b/src/pdn/test/backside_data/backside.def @@ -0,0 +1,42 @@ +VERSION 5.8 ; +BUSBITCHARS "[]" ; +DIVIDERCHAR "/" ; +DESIGN backside_top ; + +UNITS DISTANCE MICRONS 2000 ; + +DIEAREA ( 0 0 ) ( 3800 2800 ) ; + +ROW row_0 coreSite 0 0 N DO 20 BY 1 STEP 380 0 ; +ROW row_1 coreSite 0 2800 FS DO 20 BY 1 STEP 380 0 ; + +TRACKS X 35 DO 20 STEP 380 LAYER M1 ; +TRACKS Y 35 DO 20 STEP 280 LAYER M2 ; +TRACKS X 35 DO 20 STEP 380 LAYER B1 ; + +COMPONENTS 5 ; +- u_tap_0 bridge_tap + PLACED ( 0 0 ) N ; +- u_fill_0 backside_filler + PLACED ( 760 0 ) N ; +- u_fill_1 backside_filler + PLACED ( 950 0 ) N ; +- u_fill_2 backside_filler + PLACED ( 1140 0 ) N ; +- u_tap_1 bridge_tap + PLACED ( 1330 0 ) N ; +END COMPONENTS + +PINS 0 ; +END PINS + +SPECIALNETS 2 ; +- vdd ( * vdd ) + USE POWER + + ROUTED B1 140 + SHAPE FOLLOWPIN + ( 0 2800 ) ( 3800 * ) + ; +- vss ( * vss ) + USE GROUND + + ROUTED B1 140 + SHAPE FOLLOWPIN + ( 0 0 ) ( 3800 * ) + ; +END SPECIALNETS + +NETS 0 ; +END NETS + +END DESIGN diff --git a/src/pdn/test/backside_data/backside.lef b/src/pdn/test/backside_data/backside.lef new file mode 100644 index 00000000000..b7ae4f3f76c --- /dev/null +++ b/src/pdn/test/backside_data/backside.lef @@ -0,0 +1,118 @@ +VERSION 5.8 ; +BUSBITCHARS "[]" ; +DIVIDERCHAR "/" ; + +UNITS + DATABASE MICRONS 2000 ; +END UNITS + +PROPERTYDEFINITIONS + LAYER LEF58_TYPE STRING ; + LAYER LEF58_BACKSIDE STRING ; + MACRO LEF58_BACKSIDE_BRIDGE STRING ; +END PROPERTYDEFINITIONS + +SITE coreSite + CLASS CORE ; + SIZE 0.190 BY 1.400 ; + SYMMETRY Y ; +END coreSite + +LAYER B1 + TYPE ROUTING ; + DIRECTION HORIZONTAL ; + WIDTH 0.070 ; + PITCH 1.400 ; + SPACING 0.070 ; + PROPERTY LEF58_BACKSIDE "BACKSIDE ;" ; +END B1 + +LAYER M1 + TYPE ROUTING ; + DIRECTION VERTICAL ; + WIDTH 0.070 ; + PITCH 0.190 ; + SPACING 0.070 ; +END M1 + +LAYER V1 + TYPE CUT ; + WIDTH 0.070 ; + SPACING 0.080 ; +END V1 + +LAYER M2 + TYPE ROUTING ; + DIRECTION HORIZONTAL ; + WIDTH 0.070 ; + PITCH 0.140 ; + SPACING 0.070 ; +END M2 + +# +# Bridge tap: vdd / vss pins exist on BOTH M1 and B1, conveying that +# the cell physically stitches the front-side and backside power rails. +# +MACRO bridge_tap + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.380 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PROPERTY LEF58_BACKSIDE_BRIDGE "BACKSIDEBRIDGE ;" ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER M1 ; + RECT 0.060 0.050 0.130 1.350 ; + END + PORT + LAYER B1 ; + RECT 0.000 1.330 0.380 1.400 ; + END + END vdd + PIN vss + DIRECTION INOUT ; + USE GROUND ; + PORT + LAYER M1 ; + RECT 0.250 0.050 0.320 1.350 ; + END + PORT + LAYER B1 ; + RECT 0.000 0.000 0.380 0.070 ; + END + END vss +END bridge_tap + +# +# Backside-only filler: vdd / vss exist only on B1 (the backside rail). +# This is the common pattern on a BSPDN PDK -- the cell takes power +# from below and exposes no front-side power pin. +# +MACRO backside_filler + CLASS CORE ; + ORIGIN 0 0 ; + SIZE 0.190 BY 1.400 ; + SYMMETRY X Y ; + SITE coreSite ; + PIN vdd + DIRECTION INOUT ; + USE POWER ; + PORT + LAYER B1 ; + RECT 0.000 1.330 0.190 1.400 ; + END + END vdd + PIN vss + DIRECTION INOUT ; + USE GROUND ; + PORT + LAYER B1 ; + RECT 0.000 0.000 0.190 0.070 ; + END + END vss +END backside_filler + +END LIBRARY From df6deec2ca9d741624f3fc12ca27614adac59d64 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Fri, 29 May 2026 12:24:42 -0700 Subject: [PATCH 14/24] odb,drt: track is_backside in schema; guard null cut-via in TA * odb: declare is_backside in the dbTechLayer code-generator schema so future regenerations preserve the field, the operator== check, and the bit-field packing. The hand-written setBackside / isBackside methods continue to live in the existing "User Code dbTechLayerPublicMethods" block. * drt: restore a null-guard around cutLayer->getDefaultViaDef() in FlexTAWorker::initFixedObjs. The setLayers filter only removes LEF58_BACKSIDE layers; cut layers below MIN_ROUTING_LAYER (e.g. contact-layer cuts on PDKs whose MIN_ROUTING_LAYER is well above M0) can legitimately have a null defaultViaDef left by initDefaultVias and would crash here. Earlier commit message claimed the filter superseded the guard; that was wrong - the guard is correct in its own right and the filter does not cover this case. Signed-off-by: Matthew Guthaus --- src/drt/src/ta/FlexTA_init.cpp | 44 ++++++++++++------- .../schema/tech/dbTechLayer.json | 8 ++++ 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/drt/src/ta/FlexTA_init.cpp b/src/drt/src/ta/FlexTA_init.cpp index 978e69a69b2..06dcfae2215 100644 --- a/src/drt/src/ta/FlexTA_init.cpp +++ b/src/drt/src/ta/FlexTA_init.cpp @@ -770,14 +770,23 @@ void FlexTAWorker::initFixedObjs() && getTech()->getLayer(layerNum - 2)->getType() == dbTechLayerType::ROUTING) { auto cutLayer = getTech()->getLayer(layerNum - 1); - auto via = std::make_unique(cutLayer->getDefaultViaDef()); - odb::Rect viaBox = via->getLayer2BBox(); - frCoord viaWidth = viaBox.minDXDY(); - // only add for fat via - if (viaWidth > width) { - bloatDist = initFixedObjs_calcOBSBloatDistVia( - cutLayer->getDefaultViaDef(), layerNum, bounds, false); - initFixedObjs_helper(box, bloatDist, layerNum, netPtr, true); + // initDefaultVias() only guarantees a defaultViaDef for cut + // layers inside BOTTOM_ROUTING_LAYER..max(TOP_ROUTING_LAYER, + // topPinLayer). Cut layers outside that range (e.g. contact + // cuts below the routing range on PDKs whose MIN_ROUTING_LAYER + // is well above M0) can legitimately have a null default; + // skip them rather than constructing a frVia from nullptr. + auto defaultViaDef = cutLayer->getDefaultViaDef(); + if (defaultViaDef != nullptr) { + auto via = std::make_unique(defaultViaDef); + odb::Rect viaBox = via->getLayer2BBox(); + frCoord viaWidth = viaBox.minDXDY(); + // only add for fat via + if (viaWidth > width) { + bloatDist = initFixedObjs_calcOBSBloatDistVia( + defaultViaDef, layerNum, bounds, false); + initFixedObjs_helper(box, bloatDist, layerNum, netPtr, true); + } } } // up-via @@ -785,14 +794,17 @@ void FlexTAWorker::initFixedObjs() && getTech()->getLayer(layerNum + 2)->getType() == dbTechLayerType::ROUTING) { auto cutLayer = getTech()->getLayer(layerNum + 1); - auto via = std::make_unique(cutLayer->getDefaultViaDef()); - odb::Rect viaBox = via->getLayer1BBox(); - frCoord viaWidth = viaBox.minDXDY(); - // only add for fat via - if (viaWidth > width) { - bloatDist = initFixedObjs_calcOBSBloatDistVia( - cutLayer->getDefaultViaDef(), layerNum, bounds, false); - initFixedObjs_helper(box, bloatDist, layerNum, netPtr, true); + auto defaultViaDef = cutLayer->getDefaultViaDef(); + if (defaultViaDef != nullptr) { + auto via = std::make_unique(defaultViaDef); + odb::Rect viaBox = via->getLayer1BBox(); + frCoord viaWidth = viaBox.minDXDY(); + // only add for fat via + if (viaWidth > width) { + bloatDist = initFixedObjs_calcOBSBloatDistVia( + defaultViaDef, layerNum, bounds, false); + initFixedObjs_helper(box, bloatDist, layerNum, netPtr, true); + } } } } diff --git a/src/odb/src/codeGenerator/schema/tech/dbTechLayer.json b/src/odb/src/codeGenerator/schema/tech/dbTechLayer.json index 88399a2d922..a3206244eaf 100644 --- a/src/odb/src/codeGenerator/schema/tech/dbTechLayer.json +++ b/src/odb/src/codeGenerator/schema/tech/dbTechLayer.json @@ -123,6 +123,14 @@ "no-get" ] }, + { + "type": "bit", + "name": "is_backside", + "flags": [ + "no-set", + "no-get" + ] + }, { "type": "uint32_t", "default": "0", From 8f3ae2cd309e758c19f444150471a48ae9d4a43b Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 11:16:12 -0700 Subject: [PATCH 15/24] drt: avoid int32 overflow in FlexGridGraph prevDirs indexing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the per-worker grid graph is large (many routing layers × fine pitch × full-die clip box, as on backside-power PDKs), the product `xDim * yDim * zDim * 3` used to size `prevDirs_` and index it from `setPrevAstarNodeDir`/`getPrevAstarNodeDir` exceeds INT32_MAX. With plain `int` math this wraps negative, causing `prevDirs_.resize()` to throw `std::length_error` from `vector::_M_fill_insert` and detailed routing to crash before the first iteration. Promote the multiply to `std::size_t` so the capacity and per-node base index stay correct for grids up to size_t. Signed-off-by: Matthew Guthaus --- src/drt/src/dr/FlexGridGraph.cpp | 2 +- src/drt/src/dr/FlexGridGraph.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/drt/src/dr/FlexGridGraph.cpp b/src/drt/src/dr/FlexGridGraph.cpp index 1fbe7ab5d02..70dcfe0cf4a 100644 --- a/src/drt/src/dr/FlexGridGraph.cpp +++ b/src/drt/src/dr/FlexGridGraph.cpp @@ -97,7 +97,7 @@ void FlexGridGraph::initGrids(const frLayerCoordTrackPatternMap& xMap, srcs_.clear(); dsts_.clear(); - prevDirs_.resize(capacity * 3, false); + prevDirs_.resize(static_cast(capacity) * 3, false); srcs_.resize(capacity, false); dsts_.resize(capacity, false); guides_.clear(); diff --git a/src/drt/src/dr/FlexGridGraph.h b/src/drt/src/dr/FlexGridGraph.h index 301ad0c3a4f..7b51a591855 100644 --- a/src/drt/src/dr/FlexGridGraph.h +++ b/src/drt/src/dr/FlexGridGraph.h @@ -1159,7 +1159,7 @@ class FlexGridGraph // unsafe access, no idx check void setPrevAstarNodeDir(frMIdx x, frMIdx y, frMIdx z, frDirEnum dir) { - auto baseIdx = 3 * getIdx(x, y, z); + auto baseIdx = static_cast(getIdx(x, y, z)) * 3; prevDirs_[baseIdx] = ((uint16_t) dir >> 2) & 1; prevDirs_[baseIdx + 1] = ((uint16_t) dir >> 1) & 1; prevDirs_[baseIdx + 2] = ((uint16_t) dir) & 1; @@ -1168,7 +1168,8 @@ class FlexGridGraph // unsafe access, no check frDirEnum getPrevAstarNodeDir(const FlexMazeIdx& idx) const { - auto baseIdx = 3 * getIdx(idx.x(), idx.y(), idx.z()); + auto baseIdx + = static_cast(getIdx(idx.x(), idx.y(), idx.z())) * 3; return (frDirEnum) (((uint16_t) (prevDirs_[baseIdx]) << 2) + ((uint16_t) (prevDirs_[baseIdx + 1]) << 1) + ((uint16_t) (prevDirs_[baseIdx + 2]) << 0)); From 192582417d491779290bbc5e7f764c14dad01100 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 11:18:29 -0700 Subject: [PATCH 16/24] odb: skip backside layers when picking gcell tile size dbBlock::getGCellTileSize() reads track spacings of the 2nd/3rd/4th routing layer via dbTech::findRoutingLayer(), assuming those indices hit the lowest signal metals (M2/M3/M4). On PDKs with backside power (BSPDN) the LEF orders BRDL/BM*/BPR routing layers first, so those indices instead pick coarse backside metals and the resulting tile size is roughly 30x too large. That collapses the GCell grid to a handful of cells, gives detailed routing one die-sized worker, and indirectly trips the FlexGridGraph capacity overflow. Walk getLayers() and count only non-backside routing layers so the heuristic targets frontside signal metals regardless of LEF ordering. Signed-off-by: Matthew Guthaus --- src/odb/src/db/dbBlock.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/odb/src/db/dbBlock.cpp b/src/odb/src/db/dbBlock.cpp index 4b95eeaacbf..96b8eecea1f 100644 --- a/src/odb/src/db/dbBlock.cpp +++ b/src/odb/src/db/dbBlock.cpp @@ -2516,7 +2516,20 @@ int dbBlock::getGCellTileSize() // lambda function to get the average track spacing of a given layer auto getAverageTrackSpacing = [this](int layer_idx) -> int { dbTech* tech = getTech(); - odb::dbTechLayer* tech_layer = tech->findRoutingLayer(layer_idx); + // Skip backside routing layers (e.g. BSPDN BPR/BM*/BRDL) so the Nth + // routing layer is counted among frontside metals regardless of LEF + // ordering. + odb::dbTechLayer* tech_layer = nullptr; + int count = 0; + for (auto* layer : tech->getLayers()) { + if (layer->getType() != dbTechLayerType::ROUTING || layer->isBackside()) { + continue; + } + if (++count == layer_idx) { + tech_layer = layer; + break; + } + } odb::dbTrackGrid* track_grid = findTrackGrid(tech_layer); if (track_grid == nullptr) { From d37c1a3ad205d6f903db50728ac7e0c0a3a51cbf Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 11:18:39 -0700 Subject: [PATCH 17/24] drt: skip backside block vias in io::Parser::setVias setLayers() already drops backside routing/cut layers from frTech, so any block via whose cut/top/bottom layer is on the backside has no matching frLayer and triggers DRT-0097/0098/0099 ("Cannot find ... layer") during global routing. Detect such vias up front (via params and via boxes both) and skip them, mirroring the existing backside guards elsewhere in this file. Signed-off-by: Matthew Guthaus --- src/drt/src/io/io.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/drt/src/io/io.cpp b/src/drt/src/io/io.cpp index 335d2684cc1..d49c9e1bbe8 100644 --- a/src/drt/src/io/io.cpp +++ b/src/drt/src/io/io.cpp @@ -207,6 +207,13 @@ void io::Parser::setVias(odb::dbBlock* block) for (auto via : block->getVias()) { if (via->getViaGenerateRule() != nullptr && via->hasParams()) { const odb::dbViaParams params = via->getViaParams(); + // Skip block vias whose cut/top/bottom layer is on the backside; + // those layers are filtered out of frTech by setLayers(). + if (params.getCutLayer()->isBackside() + || params.getBottomLayer()->isBackside() + || params.getTopLayer()->isBackside()) { + continue; + } frLayerNum cutLayerNum = 0; frLayerNum botLayerNum = 0; frLayerNum topLayerNum = 0; @@ -351,6 +358,17 @@ void io::Parser::setVias(odb::dbBlock* block) utl::DRT, 337, "Duplicated via definition for {}", via->getName()); } } else { + // Skip box-defined block vias touching backside layers. + bool any_backside = false; + for (auto box : via->getBoxes()) { + if (box->getTechLayer()->isBackside()) { + any_backside = true; + break; + } + } + if (any_backside) { + continue; + } std::map> lNum2Int; for (auto box : via->getBoxes()) { if (getTech()->name2layer_.find(box->getTechLayer()->getName()) From 86ed41744841ee16eb1c366735d138071d58aae7 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 12:19:42 -0700 Subject: [PATCH 18/24] odb: rename and clarify backside routing layer accessors Rename `firstRoutingLayer()` / `firstBacksideLayer()` to `firstFrontsideRoutingLayer()` / `firstBacksideRoutingLayer()` so the side filter is explicit in both names and "routing" is consistent. By PDK convention, backside metals are numbered going away from the substrate (e.g. BM1 nearest, BM4 farther out, BRDL outermost), mirror- ing the front-side numbering. In the LEF, however, the backside stack is listed in physical stack order from the outermost backside layer down (BRDL ... BPR) before the frontside (M0 ... RDL). Iterating `findRoutingLayer(level)` from level 1 upward therefore landed on the outermost backside layer, which is the opposite of what callers (PSM) need: they want the backside layer closest to the substrate. `firstBacksideRoutingLayer()` now iterates top-down and returns the substrate-closest backside layer (e.g. BPR on the bspdn gt2n PDK). Header doc updated to make that explicit. Signed-off-by: Matthew Guthaus --- src/odb/include/odb/db.h | 15 +++++++++------ src/odb/src/db/dbTech.cpp | 9 ++++++--- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/odb/include/odb/db.h b/src/odb/include/odb/db.h index 4ba6ec4383e..e1be24e7523 100644 --- a/src/odb/include/odb/db.h +++ b/src/odb/include/odb/db.h @@ -5933,16 +5933,19 @@ class dbTech : public dbObject dbTechLayer* findRoutingLayer(int level_number); /// - /// Find the lowest front-side (non-backside) routing layer. - /// Returns nullptr if there is no such layer. + /// Find the frontside (non-LEF58_BACKSIDE) routing layer closest to + /// the substrate (i.e. the lowest routing-level index that is not + /// marked backside). Returns nullptr if there is no such layer. /// - dbTechLayer* firstRoutingLayer(); + dbTechLayer* firstFrontsideRoutingLayer(); /// - /// Find the lowest backside routing layer (LEF58_BACKSIDE). - /// Returns nullptr if there is no backside routing layer. + /// Find the LEF58_BACKSIDE routing layer closest to the substrate + /// (i.e. the highest routing-level index that is marked backside, + /// since backside metals are stacked outward from M0 toward BRDL in + /// LEF order). Returns nullptr if there is no backside routing layer. /// - dbTechLayer* firstBacksideLayer(); + dbTechLayer* firstBacksideRoutingLayer(); /// /// Get the technolgy vias. This includes non-default-rule-vias. diff --git a/src/odb/src/db/dbTech.cpp b/src/odb/src/db/dbTech.cpp index 84821f9637f..c9f791278ca 100644 --- a/src/odb/src/db/dbTech.cpp +++ b/src/odb/src/db/dbTech.cpp @@ -500,7 +500,7 @@ dbTechLayer* dbTech::findRoutingLayer(int level_number) return nullptr; } -dbTechLayer* dbTech::firstRoutingLayer() +dbTechLayer* dbTech::firstFrontsideRoutingLayer() { const int n = getRoutingLayerCount(); for (int level = 1; level <= n; ++level) { @@ -512,10 +512,13 @@ dbTechLayer* dbTech::firstRoutingLayer() return nullptr; } -dbTechLayer* dbTech::firstBacksideLayer() +dbTechLayer* dbTech::firstBacksideRoutingLayer() { + // Backside layers appear before frontside layers in the LEF, ordered + // outward from the substrate (BPR ... BM1 ... BRDL). Iterate top-down + // so we return the backside layer closest to the substrate. const int n = getRoutingLayerCount(); - for (int level = 1; level <= n; ++level) { + for (int level = n; level >= 1; --level) { dbTechLayer* layer = findRoutingLayer(level); if (layer != nullptr && layer->isBackside()) { return layer; From 168313a795a5e9a836fc7d5b89afc2eb0e81e89d Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 12:19:56 -0700 Subject: [PATCH 19/24] psm: switch to renamed routing-layer accessors and drop fallback Use the new `firstFrontsideRoutingLayer()` / `firstBacksideRoutingLayer()` names. Remove the defensive fallback that reassigned `front_base` to `findRoutingLayer(1)` when no front-side layer was found. That branch only triggered while the LEF backside flag wasn't being parsed (every layer reporting `isBackside()=0`); with the parser correctly hooked up in odb, a tech that legitimately has no front-side routing layers is not a real configuration. Letting `front_base` stay null surfaces a clear caller-side error instead of silently substituting a backside layer as the front-side base node. Signed-off-by: Matthew Guthaus --- src/psm/src/ir_network.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index e3390087e9d..988b2f01374 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -249,11 +249,8 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) const utl::DebugScopedTimer timer( logger_, utl::PSM, "timer", 1, "Generate shapes from ITerms: {}"); - odb::dbTechLayer* front_base = getTech()->firstRoutingLayer(); - odb::dbTechLayer* back_base = getTech()->firstBacksideLayer(); - if (front_base == nullptr) { - front_base = getTech()->findRoutingLayer(1); - } + odb::dbTechLayer* front_base = getTech()->firstFrontsideRoutingLayer(); + odb::dbTechLayer* back_base = getTech()->firstBacksideRoutingLayer(); LayerMap shapes_by_layer; bool floorplan_asseted = false; From a81adcf1d62c9c3fd289bf65b8d4575a5486fcff Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 12:20:04 -0700 Subject: [PATCH 20/24] odb: drop unneeded PROPERTYDEFINITIONS from backside-bridge test LEF Built-in LEF58 properties are dispatched by a hardcoded name table in the LEF reader (lefin.cpp) and do not require an explicit PROPERTYDEFINITIONS statement; matching the style of existing tests for LEF58_BACKSIDE, LEF58_RECTONLY, etc. Verified that the parser still picks up LEF58_BACKSIDE_BRIDGE on `bridge_tap` and the .ok golden still matches. Signed-off-by: Matthew Guthaus --- src/odb/test/lef58_backside_bridge.lef | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/odb/test/lef58_backside_bridge.lef b/src/odb/test/lef58_backside_bridge.lef index 044f24e7462..7223789b25c 100644 --- a/src/odb/test/lef58_backside_bridge.lef +++ b/src/odb/test/lef58_backside_bridge.lef @@ -6,10 +6,6 @@ UNITS DATABASE MICRONS 2000 ; END UNITS -PROPERTYDEFINITIONS - MACRO LEF58_BACKSIDE_BRIDGE STRING ; -END PROPERTYDEFINITIONS - SITE coreSite CLASS CORE ; SIZE 0.190 BY 1.400 ; From cd9a62b3332abc927d501683b7c3f87e43c6c55a Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 12:56:56 -0700 Subject: [PATCH 21/24] psm: simplify iterm pin side detection and shorten master lookup Use the dbBox's tech layer directly instead of running every pin geometry through generatePolygonsFromBox(); we only need to know which side(s) of the stack the pin sits on, so the per-shape polygon math and the instance transform are unnecessary. Also reach the master via inst->getMaster() instead of iterm->getMTerm()->getMaster() since inst is already in scope. Signed-off-by: Matthew Guthaus --- src/psm/src/ir_network.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/psm/src/ir_network.cpp b/src/psm/src/ir_network.cpp index 988b2f01374..496a3040b8d 100644 --- a/src/psm/src/ir_network.cpp +++ b/src/psm/src/ir_network.cpp @@ -270,18 +270,20 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) } // First pass: figure out which side(s) this iterm has pin geometry on - // so we can pick the iterm base node's layer accordingly. + // so we can pick the iterm base node's layer accordingly. Only the + // layer matters here, so skip the polygon/transform work. bool has_front_pin = false; bool has_back_pin = false; for (auto* mpin : iterm->getMTerm()->getMPins()) { for (auto* geom : mpin->getGeometry()) { - const auto pin_shapes = generatePolygonsFromBox(geom, transform); - for (const auto& [layer, shapes] : pin_shapes) { - if (layer->isBackside()) { - has_back_pin = true; - } else { - has_front_pin = true; - } + odb::dbTechLayer* layer = geom->getTechLayer(); + if (layer == nullptr) { + continue; + } + if (layer->isBackside()) { + has_back_pin = true; + } else { + has_front_pin = true; } } } @@ -294,7 +296,7 @@ IRNetwork::generatePolygonsFromITerms(std::vector& terminals) base_layer = back_base; } const bool primary_is_back = base_layer == back_base; - const bool is_bridge = iterm->getMTerm()->getMaster()->isBacksideBridge(); + const bool is_bridge = inst->getMaster()->isBacksideBridge(); int x, y; iterm->getAvgXY(&x, &y); From b6bf791a8636abd8fbb1ef9a34b9fecb64fa1cf4 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Sat, 30 May 2026 12:57:11 -0700 Subject: [PATCH 22/24] pdn: move backside-crossing guard from add_pdn_connect to Connect() The check that refused connect rules spanning the front-side/backside boundary lived only in the add_pdn_connect Tcl command. Moving it into Connect::Connect() makes it catch every PDN connect rule regardless of how it was constructed (Tcl entry point, programmatic API, future callers), which matches the underlying invariant: PDN can never bridge the two sides via a cut-layer via, so any such rule is wrong wherever it originates. Tcl-side duplicate guard removed. Signed-off-by: Matthew Guthaus --- src/pdn/src/connect.cpp | 18 ++++++++++++++++++ src/pdn/src/pdn.tcl | 14 -------------- src/pdn/test/add_pdn_connect_backside_err.ok | 2 +- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/pdn/src/connect.cpp b/src/pdn/src/connect.cpp index 7d3593b0eda..55efb204263 100644 --- a/src/pdn/src/connect.cpp +++ b/src/pdn/src/connect.cpp @@ -47,6 +47,24 @@ Connect::Connect(Grid* grid, odb::dbTechLayer* layer0, odb::dbTechLayer* layer1) utl::PDN, 5, "{} must be a routing layer", layer1->getName()); } + // Backside-power sanity check. A standard cut-layer via cannot bridge + // a front-side metal to a backside metal (BPR / BM* / BRDL); PDN cannot + // create TSVs or backside cut vias, so the connection has to be + // provided by a tap/bridge cell whose layout already stitches the two + // sides together. Refuse the request rather than silently building a + // via that won't exist on the die. + if (layer0_->isBackside() != layer1_->isBackside()) { + grid_->getLogger()->error( + utl::PDN, + 1200, + "Connect rule layers ({}, {}) span the front-side/backside " + "boundary. PDN cannot create TSVs or vias across this boundary; " + "the connection must come from a tap/bridge cell that internally " + "stitches the two sides.", + layer0_->getName(), + layer1_->getName()); + } + if (layer0_->getRoutingLevel() > layer1_->getRoutingLevel()) { // ensure layer0 is below layer1 std::swap(layer0_, layer1_); diff --git a/src/pdn/src/pdn.tcl b/src/pdn/src/pdn.tcl index ef491e61c54..5b2b87f357a 100644 --- a/src/pdn/src/pdn.tcl +++ b/src/pdn/src/pdn.tcl @@ -572,20 +572,6 @@ proc add_pdn_connect { args } { set l0 [pdn::get_layer [lindex $keys(-layers) 0]] set l1 [pdn::get_layer [lindex $keys(-layers) 1]] - # Backside-power sanity check. A standard cut-layer via cannot bridge - # a front-side metal to a backside metal (BPR / BM* / BRDL); PDN - # cannot create TSVs or backside cut vias, so the connection has to - # be provided by a tap/bridge cell whose layout already stitches the - # two sides together. Refuse the request rather than silently - # building a via that won't exist on the die. - if { [$l0 isBackside] != [$l1 isBackside] } { - utl::error PDN 1200 \ - "add_pdn_connect layers ([$l0 getName], [$l1 getName]) span the\ - front-side/backside boundary. PDN cannot create TSVs or vias\ - across this boundary; the connection must come from a\ - tap/bridge cell that internally stitches the two sides." - } - set cut_pitch "0 0" if { [info exists keys(-cut_pitch)] } { set cut_pitch [pdn::get_one_to_two "-cut_pitch" $keys(-cut_pitch)] diff --git a/src/pdn/test/add_pdn_connect_backside_err.ok b/src/pdn/test/add_pdn_connect_backside_err.ok index e75098cb619..bab021e0068 100644 --- a/src/pdn/test/add_pdn_connect_backside_err.ok +++ b/src/pdn/test/add_pdn_connect_backside_err.ok @@ -4,5 +4,5 @@ [INFO ODB-0132] Created 2 special nets and 10 connections. [INFO PDN-0101] Using vdd as power net for Core domain. [INFO PDN-0102] Using vss as ground net for Core domain. -[ERROR PDN-1200] add_pdn_connect layers (M1, B1) span the front-side/backside boundary. PDN cannot create TSVs or vias across this boundary; the connection must come from a tap/bridge cell that internally stitches the two sides. +[ERROR PDN-1200] Connect rule layers (M1, B1) span the front-side/backside boundary. PDN cannot create TSVs or vias across this boundary; the connection must come from a tap/bridge cell that internally stitches the two sides. PDN-1200 From 9580ec38d53c904551831229e24452fc5751f44f Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Tue, 2 Jun 2026 10:16:38 -0700 Subject: [PATCH 23/24] test: sort backside_data entries in psm/pdn BUILD files Auto-applied by buildifier (format + lint=fix) to satisfy the Buildifier format / Buildifier lint GitHub-Action checks on PR #10547. - src/psm/test/BUILD: move backside_data/backside.{def,lef} into alphabetical position within the data filegroup. - src/pdn/test/BUILD: move the add_pdn_connect_backside_err key into alphabetical position within the per-test data dict to clear the unsorted-dict-items warning at line 295. Signed-off-by: Matthew Guthaus --- src/pdn/test/BUILD | 8 ++++---- src/psm/test/BUILD | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pdn/test/BUILD b/src/pdn/test/BUILD index 3a19dee754a..d29e673821b 100644 --- a/src/pdn/test/BUILD +++ b/src/pdn/test/BUILD @@ -280,6 +280,10 @@ filegroup( test_name + ".*", ], ) + { + "add_pdn_connect_backside_err": [ + "backside_data/backside.def", + "backside_data/backside.lef", + ], "asap7_failed_macro_covered": ["asap7_failed_macro_grid.def"], "asap7_macro_covered_partial": ["asap7_failed_macro_grid.def"], "asap7_macro_notcovered": ["asap7_failed_macro_grid.def"], @@ -292,10 +296,6 @@ filegroup( "ihp_ethmac/RM_IHPSG13_1P_256x48_c2_bm_bist.lef", "ihp_ethmac/floorplan.def", ], - "add_pdn_connect_backside_err": [ - "backside_data/backside.def", - "backside_data/backside.lef", - ], }.get(test_name, []), ) for test_name in ALL_TESTS diff --git a/src/psm/test/BUILD b/src/psm/test/BUILD index 0a45d507b0d..03b55657c73 100644 --- a/src/psm/test/BUILD +++ b/src/psm/test/BUILD @@ -101,8 +101,6 @@ filegroup( "Vsrc_aes_vss.loc", "Vsrc_gcd_vdd.loc", "Vsrc_gcd_vss.loc", - "backside_data/backside.def", - "backside_data/backside.lef", "asap7/asap7_tech_1x_201209.lef", "asap7/asap7sc7p5t_28_R_1x_220121a.lef", "asap7/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz", @@ -116,6 +114,8 @@ filegroup( "asap7_data/asap7.lib", "asap7_data/fakeram7_256x32.lef", "asap7_data/riscv.def", + "backside_data/backside.def", + "backside_data/backside.lef", "gcd_all_vss-em.rptok", "gcd_all_vss-spice.spok", "gcd_all_vss-voltage.rptok", From 41f4fc46231f20dfd5c590234c9c8d0e697f51e7 Mon Sep 17 00:00:00 2001 From: Matthew Guthaus Date: Tue, 2 Jun 2026 20:53:11 -0700 Subject: [PATCH 24/24] drt,odb: silence clang-tidy on bspdn-touched files Clears the remaining Clang-Tidy-Bazel warnings introduced by the LEF58_BACKSIDE PR (#10547): - src/drt/src/io/io.cpp:480: change the loop index in the backside-via-skip path in setVias() from `int i = 0; i < (int) via->getViaLayerRuleCount()` to `uint32_t i = 0; i < via->getViaLayerRuleCount()` to match the API return type and silence modernize-use-integer-sign-comparison. - src/drt/src/io/io.cpp:1068: mark updatefrAccessPoint static. It is only invoked from within this TU (line 1209 and 1299); the return-type change from void to bool on the bspdn branch made clang-tidy re-flag misc-use-internal-linkage. - src/odb/src/lefin/lefTechLayerBacksideParser.cpp: wrap the template parse() helper in an unnamed namespace inside odb::lefTechLayerBackside so the helper has internal linkage. The public entry odb::lefTechLayerBacksideParser::parse() still resolves through lefTechLayerBackside::parse() because the unnamed namespace is implicitly part of its parent for qualified lookup. No functional change. Local build + odb.lef58_backside_bridge.tcl golden test both clean. Signed-off-by: Matthew Guthaus --- src/drt/src/io/io.cpp | 8 ++++---- src/odb/src/lefin/lefTechLayerBacksideParser.cpp | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/drt/src/io/io.cpp b/src/drt/src/io/io.cpp index d49c9e1bbe8..8779ef346bf 100644 --- a/src/drt/src/io/io.cpp +++ b/src/drt/src/io/io.cpp @@ -477,7 +477,7 @@ void io::Parser::createNDR(odb::dbTechNonDefaultRule* ndr) z = std::numeric_limits::max(); for (auto via : viaRules) { bool any_backside = false; - for (int i = 0; i < (int) via->getViaLayerRuleCount(); i++) { + for (uint32_t i = 0; i < via->getViaLayerRuleCount(); i++) { if (via->getViaLayerRule(i)->getLayer()->isBackside()) { any_backside = true; break; @@ -1065,9 +1065,9 @@ frNet* io::Parser::addNet(odb::dbNet* db_net) return raw_net_in; } -bool updatefrAccessPoint(odb::dbAccessPoint* db_ap, - frAccessPoint* ap, - frTechObject* tech) +static bool updatefrAccessPoint(odb::dbAccessPoint* db_ap, + frAccessPoint* ap, + frTechObject* tech) { // Access points on backside layers (e.g. PG taps) are invisible to // the front-side router; report so the caller can drop them. diff --git a/src/odb/src/lefin/lefTechLayerBacksideParser.cpp b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp index d6c761bde13..50d5cf041cc 100644 --- a/src/odb/src/lefin/lefTechLayerBacksideParser.cpp +++ b/src/odb/src/lefin/lefTechLayerBacksideParser.cpp @@ -11,6 +11,8 @@ namespace odb::lefTechLayerBackside { +namespace { + template bool parse(Iterator first, Iterator last, @@ -26,6 +28,8 @@ bool parse(Iterator first, return valid && first == last; } +} // namespace + } // namespace odb::lefTechLayerBackside namespace odb {