| Download Verilog::CodeGen | Browse source code | Read the POD | |
| Version 0.9.4 | Last update: Thu Sep 18 12:10:37 BST 2003 | ||
Verilog::CodeGen GUI
This Perl-Verilog code generator GUI is available from CPAN as part of the Verilog::CodeGen distribution.
The Verilog::DeviceLibs distribution contains a GUI frontend to the code generator. This GUI communicates with XEmacs to edit the object templates and view the parsed results. It allows to inspect the generated code, to run the testbenches and view the waveforms.
Here is a screenshot: 
What do you need to use this GUI?
- Perl-Tk. Otherwise, no GUI
- XEmacs (I have v21.1.14) with gnuserv enabled, i.e. put the line
(gnuserv-start)in your .emacs. Without XEmacs, the GUI is rather useless.
For a better user experience, customize gnuserv to open files in the active frame. By default, gnuserv will open a new frame for every new file, and you end up with lots of frames.- Choose Options->Customize->Group
- type gnuserv
- Open the "Gnuserv Frame" section (by clicking on the arrow)
- Tick "Use selected frame"
I also use the auto-revert-mode because parsing the test bench code modifies it, and I got annoyed by XEmacs prompting me for confirmation. See the file for details on how to install.
The Verilog-mode is (obviously) very usefull too. - If you want to inspect the generated code, you need the v2html Verilog to HTML convertor and a controllable browser, I use galeon.
- To run the testbench, I use Icarus Verilog, a great open source Verilog simulator.
- To plot the results, I use GTkWave, a great open source waveform viewer.
What does it do?
The GUI is very simple to use:
- Type the name of the object you want to create in the first field. If the object exists, a few characters are sufficient, the rest will be guessed.
- Click "Edit". You'll get an XEmacs window with the code.
- To see the generated code, click "Parse".
Tick the "Show result" box if you want to see the result in XEmacs, otherwise it's displayed in the log window. - When the object is ready, click "Update" to add it to the device library. Tick the "Show module" box if you want to see the result in XEmacs.
- Now you're ready to create a testbench. Type the name of the object you want to test in the first field. If the object exists, a few characters are sufficient, the rest will be guessed.
- Click "Edit". You'll get an XEmacs window with the code.
Tick the "Overwrite" box if you want to overwrite anexisting testbench. - To see the generated code, click "Parse".
Tick the "Show result" box if you want to see the result in XEmacs, otherwise it's displayed in the log window.
Tick the "Inspect code" box if you want to inspect the code (using v2html).
Tick the "Run" box if you want to simulate the code (with Icarus Verilog).
Tick the "Plot" box if you want to view the results from the simulation (with GTkWave)
How does it work?
The gui.pl script is a kind of shell that hands off all non-GUI tasks to a set of scripts in the GUI folder. These scripts communicate with the GUI via TCP/IP port 2507. There's no special reason to use TCP/IP, if you don't like it you can use a named pipe, it's in the script but commented out.
In principle you can use these commandline scripts stand-alone, but I did not bother to document all flags. Use the GUI or read the code.
