Update wiki pages
[geda-gaf.git] / docs / wiki / geda-gnetlist_ug-config.html
blob376ad31d3aa6b1a97d17dcefcf57a3ffdba269a3
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html>
4 <head>
5 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
6 <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
7 <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10 </head>
11 <body>
12 <a href=.>start</a>&nbsp;=>&nbsp;<a href=geda-gnetlist_ug.html>gnetlist_ug</a></br>
13 <div class="table sectionedit1"><table class="inline">
14 <tr class="row0">
15 <td class="col0 leftalign"> « <a href="geda-gnetlist_ug-implicit_pins.html" class="wikilink1" title="geda-gnetlist_ug-implicit_pins.html">Implicit pins</a> </td><td class="col1 centeralign"> <strong><a href="geda-gnetlist_ug.html" class="wikilink1" title="geda-gnetlist_ug.html">gEDA gnetlist User Guide</a></strong> </td><td class="col2 rightalign"> <a href="geda-gnetlist_ug-command_line.html" class="wikilink1" title="geda-gnetlist_ug-command_line.html">Command-line arguments</a> » </td>
16 </tr>
17 </table></div>
18 <!-- EDIT1 TABLE [1-129] -->
19 <h2 class="sectionedit2" id="configuring_gnetlist">Configuring gnetlist</h2>
20 <div class="level2">
22 <p>
23 gnetlist loads a series of configuration files at start-up, if they exist:
24 </p>
25 <ol>
26 <li class="level1"><div class="li"> The suite&#039;s system configuration file, called <code>$PREFIX/share/gEDA/system-gafrc</code></div>
27 </li>
28 <li class="level1"><div class="li"> The suite&#039;s user configuration file, called <code>$HOME/.gEDA/gafrc</code></div>
29 </li>
30 <li class="level1"><div class="li"> A <code>gafrc</code> file in the current working directory.</div>
31 </li>
32 <li class="level1"><div class="li"> gnetlist&#039;s system configuration file, called <code>$PREFIX/share/gEDA/system-gnetlistrc</code></div>
33 </li>
34 <li class="level1"><div class="li"> gnetlist&#039;s user configuration file, called <code>$HOME/.gEDA/gnetlistrc</code></div>
35 </li>
36 <li class="level1"><div class="li"> A <code>gnetlistrc</code> file in the current working directory.</div>
37 </li>
38 </ol>
40 <p>
41 $PREFIX denotes the base installation directory for gnetlist (<code>/usr</code> on most systems), and $HOME denotes your home directory.
42 </p>
44 <p>
45 These files are scripts written in Scheme, and they are executed using a Scheme interpreter. This means that you can use the configuration files as a way of customising and extending gnetlist.
46 </p>
48 <p>
49 There are a very large number of options that affect the way gnetlist works, and only the most commonly-used are listed here. For a full list, see the <code>system-gnetlistrc</code> file installed with gEDA.
50 </p>
52 </div>
53 <!-- EDIT2 SECTION "Configuring gnetlist" [131-1199] -->
54 <h3 class="sectionedit3" id="symbol_and_source_libraries">Symbol and source libraries</h3>
55 <div class="level3">
57 <p>
58 When using gnetlist, it is very important that your symbol and source libraries are set up correctly. You will almost always want to put these settings in a suite configuration file (one of the “<code>gafrc</code>” files) so that the same libraries are used by gschem and gnetlist. For an explanation of how to set up symbol and source libraries, see the <a href="geda-gschem_ug-config.html" class="wikilink1" title="geda-gschem_ug-config.html">gEDA gschem User Guide</a>.
59 </p>
61 </div>
62 <!-- EDIT3 SECTION "Symbol and source libraries" [1200-1637] -->
63 <h3 class="sectionedit4" id="hierarchy_processing_options">Hierarchy processing options</h3>
64 <div class="level3">
66 <p>
67 When working with <a href="geda-gnetlist_ug-hierarchy.html" class="wikilink1" title="geda-gnetlist_ug-hierarchy.html">hierarchy</a>, gnetlist renames nets and components based on where in the hierarchy they occur. You can configure how this “mangling” is carried out, and disable it if necessary.
68 </p>
70 <p>
71 By default, gnetlist appends names at each level of hierarchy together, using “/” as the separator (so the component “U1” in the subcircuit “A3” becomes “A3/U1”). For component names (“refdes”), the <code>hierarchy-uref-order</code> and <code>hierarchy-uref-separator</code> functions can be used to change this. For example, to change the “refdes” mangling to prepend names at each level with the separator “:”, you could use:
72 </p>
73 <pre class="code">(hierarchy-uref-order &quot;prepend&quot;)
74 (hierarchy-uref-separator &quot;:&quot;)</pre>
76 <p>
77 Now “U1” in the subcircuit “A3” would be renamed to “U1:A3” by gnetlist.
78 </p>
80 <p>
81 The <code>hierarchy-uref-mangle</code> function can be used to turn off “refdes” mangling entirely:
82 </p>
83 <pre class="code">(hierarchy-uref-mangle &quot;disabled&quot;)</pre>
85 <p>
86 This is very rarely a useful thing to do.
87 </p>
89 <p>
90 Similar settings exist for net names set using the “<code>netname=</code>” attribute, and net names set using <a href="geda-gnetlist_ug-implicit_pins.html" class="wikilink1" title="geda-gnetlist_ug-implicit_pins.html">implicit pins</a> and the “<code>net=</code>” attribute.
91 </p>
92 <ul>
93 <li class="level1"><div class="li"> The <code>hierarchy-netname-order</code>, <code>hierarchy-netname-separator</code> and <code>hierarchy-netname-mangle</code> functions control “<code>netname=</code>” mangling.</div>
94 </li>
95 <li class="level1"><div class="li"> The <code>hierarchy-netattrib-order</code>, <code>hierarchy-netattrib-separator</code> and <code>hierarchy-netattrib-mangle</code> functions control “<code>net=</code>” mangling.</div>
96 </li>
97 </ul>
99 <p>
100 It is sometimes useful to turn off hierarchy processing entirely. You can do this with the <code>hierarchy-traversal</code> option:
101 </p>
102 <pre class="code">(hierarchy-traversal &quot;disabled&quot;)</pre>
104 </div>
105 <!-- EDIT4 SECTION "Hierarchy processing options" [1638-3241] -->
106 <h3 class="sectionedit5" id="automatic_net_naming">Automatic net naming</h3>
107 <div class="level3">
110 You can control how gnetlist automatically names nets that are not named in the schematic files using the <code>unnamed-netname</code> function. gnetlist will add a unique number to the end of the string you provide. For example:
111 </p>
112 <pre class="code">(unnamed-netname &quot;unnamed_net&quot;)</pre>
115 This would make gnetlist automatically give unnamed nets names of the form “unnamed_net12345”.
116 </p>
118 </div>
119 <!-- EDIT5 SECTION "Automatic net naming" [3242-] --></body>
120 </html>