1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
|
<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NAME</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:feedback@suse.de" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#distribution">DISTRIBUTION</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#supported_systems">SUPPORTED SYSTEMS</a></li>
<li><a href="#installation">INSTALLATION</a></li>
<li><a href="#usage_documentation">USAGE DOCUMENTATION</a></li>
<li><a href="#directory_structure">DIRECTORY STRUCTURE</a></li>
<li><a href="#limitations">LIMITATIONS</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>This is the Verilator Package README file.</p>
<p>
</p>
<hr />
<h1><a name="distribution">DISTRIBUTION</a></h1>
<p>This package is Copyright 2003-2012 by Wilson Snyder. (Report bugs to
<a href="http://www.veripool.org/">http://www.veripool.org/</a>.)</p>
<p>Verilator 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. (See the documentation for more
details.)</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.</p>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Verilator converts synthesizable (not behavioral) Verilog code into C++ or
SystemC code. It is not a complete simulator, just a translator.</p>
<p>Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
reads the specified Verilog code, lints it, and optionally adds coverage
code. For C++ format, it outputs .cpp and .h files. For SystemC format,
it outputs .sp files for the SystemPerl preprocessor available at
<a href="http://www.veripool.org.">http://www.veripool.org.</a></p>
<p>The resulting files are then compiled with C++. The user writes a little
C++ wrapper file, which instantiates the top level module. This is
compiled in C++, and linked with the Verilated files.</p>
<p>The resulting executable will perform the actual simulation.</p>
<p>
</p>
<hr />
<h1><a name="supported_systems">SUPPORTED SYSTEMS</a></h1>
<p>Verilator is developed and has primary testing on:</p>
<pre>
SuSE 11.1 AMD64 i686-linux-2.6.27, GCC 4.3.2</pre>
<p>Versions have also built on Redhat Linux, Macs OS-X, HPUX and Solaris. It
should run with minor porting on any Linix-ish platform. Verilator also
works on Windows under Cygwin, and Windows under MinGW (gcc -mno-cygwin).
Verilated output (not Verilator itself) compiles under MSVC++ 2008.</p>
<p>
</p>
<hr />
<h1><a name="installation">INSTALLATION</a></h1>
<p>For more details see
<a href="http://www.veripool.org/projects/verilator/wiki/Installing">http://www.veripool.org/projects/verilator/wiki/Installing</a>.</p>
<p>If you will be modifying Verilator, you should use the "git" method as it
will let you track changes.</p>
<dl>
<dt>
<dd>
<p>The latest version is available at <a href="http://www.veripool.org/verilator">http://www.veripool.org/verilator</a>.</p>
</dd>
<dd>
<p>Download the latest package from that site, and decompress.</p>
</dd>
<dd>
<pre>
tar xvzf verilator_version.tgz</pre>
</dd>
</li>
<dt>
<dd>
<p>If you will be using SystemC (vs straight C++ output), download SystemC
2.0.1 from <a href="http://www.systemc.org">http://www.systemc.org</a>. Follow their installation
instructions. You will need to set SYSTEMC_INCLUDE to point to the
include directory with systemc.h in it, and SYSTEMC_LIBDIR to points
to the directory with libsystemc.a in it. (Older installations may
set SYSTEMC and SYSTEMC_ARCH instead.)</p>
</dd>
</li>
<dt>
<dd>
<p>If you will be using SystemPerl or coverage, download and install
System-Perl, <a href="http://www.veripool.org/systemperl">http://www.veripool.org/systemperl</a>. Note you'll need to
set a <code>SYSTEMPERL</code> environment variable to point to the downloaded kit.
Optionally also set <code>SYSTEMPERL_INCLUDE</code> to point to the installed
headers.</p>
</dd>
</li>
<dt>
<dd>
<p>You will need the <code>flex</code> and <code>bison</code> packages installed.</p>
</dd>
</li>
<dt>
<dd>
<p><code>cd</code> to the Verilator directory containing this README.</p>
</dd>
</li>
<dt>
<dd>
<p>You now have to decide how you're going to eventually install the kit.</p>
</dd>
<dd>
<p>Note Verilator builds the current value of VERILATOR_ROOT, SYSTEMC_INCLUDE,
SYSTEMC_LIBDIR, SYSTEMPERL, and SYSTEMPERL_INCLUDE as defaults into the
executable, so try to have them correct before configuring.</p>
</dd>
<ol>
<li>
<p>Our personal favorite is to always run Verilator from the kit directory.
This allows the easiest experimentation and upgrading. It's also how most
EDA tools operate; to run any of them you point to the tarball.</p>
<pre>
export VERILATOR_ROOT=`pwd` # if your shell is bash
setenv VERILATOR_ROOT `pwd` # if your shell is csh
./configure</pre>
</li>
<li>
<p>To install globally onto a "cad" disk with multiple versions of every tool,
and add it to path using Modules/modulecmd:</p>
<pre>
unset VERILATOR_ROOT # if your shell is bash
unsetenv VERILATOR_ROOT # if your shell is csh
# For the tarball, use the version number instead of git describe
./configure --prefix /CAD_DISK/verilator/`git describe | sed "s/verilator_//"`</pre>
<pre>
After installing you'll want a module file like the following:</pre>
<pre>
set install_root /CAD_DISK/verilator/{version-number-used-above}
setenv VERILATOR_ROOT $install_root
prepend-path PATH $install_root/bin
prepend-path MANPATH $install_root/man</pre>
</li>
<li>
<p>The next option is to install it globally, using the normal system paths:</p>
<pre>
unset VERILATOR_ROOT # if your shell is bash
unsetenv VERILATOR_ROOT # if your shell is csh
./configure</pre>
</li>
<li>
<p>Alternatively you can configure a prefix that install will populate, as
most GNU tools support:</p>
<pre>
unset VERILATOR_ROOT # if your shell is bash
unsetenv VERILATOR_ROOT # if your shell is csh
./configure --prefix /opt/verilator-VERSION</pre>
<p>Then after installing you will need to add /opt/verilator-VERSION/bin to
PATH.</p>
</li>
</ol>
<dt>
<dd>
<p>Type <code>make</code> to compile Verilator.</p>
</dd>
<dd>
<p>Type <code>make test_c</code> to check the compilation.</p>
</dd>
<dd>
<p>Type <code>make test</code> for a more complete test. You may get a error about the
Bit::Vector Perl package. You will need to install it and SystemPerl if
you want all tests to pass.</p>
</dd>
<dd>
<p>You may get a error about a typedef conflict for uint32_t. Edit
verilated.h to change the typedef to work, probably to @samp{typedef
unsigned long uint32_t;}.</p>
</dd>
</li>
<dt>
<dd>
<p>If you used the VERILATOR_ROOT scheme you're done. Programs should set the
environment variable VERILATOR_ROOT to point to this distribution, then
execute $VERILATOR_ROOT/bin/verilator, which will find the path to all
needed files.</p>
</dd>
<dd>
<p>If you used the prefix scheme, now do a <code>make install</code>. To run verilator,
have the verilator binary directory in your PATH (this should already be
true if using the default configure), and make sure VERILATOR_ROOT is not
set.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="usage_documentation">USAGE DOCUMENTATION</a></h1>
<p>Detailed documentation and the man page can be seen by running:</p>
<pre>
bin/verilator --help</pre>
<p>or reading verilator.txt in the same directory as this README.</p>
<p>
</p>
<hr />
<h1><a name="directory_structure">DIRECTORY STRUCTURE</a></h1>
<p>The directories in the kit after de-taring are as follows:</p>
<pre>
bin/verilator => Compiler Wrapper invoked to Verilate code
include/ => Files that should be in your -I compiler path
include/verilated*.cpp => Global routines to link into your simulator
include/verilated.h => Global headers
include/verilated.v => Stub defines for linting
include/verilated.mk => Common makefile
src/ => Translator source code
test_v => Example Verilog code for other test dirs
test_c => Example Verilog->C++ conversion
test_sc => Example Verilog->SystemC conversion
test_sp => Example Verilog->SystemPerl conversion
test_vcs => Example Verilog->VCS conversion (test the test)
test_verilated => Internal tests
test_regress => Internal tests</pre>
<p>
</p>
<hr />
<h1><a name="limitations">LIMITATIONS</a></h1>
<p>See verilator.txt (or execute <code>bin/verilator --help</code>) for limitations.</p>
</body>
</html>
|