Downloaded and integrated latest wiki documentation from the geda website.
[geda-gaf/peter-b.git] / docs / wiki / geda_faq-attribs.html
blob66622730c1135dad129fe96f509084a1c4404e0e
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
4 lang="en" dir="ltr">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <title>geda:faq-attribs</title>
8 <meta name="generator" content="DokuWiki Release rc2007-05-24" />
9 <meta name="robots" content="index,follow" />
10 <meta name="date" content="2007-05-24T22:27:26-0400" />
11 <meta name="keywords" content="geda,faq-attribs" />
12 <link rel="search" type="application/opensearchdescription+xml" href="http://geda.seul.org/wiki/lib/exe/opensearch.php" title="geda Wiki" />
13 <link rel="start" href="http://geda.seul.org/wiki/" />
14 <link rel="contents" href="http://geda.seul.org/wiki/geda:faq-attribs?do=index" title="Index" />
15 <link rel="alternate" type="application/rss+xml" title="Recent Changes" href="http://geda.seul.org/wiki/feed.php" />
16 <link rel="alternate" type="application/rss+xml" title="Current Namespace" href="http://geda.seul.org/wiki/feed.php?mode=list&ns=geda" />
17 <link rel="alternate" type="text/html" title="Plain HTML" href="http://geda.seul.org/wiki/_export/xhtml/geda:faq-attribs" />
18 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/_export/raw/geda:faq-attribs" />
19 <link rel="stylesheet" media="all" type="text/css" href="lib/exe/css" />
20 <link rel="stylesheet" media="screen" type="text/css" href="lib/exe/001css" />
21 <link rel="stylesheet" media="print" type="text/css" href="lib/exe/002css" />
22 </head>
23 <body>
24 <div class="dokuwiki export">
25 <div class="toc">
26 <div class="tocheader toctoggle" id="toc__header">Table of Contents</div>
27 <div id="toc__inside">
29 <ul class="toc">
30 <li class="level1"><div class="li"><span class="li"><a href="#bom_generation" class="toc">BOM generation</a></span></div>
31 <ul class="toc">
32 <li class="level2"><div class="li"><span class="li"><a href="#i_have_created_a_new_design._how_do_i_create_a_bom" class="toc">I have created a new design. How do I create a BOM?</a></span></div></li>
33 </ul>
34 </li>
35 <li class="level1"><div class="li"><span class="li"><a href="#drcs" class="toc">DRCs</a></span></div>
36 <ul class="toc">
37 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_check_my_schematics" class="toc">How do I check my schematics?</a></span></div></li>
38 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_see_the_drc_output_in_the_screen_without_writing_to_a_file" class="toc">How do I see the DRC output in the screen, without writing to a file?</a></span></div></li>
39 <li class="level2"><div class="li"><span class="li"><a href="#i_want_to_disable_some_of_the_schematic_drc_checks._how_can_i_do_it" class="toc">I want to disable some of the schematic DRC checks. How can I do it?</a></span></div></li>
40 <li class="level2"><div class="li"><span class="li"><a href="#can_i_include_the_drc_checking_into_a_makefile_and_stop_when_errors_or_warnings_are_found" class="toc">Can I include the DRC checking into a Makefile and stop when errors or warnings are found?</a></span></div></li>
41 <li class="level2"><div class="li"><span class="li"><a href="#there_are_some_warnings_in_my_design_i_m_aware_of._can_i_ignore_the_warnings_in_the_return_value" class="toc">There are some warnings in my design I&#039;m aware of. Can I ignore the warnings in the return value?</a></span></div></li>
42 </ul>
43 </li>
44 <li class="level1"><div class="li"><span class="li"><a href="#attribute_management" class="toc">Attribute management</a></span></div>
45 <ul class="toc">
46 <li class="level2"><div class="li"><span class="li"><a href="#help_my_design_has_hundreds_of_components_and_it_s_a_pain_to_use_gschem_to_attach_all_my_attributes" class="toc">Help! My design has hundreds of components, and it&#039;s a pain to use gschem to attach all my attributes!</a></span></div></li>
47 <li class="level2"><div class="li"><span class="li"><a href="#how_do_i_know_what_footprint_name_to_use_for_layout_using_pcb" class="toc">How do I know what footprint name to use for layout using PCB?</a></span></div></li></ul>
48 </li></ul>
49 </div>
50 </div>
54 <h1><a name="bom_generation" id="bom_generation">BOM generation</a></h1>
55 <div class="level1">
57 </div>
58 <!-- SECTION "BOM generation" [1-30] -->
59 <h2><a name="i_have_created_a_new_design._how_do_i_create_a_bom" id="i_have_created_a_new_design._how_do_i_create_a_bom">I have created a new design. How do I create a BOM?</a></h2>
60 <div class="level2">
62 <p>
63 There are as many ways to export a BOM from your design as there are gEDA developers. Indeed, there are five or six different backends for gnetlist which enable you to export a BOM. Therefore, it’s easy for the newbie to be confused about which approach to use. A good, simple, and reasonably complete method is this:
64 </p>
65 <ul>
66 <li class="level1"><div class="li"> Create a file called “attribs” in your project directory. In this file, place each attrib whose value you wish to export on a separate line. Here’s an example:<pre STYLE="background : Lightgreen;margin-left : 2em"><font size="+0">value
67 Mfr
68 Mfr_PN
69 Vendor
70 Vendor_PN</font></pre></div>
71 </li>
72 <li class="level1"><div class="li"> Netlist your design using the following command:<br/>
73 <br/>
74 <code>gnetlist -v -g bom2 -o MyDesign.bom MyDesign.sch</code> <br/>
75 <br/>
76 Note that the <strong><code>-v</code></strong> flag will provide a verbose spew telling you what is going in gnetlist while it is running. This can be useful if you need to diagnose a problem with netlisting.</div>
77 </li>
78 <li class="level1"><div class="li"> With this command, gnetlist will dump a BOM into the file “MyDesign.bom”. The BOM items will be separated using a “:” (colon) character. You may then read this file into any spreadsheet program. Make sure to import the BOM as a .csv file, and specify the “:” character as the item separator.</div>
79 </li>
80 </ul>
82 <p>
83 Many other methods to create BOMs exist. Perhaps other geda-users will post their favorite methods here?!?!?
84 </p>
86 </div>
87 <!-- SECTION "I have created a new design. How do I create a BOM?" [31-1355] -->
88 <h1><a name="drcs" id="drcs">DRCs</a></h1>
89 <div class="level1">
91 </div>
92 <!-- SECTION "DRCs" [1356-1374] -->
93 <h2><a name="how_do_i_check_my_schematics" id="how_do_i_check_my_schematics">How do I check my schematics?</a></h2>
94 <div class="level2">
96 <p>
97 You can check your schematics using the drc2 gnetlist’s backend. It will check your schematics for some common errors, like duplicate references, unconnected pins, unused slots and more.
98 </p>
101 Run the drc2 backend with the following command:
102 </p>
103 <pre class="code">gnetlist -g drc2 -o MyDesign.drc MyDesign.sch</pre>
106 With this command, the DRC output is written into the file “MyDesign.drc”. You can then view this file with a text editor and see the DRC warnings and errors.
107 </p>
109 </div>
110 <!-- SECTION "How do I check my schematics?" [1375-1879] -->
111 <h2><a name="how_do_i_see_the_drc_output_in_the_screen_without_writing_to_a_file" id="how_do_i_see_the_drc_output_in_the_screen_without_writing_to_a_file">How do I see the DRC output in the screen, without writing to a file?</a></h2>
112 <div class="level2">
115 Run the drc2 backend with the following command:
116 </p>
117 <pre class="code">gnetlist -g drc2 -o - MyDesign.sch</pre>
120 This way, you will see the DRC output directly in your screen.
121 </p>
123 </div>
124 <!-- SECTION "How do I see the DRC output in the screen, without writing to a file?" [1880-2123] -->
125 <h2><a name="i_want_to_disable_some_of_the_schematic_drc_checks._how_can_i_do_it" id="i_want_to_disable_some_of_the_schematic_drc_checks._how_can_i_do_it">I want to disable some of the schematic DRC checks. How can I do it?</a></h2>
126 <div class="level2">
129 The drc2 backend is highly configurable. You have to put some special commands into a file and use the “-l” option of gnetlist with it.
130 </p>
133 The most common commands are:
134 </p>
135 <ul>
136 <li class="level1"><div class="li"> (define dont-check-non-numbered-parts 1) ;; Disable the non-numbered parts check</div>
137 </li>
138 <li class="level1"><div class="li"> (define dont-check-duplicated-references 1) ;; Disable the duplicate references check</div>
139 </li>
140 <li class="level1"><div class="li"> (define dont-check-one-connection-nets 1) ;; Disable the check for nets with only one connection.</div>
141 </li>
142 <li class="level1"><div class="li"> (define dont-check-pintypes-of-nets 1) ;; Disable the pintype check</div>
143 </li>
144 <li class="level1"><div class="li"> (define dont-check-not-driven-nets 1) ;; Disable the driven net check</div>
145 </li>
146 <li class="level1"><div class="li"> (define dont-check-unconnected-pins 1) ;; Disable the unconnected pins check</div>
147 </li>
148 <li class="level1"><div class="li"> (define dont-check-duplicated-slots 1) ;; Disable the duplicated slots check</div>
149 </li>
150 <li class="level1"><div class="li"> (define dont-check-unused-slots 1) ;; Disable the unused slots check</div>
151 </li>
152 <li class="level1"><div class="li"> (define dont-check-slots 1) ;; Disable slot number check</div>
153 </li>
154 <li class="level1"><div class="li"> (define action-unused-slots #\w) ;; Output an unused slots as a warning</div>
155 </li>
156 <li class="level1"><div class="li"> (define action-unused-slots #\e) ;; Output an unused slots as an error</div>
157 </li>
158 <li class="level1"><div class="li"> (define action-unused-slots #\c) ;; An unused slot is OK.</div>
159 </li>
160 <li class="level1"><div class="li"> (define case_insensitive 1) ;; Do all checks case insensitive</div>
161 </li>
162 </ul>
165 There are some other advanced commands, to modify the DRC matrix and the pintype which can drive a net. See the backend file “gnet-drc2.scm” with a text editor. At the beginning there is the available documentation.
166 </p>
169 Copy the above lines you want into a file (for example “drc_rules.txt”), one per line, and run the drc checker:
170 </p>
171 <pre class="code">gnetlist -g drc2 -l drc_rules.txt -o MyDesign.drc MyDesign.sch</pre>
174 With this command, the DRC output is written into the file “MyDesign.drc”. You can then view this file with a text editor and see the DRC warnings and errors.
175 </p>
177 </div>
178 <!-- SECTION "I want to disable some of the schematic DRC checks. How can I do it?" [2124-3952] -->
179 <h2><a name="can_i_include_the_drc_checking_into_a_makefile_and_stop_when_errors_or_warnings_are_found" id="can_i_include_the_drc_checking_into_a_makefile_and_stop_when_errors_or_warnings_are_found">Can I include the DRC checking into a Makefile and stop when errors or warnings are found?</a></h2>
180 <div class="level2">
183 Yes. The drc2 backend will return an error if there are errors or warnings, so you can add the following to your Makefile:
184 </p>
185 <pre class="code">$(objects).drc : $(objects).sch
186 gnetlist -g drc2 $(objects).sch -o $(objects).drc</pre>
189 If you are going to simulate your design, then you can add the following to your Makefile:
190 </p>
191 <pre class="code">$(objects).cir : $(objects).sch $(objects).drc
192 grep -v ERROR $(objects).drc &gt;/dev/null 2&gt;&amp;1
193 gnetlist -g spice-sdb $(objects).sch -o $(objects).cir</pre>
196 If not, please use the above example and adapt it to your own workflow.
197 </p>
199 </div>
200 <!-- SECTION "Can I include the DRC checking into a Makefile and stop when errors or warnings are found?" [3953-4630] -->
201 <h2><a name="there_are_some_warnings_in_my_design_i_m_aware_of._can_i_ignore_the_warnings_in_the_return_value" id="there_are_some_warnings_in_my_design_i_m_aware_of._can_i_ignore_the_warnings_in_the_return_value">There are some warnings in my design I&#039;m aware of. Can I ignore the warnings in the return value?</a></h2>
202 <div class="level2">
205 Use the “-O ignore-warnings-in-return-value” option:
206 </p>
207 <pre class="code">gnetlist -g drc2 -o - MyDesign.sch -O ignore-warnings-in-return-value</pre>
210 Do this with caution! You will be missing all the warnings!
211 </p>
213 </div>
214 <!-- SECTION "There are some warnings in my design I'm aware of. Can I ignore the warnings in the return value?" [4631-4942] -->
215 <h1><a name="attribute_management" id="attribute_management">Attribute management</a></h1>
216 <div class="level1">
218 </div>
219 <!-- SECTION "Attribute management" [4943-4978] -->
220 <h2><a name="help_my_design_has_hundreds_of_components_and_it_s_a_pain_to_use_gschem_to_attach_all_my_attributes" id="help_my_design_has_hundreds_of_components_and_it_s_a_pain_to_use_gschem_to_attach_all_my_attributes">Help! My design has hundreds of components, and it&#039;s a pain to use gschem to attach all my attributes!</a></h2>
221 <div class="level2">
224 The answer here is the gEDA/gaf utility “gattrib”. Gattrib is an attribute editor for gEDA. It reads your .sch file(s) and creates a spreadsheet showing all components, nets, and pins in rows, with the associated attributes listed in the columns. Gattrib allows you to add, modify, or delete attributes outside of gschem, and then save the .sch files back out. Here’s a screenshot:
225 </p>
228 <a href="_detail/geda_faq_attrib.html" class="media" title="geda:faq_attrib.jpg"><img src="_media/geda_faq_attrib.jpg" class="media" title="faq_attrib.jpg" alt="faq_attrib.jpg" /></a>
229 </p>
232 Note that gattrib is the gEDA Project’s current answer to the question of heavy symbols. That is, rather than putting all attributes (such as SPICE model files, footprint names, manufacturer part nos and the like), you are encouraged to put this information into your schematic using gattrib, where it is visible and easily manipulable with gattrib.
233 </p>
236 When using gattrib, make sure you exit gschem first. Gattrib and gschem both save your work into the same file, so you should have only one program running at a time to avoid conflicts. There is no lockfile mechanism in gEDA/gaf (yet), so it’s your responsibility to avoid conflicts.
237 </p>
239 </div>
240 <!-- SECTION "Help! My design has hundreds of components, and it's a pain to use gschem to attach all my attributes!" [4979-6148] -->
241 <h2><a name="how_do_i_know_what_footprint_name_to_use_for_layout_using_pcb" id="how_do_i_know_what_footprint_name_to_use_for_layout_using_pcb">How do I know what footprint name to use for layout using PCB?</a></h2>
242 <div class="level2">
245 <a href="geda_pcb_tips.html" class="wikilink1" title="geda:pcb_tips">Answered here</a>.
246 </p>
248 </div>
249 <!-- SECTION "How do I know what footprint name to use for layout using PCB?" [6149-] --></div>
250 </body>
251 </html>