[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gEDA-dev: Re: refdes renumbering
--Hi Rik, and all,
--
--
--I think we have to have one official version of refdes_renum, or
whatever you
--call it, along with the others. One can decide wich to use.
--I'm gonna see what Rik's code does. Anyways, thank you for the code!
--
--Rik!
--
--How do you plan to implement slots in your refdes renumber utility?
Even in commercial software that I have used slotted components aren't
handled particularly well. The last time I was using Viewlogic
assigning reference designators on a blank design would at least pack
all slotted components into the smallest number of reference
designators. For example, if you had 3 instantiations of a component
with only two slots it would put two of the instantiations together
under the same refdes and create a second refdes for the remaining
instantiation.
In pseudo-code.
read a schematic
find instantiations of components
look up symbol in symbol search tree
load symbol and find numslots attribute
if (!slotted)
continue to process refdes normally
else
search hash table to find if this component has been seen before
if (!seen)
assign refdes normally
record the component, refdes, and last slot # used in a hash table
else
assign the refdes used previously
add a slot= attribute to the schematic to change the component to
the correct slot
update the hash table with the last slot # used for that component
As you can see, the addition of this simple feature actually means a
fair amount of code. The existing code is line-oriented using regular
expressions and only performs substitutions on a single line. In order
to accomodate slotted components the program will have to understand
multi-line structures(instantiations), look up symbols in the symbol
search tree, and add slot= attributes to the schematic which may not
have existed previously. Perhaps there is not enough of a gain for all
that to be coded.
--Rik
_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev