Last updated July 2007. This file contains information related to installation of fREEDA and ifreeda which is a GUI front-end to fREEDA. The README and README_GUI files contain useful usage information. The topics are organized in the following order: NOTE: For Windows users using Cygwin, if you download the binary file, then no installation is required. For source installation on cygwin, use the mount command to be able to install under c:/Documents and Settings/username and circumvent the problem of having spaces in the path. For example, for Windows username "elvis", you must insert special lines in the .bashrc file which can be found in the cygwin home directory. In this example it is assumed to be c:/Documents and Settings/elvis" The two lines therefore are mount -f "c:/Documents and Settings/elvis" "/elvis" export HOME=/elvis 1 - System requirements 2 - Directory structure 3 - Installing the libraries 4 - Compiling and Installing fREEDA 5 - Troubleshooting 6 - Contact information 1 - System Requirements ----------------------- - GNU Make - GNU C compiler gcc/g++ version 4.0.x - GNU fortran compiler g77-3.4.x - GNU flex-2.5.xx and bison-2.1 - The bash shell version 3.1.x For ifreeda - Qt 3.3.4. This includes the qmake tool, and the associated toolkit library. The installation of Qt is beyond the scope of this document. Visit http://www.trolltech.com for more information. 2 - Directory Structure ----------------------- freeda- (main directory) - libs (containes the libraries that are linked with freeda) - doc (freeda PDF documentation) - ifreeda (contains GUI code) - simulator (the main freeda code) - analysis - compat - elements - inout - lib - network - projects (contains examples to test with the GUI) - test (contains some sample netlists) NOTE: You do not need to read the the instructions below unless you want to do the manual install. To run the automatic install, execute the script build_freeda from the freeda- directory. 3 - Installing the libraries ---------------------------- Note:- Example commands will be provided, but they may differ slightly for your system. The symbol $ is used as the shell prompt. Go to the libs directory, from within the freeda directory $ cd libs a) ADOLC - Automatic differentiation package. (http://www.math.tu-dresden.de/~adol-c/) $ cd adolc $ ./configure $ make When the compilation is succesfully completed, then copy the library to the simulator/lib directory. $ cp adolc/.libs/libadolc.a ../../simulator/lib Go back to libs. $ cd ../ b) BLAS - Basic Linear Algebra Subprograms http://www.netlib.org/blas/ Enter the blas directory $ cd blas Issue the make command $ make static This will create libblas.a Copy it to simulator/lib $ cp libblas.a ../../simulator/lib/ $ cd ../ c) NNES Nonlinear System of Equations Solver http://www.netlib.org/opt/ Enter the nnes directory and make the library The makefile may need a few changes to reflect your system. $ cd nnes $ make -f makefile.gcc This creates libnnes.a Copy it to simulator/lib $ cp libnnes.a ../../simulator/lib $ cd ../ d) SPARSE - Sparse Matrix Library http://www.netlib.org/sparse/ Enter the sparse directory and make the library. The makefile may need a few changes to reflect your system. $ cd sparse $ make -f makefile.gcc This creates libsparse.a Copy it to simulator/lib $ cp libsparse.a ../../simulator/lib $ cd ../ e) SuperLU - Sparse Matrix Library http://www.nersc.gov/~xiaoye/SuperLU/ Enter the SuperLU directory and make the library. There are some customized makefiles that can be used, depending on your system. For a gcc x86 system $ cd SuperLU $ cp make.gcc make.inc $ cd SRC $ make $ cd .. This created the superlu library file. Copy it to simulator/lib $ cp superlu_gcc.a ../../../simulator/lib/libsuperlu.a $ cd .. f) FFTW - Fast Fourier Transform Routines http://www.fftw.org Enter the fftw dorectory. The installation is like any standard GNU project $ cd fftw $ ./configure $ make Copy the library files to simulator/lib $ cp fftw/.libs/libfftw.a ../../simulator/lib $ cp rfftw/.libs/librfftw.a ../../simulator/lib $ cd ../ This completes the installation of the libraries. 4 - Compiling and Installing fREEDA ----------------------------------- Congratulations on having made it so far. Now onto compiling freeda and freeda-specific files. Now start from the freeda-/simulator directory. Open makefile.defs in any text editor and change FRHOME=freeda_dir_path to FRHOME=. For example FRHOME=/home/nmk/freeda- is what it looks like on my system. Type make dep $ make dep Now you are ready to make the sources. $ make This will compile all the sources below the simulator directory. Once this completes succesfully, the freeda binary will be created in freeda-/simulator. From there, you can run the simulator on any of the sample netlists in the test directory. For example, from freeda-/simulator: ./freeda 5 - Compiling and Installing the GUI (ifreeda) ---------------------------------------------- From the simulator, go into the ifreeda directory which is one level up. $ cd ../ifreeda/components Use the qmake tool provided in the Qt installation to compile. $ qmake -nomoc &> /dev/null $ qmake-qt3 -nomoc &> /dev/null $ make staticlib Now go to the diagrams directory and repeat. $ cd .. $ cd diagrams $ qmake -nomoc &> /dev/null $ qmake-qt3 -nomoc &> /dev/null $ make staticlib Now go to the dialogs directory and repeat. $ cd .. $ cd dialogs $ qmake -nomoc &> /dev/null $ qmake-qt3 -nomoc &> /dev/null $ make staticlib Now go to the paintings directory and repeat. $ cd .. $ cd paintings $ qmake -nomoc &> /dev/null $ qmake-qt3 -nomoc &> /dev/null $ make staticlib Now go to the ifreeda directory and repeat. $ cd .. $ qmake &> /dev/null $ qmake-qt3 &> /dev/null $ make $ mv ifreeda ../simulator/. This will put the ifreeda binary into the simulator directory. To run this, from the simulator directory type $ ./ifreeda 5 - Troubleshooting ------------------- - Make sure that fREEDA's installation directory path is correct in simulator/makefile.defs. There is a variable called FRHOME which should be set correctly. This is done automatically if you run the build_freeda script. - Although care has been taken to be as general as possible, some compilers/architectures may not support all the compiler flags used during installation. To see which flags have been used, look in freeda-/simulator/makefile.defs 6 - Contact information ----------------------- This INSTALL file and the compilation process is maintained by Nikhil Kriplani. Please direct any issues and queries to nkriplani@ncsu.edu. Getting the system to compile correctly is always a work in progress, so any feedback to help improve the process is welcome. If the compilation is succesful, send a friendly note and let me know.