Installation Guide
From Icarus Verilog
Icarus may be installed from source code or from pre-packaged binary distributions.
Contents |
[edit] Installation From Source
Icarus is developed for Unix-like environments but can also be compiled on Windows systems using Cygwin environment or Mingw compilers. The following instructions are the common steps for obtaining the Icarus Verilog source, compiling and installing. Note that there are precompiled and/or prepackaged versions for a variety of systems, so if you find an appropriate packaged version, then that is the easiest way to install.
[edit] Obtaining Snapshots
The ftp site for the latest snapshot is ftp://ftp.icarus.com/pub/eda/verilog/snapshots. Download a tarball with a name such as verilog-version.tar.gz and un-tar it using:
% tar -zxvf verilog-version.tar.gz
This will create a directory, similar to the name of the tarball, such as verilog-version. Change into this directory using:
% cd verilog-version
The source is then compiled and installed in the manner appropriate for your operating system. See below.
[edit] Obtaining Source From git
|
Note: Icarus Verilog uses git version 1.5. It is recommended that you too use git 1.5 for accessing the Icarus Verilog repository. I have witnessed git 1.4 being confused by git 1.5 formats. |
The source code for Icarus is stored under the git source code control system.
You can use git to get the latest development head or the latest of a specific
branch. Stable releases are placed on branches, and in particular the v0.8 stable
releases are on the branch "v0_8-branch"
To get the development version of the code follow these steps:
% git clone git://icarus.com/~steve-icarus/verilog
The clone will create a directory, named verilog, containing the source tree, and will populate that directory with the most current source from the HEAD of the repository.
Change into this directory using:
% cd verilog
Normally, this is enough as you are now pointing at the most current development code, and you have implicitly created a bracsh "master" that tracks the development head. However, If you want to actually be working on the v0_8-branch (the branch where the latest v0.8 patches are) then you checkout that branch with the command:
% git checkout --track -b v0_8-branch origin/v0_8-branch
This creates a local branch that tracks the v0_8-branch in the repository, and switches you over to your new v0_8-branch. The tracking is important as it causes pulls from the repository to re-merge your local branch with the remote v0_8-branch. You always work on a local branch, then merge only when you push/pull from the remote repository. The v0_8-branch is the current code for the v0.8 release series.
Now that you've cloned the repository and optionally selected the branch you want to work on, your local source tree may later be synced up with the development source by using the git command:
% git pull
The git system remembers the repository that it was cloned from, so you don't need to re-enter it when you pull.
Finally, configuration files are built by the extra step:
% source autoconf.sh
The source is then compiled as appropriate for your system.
|
The icarus.com URL is for the master version of the git repository, but there is a mirror here:
The mirror site also offers some web based visualization of logs and branches: <http://repo.or.cz/w/iverilog.git> |
[edit] Obtaining Source From CVS (obsolete)
The source code for Icarus is stored under the CVS source code control system. At this point you have a choice to make. Decide if you want to get the latest development (main trunk) or if you want to get the latest of a specific branch. Stable releases are placed on branches, and in particular the v0.8 stable releases are on the branch "v0_8-branch"
To get the development version of the code follow these steps:
% cvs -d :pserver:cvs@icarus.com:/home/demon/anoncvs login (Password is "cvs") % cvs -d :pserver:cvs@icarus.com:/home/demon/anoncvs get verilog
Or, to get the v0.8 stable branch, follow these steps:
% cvs -d :pserver:cvs@icarus.com:/home/demon/anoncvs login (Password is "cvs") % cvs -d :pserver:cvs@icarus.com:/home/demon/anoncvs get verilog -r v0_8-branch
(Normally, if you are interested in the CVS version of the source, then you are not interested in the stable branch.)
This sequence (whichever you choose) will create a directory, named verilog, containing the source tree and will populate that directory with the most current source from the repository. Change into this directory using:
% cd verilog
The source tree may later be synched up with the development source by using the cvs command:
% cvs update -d
(Note that you do not need to specify the branch name in the update command. CVS remembers.) Configuration files are built by the extra step:
% source autoconf.sh
The source is then compiled as appropriate for your system.
[edit] Compiling on Linux/Unix
This is probably the easiest case. Given that you have the source tree from the above instructions, the compile and install is generally as simple as:
% ./configure % make (su to root) # make install
The "make install" typically needs to be done as root so that it can install in directories such as "/usr/local/bin" etc. You can change where you want to install by passing a prefix to the "configure" command:
% ./configure --prefix=/my/special/directory
This will configure the source for eventual installation in the directory that you specify. Note that "rpm" packages of binaries for Linux are typically configured with "--prefix=/usr" per the Linux File System Standard.
[edit] Compiling on Macintosh OS X
Since Mac OS X is a BSD flavor of Unix, you can install Icarus Verilog from source using the procedure described above. You need to install the Xcode software, which includes the C and C++ compilers for Mac OS X. The package is available for free download from Apple's developer site. Once Xcode is installed, you can build Icarus Verilog in a terminal window just like any other Unix install.
[edit] Compiling on Solaris
Solaris is a form of Unix, so the Unix instructions above generally apply. However, a Solaris user will need to install some other compilation tools:
- gnu make
Solaris includes a BSD-style make, but Icarus Verilog uses some GNU make extensions. It is conventional on a Solaris system to install GNU make as "gmake".
- gcc
As of this writing, Icarus Verilog will not compile with the SUN C++ compiler. It is not a language issue, but a tools flags problem. The Makefiles pass flags to the compiler that gcc understands for making shared objects, etc.
- bison/flex
These tools are gnu replacements for yacc/lex. They are extended versions of their older counterparts.
These tools are commonly available for Solaris. (SUN used to distribute a CD that included these and other GNU tools precompiled and prepackaged. Can anybody confirm that they still have such a disk?)
[edit] Compiling on MS Windows
The source as available above can also be compiled on MS Windows systems. The preferred method for compiling on Windows is to use the mingw32 compiler. The source tree has detailed instructions for configuring/compiling in the text file "mingw.txt". Be warned, compiling for Windows is somewhat painful.
[edit] Compiling on M$ Windows (cygwin)
Cygwin users should preferably use the mingw32 method to compile Icarus Verilog. Programs compiled by mingw32 are perfectly usable under Cygwin, like any other Windows binary, so mingw32 builds are the preferred distribution form. However, there are practical reasons to compile directly under Cygwin (chiefly file path handling), and it is perfectly reasonable to expect it to work.
In a Cygwin command line follow the instructions for Linux/Unix. The instructions are the same, as Cygwin is an attempt to be Unix under Windows.
In order to compile/install Icarus using Cygwin the following packages must be installed:
binutils, g++, autoconf, automake, make, flex, bison, gperf, libbz2-devel (otherwise system.vpi won't build)
They should all be available via the Cygwin setup program.
The ghostscript package (to get ps2pdf) is optional, but since Cygwin has a working "man" system, the man pages will be installed into a Cygwin system and ps2pdf is not required.
[edit] Installation From Premade Packages
The various operation systems and distributions have various package management systems, and there are prepackaged distributions of Icarus Verilog available for some of them. If there is a prepackaged version that is suitable for your system and needs, then prepackaged installs are the easiest.
[edit] RPM Based Systems
On systems that use RPM Package Manager (RPM) software packages, Icarus Verilog may be installed from a binary RPM package. If no binary RPM package is available for your system, then one can be easily made from a source RPM package.
[edit] Building a Binary RPM Package
Source RPM packages are generally available at the same site where the source tarballs are hosted, and have the suffix ".src.rpm". Once downloaded, a binary RPM package can be built using:
% rpmbuild --rebuild verilog-version.src.rpm
(Older RPM Based Systems that do not have rpmbuild use rpm to build the binary packages.)
This compiles the source RPM package and makes a binary RPM package tailored for your system. The generated package is placed where you configured rpm to place built packages: often "/usr/src/rpm/RPMS". (NOTE: Building packages may require that you include other packages (notably -devel packages) that are not otherwise needed.)
[edit] Installing a Binary RPM Package
Binary RPM packages, downloaded or built using the instructions above, can be installed with the following command (run as root):
# rpm -Uvh verilog-version.type.rpm
If you are using yum (Yellow dog Updater) as your RPM package updater/installer/remover, then you can install a downloaded or built binary RPM package with the following command (run as root):
# yum -y localinstall verilog-version.type.rpm
[edit] SuSE Linux/openSUSE
[edit] Introduction
The openSUSE build service has now a web interface that allows to search for packages. To find Icarus Verilog RPM packages go to the web page http://software.opensuse.org/search, select your version of the distribution and enter the search term verilog. Starting with openSUSE 10.3 the distribution supports a 1-Click install feature, allowing to start the installation by selecting the 1-Click link on the web page.
If you like to add the repository to your installation source, go to the below sections and read how to do that.
[edit] Stable Version
Werner Hoch provides a "yum" repository with a variety of EDA packages, including the stable releases of Icarus Verilog and GTKWAVE. The easiest way to use this repository is via "YaST".
- Start the YaST Control Center application, normally from your start menu.
- Select "Installation Source" to add the new repository.
- In the Installation Source control panel, select Add-->FTP to add a new FTP source.
- The FTP server is ftp-1.gwdg.de
- The Directory is one of these (select based on the system you have):
- /pub/opensuse/repositories/home:/werner2101/SUSE_Linux_9.3
- /pub/opensuse/repositories/home:/werner2101/SUSE_Linux_10.0
- /pub/opensuse/repositories/home:/werner2101/SUSE_Linux_10.1
- /pub/opensuse/repositories/home:/werner2101/openSUSE_10.2
- Click "OK" in the Add... dialog to add the repository, and
- Click "Finish" to finish adding the installation source.
Now you can use the YaST "Software Management" control to add the "verilog" package, which is Icarus Verilog.
An alternate mirror of this repository is here:
- The HTTP server is software.opensuse.org
- The directory is one of these (select based on the system you have):
- /download/home:/werner2101/SUSE_Linux_9.3
- /download/home:/werner2101/SUSE_Linux_10.0
- /download/home:/werner2101/SUSE_Linux_10.1
- /download/home:/werner2101/openSUSE_10.2
[edit] Development Snapshot
Development snapshots are available from: http://software.opensuse.org/download/home:/dannori/
or the mirror: ftp://ftp-1.gwdg.de/pub/opensuse/repositories/home:/dannori
[edit] Ubuntu Linux
|
This needs testing! See discussion tab. |
The Ubuntu Universe repository has the Icarus Verilog .deb package. To install Icarus Verilog follow the steps below
- Add the Universe repository in /etc/apt/sources.list using your favourite text editor (It would already be there but would have been commented). In Edgy Eft,the line would be something like
deb http://archive.ubuntu.com/ubuntu/ edgy universe deb-src http://archive.ubuntu.com/ubuntu/ edgy universe
- Run sudo apt-get update from terminal.
- Run sudo apt-get install verilog
[edit] Macintosh OS X
Icarus Verilog can be easily installed on Mac OS using either the MacPorts or Fink package managers.
[edit] MacPorts
Instructions for downloading and installing MacPorts can be found here. Once MacPorts is installed and configured, Icarus Verilog can be installed in a terminal window using:
% sudo port -d -v install iverilog
GTKWave (the waveform viewer) can also be installed via MacPorts:
% sudo port -v install gtkwave
[edit] Fink
Instructions for downloading and installing Fink can be found here.
TBD
[edit] FreeBSD
Icarus Verilog can be used without a problem on FreeBSD-based systems. It is very simple to install and get it working. The fastest way is to use FreeBSD Ports collection.
[edit] FreeBSD Ports
FreeBSD Ports collection includes Icarus Verilog as a port of it's base package. FreeBSD Ports collection normally is put under /usr/ports hierarchy.
Installation (as root--unless you've done some customization):
% # cd /usr/ports/cad/iverilog && make install clean
Now, you should be able to use "iverilog". If you use csh(1) shell, remember to type:
% rehash
In case of having no /usr/ports directory, you'll have to fetch it by yourself. The easiest way is to copy /usr/share/examples/cvsup/ports-supfile to some other location:
% cp /usr/share/examples/cvsup/ports-supfile ~/csup-ports
Edit this file to change "CHANGE_THIS.FreeBSD.org" to appropriate FreeBSD mirror, and start downloading:
# csup -L 2 ~/csup-ports
This will take some time and disk space. It's about downloading all Ports. For more information, visit FreeBSD Handbook, especially Installing Applications: Packages and Ports section.
[edit] Windows
Windows binaries wrapped in a handy installer is Pablo Bleyer Kocik's page "Icarus Verilog for Windows". This page makes available installers mainly for the most recent stable versions. Simply download the version of choice and execute the installer.
