Verilog to VHDL RTL converter

Download

the script is here and is licensed as GPL

Overview

This script may be useful for translating synthesizeable verilog RTL to synthesizeable VHDL RTL. Or at least getting most of the work done and allowing a VHDL literate human to clean up the hard bits. This is a command line tool tested under linux and freebsd. It is currently at release 1.1 and is definitely use-with-care-only.

It can translate (most of) the verilog constructs I use, but thats bound to be a limited test suite.

Feedback (bug reports) is welcome, and is much more useful if accompanied with a verilog code fragment, preferably with an edited version showing what you think it _should_ generate. It needs a regression suite. Most of the code I've used it on is not mine to post. If you do send me code, make it clear whether its private or not.

Usage

v2vhd -h for help.

v2vhd -e blah.v > blah.vhd for the entity.

v2vhd blah.v > blah_rtl.vhd for the architecture.

General Comments

Comments in the code are preserved, both /*..*/ and // comments. (But I don't think multiline /* comments currently works). Comments get mapped onto their own line and come out near the original commented place. The entity does not get (many?) comments, they are all in the architecture.

There are various debug options only useful if you are hacking the perl.

The script indents its output somewhat. I find (particularly with earlier versions) that reading the output into an xemacs buffer in vhdl-mode and beautifying it does more good than harm.

The -s flag can be used. It attempts to find explicit parameter assigned state variables and maps them to vhdl enumerated types. This option needs more testing.


John Sheahan
Last modified: Wed Apr 16 09:19:29 EST 2003