------------------------------------------------------------------------------ INSTALL RISC V 0.2.0 ------------------------------------------------------------------------------ Requirements: - host platform: Linux, CentOS 6.6, x86_64 (or similar) - GNU C++ compiler tool chain (version 4.4.7 works, others may also) - boost library (version 1.47.0) - ROSE compiler source installation - Accellera SystemC 2.3.1 source installation Installation: - Prep1: prepare a directory tree - Prereq1: install BOOST library - Prereq2: install ROSE compiler - Prereq3: install Accellera SystemC - Step1: install RISC compiler and simulator - Step2: run the RISC demo examples ----------------------------------------------------------------------------- Prep1: Prepare a top directory to assemble all packages ----------------------------------------------------------------------------- csh$ cd /path/to/top/directory/ -> adjust the path to fit your local environment csh$ mkdir risc_v0.2.0 csh$ setenv RISC /path/to/top/directory/risc_v0.2.0 csh$ mkdir $RISC/download csh$ mkdir $RISC/build csh$ mkdir $RISC/install ----------------------------------------------------------------------------- Prereq1: Install BOOST library ----------------------------------------------------------------------------- Reference: http://www.boost.org/doc/libs/1_59_0/more/getting_started/unix-variants.html csh$ cd $RISC/download/ csh$ wget http://downloads.sourceforge.net/project/boost/boost/1.47.0/boost_1_47_0.tar.gz csh$ cd $RISC/build/ csh$ gtar xvzf ../download/boost_1_47_0.tar.gz csh$ cd boost_1_47_0/ csh$ ./bootstrap.sh --prefix=$RISC/install/boost_1_47_0 csh$ ./b2 install ----------------------------------------------------------------------------- Prereq2: Install ROSE compiler ----------------------------------------------------------------------------- Reference: https://en.wikibooks.org/wiki/ROSE_Compiler_Framework/Installation csh$ cd $RISC/download/ csh$ git clone https://github.com/rose-compiler/rose.git edg4x-rose csh$ cd edg4x-rose/ csh$ git checkout b3bfc1fdfb91f3f19c2791858b9f8c98aaf7a73e csh$ ./build csh$ cd $RISC/build/ csh$ mkdir edg4x-rose csh$ cd edg4x-rose/ csh$ setenv LD_LIBRARY_PATH $RISC/install/boost_1_47_0/lib csh$ $RISC/download/edg4x-rose/configure --prefix=$RISC/install/edg4x-rose --with-boost=$RISC/install/boost_1_47_0 --without-java --with-C_OPTIMIZE=-O2 --with-CXX_OPTIMIZE=-O2 --with-C_DEBUG=-DNDEBUG --with-CXX_DEBUG=-DNDEBUG csh$ make -j4 -> 4 parallel processes, takes about 40 minutes total csh$ make install ----------------------------------------------------------------------------- Prereq3: Install Accellera SystemC ----------------------------------------------------------------------------- Reference: http://www.accellera.org/downloads/standards/systemc/files csh$ cd $RISC/download/ csh$ wget http://www.accellera.org/images/downloads/standards/systemc/systemc-2.3.1.tgz csh$ cd $RISC/build/ csh$ gtar xvzf $RISC/download/systemc-2.3.1.tgz csh$ cd systemc-2.3.1 csh$ mkdir objdir csh$ cd objdir csh$ setenv CXX g++ csh$ ../configure --prefix=$RISC/install/systemc-2.3.1 csh$ gmake csh$ gmake install csh$ gmake check csh$ cd $RISC/build/systemc-2.3.1 csh$ mkdir objdir_pt csh$ cd objdir_pt csh$ setenv CXX g++ csh$ ../configure --prefix=$RISC/install/systemc-2.3.1_pt --enable-pthreads csh$ gmake csh$ gmake install csh$ gmake check ----------------------------------------------------------------------------- Step1: Install RISC compiler and simulator ----------------------------------------------------------------------------- Reference: http://www.cecs.uci.edu/~doemer/risc.html#RISC csh$ cd $RISC/download/ csh$ wget http://www.cecs.uci.edu/~doemer/risc/risc_v0.2.0.tar.gz csh$ cd $RISC/build/ csh$ gtar xvzf $RISC/download/risc_v0.2.0.tar.gz csh$ cd risc_v0.2.0 csh$ vi source_me.csh -> adjust the path(s) to fit your local environment: setenv RISC /path/to/top/directory/risc_v0.2.0 setenv SYSTEMC_HOME $RISC/install/systemc-2.3.1_risc setenv BOOST_HOME $RISC/install/boost_1_47_0 setenv ROSE_HOME $RISC/install/edg4x-rose setenv RISC_HOME $RISC/install/risc-0.2.0 csh$ vi source_me -> adjust the path(s) to fit your local environment: export RISC=/path/to/top/directory/risc_v0.2.0 export SYSTEMC_HOME=${RISC}/install/systemc-2.3.1_risc export BOOST_HOME=${RISC}/install/boost_1_47_0 export ROSE_HOME=${RISC}/install/edg4x-rose export RISC_HOME=${RISC}/install/risc-0.2.0 csh$ source source_me.csh csh$ make clean csh$ make build csh$ make install csh$ make test ----------------------------------------------------------------------------- Step2: Run the RISC demo examples ----------------------------------------------------------------------------- csh$ cd $RISC/build/risc_v0.2.0/ csh$ source source_me.csh csh$ cd projects/demo_201509 csh$ vi Makefile csh$ make risc csh$ vi play.cpp csh$ make play_seq csh$ make play_ooo csh$ /usr/bin/time play_seq csh$ /usr/bin/time play_ooo csh$ vi mandelbrot.cpp csh$ make mandelbrot_seq csh$ make mandelbrot_ooo csh$ /usr/bin/time mandelbrot_seq csh$ /usr/bin/time mandelbrot_ooo ------------------------------------------------------------------------------ The RISC Team, September 2015. ------------------------------------------------------------------------------