odb: convert areas from double/int/uint to int64_t#10570
Open
gadfort wants to merge 8 commits into
Open
Conversation
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request migrates the storage of area values in the database from double or int to int64_t (in square DBUs) across various technology rules and layers, updating the schema version to 131 and adding backward compatibility for older database files. The review feedback is highly constructive, pointing out a critical migration bug in dbTechLayerCutSpacingRule.cpp where the area was not properly scaled by dbu_per_micron for older schemas. Additionally, the feedback identifies potential integer overflow risks during deserialization in dbTechLayerAreaRule.cpp and dbTechLayerMinCutRule.cpp, and recommends replacing C-style casts with static_cast for improved type safety.
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
Signed-off-by: Peter Gadfort <peter.gadfort@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the database we were incorrectly storing areas as distances or as doubles.
This converts them to int64_t (atleast those I could find), I chose this since it's the return type of
Rect::area()so trying to be consistent there.I searched through the code to find the callers and adjust them (this should be checked carefully).
I added a custom-serial flag to the code generator since I couldn't see a way to change datatype changes nicely.
Type of Change
Impact
No change expected
Verification
./etc/Build.sh).Related Issues
N/A