Downloaded and integrated latest wiki documentation from the geda website.
[geda-gaf/whiteaudio.git] / docs / wiki / geda_sn_readme.html
blob70f3fefbe1ba75abc668eabb93795adde6b7d3d3
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:sn_readme</title>
8 <meta name="generator" content="DokuWiki Release rc2007-05-24" />
9 <meta name="robots" content="index,follow" />
10 <meta name="date" content="2007-05-24T22:27:24-0400" />
11 <meta name="keywords" content="geda,sn_readme" />
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:sn_readme?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:sn_readme" />
18 <link rel="alternate" type="text/plain" title="Wiki Markup" href="http://geda.seul.org/wiki/_export/raw/geda:sn_readme" />
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">
28 <h1><a name="switcap_netlister_readme" id="switcap_netlister_readme">Switcap netlister README</a></h1>
29 <div class="level1">
30 <pre class="code">-----------------------------------------------------------------
31 I. What is this?
32 -----------------------------------------------------------------
34 This archive contains a set of symbols and a netlister backend for the
35 gEDA to drive SWITCAP simulations. gEDA is the GNU EDA project and
36 includes a schematic capture tool and a highly flexible netlister.
37 The SWITCAP program is a switched capacitor circuit simulator.
39 -----------------------------------------------------------------
40 II. Overview
41 -----------------------------------------------------------------
43 The basic steps involved with using gEDA as the frontend for SWITCAP
44 simulations are:
46 - configure the gEDA symbol search path
47 - set the gEDA netlister backend search path
48 - create schematics of the circuit
49 - create an analysis file
50 - extract the netlist
51 - run the SWITCAP simulation
54 -----------------------------------------------------------------
55 III. Initial Setup
56 -----------------------------------------------------------------
57 1) Set your symbol search path for gschem and gnetlist by adding
58 the following line to the &#039;gschemrc&#039; and &#039;gnetlistrc&#039; files in
59 your project directory.
61 (component-library &quot;/path/to/sym/switcap&quot;)
63 If those files do not exist, then create them. You will need to
64 replace /path/to/sym/switcap with the directory name where you
65 have installed the .sym files.
67 2) Set the search path for scheme files for gnetlist by adding the
68 following line to your &#039;gnetlistrc&#039; file.
70 (scheme-directory &quot;/path/to/scheme&quot;)
72 You will need to replace /path/to/scheme with the path to where
73 you have installed the gnet-switcap.scm file.
75 3)
77 -----------------------------------------------------------------
78 IV. Creating Schematics
79 -----------------------------------------------------------------
81 --------------------
82 A. Required Symbols
83 --------------------
85 This section assumes you are familiar with using gschem to create and
86 edit schematics. SWITCAP netlisting is only supported for the
87 components contained in the SWITCAP symbol library as well as the
88 ground symbol found in the &#039;power&#039; library which comes with gEDA. All
89 allowed SWITCAP elements except for subcircuits are supported. You
90 _must_ include the following elements on your schematic:
92 - one instance of the switcap-timing symbol. This symbol will set the
93 master clock period for your simulations.
95 - one or more instances of the switcap-clock symbol. This symbol
96 defines a clock with a particular phase and period. The reference
97 designator of the clock symbol is used by the switches to set what
98 phase they switch on.
100 - one or more instances of the switcap-analysis symbol. This symbol
101 defines an analysis by specifying a file to include in the SWITCAP
102 netlist.
104 --------------------
105 B. Optional Symbols
106 --------------------
108 You can also optionally add the following SWITCAP special symbols to
109 your schematic:
111 - zero or one instance of the switcap-title symbol. This will add a
112 TITLE: line to the SWITCAP netlist and will appear in the output
113 file.
115 - zero or one instance of the switcap-options symbol. By editing the
116 OPTIONS attribute on this symbol you can set the various options
117 which can be passed to SWITCAP.
119 --------------------
120 C. Net Names
121 --------------------
123 When creating schematics to drive SWITCAP, you should name all nets
124 that you wish to plot. To avoid possible conflicts with unnamed nets,
125 you should avoid using purely numerical names for nets because
126 all unnamed nets will be assigned (somewhat randomly) numbers.
127 SWITCAP limits the length of node names to 7 characters.
129 --------------------
130 D. Switches
131 --------------------
133 When placing switches on your schematic, you will need to define
134 which clock they are controlled with. This is done by setting
135 the clock attribute on the switch to the reference designator
136 of the clock which should control it.
138 -----------------------------------------------------------------
139 V. Extracting the SWITCAP Netlist
140 -----------------------------------------------------------------
142 To extract the SWITCAP netlist, run
144 gnetlist -g switcap -o test.scn file1.sch [file2.sch ...]
146 For the example file contained in this archive, you can run:
148 gnetlist -g switcap -o example.scn ckt.sch clocks.sch analysis.sch
150 The netlist will be left in example.scn.
152 -----------------------------------------------------------------
153 VI. Running SWITCAP
154 -----------------------------------------------------------------
156 I typically use something like:
158 printf &quot;example.scn\nexample.out&quot; | sw
160 so I can use command history to rerun SWITCAP without having to
161 manually type the file names each time.
163 Refer to the SWITCAP manual for more details.
166 </pre>
168 </div>
169 </div>
170 </body>
171 </html>