web: add net fanout histogram to charts widget#10649
Conversation
46c26df to
b410a49
Compare
There was a problem hiding this comment.
Code Review
This pull request introduces a new Net Fanout tab to the charts widget, allowing users to view and interact with net fanout distributions. Key changes include frontend support for log-scale rendering, tooltips, and double-click bin selection, alongside backend handlers to compute and serialize the fanout histogram. Feedback highlights two critical stability and concurrency issues: first, double-clicking a bin with a very large number of nets could cause severe performance degradation or crashes, so limiting the selection size is recommended; second, accessing the database in handleFanoutHistogram without acquiring the shared tcl_eval_->mutex lock introduces potential race conditions, which should be resolved by locking the mutex.
Adds a "Net Fanout" tab alongside Setup/Hold Slack, backed by a new fanout_histogram request that bins per-net load count from odb directly (no STA dependency). Also tightens the histogram Y-axis snap so a tall bar fills most of the chart instead of half, and keeps the hover tooltip inside the widget bounds. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b410a49752
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Double-clicking a densely populated fanout bin could select tens of thousands of nets, inserting each into the SelectionSet and computing highlight shapes for all of them -- prohibitively slow and memory-heavy, to the point of hangs or crashes on large designs. Cap the selection at 1000 nets while still reporting the true bin count, and surface a truncated flag so the client warns when the limit is hit. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
b410a49 to
efd55c7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efd55c73d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const data = await this._app.websocketManager.request(req); | ||
| this._histogramData = data; | ||
| this._syncView(); | ||
|
|
||
| const total = data.total_endpoints || 0; | ||
| const unconstrained = data.unconstrained_count || 0; | ||
| const constrained = total - unconstrained; | ||
| this._statusLabel.textContent = `${constrained} endpoints` + | ||
| (unconstrained > 0 ? `, ${unconstrained} unconstrained` : ''); | ||
| if (this._currentTab === 'fanout') { |
There was a problem hiding this comment.
Drop stale histogram responses after tab switches
If a user switches tabs while a histogram request is in flight, the response is interpreted using the new this._currentTab when it completes. For example, a fanout_histogram response that arrives after switching back to Setup is stored in _histogramData, rendered as slack data, and then reports 0 endpoints because total_endpoints is absent; the reverse can render slack bins as fanout. Capture the requested tab/generation before the await and ignore responses that are no longer current.
Useful? React with 👍 / 👎.
| // STA-touching code (descriptors, getProperties) must hold the | ||
| // shared STA lock. | ||
| std::lock_guard<std::mutex> sta_lock(tcl_eval_->mutex); |
There was a problem hiding this comment.
Honor DBU mode for fanout-bin inspection
When a fanout bin is double-clicked with Show DBU enabled, this new inspect path still formats properties with the default micron converter because it never reads use_dbu or installs ScopedDbuFormat before writeInspectPayload; unlike the existing select/inspect/select_next paths, the client request also omits the flag. The first net opened from the histogram therefore shows inconsistent units until the user re-inspects or cycles selection.
Useful? React with 👍 / 👎.
Summary
Adds a Net Fanout tab to the web charts widget, alongside the existing Setup/Hold Slack views.
fanout_histogramrequest that bins per-net load count directly from odb (no STA dependency).Changes
charts-widget.js— Net Fanout tab + Y-axis snap / tooltip fixesrequest_handler.{cpp,h}—fanout_histogramrequest handlertiming_report.{cpp,h}— per-net fanout binning from odbweb.cpp— wire up the new requesttest/js/test-charts-widget.js— coverage for the new tab