diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 56b9cd782..20c63956f 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -146,6 +146,7 @@ Stephen Henry Steven Hugg Sören Tempel Teng Huang +Tim Hutt Tim Snyder Tobias Rosenkranz Tobias Wölfel diff --git a/docs/guide/environment.rst b/docs/guide/environment.rst index dc037cc8f..a8e4b4439 100644 --- a/docs/guide/environment.rst +++ b/docs/guide/environment.rst @@ -91,9 +91,29 @@ associated programs. .. option:: VERILATOR_ROOT - Specifies the directory containing the distribution kit. This is used - to find the executable, Perl library, and include files. If not - specified, it will come from a default optionally specified at configure - time (before Verilator was compiled). It should not be specified if - using a pre-compiled Verilator package as the hard-coded value should be - correct. See :ref:`Installation`. + The ``VERILATOR_ROOT`` environment variable is used in several places: + + * At ``./configure`` time: If set, it is embedded into the binary, and + at runtime if ``VERILATOR_ROOT`` is not set, the embedded value is + used for the runtime default. + + * When ``verilator`` is run: If ``VERILATOR_ROOT`` is set it will be + used to find the ``verilator_bin`` executable (this is the actual + Verilator binary; ``verilator`` is a Perl wrapper). If not set, the + ``verilator`` script uses other methods to find ``verilator_bin`` + (looking in the same directory and falling back to ``$PATH``). + + * When ``make`` is run on the Makefile generated by ``verilator``: The + value of ``VERILATOR_ROOT`` (falling back to the value embedded in the + binary if not set) is used to find the include files + (``include/verilated.mk``). + + If you are using a pre-compiled Verilator package, you should not need + to set ``VERILATOR_ROOT`` - the value embedded in the binary should be + correct. In fact this option *does not work* with Verilator packages + that have been installed with ``make install``. If a Verilator package + has been installed using ``./configure --prefix=/some/path && make + install`` and then moved to another location, you cannot use + ``VERILATOR_ROOT`` to point to the new version. + + See :ref:`Installation` for more details. diff --git a/docs/guide/install.rst b/docs/guide/install.rst index a862b4abb..5d1021b34 100644 --- a/docs/guide/install.rst +++ b/docs/guide/install.rst @@ -202,8 +202,9 @@ These are the installation options: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Our personal favorite is to always run Verilator in-place from its Git -directory. This allows the easiest experimentation and upgrading, and -allows many versions of Verilator to co-exist on a system. +directory (don't run ``make install``). This allows the easiest +experimentation and upgrading, and allows many versions of Verilator to +co-exist on a system. :: @@ -212,10 +213,10 @@ allows many versions of Verilator to co-exist on a system. ./configure # Running will use files from $VERILATOR_ROOT, so no install needed -Note after installing (below steps), a calling program or shell must set -the environment variable :option:`VERILATOR_ROOT` to point to this Git -directory, then execute ``$VERILATOR_ROOT/bin/verilator``, which will find -the path to all needed files. +Note after installing (see `Installation`_), a calling program or shell +must set the environment variable :option:`VERILATOR_ROOT` to point to this +Git directory, then execute ``$VERILATOR_ROOT/bin/verilator``, which will +find the path to all needed files. 2. Install into a specific location @@ -233,7 +234,8 @@ location include the Verilator version name: # For the tarball, use the version number instead of git describe ./configure --prefix /CAD_DISK/verilator/`git describe | sed "s/verilator_//"` -Note after installing (below steps), if you use `modulecmd +Note after installing (see `Installation`_), you need to add the path to +the ``bin`` directory to your ``PATH``. Or, if you use `modulecmd `__, you'll want a module file like the following: @@ -246,11 +248,11 @@ following: prepend-path PKG_CONFIG_PATH $install_root/share/pkgconfig -3. Install into a Specific Path -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3. Install into a Specific Prefix +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You may eventually install Verilator into a specific installation prefix, -as most GNU tools support: +as follows. This option is typically only used by OS package maintainers. :: @@ -274,8 +276,8 @@ configure's default system paths: unsetenv VERILATOR_ROOT # if your shell is csh ./configure -Then after installing (below), the binaries should be in a location -already in your ``$PATH`` environment variable. +Then after installing (see `Installation`_), the binaries should be in a +location already in your ``$PATH`` environment variable. Configure