diff --git a/DRAMSys/simulator/src/error/errormodel.cpp b/DRAMSys/simulator/src/error/errormodel.cpp index 477adfbb..1fe29ccb 100644 --- a/DRAMSys/simulator/src/error/errormodel.cpp +++ b/DRAMSys/simulator/src/error/errormodel.cpp @@ -231,24 +231,28 @@ void errorModel::markBitFlips() { for(unsigned int row = 0; row < Configuration::getInstance().memSpec.NumberOfRows; row++) { - // Get the time interval between now and the last acivate/refresh - sc_time interval = sc_time_stamp() - lastRowAccess[row]; - - // Obtain the number of bit flips for the current temperature and the time interval: - unsigned int n = getNumberOfFlips(temperature, interval); - - // Check if the current row is in the range of bit flips for this interval - // and temperature, if yes mark it as flipped: - for (unsigned int i=0; i/dev/null 2>&1`; `make -j$numberOfCores > /dev/null 2>&1`; +my $took = time() - $starttime; # Check if Build was sucessful: if( -e "./simulator/dramSys" ) { - print color("reset"),"[ ", color("green"), "done", color("reset"), " ]\n"; + print color("reset"),"[ ", color("green"), "done", color("reset"), " ]\t", "(", $took, " seconds)\n"; } else { - print color("reset"),"[ ", color("red"), "fail", color("reset"), " ]\n"; + print color("reset"),"[ ", color("red"), "fail", color("reset"), " ]\t", "(", $took, " seconds)\n"; exit -1; } @@ -80,16 +86,18 @@ foreach(@tests) { my $name = $1; chdir("./$name"); - print color("reset"),"Test: ".$name."\t"; + print color($timestamp_color), timestamp(), color("reset"),"Test: ".$name."\t"; + $starttime = time(); `perl test.pl`; + $took = time() - $starttime; if( $? == 0 ) { - print color("reset"),"[ ", color("green"), "done", color("reset"), " ]\n"; + print color("reset"),"[ ", color("green"), "done", color("reset"), " ]\t", "(", $took, " seconds)\n"; } else { - print color("reset"),"[ ", color("red"), "fail", color("reset"), " ]\n"; + print color("reset"),"[ ", color("red"), "fail", color("reset"), " ]\t", "(", $took, " seconds)\n"; } chdir("../"); } @@ -98,3 +106,11 @@ foreach(@tests) exit -1; } } + +sub timestamp { + my $t = localtime; + return sprintf( "[%04d-%02d-%02d %02d:%02d:%02d]\t", + $t->year + 1900, $t->mon + 1, $t->mday, + $t->hour, $t->min, $t->sec ); +} +