-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
The installation procedure described in README.md does not work. Below is the process I used to install the tool (Ubuntu 18.04).
Installation
Prerequisites
Build Tools
- Install
build-essential,git,automake, andcmake:
sudo apt-get install git automake cmakeLibraries
- Install
liblpsolve55-dev,libgmp3-dev,libtool, andlibboost-dev:
sudo apt-get install liblpsolve55-dev libgmp3-dev libtool libboost-devLua and LuaBind
- Download Lua 5.1.5:
wget https://www.lua.org/ftp/lua-5.1.5.tar.gz
tar xvf lua-5.1.5.tar.gz
cd lua-5.1.5- Add the
-fPICcompilation flag (and, optionally,-g) tosrc/Makefile:
CFLAGS= -g -O2 -Wall -fPIC $(MYCFLAGS)- Build the library:
make linux
make local
cd ..- Download LuaBind 0.9.1:
wget https://sourceforge.net/projects/luabind/files/luabind/0.9.1/luabind-0.9.1.tar.gz/download -O luabind-0.9.1.tar.gz
tar xvf luabind-0.9.1.tar.gz
cd luabind-0.9.1- Build the library (
$TOOLSpoints to the directory with the manually installed tools and libraries):
LUA_PATH=$(TOOLS)/lua-5.1.5
bjam --prefix=$(TOOLS)/luabind-0.9.1 install- Install LuaBitOp:
sudo apt-get install luarocks
sudo luarocks install luabitopSystemC
- Download SystemC 2.3.3:
wget https://www.accellera.org/images/downloads/standards/systemc/systemc-2.3.3.tar.gz
tar xvf systemc-2.3.3.tar.gz-
Follow the instructions specified in
INSTALL. -
Set the environment variables (
$TOOLSpoints to the directory with the manually installed tools and libraries):
export SYSTEMC_INCLUDE=$(TOOLS)/systemc-2.3.3/include/
export SYSTEMC_LIBDIR=$(TOOLS)/systemc-2.3.3/lib-linux64/Verilator
git clone https://github.com/verilator/verilator
cd verilator
autoconf
./configure
make
sudo make install- Set the environment variable (
$TOOLSpoints to the directory with the manually installed tools and libraries):
export VERILATOR_ROOT=$(TOOLS)/verilator/Clang
- Download Clang+LLVM 3.1 to be used as Shang's front-end:
wget https://releases.llvm.org/3.1/clang+llvm-3.1-x86_64-linux-ubuntu_12.04.tar.gz
tar xvf clang+llvm-3.1-x86_64-linux-ubuntu_12.04.tar.gzABC
- Install ABC:
git clone https://github.com/ispras/abc.git abc
cd abc
make ABC_USE_PIC=1 libabc.aBuild Shang
- Clone the LLVM sources:
git clone http://llvm.org/git/llvm.git- Reset to the revision
16436dffb50fac4677c7162639f8da0b73eb4e99:
cd llvm
git reset --hard 16436dffb50fac4677c7162639f8da0b73eb4e99- Clone the Shang sources:
cd lib/Target/
git clone https://forge.ispras.ru/git/shang.git VerilogBackend- Apply the patch:
cd ../../
git apply lib/Target/VerilogBackend/util/llvm-16436dffb50fac4677c7162639f8da0b73eb4e99.patch- Create the
buildfolder:
cd ..
mkdir build
cd build- Run
cmakewith the following flags ($TOOLSpoints to the directory with the manually installed tools and libraries):
/usr/bin/cmake ../llvm/
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_LOGIC_SYNTHESIS=OFF \
-DLUA_INCLUDE_DIR=$TOOLS/lua-5.1.5/include \
-DLUA_LIBRARY=$TOOLS/lua-5.1.5/lib/liblua.a \
-DLUA_LUAC=$TOOLS/lua-5.1.5/bin/luac \
-DLUABIND_INCLUDE_DIR=/usr/include \
-DLUABIND_LIBRARY=$TOOLS/luabind-0.9.1/lib/libluabindd.so \
-DLPSOLVE_INCLUDE_DIR=/usr/include/lpsolve \
-DLPSOLVE_LIBRARY=/usr/lib/lp_solve/liblpsolve55.so \
-DABC_INCLUDE_DIR=$TOOLS/abc \
-DABC_LIBRARY=$TOOLS/abc/libabc.a \
-DSYSTEMC_ROOT_DIR=$TOOLS/systemc-2.3.3/ \
-DVERILATOR_ROOT_DIR=$TOOLS/verilator/Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels