gaf: Fix memory leak
[geda-gaf.git] / docs / wiki / geda-sn_readme.html
blob414b65cb2de0c40d0137288a65c678085ece6dbf
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>
13 <h1 id="switcapnetlisterreadme">Switcap netlister README</h1>
14 <div class="level1">
15 <pre class="code">-----------------------------------------------------------------
16 I. What is this?
17 -----------------------------------------------------------------
19 This archive contains a set of symbols and a netlister backend for the
20 gEDA to drive SWITCAP simulations. gEDA is the GNU EDA project and
21 includes a schematic capture tool and a highly flexible netlister.
22 The SWITCAP program is a switched capacitor circuit simulator.
24 -----------------------------------------------------------------
25 II. Overview
26 -----------------------------------------------------------------
28 The basic steps involved with using gEDA as the frontend for SWITCAP
29 simulations are:
31 - configure the gEDA symbol search path
32 - set the gEDA netlister backend search path
33 - create schematics of the circuit
34 - create an analysis file
35 - extract the netlist
36 - run the SWITCAP simulation
39 -----------------------------------------------------------------
40 III. Initial Setup
41 -----------------------------------------------------------------
42 1) Set your symbol search path for gschem and gnetlist by adding
43 the following line to the &#039;gschemrc&#039; and &#039;gnetlistrc&#039; files in
44 your project directory.
46 (component-library &quot;/path/to/sym/switcap&quot;)
48 If those files do not exist, then create them. You will need to
49 replace /path/to/sym/switcap with the directory name where you
50 have installed the .sym files.
52 2) Set the search path for scheme files for gnetlist by adding the
53 following line to your &#039;gnetlistrc&#039; file.
55 (scheme-directory &quot;/path/to/scheme&quot;)
57 You will need to replace /path/to/scheme with the path to where
58 you have installed the gnet-switcap.scm file.
60 3)
62 -----------------------------------------------------------------
63 IV. Creating Schematics
64 -----------------------------------------------------------------
66 --------------------
67 A. Required Symbols
68 --------------------
70 This section assumes you are familiar with using gschem to create and
71 edit schematics. SWITCAP netlisting is only supported for the
72 components contained in the SWITCAP symbol library as well as the
73 ground symbol found in the &#039;power&#039; library which comes with gEDA. All
74 allowed SWITCAP elements except for subcircuits are supported. You
75 _must_ include the following elements on your schematic:
77 - one instance of the switcap-timing symbol. This symbol will set the
78 master clock period for your simulations.
80 - one or more instances of the switcap-clock symbol. This symbol
81 defines a clock with a particular phase and period. The reference
82 designator of the clock symbol is used by the switches to set what
83 phase they switch on.
85 - one or more instances of the switcap-analysis symbol. This symbol
86 defines an analysis by specifying a file to include in the SWITCAP
87 netlist.
89 --------------------
90 B. Optional Symbols
91 --------------------
93 You can also optionally add the following SWITCAP special symbols to
94 your schematic:
96 - zero or one instance of the switcap-title symbol. This will add a
97 TITLE: line to the SWITCAP netlist and will appear in the output
98 file.
100 - zero or one instance of the switcap-options symbol. By editing the
101 OPTIONS attribute on this symbol you can set the various options
102 which can be passed to SWITCAP.
104 --------------------
105 C. Net Names
106 --------------------
108 When creating schematics to drive SWITCAP, you should name all nets
109 that you wish to plot. To avoid possible conflicts with unnamed nets,
110 you should avoid using purely numerical names for nets because
111 all unnamed nets will be assigned (somewhat randomly) numbers.
112 SWITCAP limits the length of node names to 7 characters.
114 --------------------
115 D. Switches
116 --------------------
118 When placing switches on your schematic, you will need to define
119 which clock they are controlled with. This is done by setting
120 the clock attribute on the switch to the reference designator
121 of the clock which should control it.
123 -----------------------------------------------------------------
124 V. Extracting the SWITCAP Netlist
125 -----------------------------------------------------------------
127 To extract the SWITCAP netlist, run
129 gnetlist -g switcap -o test.scn file1.sch [file2.sch ...]
131 For the example file contained in this archive, you can run:
133 gnetlist -g switcap -o example.scn ckt.sch clocks.sch analysis.sch
135 The netlist will be left in example.scn.
137 -----------------------------------------------------------------
138 VI. Running SWITCAP
139 -----------------------------------------------------------------
141 I typically use something like:
143 printf &quot;example.scn\nexample.out&quot; | sw
145 so I can use command history to rerun SWITCAP without having to
146 manually type the file names each time.
148 Refer to the SWITCAP manual for more details.
150 </pre>
152 </div>
153 </body>
154 </html>