Updated all pot/po files (via make update-po). Added new menus to rcstrings.c.
[geda-gaf/whiteaudio.git] / docs / wiki / geda_na_howto.html
blobe17f56018650cdb8e171a997e8eb8c53d3bd4e9f
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:na_howto</title>
8 <meta name="generator" content="DokuWiki Release rc2007-05-24" />
9 <meta name="robots" content="noindex,nofollow" />
10 <meta name="date" content="2007-05-24T22:27:25-0400" />
11 <meta name="keywords" content="geda,na_howto" />
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:na_howto?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:na_howto" />
18 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/_export/raw/geda:na_howto" />
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="#net_attribute_mini-howto" class="toc">net= attribute mini-HOWTO</a></span></div>
31 <ul class="toc">
32 <li class="level2"><div class="li"><span class="li"><a href="#what_is_the_net_attribute_used_for" class="toc">What is the net= attribute used for?</a></span></div></li>
33 <li class="level2"><div class="li"><span class="li"><a href="#what_is_the_format_of_the_net_attribute" class="toc">What is the format of the net= attribute?</a></span></div></li>
34 <li class="level2"><div class="li"><span class="li"><a href="#how_do_you_actually_use_the_net_attribute" class="toc">How do you actually use the net= attribute?</a></span></div></li>
35 <li class="level2"><div class="li"><span class="li"><a href="#caveats_bugs" class="toc">Caveats / Bugs</a></span></div></li>
36 <li class="level2"><div class="li"><span class="li"><a href="#example" class="toc">Example</a></span></div></li>
37 <li class="level2"><div class="li"><span class="li"><a href="#final_notes" class="toc">Final notes</a></span></div></li></ul>
38 </li></ul>
39 </div>
40 </div>
44 <h1><a name="net_attribute_mini-howto" id="net_attribute_mini-howto">net= attribute mini-HOWTO</a></h1>
45 <div class="level1">
47 <p>
48 by: Ales Hvezda
49 </p>
51 <p>
52 This document is released under <a href="http://www.gnu.org/copyleft/fdl.html" class="urlextern" title="http://www.gnu.org/copyleft/fdl.html" rel="nofollow">GFDL</a>
53 </p>
55 <p>
56 October 2nd, 2003
57 </p>
59 <p>
60 The information in this document is current as of 19991011.
61 </p>
63 </div>
64 <!-- SECTION "net= attribute mini-HOWTO" [1-216] -->
65 <h2><a name="what_is_the_net_attribute_used_for" id="what_is_the_net_attribute_used_for">What is the net= attribute used for?</a></h2>
66 <div class="level2">
68 <p>
69 The <strong><code>net=</code></strong> attribute is used to specify power, ground, and/or arbitrary nets in the gEDA system.<br/>
70 The <strong><code>net=</code></strong> attribute is used instead some of the other systems of specifying power/ground (such as having power/ground pins on symbols or power boxes). Some devices have lots of power/ground pins and having all of these pins on the symbol would increase its size and make it unmanageable. The <strong><code>net=</code></strong> attribute is the power/ground specification of choice in the gEDA system because of its simplicity and versatility. Now having said all this, you can have power/ground pins on a symbol, but gnetlist will probably not recognize these nets connected to these pins as separate power/ground nets. Please keep this in mind as you draw symbols.
71 </p>
73 </div>
74 <!-- SECTION "What is the net= attribute used for?" [217-1022] -->
75 <h2><a name="what_is_the_format_of_the_net_attribute" id="what_is_the_format_of_the_net_attribute">What is the format of the net= attribute?</a></h2>
76 <div class="level2">
78 <p>
79 Attributes in gEDA are simple text items which are in the form <code>name=value</code>. All proper attributes follow this form. Attribute names are always lower case, but the value can be upper or lower case. gnetlist and friends are case sensitive. Typically net/signal names by default are upper case.<br/>
80 Attribute can be attached to an object or in certain cases (like the <strong><code>net=</code></strong> attribute) can be free oating (not attached to anything). The free floating attributes are also called toplevel attributes.<br/>
81 The <strong><code>net=</code></strong> attribute is a text item which takes on the following form:
82 </p>
83 <pre class="code">net=signalname:pinname,pinname,pinname,...</pre>
85 <p>
86 where:
87 </p>
88 <table class="inline">
89 <tr>
90 <td> <strong><code>net=</code></strong> </td><td> The attribute name (always the same, lowercase) </td>
91 </tr>
92 <tr>
93 <td> signalname </td><td> The signal or net being defines (like +5V, GND, etc&hellip;) </td>
94 </tr>
95 <tr>
96 <td> pinname </td><td> The pin name (or number) which is assigned to this signal/net (or pin names/numbers) </td>
97 </tr>
98 </table>
101 The signalname cannot contain the &quot;:&quot; character (since it is a delimiter). The pinname is the pin name (A1, P2, D1, etc&hellip;) or pin number (1, 2, 5, 13, etc&hellip;). The pinname cannot contain the &quot;,&quot; character (since it is also a delimiter). pinnames are typically the same sort of numbers/names like the <code>pin#=#</code> attribute (if you are familiar with that attribute).<br/>
102 You can only have ONE signalname per <strong><code>net=</code></strong> attribute, but you can have as many pinnames/numbers as you want.
103 </p>
105 </div>
106 <!-- SECTION "What is the format of the net= attribute?" [1023-2446] -->
107 <h2><a name="how_do_you_actually_use_the_net_attribute" id="how_do_you_actually_use_the_net_attribute">How do you actually use the net= attribute?</a></h2>
108 <div class="level2">
111 You can place the <strong><code>net=</code></strong> attribute in several places. Here’s the list so far:
112 </p>
113 <ul>
114 <li class="level1"><div class="li"> Inside a symbol either as an attached attribute or an unattached attribute (toplevel attribute). Example which creates power/gnd nets: <strong><code>net=GND:7</code></strong> or <strong><code>net=+5V:14</code></strong></div>
115 </li>
116 <li class="level1"><div class="li"> Outside a symbol (which is instantiated on a schematic) attached as an attribute to override an existing <strong><code>net=</code></strong> created net/signal. Suppose a symbol has a <strong><code>net=GND:7</code></strong> inside it already; attaching this to the symbol: <strong><code>net=AGND:7</code></strong> overrides the GND net (on pin 7) calling it AGND and connects/associates it to pin 7.</div>
117 </li>
118 <li class="level1"><div class="li"> Outside or inside a symbol to connect a net to a visible pin automatically. This is still untested and still might have some undesirable (negative) side effects. Use with caution.</div>
119 </li>
120 <li class="level1"><div class="li"> Attached to one of those special power/gnd symbol (like vcc/gnd/vdd) and you can change what that symbol represents. You could change the ground symbol to create a net called DIGITAL GND without editing the symbol (<strong><code>net=DIGITAL_GND:1</code></strong>).<br/>
121 In the current symbol (19991011) library there are symbols named <strong>vdd-1.sym</strong>, <strong>vcc-1.sym</strong>, <strong>vee-1.sym</strong>, etc&hellip; which do not have a <strong><code>net=</code></strong> attribute inside, so you must attach the <strong><code>net=</code></strong> attribute yourself (in the schematic).<br/>
122 There also symbols named 5V-minus-1.sym, 12V-plus-1.sym, 9V-plus-1.sym, etc&hellip; which have the appropriate <strong><code>net=</code></strong> attribute in them already (can be overridden though). You can use these symbol as examples of how to use the <strong><code>net=</code></strong> attribute.<br/>
123 </div>
124 </li>
125 </ul>
128 You can have as many <strong><code>net=</code></strong> attributes as you want. Just remember that <strong><code>net=</code></strong> attributes attached to the outside of a symbol override any equivalent internal (inside the symbol) <strong><code>net=</code></strong> attributes. If you run into a case where this doesn’t work, please let <strong>ahvezdaATgeda.seul.org</strong>. In fact, send any bug reports to that individual.
129 </p>
131 </div>
132 <!-- SECTION "How do you actually use the net= attribute?" [2447-4387] -->
133 <h2><a name="caveats_bugs" id="caveats_bugs">Caveats / Bugs</a></h2>
134 <div class="level2">
137 The <strong><code>net=</code></strong> attribute/mechanism is fairly new, so there are bound to be bugs (many bugs). Here are some of the identified issues:
138 </p>
139 <ul>
140 <li class="level1"><div class="li"> As of 19991011 almost all of the symbols in the standard library do not have the <strong><code>net=</code></strong> attribute or any other power/ground specifiers. Hopefully this will be updated sometime (any volunteers?).</div>
141 </li>
142 <li class="level1"><div class="li"> Attach a special power symbol (vcc/gnd) to a already named net will alias (rename) that net to the signalname specified in the <strong><code>net=</code></strong> attribute (in/attached to the vcc/gnd symbol). You can override this (so the reverse is true) by playing with the “net-naming-priority”. Be careful with this. There might be other “aliasing” issues which have not been identified yet.</div>
143 </li>
144 <li class="level1"><div class="li"> Creating a <strong><code>net=</code></strong> attribute which associates a signal name with a pin which is already visible on the symbol, is probably a bad idea. This does work, but all the ramifications have not been explored yet.</div>
145 </li>
146 <li class="level1"><div class="li"> It is probably a bad idea to have the same <strong><code>net=</code></strong> attribute attached several times. Ales has not formalized what happens in this case. Just remember that the <strong><code>net=</code></strong> attribute on the outside of a symbol should override the internal one.</div>
147 </li>
148 </ul>
150 </div>
151 <!-- SECTION "Caveats / Bugs" [4388-5599] -->
152 <h2><a name="example" id="example">Example</a></h2>
153 <div class="level2">
156 Here’s a schematic which uses standard symbols (note: the 7400 does not have the <strong><code>net=</code></strong> attribute inside yet). This schematic consists of a 7400 with the <strong><code>net=</code></strong> attributes attached for power and ground, One of the input pins grounded using a gnd symbol and the other at a logic one using the vcc symbol (with an attached <strong><code>net=</code></strong> attribute). One of the input net is named, but as you will see, the netname is replaced by the <strong><code>net=</code></strong> signal name (see above for more info on this). The output is pulled up with a pull up resistor which has power specified using the +5V symbol.<br/>
158 </p>
159 <table class="inline">
160 <tr>
161 <td> <a href="_detail/geda_net.html" class="media" title="geda:net.jpg"><img src="_media/geda_net.jpg" class="media" title="net.jpg" alt="net.jpg" /></a> </td>
162 </tr>
163 </table>
164 <pre class="code">v 19991011
165 C 38700 58100 1 0 0 7400-1.sym
167 T 39000 59000 5 10 1 1 0
168 uref=U100
169 T 38900 59500 5 10 1 1 0
170 net=GND:7
171 T 38900 59300 5 10 1 1 0
172 net=+5V:14
174 N 38700 58800 37400 58800 4
176 T 37600 58900 5 10 1 1 0
177 netname=NETLABEL
179 N 37400 58800 37400 59200 4
180 N 38700 58400 37400 58400 4
181 N 37400 58000 37400 58400 4
182 C 37300 57700 1 0 0 gnd-1.sym
183 C 37200 59200 1 0 0 vcc-1.sym
185 T 36800 59200 5 10 1 1 0
186 net=+5V:1
188 N 40000 58600 41600 58600 4
190 T 41200 58700 5 10 1 1 0
191 netname=OUTPUT
193 C 40700 58800 1 90 0 resistor-1.sym
195 T 40800 59200 5 10 1 1 0
196 uref=R1
198 N 40600 58800 40600 58600 4
199 N 40600 59900 40600 59700 4
200 C 40400 59900 1 0 0 5V-plus-1.sym</pre>
203 <strong>gnetlist</strong> (using the geda netlist format) run using this sample schematic outputs this:
204 </p>
205 <pre class="code">START header
207 gEDA&#039;s netlist format
208 Created specifically for testing of gnetlist
210 END header
212 START components
214 R1 device=RESISTOR
215 U100 device=7400
217 END components
219 START renamed-nets
221 NETLABEL -&gt; +5V
223 END renamed-nets
225 START nets
227 +5V : R1 2, U100 14, U100 1
228 GND : U100 7, U100 2
229 OUTPUT : R1 1, U100 3
231 END nets</pre>
234 Notice how NETLABEL was renamed (aliased to the +5V net).
235 </p>
237 </div>
238 <!-- SECTION "Example" [5600-7377] -->
239 <h2><a name="final_notes" id="final_notes">Final notes</a></h2>
240 <div class="level2">
243 Send all bugs to <strong>ahvezdaATgeda.seul.org</strong> or <strong>geda-devATgeda.seul.org</strong> (mailing list, please subscribe first). [I’m sure there’s more to say here]
244 </p>
246 </div>
247 <!-- SECTION "Final notes" [7378-] --></div>
248 </body>
249 </html>