Pin Table to Pseudo-schematic

The pins2gsch script converts a "tab-separated value" (TSV) file into a pseudo-schematic. The output is in legal gEDA schematic format, but is not in a form that gschem can usefully display or edit. The output can, however, serve as input to gnetlist or one of pcb's schematic importers.

Shell usage:
awk -f pins2gsch.awk input.tsv > output.sch
Makefile rule:
%.sch : %.tsv
	awk -f pins2gsch.awk $< > $@
Here's a fragment of an actual input file:
# All LVDS signals are here. Others are on J2.
#
J1	1	GND
#-
J1	20	VPCLK+	Command/HK clock
J1	2	VPCLK-
#-
J1	21	CCLK+	ASIC Cclk
J1	3	CCLK-
#-

The script ignores blank lines and lines that start with "#".

"TAB" characters separate fields.

The first field is the refdes.

The second field is the pinnumber.

The third field is the name of the net to be attached to the pin.

The script ignores additional fields (but see pins2tex).

The output file contains invisible embedded components with net= attributes that specify the connections.

Because these components lack other attributes (like footprint, for example), it is important to put a placeholder component in one of your normal schematics and attach the additional required attributes to it. I use a symbol that's simply a box with no pins, with the refdes and other attributes of the part attached. Because gnetlist misses such attributes unless they are attached to the first instance of a given refdes, it is important when netlisting to place the names of the pseudo-schematics produced by pins2gsch after the normal schematics in the argument list for the netlister.



Copyright 2010, all rights reserved unless specified otherwise.
gedasymbols.org is maintained by DJ Delorie