MemTest.py revision 8832:247fee427324
15680Sgblack@eecs.umich.edu# Copyright (c) 2005-2007 The Regents of The University of Michigan
25680Sgblack@eecs.umich.edu# All rights reserved.
35680Sgblack@eecs.umich.edu#
45680Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without
55680Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are
65680Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright
75680Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer;
85680Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright
95680Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the
105680Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution;
115680Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its
125680Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from
135680Sgblack@eecs.umich.edu# this software without specific prior written permission.
145680Sgblack@eecs.umich.edu#
155680Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
165680Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
175680Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
185680Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
195680Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
205680Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
215680Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
225680Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
235680Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
245680Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
255680Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
265680Sgblack@eecs.umich.edu#
275680Sgblack@eecs.umich.edu# Authors: Nathan Binkert
285680Sgblack@eecs.umich.edu
295680Sgblack@eecs.umich.edufrom MemObject import MemObject
305680Sgblack@eecs.umich.edufrom m5.params import *
315680Sgblack@eecs.umich.edufrom m5.proxy import *
325680Sgblack@eecs.umich.edu
335680Sgblack@eecs.umich.educlass MemTest(MemObject):
345680Sgblack@eecs.umich.edu    type = 'MemTest'
355680Sgblack@eecs.umich.edu    max_loads = Param.Counter(0, "number of loads to execute")
365680Sgblack@eecs.umich.edu    atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n")
375680Sgblack@eecs.umich.edu    memory_size = Param.Int(65536, "memory size")
385680Sgblack@eecs.umich.edu    percent_dest_unaligned = Param.Percent(50,
395680Sgblack@eecs.umich.edu        "percent of copy dest address that are unaligned")
405680Sgblack@eecs.umich.edu    percent_reads = Param.Percent(65, "target read percentage")
415680Sgblack@eecs.umich.edu    issue_dmas = Param.Bool(False, "this memtester should issue dma requests")
425680Sgblack@eecs.umich.edu    percent_source_unaligned = Param.Percent(50,
435680Sgblack@eecs.umich.edu        "percent of copy source address that are unaligned")
445680Sgblack@eecs.umich.edu    percent_functional = Param.Percent(50, "percent of access that are functional")
455680Sgblack@eecs.umich.edu    percent_uncacheable = Param.Percent(10,
465853Sgblack@eecs.umich.edu        "target uncacheable percentage")
475680Sgblack@eecs.umich.edu    progress_interval = Param.Counter(1000000,
485680Sgblack@eecs.umich.edu        "progress report interval (in accesses)")
495680Sgblack@eecs.umich.edu    trace_addr = Param.Addr(0, "address to trace")
505680Sgblack@eecs.umich.edu
515680Sgblack@eecs.umich.edu    test = Port("Port to the memory system to test")
525680Sgblack@eecs.umich.edu    functional = Port("Port to the functional memory used for verification")
535852Sgblack@eecs.umich.edu    suppress_func_warnings = Param.Bool(False,
545852Sgblack@eecs.umich.edu        "suppress warnings when functional accesses fail.\n")
555852Sgblack@eecs.umich.edu    sys = Param.System(Parent.any, "System Parameter")
565680Sgblack@eecs.umich.edu
575680Sgblack@eecs.umich.edu