Sie können das Programm mit folgender Eingabe im Simulator laufen lassen:
// -----------------------------------------------------------------------------
// parameters for DM cache
// -----------------------------------------------------------------------------
#const SingleCycle yes // whether everything is done in one stage
#const DataWidth 16 // bitwidth of registers (two bytes wide)
#const MemSize 512 // size of physical main memory in bytes
#const CacheSize 32 // size of data cache in bytes
#const BlockSize 4 // number of bytes in a block
#const SetAssoc 1 // number of blocks in a set
// -----------------------------------------------------------------------------
// parameters for A2 cache
// -----------------------------------------------------------------------------
#const SingleCycle yes // whether everything is done in one stage
#const DataWidth 16 // bitwidth of registers (two bytes wide)
#const MemSize 512 // size of physical main memory in bytes
#const CacheSize 32 // size of data cache in bytes
#const BlockSize 4 // number of bytes in a block
#const SetAssoc 4 // number of blocks in a set
mov $0, 30
mov $2, 0
mov $1, 16
loop: ldi $4, $2, 4
modi $3, $2, 4
ld $5, $3, $0
xor $6, $4, $5
add $7, $2, $0
sti $6, $7, 6
addi $2, $2, 1
slt $7, $2, $1
bnz $7, loop