odb: enable reading different odb files in a single openroad session#10072
odb: enable reading different odb files in a single openroad session#10072openroad-ci wants to merge 14 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request enables the ability to reload a database by clearing the existing state instead of throwing an error when the database is already populated. It introduces a preDbClear observer notification, allowing components like STA, the GUI, and ODB to perform necessary cleanup before the database is reset. Key implementation details include preserving session-level state (observers and loggers) during the database clear process, stopping GUI render threads, and resetting network and tech data. Review feedback suggests ensuring that GUI render threads are fully joined before proceeding with the clear and using the provided database pointer in dbSta to avoid potential null pointer issues during re-initialization.
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
|
How have you verified this change? For example I see nothing that updates tap and it holds an dbDatabase* member. |
I tested mainly with the GUI, by switching over different ODB files from different stages of the flow. Everything looks fine visually (wires are loaded/removed according to the stage I'm loading, instances are only shown in the ODBs post-floorplan, etc.) I also tested with a simple script that loads the ODB file and print some data from the design (net count and instance count) and compared it with loading the ODB files on a specific openroad run, and things were also matching. |
|
You might try load one db, switch to the input to step N, then run step N, verify the result is the same as for that step without the prior load. I expect it will fail for tapcell for example. |
Tapcell actually worked, but mainly because its internal state is not so important when reloading ODB and re-running the tool. Everything is computed from scratch again, so I was able to reproduce the same results. However, I need to reset other tools (like GRT, DPL, CTS, etc.) to ensure that, when reloading ODB, the state of each module is correct to ensure reproducibility. The current state of my implementation on this branch works for visualization only. |
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Clear staCell pointers on all masters before freeing the network to prevent the GUI render thread from accessing freed ConcreteCell objects. Recreate the default scene after deleteScenes() so cmd_scene_ remains valid for heatmap settings queries on exit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Call destroyMap() in HeatMapDataSource::setChip when the chip changes to invalidate cached heatmap data. Fix the MapSettingMultiChoice getter type from const std::string to std::string to avoid std::function double-wrapping. Stop render threads in saveSettings before serializing renderer state to prevent races with the render thread on exit. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Override setChip in RoutingCongestionDataSource to reset the cached layer pointer. Override setChip in RUDYDataSource to reset the cached rudy pointer, unregister from the old block, and re-register on the new block. Add GlobalRouter::clearRudy() to delete the cached Rudy so it is recreated for the new block. Reset layer_, net_, and corner_ in IRDropDataSource::setChip to prevent dangling pointer access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
|
@maliberty I've pushed some changes in different tools to ensure that, after reloading the ODB file, their state will also be reset. I tested with the regression tests under OpenROAD/test, and it's working as expected. The same results are produced when running a single openroad session compared to reloading ODB. |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 21 days if no further activity occurs. Remove the |
Summary
This PR enables the reload of the database in a single openroad session.
Type of Change
Impact
Allow reading multiple ODB files in the same openroad session.
Verification
./etc/Build.sh).