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

Re: gEDA-user: Hierarchy viewer and database proposal



El mar, 21-10-2003 a las 15:16, Stuart Brorson escribió:
[snip]
> Prompted by your posting, I went and looked at drc2.  I have been
> thinking about DRC checking for a while, and wanted something to check
> the parameters you check.  Your prog is excellent work!  It found a
> funky issue with one of my schematics (doubly named net) which I
> had overlooked.

I'm happy to see people like it. Since I wrote it, I have no comments
about it, so I thought it was not used. :-)

It can be improved. There's a thing I wanted to implement, but I didn't
know enough of gschem and gnetlist to do it: in many CAE tools, when
reporting a warning/error, the schematic page and the coordinates of the
error are reported to help the user find the bug. It may be useful, but
I didn't know if gschem and gnetlist were ready to do this.
> 
> One question:  When I ran it, it complained
> vociferously about parts lacking the slot attribute.  None of my parts
> are multislotted; most of them are simple surface-mount passives.
> Therefore, I don't need this check.  

The problem I had when writing the backend is that it should check for
unused slots (and generate a warning if you want), slots used twice, or
"phantom" slots used (using slot 3 when the part only have 2 slots), for
example.
There are attributes storing how many slots a package have (numslots)
and the slot used (slot), so these are the ones the backend should
check.
But in a schematic, a part may have no such attributes (your case), so
the backend will never know about this. This is why it complains if you
have parts with no slot and numslots attributes defined.
When placing a part, there are attributes which are defined
automatically, like refdes. I think that defining automatically numslots
and slot when placing a part will be an excellent solution, for both the
user and the backends. This is what I suggested, and Ales says he will
think about it...
The problem may arise with non-multislotted parts, like a resistor, but,
from my point of view, there is no such problem. For a resistor,
numslots = 1 (it only has one resistor per package), and slot = 1 (the
only possible value). The user will never complain about this, because
he already knows it, and the backend (specially the DRC) will be happy.

If your design mix non-multislotted with multislotted parts, you will
want the DRC check this, so just enabling/disabling that check is not
the right solution.

> 
> I read the comments in the scheme
> file about how to enable/disable various checks.  I am a little
> confused about how to do this, except to stick a 
> (define action-unused-slots \#c) somewhere in the scheme prog.  I
> tried to put this define into the gnetlistrc file, but that didn't
> work.
[snip]
> Therefore, my question is:  where does the define go?  Are you
> assuming that we run gnetlist in interactive mode?
> 
No, I don't assume that. For this purpose, I added the '-l' flag to
gnetlist. It loads an scheme file before executing the backend, so you
can put there the definitions of the DRC matrix, the checks you want to
pass, and so on. So, IIRC, if you have a file 'definitions.scm', you
have to execute:
	gnetlist -l definitions.scm -g drc2 schematic.sch -o output.drc

You can have as many definition files as you want, since you can use the
'-l' flag multiple times in the command line.

> A suggestion: if the "define" could live in the gnetlistrc file, that
> would be a fine thing.  

I don't think that. For some situations, I may want to pass some checks,
and for other situations, I may want to pass other ones.
In an ideal situation. You will want to pass all checks to ensure you
have a correct design before going further. And I think that is what you
want to do, if you had no "slot" problems.

> You could also enable/disable various checks
> using the command-line flag passing facility I put into gnetlist.scm
> if you wanted, although I think that this would be cumbersome because
> there are so many possible checks. . . .

There are many checks and I don't want to add many parameters to
gnetlist. I think that including a file with such definitions is a good
solution.

Hope this is enough to help you. Regards,

Carlos



---Publicidad--------------------------------------------------------
Únete a los miles de sin pareja en Meetic... ¡te vas a enamorar!
http://www.iespana.es/_reloc/email.meetic