gschem: Make promoted attributes visible by default
[geda-gaf.git] / docs / wiki / geda-gnetlist_ug-config.html
blob6808ceeb34ad103576b8e8c2ee8b2f74390cc97a
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"> &lt;&lt; <a href="geda-gnetlist_ug-implicitpins.html" class="wikilink2" title="geda-gnetlist_ug-implicitpins.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> &gt;&gt; </td>
16 </tr>
17 </table></div>
18 <!-- EDIT1 TABLE [1-129] -->
19 <h2 id="configuringgnetlist">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>
54 <h3 id="symbolandsourcelibraries">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 &quot;<code>gafrc</code>&quot; 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>
63 <h3 id="hierarchyprocessingoptions">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 &quot;mangling&quot; 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 &quot;/&quot; as the separator (so the component &quot;U1&quot; in the subcircuit &quot;A3&quot; becomes &quot;A3/U1&quot;). For component names (&quot;refdes&quot;), the <code>hierarchy-uref-order</code> and <code>hierarchy-uref-separator</code> functions can be used to change this. For example, to change the &quot;refdes&quot; mangling to prepend names at each level with the separator &quot;:&quot;, 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 &quot;U1&quot; in the subcircuit &quot;A3&quot; would be renamed to &quot;U1:A3&quot; by gnetlist.
78 </p>
80 <p>
81 The <code>hierarchy-uref-mangle</code> function can be used to turn off &quot;refdes&quot; 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 &quot;<code>netname=</code>&quot; attribute, and net names set using <a href="geda-gnetlist_ug-implicitpins.html" class="wikilink2" title="geda-gnetlist_ug-implicitpins.html">implicit pins</a> and the &quot;<code>net=</code>&quot; 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 &quot;<code>netname=</code>&quot; 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 &quot;<code>net=</code>&quot; 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>
106 <h3 id="automaticnetnaming">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 &quot;unnamed_net12345&quot;.
116 </p>
118 </div>
119 </body>
120 </html>