John Doty

Checking for pin/refdes duplicates

  • gnet-check-duplicates.scm

    Usage

    gnetlist -g check-duplicates other-gnetlist-arguments

    This gnetlist back end finds duplicated refdes-pinnumber pairs. It emits a list of the duplicates to the standard error output. It yields an exit code of 1 if it has found any duplicates. Duplicates generally cause trouble for netlist generators, so this is a good check to run before you generate a netlist. Common causes of duplicates include erroneously duplicated refdes attributes, erroneously duplicated pinnumber attributes on a symbol, duplicate slots, and other errors in constructing composite devices from split symbols.

    You can also use this code from within another back end. Load the code using

    (load-from-path "gnet-check-duplicates.scm")

    Then, the expression:

    (find-duplicates (every-connection))

    will yield the list of duplicates.