
The Verilog to html converter
To get e-mail when I update v2html, enter your address and click "Add Me" (over 560 people already have).
The Rough Verilog Parser
If you write perl scripts to extract information from verilog files you might think that the parser that v2html uses to parse the verilog could be ripped out a used in your next script. Well it probably could - and I've tried to make it easy to do this by separating out the parser from the all the other stuff that v2html does. I called it 'The Rough Verilog Parser' and made it a perl module.You can use it in your own scripts to do things like this:
#!/usr/bin/perl -w
require rvp; # use the rough verilog parser
# Read in all the files specified on the command line
$vdb = &rvp::read_verilog(\@ARGV,[],{},1,[],[],'');
# Print out all the modules found
foreach $module (&rvp::get_modules($vdb)) {
print "$module\n";
}
Other things that it can do are: - Give you back a list of instantiations in a module.
- Give you back a list of signals in a module.
- Tell you what type a signal is.
- Tell you which ports of which instantiations a signal is connected to.
- Tell you what each port of a particular instantiation is connected to.
- Give you back a list of all the tasks and functions in a module.
- Give you back a list of all the modules in a file.
Here are the links to save to get the Rough Verilog Parser:
- A compressed tar file with all the following files in.
- The Perl Module rvp.pm.
- An example script that uses rvp.pm.
- The documentation generated using pod2man on rvp.pm.
- An example script that makes a makefile for synthesis.
- A simple script that prints a design's hierarchy.
- A more advanced hierarchy printing script that can handle more command line options.
- In the directory you run your script in (clunky, but good for getting started).
- In one of perl's standard include directories. Find out where these are on your system by executing:
perl -e 'print join "\n",@INC'(or just try running a script that uses rvp and you will get an error message that tells you where perl looked). - In a directory of your choice which you then tell perl about. One way of doing this is with the -I switch on the first line of your script. For instance:
#!/usr/bin/perl -I/home/me/perl_modules
So far one person offered a script to be put here:
- Vince Parrilla:
© 1999-2005 Costas Calamvokis