MemTest.py revision 8832
19814Sandreas.hansson@arm.com# Copyright (c) 2005-2007 The Regents of The University of Michigan 22292SN/A# All rights reserved. 310333Smitch.hayenga@arm.com# 410239Sbinhpham@cs.rutgers.edu# Redistribution and use in source and binary forms, with or without 57597Sminkyu.jeong@arm.com# modification, are permitted provided that the following conditions are 67597Sminkyu.jeong@arm.com# met: redistributions of source code must retain the above copyright 77597Sminkyu.jeong@arm.com# notice, this list of conditions and the following disclaimer; 87597Sminkyu.jeong@arm.com# redistributions in binary form must reproduce the above copyright 97597Sminkyu.jeong@arm.com# notice, this list of conditions and the following disclaimer in the 107597Sminkyu.jeong@arm.com# documentation and/or other materials provided with the distribution; 117597Sminkyu.jeong@arm.com# neither the name of the copyright holders nor the names of its 127597Sminkyu.jeong@arm.com# contributors may be used to endorse or promote products derived from 137597Sminkyu.jeong@arm.com# this software without specific prior written permission. 147597Sminkyu.jeong@arm.com# 157597Sminkyu.jeong@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162292SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172292SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182292SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192292SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202292SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212292SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222292SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232292SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242292SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252292SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262292SN/A# 272292SN/A# Authors: Nathan Binkert 282292SN/A 292292SN/Afrom MemObject import MemObject 302292SN/Afrom m5.params import * 312292SN/Afrom m5.proxy import * 322292SN/A 332292SN/Aclass MemTest(MemObject): 342292SN/A type = 'MemTest' 352292SN/A max_loads = Param.Counter(0, "number of loads to execute") 362292SN/A atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n") 372292SN/A memory_size = Param.Int(65536, "memory size") 382292SN/A percent_dest_unaligned = Param.Percent(50, 392292SN/A "percent of copy dest address that are unaligned") 402292SN/A percent_reads = Param.Percent(65, "target read percentage") 412689Sktlim@umich.edu issue_dmas = Param.Bool(False, "this memtester should issue dma requests") 422689Sktlim@umich.edu percent_source_unaligned = Param.Percent(50, 432689Sktlim@umich.edu "percent of copy source address that are unaligned") 442292SN/A percent_functional = Param.Percent(50, "percent of access that are functional") 452292SN/A percent_uncacheable = Param.Percent(10, 469944Smatt.horsnell@ARM.com "target uncacheable percentage") 479944Smatt.horsnell@ARM.com progress_interval = Param.Counter(1000000, 489944Smatt.horsnell@ARM.com "progress report interval (in accesses)") 498591Sgblack@eecs.umich.edu trace_addr = Param.Addr(0, "address to trace") 503326Sktlim@umich.edu 518229Snate@binkert.org test = Port("Port to the memory system to test") 526658Snate@binkert.org functional = Port("Port to the functional memory used for verification") 538887Sgeoffrey.blake@arm.com suppress_func_warnings = Param.Bool(False, 542907Sktlim@umich.edu "suppress warnings when functional accesses fail.\n") 552292SN/A sys = Param.System(Parent.any, "System Parameter") 568232Snate@binkert.org 578232Snate@binkert.org