DirectoryMemory.py revision 10301
18439SN/A# Copyright (c) 2009 Advanced Micro Devices, Inc.
28439SN/A# All rights reserved.
38439SN/A#
48439SN/A# Redistribution and use in source and binary forms, with or without
58439SN/A# modification, are permitted provided that the following conditions are
68439SN/A# met: redistributions of source code must retain the above copyright
78439SN/A# notice, this list of conditions and the following disclaimer;
88439SN/A# redistributions in binary form must reproduce the above copyright
98439SN/A# notice, this list of conditions and the following disclaimer in the
108439SN/A# documentation and/or other materials provided with the distribution;
118439SN/A# neither the name of the copyright holders nor the names of its
128439SN/A# contributors may be used to endorse or promote products derived from
138439SN/A# this software without specific prior written permission.
148439SN/A#
158439SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
168439SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
178439SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
188439SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
198439SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
208439SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
218439SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
228439SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
238439SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
248439SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
258439SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
268439SN/A#
278439SN/A# Authors: Steve Reinhardt
288439SN/A#          Brad Beckmann
298439SN/A
308439SN/Afrom m5.params import *
318439SN/Afrom m5.proxy import *
328439SN/Afrom m5.SimObject import SimObject
338439SN/A
348439SN/Aclass RubyDirectoryMemory(SimObject):
358439SN/A    type = 'RubyDirectoryMemory'
368439SN/A    cxx_class = 'DirectoryMemory'
3710301Snilay@cs.wisc.edu    cxx_header = "mem/ruby/structures/DirectoryMemory.hh"
388439SN/A    version = Param.Int(0, "")
398439SN/A    size = Param.MemorySize("1GB", "capacity in bytes")
408439SN/A    use_map = Param.Bool(False, "enable sparse memory")
418439SN/A    map_levels = Param.Int(4, "sparse memory map levels")
428439SN/A    # the default value of the numa high bit is specified in the command line
438439SN/A    # option and must be passed into the directory memory sim object
448439SN/A    numa_high_bit = Param.Int("numa high bit")
45