-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drt: decoupling of the OR singleton from DRT core code #6658
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
@bnmfw I thought we merged a PR for this. Is this stale? |
@maliberty I think you are referring to #6642. They both tackle the same issue (this closes it), the first solves coupling to the GUI and this solves coupling to the ORD singleton. If follows a similar decoupling pattern as the aforementioned PR, but it solves something different. I also wanted to make this a separate PR due to the debate that could arise from the Reads and Writes part. |
I think the read/write_(lef/def/db) could all be moved to odb. The only tricky case seems to be readDb's callback to sta but that could be handled by an observer. If you make that change in a separate PR it will simplify this one. Is just inconvenient to plumb the thread count to where it is needed? If so the router config avoid that though I would tend to just pass it through in a more explicit style. |
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Signed-off-by: bernardo <[email protected]>
Amazing job with these changes @bnmfw. Your work is super impressive |
Signed-off-by: bernardo <[email protected]>
@QuantamHD Thank you very much! |
@maliberty This is ready for a new review. I have, however three points I'm not 100% on:
|
Fixes #6532.
DRT Core Dependencies on the ORD singleton
There are two main dependencies DRT has:
Number of Threads
Every case of the usage of the
getThreadCount()
was analyzed. In cases where the calls were close to the SWIG the value was plumbed through it. In other cases the value is stored inrouter_cgf_->MAX_THREADS
and retrieved later.For
FlexDR.cpp
calls,router_cfg_->MAXTHREADS
always has the current thread count, so it can be used without harm.Reads and Writes
Instead of running the code from the ORD singleton, the code on these calls was copied to where it is needed.
Write calls were simply substituted by:
db_->write(utl::StreamHandler(filename, true).getStream());
Which, although being a very convoluted, is compact and straight to the point.
The single read call is a bit extensive and copying it might not be the best solution. The copied code does not need interaction with the STA, as the original use did not actually enabled it usage.