MitjaNemec / ReplicateLayout

GNU General Public License v2.0
90 stars 12 forks source link

Change lstrip to replace (lstrip produce bug). #30

Closed cyntem closed 1 year ago

cyntem commented 1 year ago

Hi, i have project with a lot of hierarchical sheets, and found that current version of ReplicateLayout not work propelrly. I made some changes, with them ReplicateLayout is working on my project. Change lstrip to replace (lstrip produce bug, for example if sheet name is power, lstrip("(property \"Sheet name\"") return "wer"). Use upper function in. sheet_id (sometimes sheet_id is not uppercase). And check only sheet filename for searching duplicate footprint.

MitjaNemec commented 1 year ago

Thanks for this. I'll have to find the time to test this on Windows and Linux as path resolution might differ. Please be patient

MitjaNemec commented 1 year ago

I've finally managed to review your code. I've refactored it a bit to work properly with filenames that have space in the name.

Your patch also handled the zone replication case where source zone is on the net which does not have a corresponding pair in the destination nets. I've never dealt with such a layout design. Do you have such design? What are the reasons for such a design?

Anyhow thanks for testing the plugin, finding the issue and proposing a fix. I appreciate it.

cyntem commented 1 year ago

I accidentally routed one component from another sheet of the same hierarchical sheet with the same pads (because their have the same input and output hierarchical pins), and then replicate layout plugin crashed with other sheets of same hierarchical ( other sheets have other input and output hierarchical pins). I inserted check in replicate_layout.py with replication zones , and crashed not happened. After that I run DRC and found mistake in my replicated layouts - and after that I found one mistaked component in first design. I didn't try after that without inserted check. I think crashing is not possible for plugin anyway, even design is not correct.