Merge pull request #34 from fzeder/master
Please see the individual commits.
This commit is contained in:
@@ -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<n; i++)
|
||||
// If the row has never been accessed ignore it and go to the next one
|
||||
if (lastRowAccess[row] != SC_ZERO_TIME)
|
||||
{
|
||||
// Check if Bit has marked as flipped yet, if yes mark it as flipped
|
||||
if(weakCells[i].flipped == false && weakCells[i].row == row)
|
||||
{
|
||||
std::stringstream msg;
|
||||
msg << "Maked weakCell[" << i << "] as flipped" << std::endl;
|
||||
DebugManager::getInstance().printDebugMessage(name, msg.str());
|
||||
// Get the time interval between now and the last acivate/refresh
|
||||
sc_time interval = sc_time_stamp() - lastRowAccess[row];
|
||||
|
||||
weakCells[i].flipped = true;
|
||||
// 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<n; i++)
|
||||
{
|
||||
// Check if Bit has marked as flipped yet, if yes mark it as flipped
|
||||
if(weakCells[i].flipped == false && weakCells[i].row == row)
|
||||
{
|
||||
std::stringstream msg;
|
||||
msg << "Maked weakCell[" << i << "] as flipped" << std::endl;
|
||||
DebugManager::getInstance().printDebugMessage(name, msg.str());
|
||||
|
||||
weakCells[i].flipped = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,11 +31,15 @@
|
||||
#
|
||||
# Authors:
|
||||
# Matthias Jung
|
||||
# Eder F. Zulian
|
||||
#
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use Term::ANSIColor;
|
||||
use Time::localtime;
|
||||
|
||||
my $timestamp_color = "green";
|
||||
|
||||
print color("red")," |||\n";
|
||||
print color("red")," +---+ Microelectronic Systems\n";
|
||||
@@ -53,18 +57,20 @@ chdir("../../");
|
||||
chdir("build/");
|
||||
|
||||
# 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;
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user