vreg - Register configuration utility


  vreg --help
  vreg ...


Vreg has two major uses. The first vreg converts a HTML document (saved via Word, Framemaker, LyX, or Latex) to a vreg file. The second generates standard headers from the .html or from a .vregs file.


When the --html switch is used, vreg generates a .vregs file from a .html file. The file format is described in vregs_spec.doc or vregs_spec.htm.

When saving HTML, be sure to change both the filename to .htm and the file format to HTML. If inside Microsoft Word, exit.


When the --header switch is used, vreg reads a .vregs file and creates definition and class headers in the --output directory. Vreg can also create LaTex tables based on the register layouts.


--change-diff program

With --change-error, use this program to determine if the error should be reported or not. The program should exit with non-zero status to raise an error.

--change-error language

Report error if file of the given language would change. Use ALL for all languages. This option may be given multiple times to specify multiple languages.


Don't write any output files, mearly report which files would change.


Displays this message and program version and exits.


Creates the header files and other files after the hardware.vregs file has changed.

--html html_filename

Reads the specified filename and creates a .vregs file from the html.

--if-product product

Only include registers in output with a Product column matching that specified. See the vregs_spec document for more information.

--library package

Specifies a package to be used to resolve subclasses. The library package will only be read, not changed in any way.


Add minimal comment to the header files, to save disk space and time. Users of the file will have to then look at the .vregs file to determine what bits represent.


Specifies the directory name to be used for all output files.


Specifies the name of the package; used for creating all filenames.


Specifies a comment to be placed into output files describing to users how to rebuild the file.


When used with the --html switch, remove a directory named html_name_files. (This generally contains images written by Microsoft Word that are not needed.) Also, clean up the HTML file to compress out useless style tags that make the file less humanly readable.


Specify the name of the rules file. (See SystemC::Vregs::Rules.) Defaults to the out_directory/


Use Verilog-2001 constructs, such as localparam. Identical to the v2k package attribute.


Displays program version and exits.


Specify vregs format file to be read or written. Defaults to be in the directory specified by --output with the filename package.vregs.



Create an _asm.h file.


Create a _class.cpp file.


Create a _class.h C++ file.


Create a _defs.h file.


Create a file.


Create a _defs.v file.

--filename-asm-h filename

Specify the output filename for the asm_h file. By default this is {--output}{package_name}_asm.h.

Similar options exist for all of the other output files.


Create all files. Equivalent to: --class_h --class_cpp --defs_h --defs_pm --defs_v --info_cpp --hash_pm --params_v --struct_h


Create a file.


Create an _info.cpp file.


Creates latex tables from the vregs definition, suitable for formatting into printable documentation.


Suppresses creating all files. Equivalent to: --noclass_h --noclass_cpp --nodefs_h --nodefs_pm --nodefs_v --noinfo_cpp --nohash_pm --noparams_v --nostruct_h

You can then use specific enables after the --nofiles to turn on the desired files, for example: --nofiles --class_h --defs_h --hash_pm


Create a file.


Create a _struct.h C file.


Vregs is part of the free Verilog software tool suite. The latest version is available from CPAN and from

Copyright 2001-2010 by Wilson Snyder. This package is free software; you can redistribute it and/or modify it under the terms of either the GNU Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.


Wilson Snyder <>


SystemC::Vregs, SystemC::Vregs::Rules

vregs_spec.htm from the SystemC::Vregs distribution.