refdes_renum: warn of possible number clash with non-conforming values
[geda-gaf/whiteaudio.git] / docs / wiki / geda-sn_readme.html
blobdc3013d5b8ba0ca89c00d3dc3c0b569ed5b069b1
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 <title></title>
6 <link rel="stylesheet" media="screen" type="text/css" href="./style.css" />
7 <link rel="stylesheet" media="screen" type="text/css" href="./design.css" />
8 <link rel="stylesheet" media="print" type="text/css" href="./print.css" />
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 </head>
12 <body>
15 <h1 class="sectionedit1009"><a name="switcap_netlister_readme" id="switcap_netlister_readme">Switcap netlister README</a></h1>
16 <div class="level1">
17 <pre class="code">-----------------------------------------------------------------
18 I. What is this?
19 -----------------------------------------------------------------
21 This archive contains a set of symbols and a netlister backend for the
22 gEDA to drive SWITCAP simulations. gEDA is the GNU EDA project and
23 includes a schematic capture tool and a highly flexible netlister.
24 The SWITCAP program is a switched capacitor circuit simulator.
26 -----------------------------------------------------------------
27 II. Overview
28 -----------------------------------------------------------------
30 The basic steps involved with using gEDA as the frontend for SWITCAP
31 simulations are:
33 - configure the gEDA symbol search path
34 - set the gEDA netlister backend search path
35 - create schematics of the circuit
36 - create an analysis file
37 - extract the netlist
38 - run the SWITCAP simulation
41 -----------------------------------------------------------------
42 III. Initial Setup
43 -----------------------------------------------------------------
44 1) Set your symbol search path for gschem and gnetlist by adding
45 the following line to the &#039;gschemrc&#039; and &#039;gnetlistrc&#039; files in
46 your project directory.
48 (component-library &quot;/path/to/sym/switcap&quot;)
50 If those files do not exist, then create them. You will need to
51 replace /path/to/sym/switcap with the directory name where you
52 have installed the .sym files.
54 2) Set the search path for scheme files for gnetlist by adding the
55 following line to your &#039;gnetlistrc&#039; file.
57 (scheme-directory &quot;/path/to/scheme&quot;)
59 You will need to replace /path/to/scheme with the path to where
60 you have installed the gnet-switcap.scm file.
62 3)
64 -----------------------------------------------------------------
65 IV. Creating Schematics
66 -----------------------------------------------------------------
68 --------------------
69 A. Required Symbols
70 --------------------
72 This section assumes you are familiar with using gschem to create and
73 edit schematics. SWITCAP netlisting is only supported for the
74 components contained in the SWITCAP symbol library as well as the
75 ground symbol found in the &#039;power&#039; library which comes with gEDA. All
76 allowed SWITCAP elements except for subcircuits are supported. You
77 _must_ include the following elements on your schematic:
79 - one instance of the switcap-timing symbol. This symbol will set the
80 master clock period for your simulations.
82 - one or more instances of the switcap-clock symbol. This symbol
83 defines a clock with a particular phase and period. The reference
84 designator of the clock symbol is used by the switches to set what
85 phase they switch on.
87 - one or more instances of the switcap-analysis symbol. This symbol
88 defines an analysis by specifying a file to include in the SWITCAP
89 netlist.
91 --------------------
92 B. Optional Symbols
93 --------------------
95 You can also optionally add the following SWITCAP special symbols to
96 your schematic:
98 - zero or one instance of the switcap-title symbol. This will add a
99 TITLE: line to the SWITCAP netlist and will appear in the output
100 file.
102 - zero or one instance of the switcap-options symbol. By editing the
103 OPTIONS attribute on this symbol you can set the various options
104 which can be passed to SWITCAP.
106 --------------------
107 C. Net Names
108 --------------------
110 When creating schematics to drive SWITCAP, you should name all nets
111 that you wish to plot. To avoid possible conflicts with unnamed nets,
112 you should avoid using purely numerical names for nets because
113 all unnamed nets will be assigned (somewhat randomly) numbers.
114 SWITCAP limits the length of node names to 7 characters.
116 --------------------
117 D. Switches
118 --------------------
120 When placing switches on your schematic, you will need to define
121 which clock they are controlled with. This is done by setting
122 the clock attribute on the switch to the reference designator
123 of the clock which should control it.
125 -----------------------------------------------------------------
126 V. Extracting the SWITCAP Netlist
127 -----------------------------------------------------------------
129 To extract the SWITCAP netlist, run
131 gnetlist -g switcap -o test.scn file1.sch [file2.sch ...]
133 For the example file contained in this archive, you can run:
135 gnetlist -g switcap -o example.scn ckt.sch clocks.sch analysis.sch
137 The netlist will be left in example.scn.
139 -----------------------------------------------------------------
140 VI. Running SWITCAP
141 -----------------------------------------------------------------
143 I typically use something like:
145 printf &quot;example.scn\nexample.out&quot; | sw
147 so I can use command history to rerun SWITCAP without having to
148 manually type the file names each time.
150 Refer to the SWITCAP manual for more details.
152 </pre>
154 </div>
155 </body>
156 </html>