Error model automatic test is now ready to run.
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -10,7 +10,7 @@
|
|||||||
/build-simulation
|
/build-simulation
|
||||||
/release-simulation
|
/release-simulation
|
||||||
*.*~
|
*.*~
|
||||||
build-*/
|
build*/
|
||||||
._.DS_Store
|
._.DS_Store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
*.swp
|
*.swp
|
||||||
|
|||||||
1
DRAMSys/tests/.gitignore
vendored
Normal file
1
DRAMSys/tests/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.txt
|
||||||
1
DRAMSys/tests/error/.gitignore
vendored
Normal file
1
DRAMSys/tests/error/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
*.stl
|
||||||
0
DRAMSys/tests/error/generateErrorTest.pl
Normal file → Executable file
0
DRAMSys/tests/error/generateErrorTest.pl
Normal file → Executable file
@@ -1,27 +1,27 @@
|
|||||||
<simulation>
|
<simulation>
|
||||||
<simconfig>
|
<simconfig>
|
||||||
<Debug value="0" />
|
<Debug value="0" />
|
||||||
<DatabaseRecording value="1" />
|
<DatabaseRecording value="0" />
|
||||||
<PowerAnalysis value="1" />
|
<PowerAnalysis value="1" />
|
||||||
<NumberOfTracePlayers value="4"/>
|
<NumberOfTracePlayers value="1"/>
|
||||||
<NumberOfMemChannels value="4"/>
|
<NumberOfMemChannels value="4"/>
|
||||||
</simconfig>
|
</simconfig>
|
||||||
|
|
||||||
<memspecs>
|
<memspecs>
|
||||||
<memspec src="../../DRAMSys/simulator/resources/configs/memspecs/WideIO.xml"></memspec>
|
<memspec src="../../DRAMSys/tests/error/WideIO.xml"></memspec>
|
||||||
</memspecs>
|
</memspecs>
|
||||||
|
|
||||||
<addressmappings>
|
<addressmappings>
|
||||||
<addressmapping src="../../DRAMSys/simulator/resources/configs/amconfigs/am_wideio.xml"></addressmapping>
|
<addressmapping src="../../DRAMSys/tests/error/am_wideio.xml"></addressmapping>
|
||||||
</addressmappings>
|
</addressmappings>
|
||||||
|
|
||||||
<memconfigs>
|
<memconfigs>
|
||||||
<memconfig src="../../DRAMSys/simulator/resources/configs/memconfigs/fr_fcfs.xml"/>
|
<memconfig src="../../DRAMSys/tests/error/fr_fcfs.xml"/>
|
||||||
</memconfigs>
|
</memconfigs>
|
||||||
|
|
||||||
<tracesetups>
|
<tracesetups>
|
||||||
<tracesetup id="fifo">
|
<tracesetup id="fifo">
|
||||||
<device clkMhz="1000">test_error.stl</device>
|
<device clkMhz="1000">../../../tests/error/test_error.stl</device>
|
||||||
</tracesetup>
|
</tracesetup>
|
||||||
</tracesetups>
|
</tracesetups>
|
||||||
</simulation>
|
</simulation>
|
||||||
|
|||||||
80
DRAMSys/tests/error/test.pl
Normal file
80
DRAMSys/tests/error/test.pl
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
#!/usr/bin/perl -w
|
||||||
|
# Copyright (c) 2015, University of Kaiserslautern
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions are
|
||||||
|
# met:
|
||||||
|
#
|
||||||
|
# 1. Redistributions of source code must retain the above copyright notice,
|
||||||
|
# this list of conditions and the following disclaimer.
|
||||||
|
#
|
||||||
|
# 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in the
|
||||||
|
# documentation and/or other materials provided with the distribution.
|
||||||
|
#
|
||||||
|
# 3. Neither the name of the copyright holder nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived from
|
||||||
|
# this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||||
|
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||||
|
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Matthias Jung
|
||||||
|
# Eder F. Zulian
|
||||||
|
#
|
||||||
|
|
||||||
|
# Test error:
|
||||||
|
# This test runs the simulation with error model enabled.
|
||||||
|
# The main configuration file for this test is DRAMSys/tests/error/sim-batch.xml.
|
||||||
|
#
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
use Term::ANSIColor;
|
||||||
|
|
||||||
|
# Create the input file (first make sure the script is executable)
|
||||||
|
chdir("../../DRAMSys/tests/error");
|
||||||
|
`chmod u+x ./generateErrorTest.pl`;
|
||||||
|
`./generateErrorTest.pl > test_error.stl`;
|
||||||
|
|
||||||
|
# Run Simulation:
|
||||||
|
chdir("../../../build/simulator/");
|
||||||
|
`./dramSys ../../DRAMSys/tests/error/sim-batch.xml > ../../DRAMSys/tests/error/output.txt`;
|
||||||
|
|
||||||
|
chdir("../../DRAMSys/tests/error");
|
||||||
|
|
||||||
|
my @channels_retention_errors = ();
|
||||||
|
@channels_retention_errors = split(/\n/,`cat output.txt | grep 'Number of Retention Error Events' | cut -d= -f2 | sed 's/ //g'`);
|
||||||
|
|
||||||
|
if (!@channels_retention_errors) {
|
||||||
|
print color("red"), "\tError: ", color("green"), "error model output information not found.\n";
|
||||||
|
print color("yellow"), "\tCheck if error model is enabled.\n";
|
||||||
|
exit -1
|
||||||
|
}
|
||||||
|
|
||||||
|
my $errors_found = 0;
|
||||||
|
foreach (@channels_retention_errors) {
|
||||||
|
print "$_\n";
|
||||||
|
$errors_found += $_;
|
||||||
|
}
|
||||||
|
|
||||||
|
print color("green"), "Number of Retention Errors Events (all banks): $errors_found\n";
|
||||||
|
|
||||||
|
if ($errors_found == 0) {
|
||||||
|
# Fail, errors expected but not found.
|
||||||
|
exit -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Success, at least one error was found.
|
||||||
|
exit 0;
|
||||||
|
|
||||||
Reference in New Issue
Block a user