MemTest.py revision 9338
1892SN/A# Copyright (c) 2005-2007 The Regents of The University of Michigan 21762SN/A# All rights reserved. 3892SN/A# 4892SN/A# Redistribution and use in source and binary forms, with or without 5892SN/A# modification, are permitted provided that the following conditions are 6892SN/A# met: redistributions of source code must retain the above copyright 7892SN/A# notice, this list of conditions and the following disclaimer; 8892SN/A# redistributions in binary form must reproduce the above copyright 9892SN/A# notice, this list of conditions and the following disclaimer in the 10892SN/A# documentation and/or other materials provided with the distribution; 11892SN/A# neither the name of the copyright holders nor the names of its 12892SN/A# contributors may be used to endorse or promote products derived from 13892SN/A# this software without specific prior written permission. 14892SN/A# 15892SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 16892SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 17892SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 18892SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 19892SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20892SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 21892SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22892SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23892SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24892SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25892SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26892SN/A# 272665Ssaidi@eecs.umich.edu# Authors: Nathan Binkert 282665Ssaidi@eecs.umich.edu 29892SN/Afrom MemObject import MemObject 30802SN/Afrom m5.params import * 311722SN/Afrom m5.proxy import * 32802SN/A 33802SN/Aclass MemTest(MemObject): 34802SN/A type = 'MemTest' 35802SN/A cxx_header = "cpu/testers/memtest/memtest.hh" 36802SN/A max_loads = Param.Counter(0, "number of loads to execute") 37802SN/A atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n") 38802SN/A memory_size = Param.Int(65536, "memory size") 39802SN/A percent_dest_unaligned = Param.Percent(50, 40802SN/A "percent of copy dest address that are unaligned") 411310SN/A percent_reads = Param.Percent(65, "target read percentage") 422542SN/A issue_dmas = Param.Bool(False, "this memtester should issue dma requests") 43802SN/A percent_source_unaligned = Param.Percent(50, 44802SN/A "percent of copy source address that are unaligned") 45802SN/A percent_functional = Param.Percent(50, "percent of access that are functional") 46802SN/A percent_uncacheable = Param.Percent(10, 472107SN/A "target uncacheable percentage") 48802SN/A progress_interval = Param.Counter(1000000, 492539SN/A "progress report interval (in accesses)") 502542SN/A trace_addr = Param.Addr(0, "address to trace") 51802SN/A 522539SN/A test = MasterPort("Port to the memory system to test") 53802SN/A functional = MasterPort("Port to the functional memory " \ 54802SN/A "used for verification") 55909SN/A suppress_func_warnings = Param.Bool(False, 563349Sbinkertn@umich.edu "suppress warnings when functional accesses fail.\n") 57909SN/A sys = Param.System(Parent.any, "System Parameter") 582539SN/A 592539SN/A