efabless / openlane2

The next generation of OpenLane, rewritten from scratch with a modular architecture
https://openlane2.readthedocs.io/
Apache License 2.0
207 stars 38 forks source link

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

Closed urish closed 1 month ago

urish commented 1 month ago

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 commented 1 month ago

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

Screenshot 2024-09-22 at 11 47 42

kareefardi commented 1 month ago

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:

remove_obstructions:

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

donn commented 1 month ago

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

donn commented 1 month ago

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