Skip to content

Add RePlAce/OpenDP unit testcases.#10

Merged
jjcherry56 merged 20 commits into
The-OpenROAD-Project:developfrom
mgwoo:master
Dec 9, 2019
Merged

Add RePlAce/OpenDP unit testcases.#10
jjcherry56 merged 20 commits into
The-OpenROAD-Project:developfrom
mgwoo:master

Conversation

@mgwoo
Copy link
Copy Markdown
Contributor

@mgwoo mgwoo commented Dec 7, 2019

Could you check this PR for RePlAce test cases?
I can't check Jenkins' behavior in my forked repo...

@mgwoo
Copy link
Copy Markdown
Contributor Author

mgwoo commented Dec 7, 2019

I can confirm that my testcases worked well in Jenkins.

Update OpenDP unit testcases for top-level app
@mgwoo
Copy link
Copy Markdown
Contributor Author

mgwoo commented Dec 7, 2019

The integrated OpenDP only has a problem with multi-height testcases.
Other testcases (fence-region, simple-case, low-util) worked well.

@mgwoo mgwoo changed the title Add RePlAce unit testcases. Add RePlAce/OpenDP unit testcases. Dec 7, 2019
@tspyrou
Copy link
Copy Markdown
Contributor

tspyrou commented Dec 7, 2019

I see this failure in jenkins.

Access or-multi-height-test-01:

run_opendp.tcl

CMD: /OpenROAD/build/src/openroad or-multi-height-test-01/run_opendp.tcl

Compare with golden:

Traceback (most recent call last):

File "regression.py", line 140, in

Run("simple", prog, openroadList)

File "regression.py", line 106, in Run

SimpleGoldenCompare(rptFile, goldenFile)

File "regression.py", line 49, in SimpleGoldenCompare

f = open(orig, "r")

FileNotFoundError: [Errno 2] No such file or directory: 'or-multi-height-test-01/ten_cells_multi.rpt'

script returned exit code 1

@jjcherry56 jjcherry56 merged commit b1b1586 into The-OpenROAD-Project:develop Dec 9, 2019
tspyrou pushed a commit that referenced this pull request Sep 10, 2020
gudeh pushed a commit to gudeh/OpenROAD that referenced this pull request Sep 29, 2025
…private/merge-master

DPL: fix small merge mistake
oharboe added a commit to oharboe/OpenROAD that referenced this pull request May 6, 2026
…message

1. Bazel test detail (The-OpenROAD-Project#7). The actual stderr (e.g.
   `AssertionError: 20 != 19`) lives in a Bazel `==================== Test
   output for <target>:` block — usually thousands of lines *before*
   the FAILED summary row in the same log. Restructure the parser to:
   - record FAILED summary rows into a per-target dict (collapses
     re-runs from `--keep_going`);
   - buffer Test-output block lines unconditionally as we see them, so
     blocks that precede their FAILED row aren't dropped;
   - use a length-78+ `=` rule as the block end (Bazel's closing fence
     is 80 wide; the unittest framework's internal 70-wide separator
     no longer terminates capture early).

   PR The-OpenROAD-Project#10287 dogfood: `//src/odb/test:odb_man_tcl_check` finding now
   carries `AssertionError: 20 != 19 : ./src/odb: help count (20) !=
   readme count (19)` in its detail / AI directive.

2. Per-finding log URL (The-OpenROAD-Project#11). cli._scan_check threads
   `check.details_url` into every emitted finding; render_markdown
   appends "Full log: <url>." to each item in the AI directive.

3. "Couldn't extract" message (The-OpenROAD-Project#10). When the discovery layer reports
   N failing checks but no parser produced a finding, the table now
   says "Found N failing check(s) but couldn't extract any actionable
   findings — see <urls>" instead of an empty screen.
   `discover_findings` returns `(findings, failing_check_urls)` so
   the renderer can show the URL list. fix_main.py + 4 unit tests
   updated for the new tuple shape.

Tests added/updated:
- test_bazel_test: 3 new cases covering block-before-summary,
  block-truncation, no-block-fallback, plus the existing assertion
  cases.
- test_render_table: empty-with-failing-urls case.
- test_cli, test_fix_runs_recipes: updated stubs for tuple return.

30/30 Bazel tests pass.

Final 10-PR dogfood survey (the same set used to motivate P0):
- All 10 PRs produce useful output.
- PR The-OpenROAD-Project#10287's bazel_test_fail finding now contains the actual
  `AssertionError`.
- PR The-OpenROAD-Project#10288's purged-build case shows a `log_unavailable` info finding
  alongside the 5 reviewable Gemini comments on its diff.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
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 8, 2026
Previously the flag added PG geometry to the GC engine but the report
file still contained every signal-vs-signal marker the engine
produced, so the user had to grep for VDD/VSS by hand to see what
PG-DRC found. Make -check_pg_nets a true "PG QA pass": after
getDRCMarkers() returns, drop every marker whose srcs do not include
a supply (frNet / frBTerm / frInstTerm) before calling reportDRC.

Default check_drc is unchanged. Renumber the chain markers so the
new filter is [PG-DRC The-OpenROAD-Project#10]; test moves to The-OpenROAD-Project#11, build registration to

Signed-off-by: Claude <noreply@anthropic.com>
The-OpenROAD-Project#12.
RamboJHB pushed a commit to RamboJHB/OpenROAD that referenced this pull request May 8, 2026
With the previous version FlexGC loaded both signal and PG nets when
the flag was on, then [PG-DRC The-OpenROAD-Project#10] threw away signal-vs-signal markers
at output. The signal-vs-signal DRC work was wasted CPU.

Make -check_pg_nets strict at ingestion: in
frRegionQuery::Impl::initDRObj() take an if/else - flag on populates
drObjs with PG snets exclusively; flag off keeps the existing
signal-net-only path. Signal routed wires never reach FlexGC under the
flag, so no signal-vs-signal checks run.

Trade-off: PG-vs-signal-routed-wire is no longer reported either, only
PG-vs-PG and PG-vs-pin/blockage (pins/blockages still come in as fixed
obstacles via frRegionQuery::Impl::init() -> shapes rtree). Per user
direction (Strict PG-only).

The [PG-DRC The-OpenROAD-Project#10] output filter is kept as a safety net and its
comment updated to reflect that with strict ingestion it should be a
no-op on expected input. Default check_drc and routing/repair flow
unchanged.

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>
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.

4 participants