Closed jakobwenzel closed 1 year ago
Mirroring the previous behaviour would probably be to overwrite previously stored values with new duplicates here: https://github.com/Xilinx/RapidWright/blob/a959449d1073747359e955a36e625656af956542/src/com/xilinx/rapidwright/edif/EDIFPortInstList.java#L42-L45
Fixed by #571.
Hi,
after hours of debugging, I found out that 131331d75ae66678901e5eb614fd5145428eb0eb subtly changed behaviour when there are duplicate
EDIFPortInst
s.Let's use this minimal example:
We create a cell inst and connect it to one net. Then we change our mind, disconnect and connect to a different net. When querying the cell inst for which net its port inst connects to, we should get netB, right? Well, before 131331d75ae66678901e5eb614fd5145428eb0eb we did. Now, we get null.
The reason for this change is subtle: Previously,
EDIFCellInst.portInsts
was a Map. When adding a duplicate entry inEDIFCellInst.addPortInst
, the previous one was discarded and the new one was saved in the map. In that changeEDIFPortInstList
was introduced, which is now used inEDIFCellInst
. In case of duplicates,EDIFPortInstList
keeps the old value and discards the new one.This change was unexpected for me and very hard to find. I believe that mirroring the previous behaviour more closely is more intuitive.