Re: gEDA-user: Strange problems in multi part symbols

2011-01-02 Thread kai-martin knaak
Oliver King-Smith wrote:

> I am continuing to have problems with multi part symbols.  Here
> 
> I have an op amp define as thus:
>
( snip )
> 
> When I try to use this op amp, the pin number show up wrong on the schematic. 
>  
> For slot 1 they show up as 1,2,1 (not 3,2,1).  When I try slot 2 I get 5,6,1 
> not 
> 5,6,7. 

The slotting mechanism expects the pinseq numbers to start at 1 and 
increment to the number of pins. It uses these numbers to map the 
sequences given in the slotdef string. The pin with pinseq=1 gets
mapped to the first number in the slotdef string. The second maps 
to the second number in the string and so on.

Your symbol has the pinseq attributes at 1, 2 and 5. The "5" is 
ignored since there are only three numbers in the slotdef string.
Thus it keeps its default value "1" no matter what slot is chosen.

Bottom line: A symbol with three pins should have the pinseq 
values "1", "2" and "3". Anything else confuses the slotting 
mechanism. 

Here is a corrected version of your symbol. Note, that the value
of the pin number attributes is ignored. For demonstration, I set 
them to some wild numbers.
/-
v 20100214 2
L 200 800 200 0 3 0 0 0 -1 -1
L 200 800 800 400 3 0 0 0 -1 -1
T 400 2600 5 10 0 0 0 0 1
device=SUBCIRCUIT
T 400 1100 5 10 0 0 0 0 1
slot=1
T 400 1700 5 10 0 0 0 0 1
numslots=2
T 400 1300 5 10 0 0 0 0 1
slotdef=1:1,2,3
T 400 1500 5 10 0 0 0 0 1
slotdef=2:5,6,7
L 800 400 200 0 3 0 0 0 -1 -1
L 300 650 300 550 3 0 0 0 -1 -1
L 250 600 350 600 3 0 0 0 -1 -1
L 250 200 350 200 3 0 0 0 -1 -1
P 0 600 200 600 1 0 0
{
T 150 650 5 8 1 1 0 6 1
pinnumber=111
T 150 550 5 8 0 1 0 8 1
pinseq=3
T 250 600 9 8 0 1 0 0 1
pinlabel=in+
T 250 600 5 8 0 1 0 2 1
pintype=in
}
P 0 200 200 200 1 0 0
{
T 150 250 5 8 1 1 0 6 1
pinnumber=222
T 150 150 5 8 0 1 0 8 1
pinseq=2
T 250 200 9 8 0 1 0 0 1
pinlabel=in-
T 250 200 5 8 0 1 0 2 1
pintype=in
}
P 800 400 1000 400 1 0 1
{
T 800 450 5 8 1 1 0 0 1
pinnumber=333
T 800 350 5 8 0 1 0 2 1
pinseq=1
T 750 400 9 8 0 1 0 6 1
pinlabel=out
T 750 400 5 8 0 1 0 8 1
pintype=out
}
T 700 600 8 10 1 1 0 0 1
refdes=U?
T 400 2800 5 10 0 0 0 0 1
description=operational amplifier
T 400 2400 5 10 0 0 0 0 1
symversion=0.1
T 400 1950 8 10 0 0 0 0 1
footprint=soic-08-d.fp
T 400 2200 8 10 0 0 0 0 1
file=./spice/OPA333.lib
\

---<)kaimartin(>---
-- 
Kai-Martin Knaak
Öffentlicher PGP-Schlüssel:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x6C0B9F53



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


Re: gEDA-user: Strange problems in multi part symbols

2011-01-02 Thread John Doty

On Jan 2, 2011, at 6:14 PM, Oliver King-Smith wrote:

>  Likewise spice back end also blows a
>   gasket trying with the pinseq numbers.  I thought the pin seq refers to
>   which position in the spice parameter list the pin refers to?
>   I was going to see if I could fix up the spice-sdb backend to handle
>   putting multi part symbols back together, but I think something might
>   be more fundamentally broken inside gschem.  Do folks have any
>   thoughts?

pinseq is overloaded. It is impossible to use slotted symbols for simulation. 
Stuart tried mightily to fix this and failed.

It could be fixed if the slot semantics were moved out of the core code. Then 
we could have the standard helpers in gnetlist.scm collect all slots for a 
given refdes into one package (for printed circuit flows) but simulation flows 
could separate slots into separate packages. This requires removing the special 
semantics for refdes from the core: the "same refdes, same package" rule is 
only appropriate for printed circuits.

Given that Stuart understood gschem and gnetlist better than most and put a lot 
of effort into fixing this, I believe that this cannot be fixed without more 
significant refactoring than he was willing to attempt. I don't think there's 
anything you can do in Guile alone to fix this.

John Doty  Noqsi Aerospace, Ltd.
http://www.noqsi.com/
j...@noqsi.com




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