Skip to content

Update ioPlacer#8

Merged
tspyrou merged 1 commit into
The-OpenROAD-Project:developfrom
mpfogaca:develop
Dec 6, 2019
Merged

Update ioPlacer#8
tspyrou merged 1 commit into
The-OpenROAD-Project:developfrom
mpfogaca:develop

Conversation

@mpfogaca
Copy link
Copy Markdown
Contributor

@mpfogaca mpfogaca commented Dec 6, 2019

Fix bug with mismatching units in DB and DEF.

@tspyrou tspyrou merged commit 04aa8c6 into The-OpenROAD-Project:develop Dec 6, 2019
tspyrou pushed a commit that referenced this pull request Sep 10, 2020
[FastRoute] Add check for min and max routing layers
gudeh pushed a commit to gudeh/OpenROAD that referenced this pull request Sep 29, 2025
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 8, 2026
Number every PG-DRC code change in the order data flows from the
user-facing Tcl flag down to the FlexGC checks, so a reader can grep
for [PG-DRC #1] .. [PG-DRC The-OpenROAD-Project#11] and walk the chain end to end:

  #1  TritonRoute.tcl          -- parse -check_pg_nets
  The-OpenROAD-Project#2  TritonRoute.i            -- SWIG bridge
  The-OpenROAD-Project#3  TritonRoute.h            -- public API param
  The-OpenROAD-Project#4  TritonRoute.cpp          -- write router_cfg_->CHECK_PG_NETS
  The-OpenROAD-Project#5  global.h                 -- RouterConfiguration field
  The-OpenROAD-Project#6  serialization.h          -- distributed-worker serialization
  The-OpenROAD-Project#7  frRegionQuery.cpp        -- feed PG snets to drObjs rtree
  The-OpenROAD-Project#8  FlexGC_init.cpp          -- skip PG in fixed-obstacle pass
  The-OpenROAD-Project#9  FlexGC_cut.cpp           -- gate via-table supply-skip
  The-OpenROAD-Project#10 drc_test_pg.tcl          -- end-to-end smoke regression
  The-OpenROAD-Project#11 CMakeLists.txt / BUILD   -- register test in both build systems

Also document why FlexGCWorker::Impl::checkCutSpacing_spc() is
deliberately left alone: that skip honors LEF SAMENETPGONLY and must
keep exempting same-PG-net cuts even when PG DRC is on.

Signed-off-by: Claude <noreply@anthropic.com>
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 8, 2026
…cfg field

Previous version stashed CHECK_PG_NETS in RouterConfiguration so every
downstream stage could read it via router_cfg_. That made the flag a
hidden global: it lived for the lifetime of the router, would persist
across calls, and forced a serialization entry for distributed
workers. Refactor to plumb the bool as an explicit parameter end to
end so PG checking happens only when, and exactly where, the user
asks for it.

  - Drop RouterConfiguration::CHECK_PG_NETS and its serialize line.
  - frRegionQuery::initDRObj gains an include_pg_nets bool (default
    false). All routing/repair callers keep the default; only
    TritonRoute::checkDRC passes true when -check_pg_nets is set.
  - FlexGCWorker gets setCheckPgNets(bool) + Impl::checkPgNets_;
    FlexGC_init.cpp / FlexGC_cut.cpp read the worker member instead
    of router_cfg_.
  - TritonRoute::getDRCMarkers takes the bool and forwards it to
    each FlexGCWorker before init.
  - TritonRoute::checkDRC body re-runs initDRObj(true) only when the
    flag is on (idempotent rebuild) and forwards the bool to
    getDRCMarkers; default check_drc and the routing flow are
    bit-identical to before.

Renumber [PG-DRC #N] markers to follow the new linear chain (#1..The-OpenROAD-Project#10):
  #1  Tcl flag parse
  The-OpenROAD-Project#2  SWIG bridge
  The-OpenROAD-Project#3  TritonRoute::checkDRC declaration
  The-OpenROAD-Project#4  TritonRoute::checkDRC body -> initDRObj(true)
  The-OpenROAD-Project#5  frRegionQuery::Impl::initDRObj feeds PG to drObjs
  The-OpenROAD-Project#6  TritonRoute::getDRCMarkers + FlexGCWorker::setCheckPgNets / member
  The-OpenROAD-Project#7  FlexGCWorker::Impl::initDesign obstacle-pass skip
  The-OpenROAD-Project#8  FlexGCWorker::Impl::checkMetalWidthViaTable supply-skip gate
  The-OpenROAD-Project#9  drc_test_pg.tcl smoke regression
  The-OpenROAD-Project#10 CMakeLists.txt / BUILD registration

Signed-off-by: Claude <noreply@anthropic.com>
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 9, 2026
When the user reports "same output with -check_pg_nets on", we have no
visibility into where the chain is failing. Wire a small set of gated
trace prints that fire only when -check_pg_nets is set, and drop a
per-rule comment block at every spec rule's check entry function so
the spec table maps 1:1 onto the source.

Trace points (chain order, all gated on CHECK_PG_NETS):

  #1 (TritonRoute.tcl)        Tcl proc parsed flag, forwarding to SWIG
  The-OpenROAD-Project#4 (TritonRoute.cpp)        checkDRC entered with the flag
  The-OpenROAD-Project#7 (frRegionQuery.cpp)      initDRObj summary: how many supply nets
                              ingested into drObjs, how many non-supply
                              specials skipped (left as obstacles), how
                              many signal nets skipped entirely
  The-OpenROAD-Project#8 (FlexGC_init.cpp)        FlexGC obstacle pass: how many shapes
                              loaded as fixed obstacles, how many
                              supply shapes deferred to the drObj pass
  The-OpenROAD-Project#10 (TritonRoute.cpp)       output filter: markers in / kept / dropped

  RULE-N (FlexGC.cpp addMarker)
                              every emitted marker is classified into
                              spec rule #1..The-OpenROAD-Project#4 by frConstraintTypeEnum
                              and printed with layer, bbox, and whether
                              any src is a supply owner

Per-rule comment annotations (no per-rect prints; addMarker handles
those centrally to avoid log spam):

  RULE-1 PG-PG spacing      checkMetalSpacing_main (FlexGC_main.cpp)
  RULE-2 Blockage / keepout checkMetalSpacing_short_obs (FlexGC_main),
                            checKeepOutZone_main (FlexGC_cut)
  RULE-3 Width / grid       checkMetalShape_minWidth,
                            checkMetalShape_offGrid (FlexGC_main.cpp)
  RULE-4 Via physical       checkMetalWidthViaTable,
                            checkLef58Enclosure_main (FlexGC_cut.cpp)

Default check_drc (no flag) emits zero new output and the routing
flow is byte-identical.

To diagnose "same result": rebuild and run check_drc -check_pg_nets;
the missing [PG-DRC #N] trace identifies the broken link.

Signed-off-by: Claude <noreply@anthropic.com>
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 11, 2026
-check_pg_nets is on

Per user direction: revert the prior band-aid (clearing leaked
routePolygons after the fact) and instead add a PG filter at the
drObj load step itself, mirroring the obstacle-pass skip [PG-DRC The-OpenROAD-Project#8].

Two filter sites, both gated on router_cfg_->CHECK_PG_NETS:

  1. FlexGCWorker::Impl::initDesign drObj loop. When the loop runs
     (skipDR=false / no drWorker), any drObj whose owning frNet is
     not supply is skipped. Reports counts via [PG-DRC #8b].

     In the check_drc path FlexGCWorker::Impl::init calls
     initDesign(design, true) so this loop is bypassed. The filter
     is added here for completeness / defense in depth (matches the
     line the user pointed at in the original source).

  2. FlexGCWorker::Impl::initNetsFromDesign. This is the actual path
     check_drc uses for drObj loading. The same is_supply_obj guard
     is applied to every entry returned by queryDRObj(getExtBox())
     before calling initRouteObj. Reports counts via [PG-DRC #8b].

Net effect under -check_pg_nets: signal-net frPathSeg / frVia /
frPatchWire never reach initRouteObj, so signal-net gcNets cannot
acquire routePolygons regardless of what drObjs contains. PG-vs-pin
and PG-vs-blockage checks are unaffected (pins / blockages still
arrive as fixed obstacles via the shapes rtree).

Default check_drc (flag off) is unchanged.

Signed-off-by: Claude <noreply@anthropic.com>
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 12, 2026
getNet() is the single funnel every shape passes through to obtain
its gcNet (pins from the shapes rtree, routed wires from drObjs, vias,
patch wires -- all of them). Putting the PG filter here catches any
leak path regardless of where it originated, which the earlier
per-rtree filters (The-OpenROAD-Project#7, The-OpenROAD-Project#8, #8b) apparently did not -- [PG-DRC INV]
still reported signal frNet gcNets with routed polygons.

Change:
  - getNet(frBlockObject*): when router_cfg_->CHECK_PG_NETS is on and
    the resolved owner is a non-supply frNet, return nullptr instead
    of creating/returning a gcNet.
  - initObj: skip the shape if getNet returns nullptr.
  - initRouteObj: return nullptr if getNet returns nullptr; the
    patch-wire callsite in initNetsFromDesign skips on nullptr.

Effect under -check_pg_nets: no signal-net geometry of any kind
enters FlexGC, so [PG-DRC INV] should report signal_frNet=0 /
routed_leak=0 and no [PG-DRC INV] LEAK lines. PG-vs-blockage still
works (blockage owner is frBlockage, not frNet); PG-vs-signal-pin
coverage is dropped (accepted -- strict PG-only per user direction).

Default check_drc (flag off) is unchanged: owner is never a problem
because CHECK_PG_NETS gates the whole branch.

Signed-off-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants