ESESC仿真器的安装

一、ESESC简介

1、ESESC blog has these slides

http://masc.soe.ucsc.edu/esesc

2、ESESC forum

https://groups.google.com/forum/#!forum/esesc

3、ESESC repository at github

https://github.com/masc-ucsc/esesc

4、To get the code

https://github.com/masc-ucsc/esesc.git

注意:上面都是一些链接,你可以从这些网站得到一些关于ESESC仿真器的资料。

二、ESESC仿真器的安装

1、首先从官网下载源代码,上面的链接已经给出

2、建立自己的目录结构,例如:/home/ercesi/cyh/esesc

3、将下载好的源代码解压到自己的目录下,例如: /home/ercesi/cyh/esesc/esesc-master

4、ESESC版本

ESESC有两个版本,即release版本和debug版本,debug版本slower、 more information ,然而release版本 faster 、less information,在本文中采用的是release版本。

在/home/ercesi/cyh/esesc/esesc-master下面建立build目录,在build目录下建立release目录,最后结果:/home/ercesi/cyh/esesc/esesc-master/build/release

5、安装下面的软件

sudo apt-get install build-essential
sudo apt-get install cmake
sudo apt-get install libboost-dev
sudo apt-get install bison flex
sudo apt-get install g++
sudo apt-get install python
sudo apt-get install texinfo
sudo apt-get install libglib2.0-dev
sudo apt-get install libncurses5-dev

6、编译

执行下面的指令:

cmake ~/cyh/esesc/esesc-master

输出的内容:

ercesi@demo:~/cyh/esesc/esesc-master/build/release$ cmake /home/ercesi/cyh/esesc/esesc-master
-- The C compiler identification is GNU 4.4.7 -- The CXX compiler identification is GNU 4.4.7 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Using /usr/bin/cc   -DESESC_SYSTEM=0 Enable esesc/qemu user mode simulation   -DESESC_LIVE=0 Disable esesc live compilation (default)   -DCMAKE_HOST_MARCH=native compilation   -DCMAKE_BUILD_TYPE=Release release compilation options (default) -- Found ZLIB: /usr/local/lib/libz.so (found version "1.2.8") -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so -- Could NOT find pixman-1 (missing: PIXMAN_LIBRARY PIXMAN_INCLUDE_DIR) -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26") -- checking for one of the modules 'sdl2' -- Found PythonInterp: /usr/bin/python (found version "2.7.6") -- Configuring done -- Generating done -- Build files have been written to: /home/ercesi/cyh/esesc/esesc-master/build/release

执行下面的指令:

make

在这一步的时候我遇到了好多的问题,下面来谈谈我遇到的问题。

问题1:在80%的时候由于qume的问题而无法继续
解决的方法:执行下列代码

cd ~/cyh/esesc/esesc-master/emul/qemu
./configure
sudo make
sudo make install 

问题2:再次make的时候,出现的问题是提示pixman的版本低
解决的方法:下载高版本的pixman,并且按照一般软件安装的方法进行安装。

问题3:再次make又会出现如下的问题:

ERROR: DTC (libfdt) not present. Your options:
         (1) Preferred: Install the DTC (libfdt) devel package
         (2) Fetch the DTC submodule, using:
             git submodule update --init dtc

解决的方法:执行下面的代码:

sudo apt-get install libfdt-dev

问题4:再次make的时候出现以下的问题,提示许多的库找不到,这个时候耐心的安装所有短缺的库就可以。

/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2    
/usr/bin/ld: cannot find -lepoxy     
/usr/bin/ld: cannot find -lEGL       
/usr/bin/ld: cannot find -laio       
/usr/bin/ld: cannot find -lcurl     
/usr/bin/ld: cannot find -lssh2      
/usr/bin/ld: cannot find -lbz2       
/usr/bin/ld: cannot find -lpixman-1
/usr/bin/ld: cannot find -lnuma      
/usr/bin/ld: cannot find -lncursesw  
/usr/bin/ld: cannot find -luuid      
/usr/bin/ld: cannot find -lSDL      
collect2: ld returned 1 exit status
make[2]: *** [main/esesc] Error 1
make[1]: *** [main/CMakeFiles/esesc.dir/all] Error 2
make: *** [all] Error 2

解决的方法:安装下列库文件

sudo apt-get install libgles2-mesa-dev
sudo apt-get install libepoxy-dev
sudo apt-get install libegl1-mesa-dev
sudo apt-get install libaio-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libssh2-1-dev
sudo apt-get install libbz2-dev
sudo apt-get install libnuma-dev
sudo apt-get install libncursesw5-dev
sudo apt-get install uuid-dev
sudo apt-get install libsdl-dev

问题5:再次make又会出现下面的问题。

/usr/bin/ld: cannot find -lseccomp   
collect2: ld returned 1 exit status
make[2]: *** [main/esesc] Error 1
make[1]: *** [main/CMakeFiles/esesc.dir/all] Error 2
make: *** [all] Error 2

解决的方法:执行下面的指令即可

sudo apt-get install libseccomp-dev

