[ . . . . snip! . . . . .] > 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...
Personally, I am not in favor of requiring that numslots be defined for each part. I prefer the minimalist approach: the various tools should just work with the minimum number of attributes required. Requiring attributes over the most basic ones (DEVICE, REFDES) for proper operation of a tool is a PITA. Therefore, I'd rather just put the (define action-unused-slots \#c) into a file to be read by the DRC checker. Better would be if the DRC checker didn't look at slot errors unless directed to. (i.e. default is to not look for slot errors; you can override the default with a config file.) As an aisde: a useful gEDA tool might be an attribute editor program (gattrib) which reads in a schematic, finds all the components, and then shows them to the user via a spreadsheet interface. Each component would occupy a row, and the various attributes would occupy the columns, like this: REFDES DEVICE VALUE FOOTPRINT MODEL-NAME FILE U1 LM311 so8 LM311 /path/to/spice-model R1 RESISTOR 100K 0603 C1 CAPACITOR 1uF 0603 U2 LF356 LF356 so8 (This will look better if you use a constant spacing sized font.) Of course, other attributes would also appear in the following columns. Then, you could use gattrib to edit the attributes, and attach new ones easily. Right now, you've got to do a lot of clicking to use gschem to attach attributes to all the parts. This would be a lot easier, particularly for larger schematics. Another way to do this is to create a prog which reads .sch and .sym files and exports to gnumeric (or even creates whitespace deliminated .txt). A similar prog would be used to read the output spreadsheet format and stick the attribute values back into the .sch and .sym files. This would be very easy using Perl or Python. Well, this is a project for another day. > > Therefore, my question is: where does the define go? Are you > > assuming that we run gnetlist in interactive mode? > >=20 > 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 OK, I'll try that. Thank you! Stuart
