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

Re: gEDA-dev: get pin attribute by pinseq



Hi Stuart,

> > Should libgeda generate a uniq pinseq for all slots of a slotted
> > components?
> 
> This is the big question.  There are two ways I can get what I want:
> 
> 1.  Suppose the part has 5 pins in each slot, and has 4 slots.  Then
> allow pinseq = {1, 2, 3, 4, 5, 6, 7, 8, 9, .... 20} and have
> get_attribute_by_pinseq do a modulo(pinseq, number_of_slotted_pins)
> operation to figure out which pin is in question.
> 
> 2.  Add another arg to get-attribute-by-pinseq calling out the slot.
> Make it an optional arg; that is, if the user doesn't specify it, then
> it is assumed to be 1.  In this case, pinseq can be {1, 2, 3, 4, 5}. 
> Then gnetlist will use the slot and pinseq to figure out the desired pin.
> 

I'm not so convinced that option #1 is the way to go.  There might be
places that assume that the pinseq values are constants.  However,
perhaps this would be okay for slotted parts.  I would look at
o_attrib_slot_update in libgeda/src/o_attrib.c for where the pinnumbers
get updated based on the slotdef attribute.

Option #2 is interesting too.  You might want to generalize it a little
to be: given a set of attributes and a pinseq number, return the 
desired attribute.  Don't know if that would be useful to anybody else.

Option #1 might be the best overall though.  Give it a shot and see
what happens.

-Ales



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