MemTest.py revision 8436
14486SN/A# Copyright (c) 2005-2007 The Regents of The University of Michigan 24486SN/A# All rights reserved. 34486SN/A# 44486SN/A# Redistribution and use in source and binary forms, with or without 54486SN/A# modification, are permitted provided that the following conditions are 64486SN/A# met: redistributions of source code must retain the above copyright 74486SN/A# notice, this list of conditions and the following disclaimer; 84486SN/A# redistributions in binary form must reproduce the above copyright 94486SN/A# notice, this list of conditions and the following disclaimer in the 104486SN/A# documentation and/or other materials provided with the distribution; 114486SN/A# neither the name of the copyright holders nor the names of its 124486SN/A# contributors may be used to endorse or promote products derived from 134486SN/A# this software without specific prior written permission. 144486SN/A# 154486SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 164486SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 174486SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 184486SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 194486SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 204486SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 214486SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 224486SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 234486SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 244486SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 254486SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 264486SN/A# 274486SN/A# Authors: Nathan Binkert 284486SN/A 295034SN/Afrom MemObject import MemObject 303102SN/Afrom m5.params import * 313187SN/Afrom m5.proxy import * 323187SN/A 335034SN/Aclass MemTest(MemObject): 341366SN/A type = 'MemTest' 354893SN/A max_loads = Param.Counter(0, "number of loads to execute") 363262SN/A atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n") 371310SN/A memory_size = Param.Int(65536, "memory size") 381310SN/A percent_dest_unaligned = Param.Percent(50, 391310SN/A "percent of copy dest address that are unaligned") 401310SN/A percent_reads = Param.Percent(65, "target read percentage") 417544SN/A issue_dmas = Param.Bool(False, "this memtester should issue dma requests") 421310SN/A percent_source_unaligned = Param.Percent(50, 431310SN/A "percent of copy source address that are unaligned") 443342SN/A percent_functional = Param.Percent(50, "percent of access that are functional") 451310SN/A percent_uncacheable = Param.Percent(10, 461310SN/A "target uncacheable percentage") 471310SN/A progress_interval = Param.Counter(1000000, 481310SN/A "progress report interval (in accesses)") 491310SN/A trace_addr = Param.Addr(0, "address to trace") 503187SN/A 513187SN/A test = Port("Port to the memory system to test") 523187SN/A functional = Port("Port to the functional memory used for verification") 538436SBrad.Beckmann@amd.com suppress_func_warnings = Param.Bool(False, 548436SBrad.Beckmann@amd.com "suppress warnings when functional accesses fail.\n") 55