然后make,如果出现以下的内容证明ESESC安装成功。

[ 98%] Building CXX object main/CMakeFiles/rabbitso.dir/__/misc/libsuc/Snippets.cpp.o
Linking CXX shared library librabbitso.so
[ 98%] Built target rabbitso
Scanning dependencies of target gtest
[ 98%] Building CXX object tests/gtest-1.7.0/CMakeFiles/gtest.dir/src/gtest-all.cc.o
Linking CXX static library libgtest.a
[ 98%] Built target gtest
Scanning dependencies of target gtest_main
[100%] Building CXX object tests/gtest-1.7.0/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
Linking CXX static library libgtest_main.a
[100%] Built target gtest_main

7、运行例子程序

在release下面建立run文件夹,并且将/home/ercesi/cyh/esesc/esesc-master/bins/和/home/ercesi/cyh/esesc/esesc-master/conf/下的所有文件拷贝到run下。
接着执行下面的代码:

cd ~/cyh/esesc/esesc-master/build/release/run
~/cyh/esesc/esesc-master/build/release/main/esesc <crafty.in

输出的结果如下:

Fill router is ITLB(0)
Bottom:clear router is Memory(0)
single:clear router is L2(0)
single:clear router is IL1(0)
single:clear router is ITLB(0)
Fill router is PTLB(0)
Bottom:clear router is Memory(0)
single:clear router is L2(0)
Creating ooorder processor 0
Fill router is ITLB(1)
Bottom:clear router is Memory(1)
single:clear router is L2(1)
single:clear router is IL1(1)
single:clear router is ITLB(1)
Fill router is PTLB(1)
Bottom:clear router is Memory(0)
single:clear router is L2(0)
Creating ooorder processor 1
Fill router is ITLB(2)
Bottom:clear router is Memory(2)
single:clear router is L2(2)
single:clear router is IL1(2)
single:clear router is ITLB(2)
Fill router is PTLB(2)
Bottom:clear router is Memory(1)
single:clear router is L2(1)
Creating ooorder processor 2
Fill router is ITLB(3)
Bottom:clear router is Memory(3)
single:clear router is L2(3)
single:clear router is IL1(3)
single:clear router is ITLB(3)
Fill router is PTLB(3)
Bottom:clear router is Memory(1)
single:clear router is L2(1)
Creating ooorder processor 3
Sampler: inst, R:2500000, W:2450000, D:20000, T:130000
Sampler: inst, nInstMax:500000000, nInstSkip:100000000, maxnsTime:500000000
Power calculations disabled
STARTING QEMU ......
QEMUReader: Initializing qemu...
Starting qemu with
arg[0] is: qemu
arg[1] is: spec00_crafty.mips64
r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0
Crafty v14.3

White(1): White(1): pondering disabled.
White(1): noise level set to 0.
White(1): search time set to 99999.00.
White(1): verbosity set to 5.
White(1): White(1): search depth set to 11.
White(1): 
              clearing hash tables

              depth   time  score   variation (1)
                1   ###.## 4.14 Qxb6
                1-> ###.## 4.14 Qxb6
                2   ###.## 4.01 Qxb6 e4
                2-> ###.## 4.01 Qxb6 e4
                3   ###.## ++ Qxb6!!
                3   ###.## 4.32 Qxb6 Rf6 Qd8+ Kh7
                3-> ###.## 4.32 Qxb6 Rf6 Qd8+ Kh7
                4   ###.## 4.22 Qxb6 e4 Qe6 Rf2
                4-> ###.## 4.22 Qxb6 e4 Qe6 Rf2
                5   ###.## 4.15 Qxb6 Rf2 Qd8+ Kh7 Qd3+ e4 Qd6
                5-> ###.## 4.15 Qxb6 Rf2 Qd8+ Kh7 Qd3+ e4 Qd6
                6   ###.## 4.01 Qxb6 Rf2 Qd8+ Kh7 Qd5 Qe2 b4
                6-> ###.## 4.01 Qxb6 Rf2 Qd8+ Kh7 Qd5 Qe2 b4
r0r0                7   ###.## -- Qxb6
r0r0r0r0r0                7   ###.## 0.09 Qxb6 Rf1 Qd8+ Kh7 Qd3+ e4 Qxf1 Qxf1
                                    b4
r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0                7-> ###.## 0.09 Qxb6 Rf1 Qd8+ Kh7 Qd3+ e4 Qxf1 Qxf1
                                    b4
r0r0r0r0r0r0r0r0r0r0r0r0r0                8   ###.## -0.13 Qxb6 Rf1 Qd8+ Kh7 Qd3+ e4 Qxf1 Qxf1
                                    b4 e3
r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0r0BootLoader::unboot called... Finishing the work
Destroying TQueue 15 with pending nodes

继续执行下面的代码:

~/cyh/esesc/esesc-master/conf/scripts/report.pl -a

输出的结果如下:

ESESC仿真器的安装_第1张图片

Good Luck Fern!

你可能感兴趣的:(ESESC仿真器的安装)