Main | News | Doc | People | Events & timeline | pcb-rnd

# pcb-rnd - the [ba] patches

Back annotation was a long standing missing functionality. There has been different suggestions, including:

- back annotation is not needed at all, the user can do it manually
- pcb should generate a new netlist, the user should run diff on the netlists and manually edit the schematics
- gschem should be able to load netlists emitted by PCB; or gnetlist could reverse-process such a netlist

The current implementation allows pcb-rnd users to make deliberate pin swapping and footprint replacement. The changes can be saved in a "netlist patch" format. A modified gschem can load these and present them as search results pointing to parts of the schematics that need to be changed. There is a demo video about how this happens in practice.

The modified gschem can be checked out from svn://repo.hu/geda-gaf-ba/trunk

The underlying mechanism is versatile and potentially allows more changes to be back annotated. These are not yet accessible due to the lack of PCB actions and GUI.

## Design decisions

This devlog entry functions as a design decision document. Another entry is a summary on how the feature ended up in a private feature-fork of gschem.

## save/load and compatibility

Deliberate changes are tracked so that a new forward annotation from the old schematics won't break them. To do this, pcb-rnd saves a NetListPatch() section in the file. Mainline PCB can not handle this section. Compatibility, by use case:

- 1. No back annotation is made in pcb-rnd: the file stays compatible
- 2. Back annotation is made in pcb-rnd, then the changes are done on the schematics and a forward annotation is also done: the netlist patch in pcb-rnd becomes empty so the pcb file is again compatible with mainline pcb; this is called resolution of netlist patches
- 3. There are unresolved netlist patches saved in pcb-rnd and the user attempts to load the pcb file in mainline pcb: syntax error (but no data loss); solution: resolve the netlist patch as described in point 2.
- 4. Cheat for situation 3.: manually remove the NetListPatch() section from the save file. This way the back annotation info is lost, but mainline pcb can load the file again. This action is sort of "revert back annotation".
- 5. Any file saved by mainline PCB can be opened by pcb-rnd, back annotation does not affect that.

## plans

Back annotation for further changes, e.g. value change, naming/renaming nets, etc.