#Lab 2
###Description The distributed operation layer (DOL) is a software development framework to program parallel applications. The DOL allows to specify applications based on the Kahn process network model of computation and features a simulation engine based on SystemC. Moreover, the DOL provides an XML-based specification format to describe the implementation of a parallel application on a multi-processor systems, including binding and mapping.
Reference:
www.tik.ee.ethz.ch/~shapes/dol.html
###How to install
- 安装VMware,下载乌邦图镜像并创建一个虚拟机。
Vmware教程:http://jingyan.baidu.com/article/0320e2c1ef9f6c1b87507bf6.html
ubuntu下载:http://www.ubuntu.com/download/desktop
- 配置必要的环境:
$ sudo apt-get update
$ sudo apt-get install ant
$ sudo apt-get install openjdk-7-jdk
$ sudo apt-get install unzip
- 将dol文件和system文件添加到ubuntu中,并解压文件:
![dol](https://github.com/CYXXYC/for-graph/blob/master/dolfile.png)
新建dol的文件夹:
`$ mkdir dol`
将dolethz.zip解压到 dol文件夹中
`$ unzip dol_ethz.zip -d dol`
解压systemc
`$ tar -zxvf systemc-2.3.1.tgz`
4. 编译systemc:
解压后进入systemc-2.3.1的目录下
`$ cd systemc-2.3.1`
新建一个临时文件夹objdir
`$ mkdir objdir`
进入该文件夹objdir
`$ cd objdir`
运行configure(能根据系统的环境设置一下参数,用于编译)
`$ ../configure CXX=g++ --disable-async-updates`
运行configure结果如下图:
![configure](https://github.com/CYXXYC/for-graph/blob/master/configure.png)
继续编译
`$ sudo make install`
记录当前的工作路径
`$ pwd`
-
编译dol:
进入dol的文件夹:$ cd ../dol
修改build_zip.xml文件,找到下面这段话:<property name="systemc.inc" value="YYY/include"/>
<property name="systemc.lib" value="YYY/lib-linux/libsystemc.a"/>
把YYY改成上页pwd的结果;
然后编译:$ ant -f build_zip.xml all
-
最后的运行结果:
进入build/bin/mian路径下$ cd build/bin/main
运行第一个例子$ ant -f runexample.xml -Dnumber=1
运行成功结果如图:
###Experimental experience
- 选对镜像很重要,不然换源会很麻烦,如果换了几次源都不行,建议用配置好的同学的镜像;
- 学会了ubuntu的几个语句,如解压unzip,创建文件夹mkdir;
- markdown真是非常好用方便的编辑软件。