-
Notifications
You must be signed in to change notification settings - Fork 536
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
rsz: Source StaTclTypes.i
and clean up the binding
#5277
base: master
Are you sure you want to change the base?
Conversation
The following STA patch is required, otherwise we get a conflict at linkage time. Please confirm the resizer change is desirable, I can open the OpenSTA PR for it.
|
clang-tidy review says "All clean, LGTM! 👍" |
@@ -35,12 +35,22 @@ | |||
|
|||
include("openroad") | |||
|
|||
swig_lib(NAME rsz |
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.
Here I decided to split out the binding into a library of its own because we are polluting its include path a lot (see below in this file).
As a result of the new include, and with the static functions STA patch, we get new warnings
If both openroad/opensta used C++17 we could silence with |
clang-tidy review says "All clean, LGTM! 👍" |
@povik is it possible to use %import instead of %include to avoid the need for the sta patch? |
@gadfort changing that and reverting the sta patch I get the failures below. I am not familiar with SWIG so it's hard for me to say how much work it would take to make
|
@povik thanks for checking, I was hoping that would have solved it. |
I appears %import doesn't bring the template functions into scope and %include leads to duplication. Using A slightly nicer patch would be to pull these helper functions out of the .i into a regular c++ where they could more easily be shared. I believe then %import could be made to work. I'm not sure its worth the bother though. |
@maliberty Should I open a PR against OpenROAD's or upstream STA? |
upstream (which requires a CLA) |
parallaxsw/OpenSTA#62, which was blocking this PR, has now been merged |
Signed-off-by: Martin Povišer <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
Now that we source `StaTclTypes.i` we can rely on it to supply much of the type conversion rules. Only keep those which are unique to the resizer, and for those try to use the generic conversion helpers (e.g. `setPtrTclList`). Signed-off-by: Martin Povišer <[email protected]>
Signed-off-by: Martin Povišer <[email protected]>
7ef4685
to
2646131
Compare
Rebased and inserted sign-offs, this could be good to go now |
clang-tidy review says "All clean, LGTM! 👍" |
The CI failures are due to some of the helpers included from
Should I open another STA patch to have |
Looks like it uses c++17 https://github.com/parallaxsw/OpenSTA/blob/bd13bc409ebac682aa25778f770458829ff14cc2/CMakeLists.txt#L565 so you can try a PR there |
To get all the SWIG type conversion rules around basic STA types, it's best if we can source
StaTclTypes.i
. Here we make the change in the resizer binding, and use it to clean up some of the binding code. See the commits.