Chapter 6. Installation
| Part II. Installation |

## Chapter 6. Installation

## 6.1. Prerequisites

The goal of Covered was to create a tool that has very few requirements to allow it to be compiled and run on all platforms. The following is a list of all utilities/resources required to compile Covered. However, Covered is primarily developed on RedHat/Fedora Core Linux and Mac OS X and as such is primarily tested by the developers on these platforms.

- gcc (Version 2.96 or higher)

- flex (Version 2.5.4 or higher)

- bison (Version 1.28 or higher)

- GNU make (Version 3.27.1 or higher)

- GNU gperf (Version 2.7.2 or higher)

- Tcl/Tk (Versions 8.4 or higher)

  - tablelist Tcl/Tk widget (Version 4.9 or higher)

Covered is primarily developed on Fedora Core but has been known to compile with both 32-bit and 64-bit compilers that contain the general GNU library of tools. It has also been compiled and run on Cygwin and Mac OS X.

## 6.2. Downloading source

To download the source files in .tar.gz format, go to the following URL:

http://covered.sourceforge.net/downloads/

Double-click on the .tar.gz version that you wish to install. The browser should immediately bring up a window asking if you would like to save to disk or open immediately. Choose the "Save to Disk" option. Another window will pop up, allowing you to choose the directory to store the tarball in. After selecting a directory, click the "Save" button. The download utility will begin downloading the tarball to the selected directory.

Once you have downloaded a tarball, enter the following to unzip and untar the package:

`> gzip -dc tarball_filename | tar xvf -`

This will create a directory called covered-version, where version will be of the form major version.minor version for stable releases or date for development releases. Enter that directory to begin configuring, building and compiling Covered from source.

## 6.3. Configuring the build

At this point, you are ready to configure the build environment to create the executables, libraries and/or documentation for Covered. However, before you configure the build environment, you will need to make a few decisions which will lead to different options given to the configure script. These questions are the following:

1. Do you need to debug Covered? (for most users, the answer to this will be "no")

   If the answer to this question is yes, configure the build environment with the `--enable-debug` option to the configure script. Doing so will allow you to use the global -D option and/or the -cli (Section 15.2, “Command-Line Interface (CLI)”) score command option for debugging; however, it will also have the side effect of causing the score command to run noticably slower. For normal usage of Covered, this option should not be specified when configuring.

2. Do you want to profile Covered's internal functionality? (for most users, the answer to this will be "no")

   If the answer to this question is yes, configure the build environment with the `--enable-profiling` option to the configure script. Doing so will allow you to use the global -P option to generate an output file containing internal profiling information for the run command. See Section 15.3, “Source Code Profiling” for more information on the -P option.

3. Will you being using Covered as a VPI module and, if so, what simulator(s) will you need VPI modules built for?

   If the answer to this question is yes and you need to build a VPI module for the Icarus Verilog simulation tool, simply add `--with-iv` on the configure command-line. If a VPI shared object module is needed for the Cver simulator, simply add `--with-cver=cver_include_dir` on the configure command line, where cver_include_dir specifies the directory that contains the vpi_user.h file. If a VPI shared object module is needed for the VCS simulator, simply add `--with-vcs=vcs_include_dir` on the configure command line, where vcs_include_dir specifies the directory that contains the vpi_user.h file.

4. Do you want to use Covered's Tcl/Tk GUI for interactive coverage analysis or just the command-line created reports?

   If the answer to this question is yes and you have a Tcl/Tk distribution that the configure script cannot find (i.e., the tcl-config and tk-config scripts exist in a non-standard directory location), please specify the `--with-tcl-config=tcl-config_pathname` and `--with-tk-config=tk-config_pathname` options to the configure script. If the answer to this question is no, specify the `--with-tcltk=no` option to the configure script to cause the GUI to not be built.

Once you have determined which configuration options you need, simply enter the following command:

`> ./configure options`

This command will create the Makefiles/include files necessary for your machine to compile the source code correctly. If any errors are generated during this command run, it is usually an indication that some program or library is missing from your computer that is necessary for Covered to compile/run. Please install any missing programs/libraries and type this command again.

## 6.4. Compiling and Installing

If the configure script completes successfully, you may compile the source with the following command:

`> make`

This will begin the process of compiling/linking the source code for Covered. This stage may take a while. When the source files have been compiled, the covered executable file will have been created. To install this executable in your `/usr/local/bin` directory, enter the following command:

`> make install`

This will install the covered executable and manpage help files. Once covered is installed, make sure that `/usr/local/bin` is in your environment path. You are now ready to run Covered.

Part II. Installation |  | Part III. Command-line Usage