graywolf - open source placement tool
- Details
- Last Updated: Friday, 19 April 2019 12:04
- Published: Friday, 08 February 2019 00:16
- Hits: 1483
graywolf is fork of Timberwolf:
TimberWolf doc is here: http://opencircuitdesign.com/qflow/archive/TimberWolf.pdf
To install Timberwolf, we need to install couple other software:
A. CMake => CMake is a popular alternative to autotools. It is usedin many open-source projects including large ones such as KDE, LLVM and Blender. See CMake section for more details on cmake.
Steps for downloading cmake:
1. dwnload cmake from here: https://cmake.org/download/ (cmake-3.14.0-rc2.tar.gz)
2. extract .gz file, and goto dir "cmake-3.14.0-rc1). Now run these 3 steps: 1. /bootstrap 2. make 3. sudo make install
B. GSL => GNU Scientific Library (libgsl): this is used in C pgms to call many scientific functions.
1. downlaod GSL from here: https://www.gnu.org/software/gsl/ 2.goto gnu ftp mirror link and download gsl-latest.tar.gz (currently latest is pointing to version 2.5)
2. extract .gz. cd to gsl-2.5 dir. Now run these 3 steps: 1. ./configure 2. make 3. make install
3. We should see libgsl.so and libgslcblas.so shared lib in /usr/local/lib dir. Also make sure env var "LD_LIBRARY_PATH" is set to ":/usr/loacal/lib/" (assuming gsl was installed in defau;t pat). echo $LD_LIBRARY_PATH => ://usr/local/lib/ . All header files for gsl lib will be in /usr/local/inlcude/gsl
Now, to test that gsl is installed correctly, we can write a simple C test program which include one of the GSL functions, and see if works. Write a pgm named gsl_test.c
#include <gsl/gsl_sf_bessel.h> //this header file dir is in /usr/local/include dir
int main (void) {
double x = 15.0;
double y = gsl_sf_bessel_J0 (x);
printf ("J0(%g) = %.18e\n", x, y);
return 0;
}
Run: gcc gsl_test.c -lgsl -lgslcblas => This should create a.out, and running a.out should produce bessel output.
-----
Once above 2 software are installed, we install Timberwolf as follows:
1. Download graywolf from here: https://github.com/rubund/graywolf.
2. Download zip file, "graywolf-master.zip". Unzip it, and you should have a dir "garywolf-master". cd to that dir, and read thru README.md. It has instructions for installing it. Run these steps:
!. cd graywolf-master
II. mkdir buid
III. cd build
IV. cmake .. => NOTE: cmake is used to build this, instead of traditional GNU Autotools
This runs CMakeLists.txt in dir graywolf-master. At this stage, you may get an error:
-- No package 'gsl' found
CMake Error at CMakeLists.txt:15 (MESSAGE):
The development files for the GNU Scientific Library (libgsl) are required
to build graywolf.
This happens, since pkg_check_modules is not able to find GSL package, even though it's installed in std location.
To fix this, modify CMakeLists.txt in dir graywolf-master. comment out line "pkg_check_modules(GSL gsl)" and replace it with "include(FindGSL)". This will allow cmake to find GSL pkg.
#pkg_check_modules(GSL gsl)
include(FindGSL)
Once done, cd to build dir, and run "cmake .." once again. This time it should run fine:
[graywolf-master/build]$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/Ajay/Downloads/graywolf-master/build
V. make => now run make, Last few lines on screen look something like this:
[100%] Built target mc_compact
Scanning dependencies of target run
[100%] Generating show_flows
[100%] Built target run
VI. sudo make install => this will install various files of this software in /usr/local/lib and /usr/local/bin
VII. make test => This will run 6 tests, but 1 of them fails.
The following tests FAILED:
5 - map9v3-twmc (Failed)
Errors while running CTest
make: *** [test] Error 8
VIII. CTEST_OUTPUT_ON_FAILURE=1 make test => this step is optional. running this produces more verbose o/p for test 5 to help us debug.
iX: now cd to any dir, (cd /home/) type "graywolf" on terminal, and it should run it. Add steps on running it => FIXME