1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
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" />
13 <h1 id=
"verilognetlisterreadme">Verilog netlister README
</h1>
15 <pre class=
"code">Verilog netlister readme.
17 THIS IS FREE SOFTWARE, see the included file COPYING for more info.
21 This is the fifth release of the Verilog netlister for gEDA.
25 1) Escaped Verilog identifiers.
27 To facilitate board level simulations, the Verilog netlister now
28 outputs `escaped
' Verilog identifiers for any net, port or instance name
29 that does not appear to be a valid Verilog identifier. In this way,
30 chips with numbered pins can be netlisted and models constructed to run
31 digital simulations of complete circuits.
37 ----- OLDER README.verilog
's -----
39 This is the fourth release of the Verilog netlister for gEDA.
43 1) Multiple width wires.
45 How to use: (mostly taken from a previous readme... )
47 Here
's how to proceed to make a schematic that can be netlisted
50 1) Create your modules by the standard method, keep in mind
51 that you must supply a `pin#
' attribute for each port
52 you want to create in the generated verilog. gmk_sym is
55 2) Place each of your newly created modules on the
56 schematic. You may also place primitives from the
57 `verilog
' symbol library. Be sure to give a _unique_
58 `uref
' to every symbol you place on the schematic,
59 unless two symbols are actually different parts of the
60 same module, and the pins listed on each symbol do not
61 have any names in common. Otherwise they will not get
64 3) Connect nets between the modules you want. Remember, if
65 you want legible Verilog later, don
't forget to name all
66 your nets by attaching `label
' attributes to them. For
67 Multiple bit wires just use standard Verilog notation.
68 The netlister will figure out which bit ordering you
69 want. Be sure to have at least one net labeled with the
70 complete range expression, otherwise the netlister will
71 guess at whether you wanted net[
15:
0] or net[
0:
15] in
72 your declarations. Any inconsistent ranges will be
73 reported as a warning. Strings that appear to be
74 invalid Verilog identifiers will be printed with a
75 warning, but otherwise ignored. (If you get a warning
76 for a valid Verilog identifier, please post a bug
79 4) Insert IPAD
's, OPAD
's, and IOPAD
's for all the nets you
80 want to be visible in the module declaration statement.
81 It is especially important to make sure that the nets
82 you hook up to the pads are named, as the net names
83 could change from run to run, that
's a bad thing. (I/O
84 pads would be a good place to put the aformentionned
85 full range expressions. Range expressions on I/O pads
86 are ignored when outputting the module declaration, but
87 they are used in figuring out the final bit ranges.)
88 Every pad must have a unique uref, otherwise the
89 netlister will get confused.
91 5) Add an unattached attribute `module_name=Your_Module
'
92 somewhere on the schematic, near the title block is
93 good. This will name the generated Verilog module
98 7) Run the schematic through the netlister:
100 gnetlist -g verilog -o output.v schematic.sch
102 7a) Check the output for correctness, _especially_ if you got
103 any warnings. (There should be no warnings.)
105 8) Feed the netlist to your favorite simulator/synthesis tool.
111 This is the third release of the Verilog netlister for geda.
113 Fixed in this release:
115 1) Netlister no longer barfs if there are no
116 Input/Output/InOut ports on the module.
118 2) Module instantiation code much improved/cleaned up, mostly
119 due to g_netlist.c patch.
123 1) A whole wack-load of symbols, I created a C program that
124 generates n-input versions of and, nand, or, nor, xor, and
127 2) Modules instantiated with positional port connections.
128 Just add the attribute `VERILOG_PORTS=POSITIONAL
' to your
130 symbol file as an unattached attribute, or attach it to the
131 symbol on the schematic.
133 3) Added bufif?, notif?, not and buf symbols.
135 4) Added example of positional port module instantiation to
136 the example schematic
138 5) Added
7447 example schematic
142 1) Module instantiation parameters. (probably by an attribute)
145 Included in this tar-ball are three patch files against the
146 19990705 version of gEDA. Apply g_netlist.c.diff and
147 g_register.c.diff to the files in gnetlist/src/ and
148 gnetlist.scm.diff to gnetlist.scm in the gnetlist/scheme
149 directory. You may have to regenerate prototype.h, or manually
150 patch it. Replace the symbols in the sym/verilog directory
151 with the symbols in this distribution. (I have modified all of
152 the symbols to use the new unattached attribute convention for
153 device et al.) (if you have applied the patch I sent to the
154 mailing list that fixes netlisting a module with no ports, you
155 may have trouble applying the gnetlist.scm.diff patch.) Don
't
156 forget to do a `make all install
' after applying the patches.
158 Once again, to netlist the example schematics to verilog type:
159 (Assuming gnetlist has been patched and is properly installed.)
161 gnetlist -g verilog -o test.v examples/sch/test.sch
165 gnetlist -g verilog -o
7447.v examples/sch/
7447.sch
168 (This README was from
19990629)
169 Verilog netlister readme.
171 THIS IS FREE SOFTWARE, see the included file COPYING for more info.
173 This is the second release of the Verilog netlister for geda.
175 Fixed in this release:
177 1) The last comma in the argument list to instantiations and
178 module definitions is now suppressed
180 2) Better handling of `special
' components has been added
184 1) Continuous assignments to
1'b0 and
1'b1 can now be
185 generated by connecting the `high
' or `low
' symbol to a
189 mjarabek@playground.net
196 This the verilog netlister for gEDA. Included in the tarball
197 are several diff files against the
19990327 gEDA distribution. All of
198 the patches apply to the gnetlist subirectory. You should be able to
199 apply them with `patch -p1
'.
201 The netlister has its limitations: (most of these will
202 eventually get fixed, I hope..)
204 1) Components connected by reference, (i.e. by having named
205 net stubs attached to pins, but not conected by a
206 continuous line) create duplicate entries in the wire
207 declaration section of the verilog code.
209 2) Multiple width wires don
't work. (Busses will help
212 3) There is no way to force a signal to
1,
0,z,x (yet).
214 4) Some scheme code needs to be improved. (Mainly the
215 classification code, it inserts `()
' elements into the
216 output lists. (I should know how to fix this in a day or
217 two.. too bad I never got a scheme course before..))
219 5) I don
't know if this will work on multiple page schematics.
221 6) The top level module is outputted with the same name
222 every time, I don
't currently think there is a way to
223 get at the name of the top level schematic.
226 The netlister does some neat things:
229 1) It outputs a verilog module with proper port
230 declarations, outputs are declared as outputs, inputs
231 are declared as inputs, and bidirectional signals are
234 2) All nets that are found on the design are declared as
235 wires. (This is to allow for net attributes later to
236 declare wand
's and such)
238 3) Any components placed on the schematic that are given
239 uref attributes create a verilog instantiation for the
240 name of the module as stored in the `device
' attribute,
241 the instatiated name is given as the `uref
' attribute.
243 4) All connections into and out of instantiated modules are
244 made by name, and not by order, because I can
't be sure
245 that the order will be right coming off the schematic.
246 (anyway, that
's better for the long run.)
248 5) A comment is inserted at the top of the module to say
249 that the file was automatically generated.
253 Here
's how to proceed to make a schematic that can be netlisted
256 1) Create your modules by the standard method, keep in mind
257 that you must supply a `pin#
' attribute for each port
258 you want to create in the generated verilog. gmk_sym is
259 useful for this (with the patch to allow ascii pin names).
261 2) Place each of your newly created modules on the
264 3) Connect nets between the modules you want. Remember, if
265 you want legible verilog later, don
't forget to name all
266 your nets by attaching `label
' attributes to them.
268 4) Insert IPAD
's, OPAD
's, and IOPAD
's for all the nets you
269 want to be visible in the module declaration statement.
270 It is especially important to make sure that the nets
271 you hook up to the pads are named, as the net names
272 could change from run to run, that
's a bad thing.
276 6) Run the schematic through the netlister:
278 gnetlist -g verilog -o output.v schematic.sch
280 6a) Edit the output file to have the right module name, and
281 to remove any duplicate wires.
284 There is an example schematic in the schematic directory, and a
285 copy of the verilog netlist generated.
289 The I/O ports for the module are detected by enumerating all of
290 the nets attached to any symbol bearing the device name of `IPAD
',
291 `OPAD
', or `IOPAD
'. If you name one of your blocks with that
292 name, don
't be surprised if you find `extra
' ports in the module
295 The wires are declared by walking through the list of nets
296 returned by the function that I patched into gnetlist. This is
297 the source of the duplicate wire declarations. This should
298 probably get fixed when `net_is_duplicate
' gets set for
299 connections made by reference.
301 Module instantiations are created by enumerating the pins found on
302 a symbol and connecting the nets found to the pins. If your block
303 has spelling errors, then the module instantiation won
't work.
304 You will have to manually trace back to find the error.
311 ------------ Below is the previous version README -------------------
313 Verilog netlister readme.
315 THIS IS FREE SOFTWARE, see the included file COPYING for more info.
318 This the verilog netlister for gEDA. Included in the tarball
319 are several diff files against the
19990327 gEDA distribution. All of
320 the patches apply to the gnetlist subirectory. You should be able to
321 apply them with `patch -p1
'.
323 [ editor
's note, if you are reading this file in a gEDA dist, then all
324 the required patching and integration is already done ]
326 The netlister has its limitations: (most of these will
327 eventually get fixed, I hope..)
329 1) Components connected by reference, (i.e. by having named
330 net stubs attached to pins, but not conected by a
331 continuous line) create duplicate entries in the wire
332 declaration section of the verilog code.
334 2) Multiple width wires don
't work. (Busses will help
337 3) There is no way to force a signal to
1,
0,z,x (yet).
339 4) Some scheme code needs to be improved. (Mainly the
340 classification code, it inserts `()
' elements into the
341 output lists. (I should know how to fix this in a day or
342 two.. too bad I never got a scheme course before..))
344 5) I don
't know if this will work on multiple page schematics.
346 6) The top level module is outputted with the same name
347 every time, I don
't currently think there is a way to
348 get at the name of the top level schematic.
351 The netlister does some neat things:
354 1) It outputs a verilog module with proper port
355 declarations, outputs are declared as outputs, inputs
356 are declared as inputs, and bidirectional signals are
359 2) All nets that are found on the design are declared as
360 wires. (This is to allow for net attributes later to
361 declare wand
's and such)
363 3) Any components placed on the schematic that are given
364 uref attributes create a verilog instantiation for the
365 name of the module as stored in the `device
' attribute,
366 the instatiated name is given as the `uref
' attribute.
368 4) All connections into and out of instantiated modules are
369 made by name, and not by order, because I can
't be sure
370 that the order will be right coming off the schematic.
371 (anyway, that
's better for the long run.)
373 5) A comment is inserted at the top of the module to say
374 that the file was automatically generated.
378 Here
's how to proceed to make a schematic that can be netlisted
381 1) Create your modules by the standard method, keep in mind
382 that you must supply a `pin#
' attribute for each port
383 you want to create in the generated verilog. gmk_sym is
384 useful for this (with the patch to allow ascii pin names).
386 2) Place each of your newly created modules on the
389 3) Connect nets between the modules you want. Remember, if
390 you want legible verilog later, don
't forget to name all
391 your nets by attaching `label
' attributes to them.
393 4) Insert IPAD
's, OPAD
's, and IOPAD
's for all the nets you
394 want to be visible in the module declaration statement.
395 It is especially important to make sure that the nets
396 you hook up to the pads are named, as the net names
397 could change from run to run, that
's a bad thing.
401 6) Run the schematic through the netlister:
403 gnetlist -g verilog -o output.v schematic.sch
405 6a) Edit the output file to have the right module name, and
406 to remove any duplicate wires.
409 There is an example schematic in the schematic directory, and a
410 copy of the verilog netlist generated.
414 The I/O ports for the module are detected by enumerating all of
415 the nets attached to any symbol bearing the device name of `IPAD
',
416 `OPAD
', or `IOPAD
'. If you name one of your blocks with that
417 name, don
't be surprised if you find `extra
' ports in the module
420 The wires are declared by walking through the list of nets
421 returned by the function that I patched into gnetlist. This is
422 the source of the duplicate wire declarations. This should
423 probably get fixed when `net_is_duplicate
' gets set for
424 connections made by reference.
426 Module instantiations are created by enumerating the pins found on
427 a symbol and connecting the nets found to the pins. If your block
428 has spelling errors, then the module instantiation won
't work.
429 You will have to manually trace back to find the error.