1、Install bison and flex, if you have not installed already.
$ sudo apt-get install bison flex
2、Download and unzip.Sources can be downloaded from http://www.pdl.cmu.edu/DiskSim/.I downloaded DiskSim 4.0 with dixtrac.
$ tar xfz disksim-4.0-with-dixtrac.tar.gz
$ cd disksim-4.0
$ unzip ../ssd-add-on.zip
3、Apply SSD add on patch.
$ patch -p1 < ssdmodel/ssd-patch
4、. Append SSD model library path to dixtrac.
add these lines to dixtrac/.paths
# path to ssdmodel
export SSDMODEL_PREFIX=../ssdmodel
export SSDMODEL_INCL=$(SSDMODEL_PREFIX)/include
export SSDMODEL_CFLAGS=-I$(SSDMODEL_INCL)
export SSDMODEL_LDPATH=$(SSDMODEL_PREFIX)/lib
export SSDMODEL_LDFLAGS=-L$(SSDMODEL_LDPATH) -lssdmodel
modify dixtrac/Makefile like this :
$(LIBDISKSIM_LDFLAGS) \
$(MEMSMODEL_LDFLAGS) \
$(DISKMODEL_LDFLAGS) \
$(SSDMODEL_LDFLAGS) \
$(LIBPARAM_LDFLAGS) \
$(LIBDDBG_LDFLAGS) \
$(ST_LDFLAGS)
CFLAGS = -Wall -g -MD -I. $(DEFINES) -I$(STHREADS) $(DMINCLUDES) \
$(LIBDISKSIM_CFLAGS) \
$(DISKMODEL_CFLAGS) $(LIBPARAM_CFLAGS) $(LIBDDBG_CFLAGS) \
$(SSDMODEL_CFLAGS)
5、Compile~~~!
$ make
6、Check if it works well.
$ cd valid; ./runvalid
$ chmod a+x ../ssdmodel/valid/runvalid
$ cd ../ssdmodel/valid; ./runvalid
Ok. It is all.