1CodeGen::Gui(3)       User Contributed Perl Documentation      CodeGen::Gui(3)
2
3
4

NAME

6       Verilog::Codegen::Gui - Verilog code generator GUI
7

SYNOPSIS

9         $ ./gui.pl [design name]
10
11       The GUI and its utility scrips are in the "scripts" folder of the
12       distribution.
13
14       The design name is optional. If no design name is provided, the GUI
15       will check the .vcgrc file for one. If this file does not exists, the
16       design library module defaults to DeviceLibs/Verilog.pm and the objects
17       will reside directly under DeviceLibs/Objects. Otherwise, the design
18       library module will be DeviceLibs/YourDesign.pm  and the objects will
19       reside under DeviceLibs/YourDesign/Objects. You can also set the design
20       name via the GUI.
21

USAGE

23       The GUI is very simple to use. A short manual:
24
25       To create, test and run Verilog code using the Verilog::CodeGen GUI:
26
27   0. Choose your design.
28       In the Design text entry field, type the full name of the design. Click
29       Set.
30
31       If the design does not exist, it will be created, that is, an empty
32       structure with skeleton files will be created. Otherwise, the design
33       will be set to the entered value.
34
35   1. Create or edit the Device Object.
36       This is the Perl script that will generate the Verilog code.
37
38       ·   If this is a new file:
39
40           In the Device Object Code area text entry field, type the full name
41           of the script, including the ".pl" extension. Click Edit (hitting
42           return does not work). The GUI will create a skeleton from a
43           template, and open it in XEmacs.
44
45       ·   If the file already exists:
46
47           -If this was the last file to be modified previously, just click
48           Edit. The GUI will open the file in XEmacs.
49
50           -If not, type the beginning of the file in  the Device Object Code
51           text entry field, then click Edit. The GUI will open the first file
52           matching the pattern in XEmacs.
53
54   2. Test the object code
55       In the Device Object Code area, click Parse. This executes the script
56       and displays the output in the Output log window. Ticking the Show
57       result tick box will cause the output to be displayed in an XEmacs
58       window. To close this window, click Done. This is a modal window, in
59       other words it will freeze the main display as long as it stays open.
60
61   3. Add the Device Object to the Device Library
62       When the object code is bug finished, click Update in the Device
63       Library Module area. This will add the device object to the device
64       library (which is a Perl module). Ticking the Show module tick box will
65       cause the complete library module to be displayed in an XEmacs window.
66       To close this window, click Done. This is a modal window, in other
67       words it will freeze the main display as long as it stays open.
68
69   4. Create or edit the test bench code
70       This is the Perl script that will generate the Verilog testbench code.
71
72       ·   If this is a new file:
73
74           In the Testbench Code area text entry field, type the full name of
75           the script, including the ".pl" extension, click Edit. The GUI will
76           create a skeleton from a template, and open it in XEmacs.
77
78       ·   If the file already exists:
79
80           -If this was the last file to be modified previously, just click
81           Edit. The GUI will open the file in XEmacs.
82
83           -If not, type the beginning of the file in  the Device Object Code
84           text entry field.  The testbench must have the name "test_"[device
85           obect file name]. Then click Edit. The GUI will open the first file
86           matching the pattern in XEmacs.
87
88           -If the Overwrite tick box is ticked, the existing script will be
89           overwritten with the skeleton. This is usefull in case of major
90           changes to the device object code.
91
92   5. Test the testbench code
93       In the Testbench Code area, click Parse. This executes the script and
94       displays the output in the Output log window.
95
96       -Ticking the Show result tick box will cause the output to be displayed
97       in an XEmacs window. To close this window, click Done. This is a modal
98       window, in other words it will freeze the main display as long as it
99       stays open.
100
101       -Ticking the Inspect code tick box will open a browser window with
102       pages generated by the v2html Verilog to HTML convertor.
103
104       -Ticking the Run tick box will execute the generated testbench.
105
106       -Ticking the Plot tick box will plot the simulation results (if any
107       exist).
108

REQUIREMENTS

110       ·   Perl-Tk
111           (http://search.cpan.org/CPAN/authors/id/N/NI/NI-S/Tk-800.024.tar.gz
112           <http://search.cpan.org/CPAN/authors/id/N/NI/NI-
113           S/Tk-800.024.tar.gz>)
114
115           Otherwise, no GUI
116
117       ·   XEmacs (<http://xemacs.org>)
118
119           With gnuserv enabled, i.e. put the line (gnuserv-start) in your
120           .emacs. Without XEmacs, the GUI is rather useless.
121
122           For a better user experience, customize gnuserv to open files in
123           the active frame. By default, gnuserv will open a new frame for
124           every new file, and you end up with lots of frames.
125
126                     o Choose Options->Customize->Group
127                     o type gnuserv
128                     o Open the "Gnuserv Frame" section (by clicking on the arrow)
129                     o Tick "Use selected frame"
130
131           I also use the auto-revert-mode
132           <ftp://ftp.csd.uu.se/pub/users/andersl/emacs/autorevert.el> because
133           parsing the test bench code modifies it, and I got annoyed by
134           XEmacs prompting me for confirmation. See the file for details on
135           how to install.
136
137           The Verilog-mode (<http://www.verilog.com/>)is (obviously) very
138           usefull too.
139
140       ·   v2html (<http://www.burbleland.com/v2html/v2html.html>)
141
142           If you want to inspect the generated code, you need the v2html
143           Verilog to HTML convertor and a controllable browser, I use galeon
144           (<http://galeon.sourceforge.net>).
145
146       ·   A Verilog compiler/simulator
147
148           To run the testbench, I use Icarus Verilog
149           <http://icarus.com/eda/verilog/index.html>, a great open source
150           Verilog simulator.
151
152       ·   A VCD waveform viewer
153
154           To plot the results, I use GTkWave
155           (<http://www.cs.man.ac.uk/apt/tools/gtkwave/index.html>, a great
156           open source waveform viewer.
157
158   To use a different Verilog compiler/simulator and/or VCD viewer:
159       In CodeGen.pm, change the following lines:
160
161          #Modify this to use different compiler/simulator/viewer
162          my $compiler="/usr/bin/iverilog";
163          my $simulator="/usr/bin/vvp";
164          my $vcdviewer="/usr/local/bin/gtkwave";
165

TODO

167       ·   Convert the utility scripts to functions to be called from
168           Verilog::CodeGen.
169
170       ·   Put the GUI scripts in a module Gui.pm.
171

AUTHOR

173       W. Vanderbauwhede wim@motherearth.org.
174
175       <http://www.comms.eee.strath.ac.uk/~wim>
176
178       Copyright (c) 2002,2003 Wim Vanderbauwhede. All rights reserved. This
179       program is free software; you can redistribute it and/or modify it
180       under the same terms as Perl itself.
181
182
183
184perl v5.12.0                      2003-05-09                   CodeGen::Gui(3)
Impressum