I’ve tried importing a project from Allegro via Altium to KiCad 7.0.7 and it worked great - apart from being unsure how to handle some of the auto-generated net names set in the PCB file. The PCB layout in KiCad required just a few manual modifications and zone adjustments in pcbnew to get it to look like the original layout. The initial import into eeschema also worked ok.
All the nets are correctly preserved in pcbnew as it should be. It’s only those net names that were auto-generated in Allegro and contain random numbers that I’m not sure how to match and sync back into eeschema.
Would ‘Update Schematic from PCB’ import these auto-generated net names by matching the nets based on the footprint pin numbers? I’ve tried this but there were many warnings and errors.
Is there another way in eeschema to check/import/set these net names?
It’s only the nets that don’t have a label attached which need to be handled as a special case, it seems. In the attached example U13 pins 1,2,5 are ok as they have labels attached, but pins 3,4 have a random number set as their net name. In eeschema, U13 pin 3 would be given net name Net-(U13-EN) and pin 4 would be Net-(U13-BP/FB) - so there is a bit of a mismatch.
Could someone please point me to the source code that handles ‘Update Schematic from PCB’?
I wouldn’t mind investigating how this can be solved / improved / scripted to streamline the import process and would contribute back to KiCad development / docs.
But is it worth it putting time in this at the moment?
Is there anything wrong with it if those names changed to auto generated names from KiCad?
Best I know, the only way to have named nets in KiCad is to put labels on them, and an algorithm to put those net names into the schematic would also need a way to find locations for those labels. And labeling a lot of small nets (Such as N17206147 with just two connections) would look a bit awkward in the schematic.
I was reading a bit of the Eeschema manual, section 6.2.1. The Update Schematic from PCB has an option to update net names, and the manual says:
Net names
If checked, the schematic will be updated with any net name changes that have been made in the board. Net labels will be updated or added to the schematic as necessary to match the board.
If unchecked, net names will not be updated in the schematic.
It is a function I have not used myself, and can’t say more about it.
I’ll be testing ‘Update Schematic from PCB’ and ‘Update PCB from Schematic’ in more detail soon.
But first, I’ve noticed one area that’s creating a problem in terms of how imported symbols and net lists are generated, especially when multiple schematic pages are imported from Altium.
The eeschema import algorithm generates new component symbols for each unique shape of a component being imported and places it to a new library - one new library per page. This generates many different GND, VCC symbols and then the net lists become unusable as each schematic page has different grounds, etc.
To work around this, I’ve copied/pasted imported schematic pages into a single larger sheet.
I’ll go through all the symbols and eliminate the duplicated symbols or select matching KiCad symbols. An alternative would be to put together a tool that could automate this mapping.
Once this is done I’ll test ‘Update Schematic from PCB’ and ‘Update PCB from Schematic’ functionality again and report back.
Attached is a screenshot of the generated symbol libraries - one library per imported page.
In KiCad’s own libraries, all power symbols create globally defined net names. As a result, all “GND” symbols on all sheets will belong to the same net. I am not sure what the altium importer does, but I guess it makes something resembling a power symbol, without it actually being a valid power symbol in the converted KiCad project. If this guess is correct, then replacing the imported power symbols with KiCad’s native power symbols will solve it.