The-OpenROAD-Project / OpenROAD

OpenROAD's unified application implementing an RTL-to-GDS Flow. Documentation at https://openroad.readthedocs.io/en/latest/
https://theopenroadproject.org/
BSD 3-Clause "New" or "Revised" License
1.64k stars 564 forks source link

odb/cdl: Handle top-level pins wired to nets of different name #6040

Closed smunaut closed 3 days ago

smunaut commented 4 weeks ago

ATM the code seem to assume that for each top level pin, the net name is equal to the pin name.

That's not always the case and this produces an incorect netlist.

To solve that, during pin name enumeration when creating the subckt line, we create a mapping from "net name" -> "pin name" for each pin connected to a net of a different name. Then when outputting the connections between sub blocks, we use the pin name instead of the DB net name.

github-actions[bot] commented 4 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

maliberty commented 4 weeks ago

Please add a unit test that demonstrates this use case.

github-actions[bot] commented 4 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 4 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

maliberty commented 1 week ago

I don't see a full test, just

image

If no ok needs updating it means this change has no effect on any test.

smunaut commented 1 week ago

@maliberty Yes, I changed the input file so that it now triggers the bad behavior. With the new input file and without the code change the resulting CDL would be invalid and not match the ok golden file. With the code fix applied, it generates the same correct netlist as before.

github-actions[bot] commented 3 days ago

clang-tidy review says "All clean, LGTM! :+1:"

smunaut commented 3 days ago