Skip to content
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

Fix Odb.RemoveRoutingObstructions failing with non-integer coordinates #553

Merged
merged 2 commits into from
Sep 22, 2024

Conversation

urish
Copy link
Contributor

@urish urish commented Sep 20, 2024

When specifying non integer coordinates in ROUTING_OBSTRUCTIONS, the Odb.RemoveRoutingObstructions would fail as it would truncate the decimal part before trying to match the coordinate.

For example, the following config would fail on any project (due to 16.5 appearing in the coordinate list):

  "ROUTING_OBSTRUCTIONS": [
    "met1 10 10 20 16.5"
  ],

@donn
Copy link
Member

donn commented Sep 22, 2024

Why are we converting dbus to microns just to convert them back to DBUs? @kareefardi

Screenshot 2024-09-22 at 11 47 42

@kareefardi
Copy link
Collaborator

Why are we converting dbus to microns just to convert them back to DBUs? @kareefardi

Screenshot 2024-09-22 at 11 47 42

add_obstructions:

  • takes microns
  • convert to dbus
  • creates an obstruction using dbu

remove_obstructions:

  • takes microns
  • iterates over existing obstructions (in dbu)
  • converts to microns for comparison
  • removes if match

There is no redundancy here. The input should be in microns

@donn
Copy link
Member

donn commented Sep 22, 2024

why not convert both to dbus and compare in integer space where things are more reliable?

urish and others added 2 commits September 22, 2024 12:45
When specifying non integer coordinates in `ROUTING_OBSTRUCTIONS`, the Odb.RemoveRoutingObstructions would fail as it would truncate the decimal part before trying to match the coordinate.

For example, the following config would fail on any project (due to 16.5 appearing in the coordinate list):

```json
  "ROUTING_OBSTRUCTIONS": [
    "met1 10 10 20 16.5"
  ],
```
@donn
Copy link
Member

donn commented Sep 22, 2024

@kareefardi I updated the code to not use floats. Please review.

@donn donn merged commit bc56ad4 into efabless:main Sep 22, 2024
52 of 53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants