DineroIV is a cache simulator developed by Jan Edler, formerly with NEC, and Mark Hill, from the University of Madison-Wisconsin.

The vanilla version of DineroIV is designed as a trace driven single-core cache simulator. It can be found here. Notably, DineroIV can model discrete instruction caches/data caches and multiple cache levels. (The default hard-coded limit is 5 levels, but this can be modified in the source code.) It supports write-through/ write-back policies and write-allocate/write-no-allocate policies. Block and subblock sizes can be modified along with replacement policies. A limitied form of prefetching is also available.

CSRL's main addition to DineroIV is the implementation of multi-core caches. The framework for supporting multi-core required a rewrite of several DineroIV data structures and algorithms. Changes to the input format were also made; the original format only requires a label and a hexidecimal address. The new format requires several additional fields; information regarding the new input format can be found by reading the source. Also, a coherency/consistency protocol was added to account for shared data within the cache.

The coherency protocol was designed as a directory protocol that shadows data in memory. MESI states were used in the implementation. (Well, the invalid state was not used, but the others were.) One limitation/feature of the directory is that it works regardless of the whether the caches are inclusive or exclusive. This characteristic requires that when a core modifies or "writes" data that another core owns, the owning core must copy back and invalidate its version all the way back to memory before ownership can be transferred. This can cause unnecessary misses to occur as the change might only need to propagate back to a shared cache.

Something also needs to be mentioned about how the caches are interconnected. With commandline options, the number of caches per level can be set. The command line option for each level affects how the caches are distributed to caches in the next highest (closer to memory) level. DineroIV requires that an equal number of caches are distributed to parent cores in the next highest level. With commandline options, this means that the L1$s must be divisible by the L2$s with no remainder (numberof(L1$) % numberof(L2$) == 0). Don't worry about the case when no higher level cache is present; it was taken into consideration. The resulting organization is symmetric when viewing the cache from a logical perspective.

DineroIV multi-core output looks similar to the original DineroIV output with the exception that each level of cache can have multiple cores.

Installing DineroIV

Get the latest version using subversion 
username: guest, password: Password2013

 $ svn co http://csrl.unt.edu/svn/tools/DineroIV_MC/ dineroIV --username=guest 

Change into the directory and build it.

 $ cd dineroIV; make clean; make 

Run it.

 $ ./dineroIV -l1-usize 32768 -l1-usize 32 -informat d < input.trace > dinero.out 

 

Running DineroIV

Running dinero is straightforward; however, take a minute to look at the -help output. It gives an idea of dineroIV's options. Most of the cache options are highly customizible. The more common options are cache size, line size and associativity.

There is a "script" folder inside the main Dinero folder. The script folder contains a "runParams" executable file that has various configurations. The configurations might help new users to get used to the general invocation syntax.

 
#!/bin/sh

dinero_param1='-l1-dsize 32768 -l1-dbsize 32 -l1-dassoc 4 -l1-drepl r -informat d'
dinero_param2='-l1-dsize 32768 -l1-dbsize 32 -l1-dassoc 1 -l1-drepl r -informat d'

p_dinero='/home/user/dineroIV'
input_trace='/home/user/Desktop/trace.trace'
dinero_output='/home/user/Desktop/dinero.out

$p_dinero/dineroIV $dinero_param2 < $input_trace > $dinero_output

 

Contact

contact: brandonpotter[at]my[dot]unt[dot]edu