[ENG-2108] FEATURE - check_setup has json dump option#61
Conversation
Greptile SummaryThis PR adds a
Confidence Score: 5/5Safe to merge. The new JSON path is additive, the accumulator is always cleared at the start of each check run, and the Tcl layer enforces the correct call ordering. The change is well-scoped: it adds a side-accumulator to an existing check routine without touching any existing data paths. The clear() guard prevents stale data, loop omission is deliberate and warned, error handling on file open is present, and a regression test validates the output format end-to-end. No files require special attention. The only open item is a stale/missing comment on pushPinErrors and pushClkErrors in search/CheckTiming.cc. Important Files Changed
Sequence DiagramsequenceDiagram
participant User as Tcl User
participant Tcl as Search.tcl
participant SWIG as Search.i
participant Sta as Sta.cc
participant CT as CheckTiming.cc
User->>Tcl: check_setup -json out.json [flags]
Tcl->>Tcl: parse_key_args extracts -json
Tcl->>SWIG: check_timing_cmd(flags...)
SWIG->>Sta: Sta::checkTiming(...)
Sta->>CT: "check_timing_->check(...)"
CT->>CT: clear() resets errors_ and json_results_
CT->>CT: checkNoInputDelay() pushPinErrors(no_input_delay)
CT->>CT: checkRegClks() pushPinErrors(unclocked/multiple_clock)
CT->>CT: checkUnconstrainedEndpoints() pushPinErrors(unconstrained)
CT->>CT: checkLoops() writes errors_ only
CT->>CT: checkGeneratedClocks() pushClkErrors(generated_clock)
CT-->>Sta: return errors_
Sta-->>SWIG: return errors_
SWIG-->>Tcl: return errors list
Tcl->>Tcl: if loops then sta_warn 518
Tcl->>SWIG: report_check_timing_json(filename)
SWIG->>Sta: Sta::reportCheckTimingJson(filename)
Sta->>CT: "check_timing_->reportJson(filename)"
CT->>CT: open ofstream, serialize json_results_
CT-->>Sta: file written
Reviews (2): Last reviewed commit: "fix typo!" | Re-trigger Greptile |
|
@greptile please look at my resolutions/comments and review again |
Added a "-json [filepath]" option to the check_setup command to dump a comprehensive JSON summary that would normally go to a report
Implementation consists of these main parts:
Test case provided for validation purposes
NOTE - loops are not dumped for now because of more overhead in implementation + we don't use it right now