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`; -chdir("build/"); +chdir("build/") || die("chdir"); # Build the Project: -print color("reset"),"\nBuild Project\t"; +my $starttime = time(); +print "\n", color($timestamp_color), timestamp(), color("reset"),"Build Project\t"; `qmake ../DRAMSys/dram.vp.system.pro >/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; } # Find all tests: # Navigate to Build Folder -chdir("../DRAMSys/tests"); +chdir("../DRAMSys/tests") || die("chdir"); my @tests = split(/\n/,`find -iname test.pl`); # Run Tests: @@ -79,22 +92,32 @@ foreach(@tests) if($_ =~ /\.\/([\w\d]+)\/test\.pl/) { my $name = $1; - chdir("./$name"); - print color("reset"),"Test: ".$name."\t"; + chdir("./$name") || die("chdir"); + 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("../"); + chdir("../") || die("chdir"); } else { 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 ); +} +