# (use chmod +x and leave above line to auto-run awk) # This awk script converts dineroIII bus2 output (-o2) back into # din format. This is useful for simulating a level two cache. # # From H&P tools support, modified by Phil Koopman 10/97. # # Example usage: # cat foo.din | dinero -b16 -i8K -d8K -o2 | twolevel.awk | dinero -b16 -u16K # # Information on whether a read miss is due to a read, write or # instruction fetch is lost. Snoop (-o3) records are not handled. # $1 != "BUS2" { print $0 >>fn } $1 == "BUS2" && $2 =="r" { print "0 " $4 } $1 == "BUS2" && $2 =="w" { print "1 " $4 } $1 == "BUS2" && $2 !="r" && $2 !="w" { printf "ERROR UNEXPECTED INPUT: " ; print }