Documentation: Highlight syntax in install.rst (#5478)

This commit is contained in:
Chris Bachhuber 2024-09-22 21:55:12 +02:00 committed by GitHub
parent 88bd479bc7
commit b17619296a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ started. (Note packages are unlikely to have the most recent version, so
:ref:`Git Install` might be a better alternative.) To install as a
package:
::
.. code-block:: shell
apt-get install verilator # On Ubuntu
@ -36,7 +36,7 @@ options and details, see :ref:`Detailed Build Instructions` below.
In brief, to install from git:
::
.. code-block:: shell
# Prerequisites:
#sudo apt-get install git help2man perl python3 make autoconf g++ flex bison ccache
@ -89,7 +89,7 @@ Install Prerequisites
To build or run Verilator, you need these standard packages:
::
.. code-block:: shell
sudo apt-get install git help2man perl python3 make
sudo apt-get install g++ # Alternatively, clang
@ -101,7 +101,7 @@ To build or run Verilator, you need these standard packages:
To build or run Verilator, the following are optional but should be installed
for good performance:
::
.. code-block:: shell
sudo apt-get install ccache # If present at build, needed for run
sudo apt-get install mold # If present at build, needed for run
@ -110,20 +110,20 @@ for good performance:
The following is optional but is recommended for nicely rendered command line
help when running Verilator:
::
.. code-block:: shell
sudo apt-get install perl-doc
To build Verilator you will need to install these packages; these do not
need to be present to run Verilator:
::
.. code-block:: shell
sudo apt-get install git autoconf flex bison
Those developing Verilator itself may also want these (see internals.rst):
::
.. code-block:: shell
sudo apt-get install clang clang-format-14 cmake gdb gprof graphviz lcov
sudo apt-get install python3-clang yapf3 bear jq
@ -170,14 +170,14 @@ Obtain Sources
Get the sources from the git repository: (You need to do this only once,
ever.)
::
.. code-block:: shell
git clone https://github.com/verilator/verilator # Only first time
## Note the URL above is not a page you can see with a browser; it's for git only
Enter the checkout and determine what version/branch to use:
::
.. code-block:: shell
cd verilator
git pull # Make sure we're up-to-date
@ -192,7 +192,7 @@ Auto Configure
Create the configuration script:
::
.. code-block:: shell
autoconf # Create ./configure script
@ -218,7 +218,7 @@ 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.
::
.. code-block:: shell
export VERILATOR_ROOT=`pwd` # if your shell is bash
setenv VERILATOR_ROOT `pwd` # if your shell is csh
@ -240,7 +240,7 @@ that may support multiple versions of every tool. Tell configure the
eventual destination directory name. We recommend that the destination
location include the Verilator version name:
::
.. code-block:: shell
unset VERILATOR_ROOT # if your shell is bash
unsetenv VERILATOR_ROOT # if your shell is csh
@ -252,7 +252,7 @@ the ``bin`` directory to your ``PATH``. Or, if you use `modulecmd
<http://modules.sourceforge.net/>`__, you'll want a module file like the
following:
::
.. code-block:: shell
set install_root /CAD_DISK/verilator/{version-number-used-above}
unsetenv VERILATOR_ROOT
@ -267,7 +267,7 @@ following:
The final option is to eventually install Verilator globally, using
configure's default system paths:
::
.. code-block:: shell
unset VERILATOR_ROOT # if your shell is bash
unsetenv VERILATOR_ROOT # if your shell is csh
@ -284,7 +284,7 @@ The command to configure the package was described in the previous step.
Developers should configure to have more complete developer tests.
Additional packages may be required for these tests.
::
.. code-block:: shell
export VERILATOR_AUTHOR_SITE=1 # Put in your .bashrc
./configure --enable-longtests ...above options...
@ -295,7 +295,7 @@ Compile
Compile Verilator:
::
.. code-block:: shell
make -j `nproc` # Or if error on `nproc`, the number of CPUs in system
@ -305,7 +305,7 @@ Test
Check the compilation by running self-tests:
::
.. code-block:: shell
make test
@ -317,7 +317,7 @@ If you used any install option other than the `1. Run-in-Place from
VERILATOR_ROOT <#_1_run_in_place_from_verilator_root>`__ scheme, install
the files:
::
.. code-block:: shell
make install