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

Re: gEDA-user: Check for same refdes



> > Every Scheme backend should compile a list of refdeses it has seen
> > while netlisting, and then compare each refdes it encounters against
> > the previously seen list.
> 
> > I'll stick that into spice-sdb the next time I go around with it.  I
> > can make it emit a warning.
>  
> how about make a generic function in scheme which does this and
> a netlist backend can use it if it wants to?

Yeah, that's the right way to do it.  I can stick it into gnetlist.scm
(or whatever the shared file is named) & invoke it in spice-sdb.

> You know, it might be a good idea to come up with some routines
> to handle refdes name mangling too.  Why?  netlist format A might
> be case sensitive and netlist format B might not be.  Ra vs RA
> might then be unique for one backend and not another.  Length
> of refdes is another issue.
> 
> FWIW, this problem existed for net names too.  If you take a look
> at the switcap and futurenet backends you'll see a call like:
> 
>         ;; initialize the net-name aliasing
> 	(gnetlist:build-net-aliases futurenet2:map-net-names all-unique-nets)
> 
> at the beginning of the netlisting where futurenet2:map-net-names is the
> function which describes how to produce a valid futurenet2 net name from
> any geda netname.  Then later, if you want to output a netname, use
> 
> (gnetlist:alias-net "original_net_name")
> 
> You can go back with
> 
> (gnetlist:unalias-net "alised_net_name")
> 
> Oh, I think the pads backend uses this too.  The initialization function,
> gnetlist:build-net-aliases looks for name collisions as a result of the
> mapping.
> 
> I'd think this would be most useful for refdes's as well.  Shouldn't be
> hard.

I'll look at your manging code & see what I can do.

It'll take a little while for me to clear the decks of other projects,
but it's on the list.

Stuart