[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: "Inherited" attributes view in gschem



Peter Clifton <pcjc2@xxxxxxxxx> wrote:

> What does the pinout file look like?

#pin name	pin number
A:1		1
B:1		2
Y:1		3
A:2		4
B:2		5
Y:2		6
GND		7
Y:3		8
A:3		9
B:3		10
Y:4		11
A:4		12
B:4		13
Vcc		14

> > 	PinToNet GND GND;
> > 	SymOnPin GND "gnd-1";
>
> What do last two lines above two lines do?

PinToNet connects the pin named GND to the net named GND, SymOnPin
illustrates that connection graphically.  uschem-netlist cares only
about the former, uschem-print cares only about the latter.  If only one
is present or if the two conflict, uschem-check will flag a DRC error if
run with the symbol files present.

The above is a good illustration of uEDA's principle of orthogonality:
the component information, the netlist (electrical interconnect)
information and the graphical information are kept orthogonal in the
schematic source code language.  One rule is that graphical symbols
(*.sym files) are merely a decoration and must not be needed for netlist
generation - thus uschem-netlist does not read them or look for them at
all; *.usch, MCL and pinout files must be sufficient for generating the
netlist for the circuit being described.

The symbol used with the SymOnPin decoration must have exactly one pin
and may not be rotated.  The SymOnPin trick is the only way in uschem to
have two abutting pins, i.e., two pins whose active ends are at exactly
the same (x,y) coordinates, otherwise that is not allowed.

Even though I have invented my own language for schematic sheets (*.usch),
the symbol (*.sym) format is basically borrowed from gschem with a few
tweaks.  Many gschem symbols may be used totally unchanged with uschem,
but some uschem symbols in the IFCTF part library use new uschem features.

Here is my 7400-1.sym:

L 300 200 300 800 3 0 0 0 -1 -1
L 300 800 700 800 3 0 0 0 -1 -1
L 300 200 700 200 3 0 0 0 -1 -1
A 700 500 300 270 180 3 0 0 0 -1 -1
V 1050 500 50 6 0 0 0 -1 -1 0 -1 -1 -1 -1 -1
P 1100 500 1300 500 1 0 1
{
T 1100 550 5 8 1 1 0 0 1
pinnumber=%d
T 950 500 9 8 0 1 0 6 1
pinname=Y
}
P 300 300 0 300 1 0 1
{
T 200 350 5 8 1 1 0 6 1
pinnumber=%d
T 350 300 9 8 0 1 0 0 1
pinname=B
}
P 300 700 0 700 1 0 1
{
T 200 750 5 8 1 1 0 6 1
pinnumber=%d
T 350 700 9 8 0 1 0 0 1
pinname=A
}

Here is my gnd-1.sym:

P 100 100 100 300 1 0 1
{
attr forcenet=GND
}
L 0 100 200 100 3 0 0 0 -1 -1
L 55 50 145 50 3 0 0 0 -1 -1
L 80 10 120 10 3 0 0 0 -1 -1

gschem's net= attribute (which I consider to be a horrendous kludge) can
never work in uschem because the *.sym files are excluded from the
netlist generation process by design.  All net connections must be
declared in the *.usch files using the Net object, the GraphNet object
or the PinToNet decoration.  If you want to make a net connection which
is not represented graphically (I'm not passing judgment on the wisdom
of doing so as uEDA follows the traditional UNIX philosophy of providing
mechanism, not policy), you can use the non-graphical Net object (legal
even in an otherwise graphical schematic sheet) or a PinToNet decoration
with no corresponding SymOnPin - if the pin in question isn't shown on
the symbol, that won't even be a DRC error.

The forcenet= attribute used in the decorative symbols such as gnd-1.sym
is only for DRC (uschem-check) and for the future graphical schematic
editor.

You can get a much better idea of how it all works by checking uEDA, my
part library and a sample board project out of my CVS:

cvs -d :pserver:anoncvs@xxxxxxxxxxxxxxxxxxx:/fs1/IFCTF-cvs co ueda ifctf-part-lib OSDCU

MS


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user