Sequencer.py revision 8932
112838Sgabeblack@google.com# Copyright (c) 2009 Advanced Micro Devices, Inc.
212838Sgabeblack@google.com# All rights reserved.
312838Sgabeblack@google.com#
412838Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without
512838Sgabeblack@google.com# modification, are permitted provided that the following conditions are
612838Sgabeblack@google.com# met: redistributions of source code must retain the above copyright
712838Sgabeblack@google.com# notice, this list of conditions and the following disclaimer;
812838Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright
912838Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the
1012838Sgabeblack@google.com# documentation and/or other materials provided with the distribution;
1112838Sgabeblack@google.com# neither the name of the copyright holders nor the names of its
1212838Sgabeblack@google.com# contributors may be used to endorse or promote products derived from
1312838Sgabeblack@google.com# this software without specific prior written permission.
1412838Sgabeblack@google.com#
1512838Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1612838Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1712838Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1812838Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1912838Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2012838Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2112838Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2212838Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2312838Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2412838Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2512838Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2612838Sgabeblack@google.com#
2712838Sgabeblack@google.com# Authors: Steve Reinhardt
2812838Sgabeblack@google.com#          Brad Beckmann
2912838Sgabeblack@google.com
3012838Sgabeblack@google.comfrom m5.params import *
3112952Sgabeblack@google.comfrom m5.proxy import *
3212838Sgabeblack@google.comfrom MemObject import MemObject
3312838Sgabeblack@google.com
3412838Sgabeblack@google.comclass RubyPort(MemObject):
3512838Sgabeblack@google.com    type = 'RubyPort'
3612838Sgabeblack@google.com    abstract = True
3712838Sgabeblack@google.com    slave = VectorSlavePort("CPU slave port")
3812838Sgabeblack@google.com    master = VectorMasterPort("CPU master port")
3912838Sgabeblack@google.com    version = Param.Int(0, "")
4012952Sgabeblack@google.com    pio_port = MasterPort("Ruby_pio_port")
4112838Sgabeblack@google.com    using_ruby_tester = Param.Bool(False, "")
4212838Sgabeblack@google.com    using_network_tester = Param.Bool(False, "")
4312838Sgabeblack@google.com    access_phys_mem = Param.Bool(True,
4412838Sgabeblack@google.com        "should the rubyport atomically update phys_mem")
4512838Sgabeblack@google.com    ruby_system = Param.RubySystem("")
4612952Sgabeblack@google.com    system = Param.System(Parent.any, "system object")
4712838Sgabeblack@google.com    support_data_reqs = Param.Bool(True, "data cache requests supported")
4812838Sgabeblack@google.com    support_inst_reqs = Param.Bool(True, "inst cache requests supported")
4912952Sgabeblack@google.com
5012952Sgabeblack@google.com
5112952Sgabeblack@google.comclass RubyPortProxy(RubyPort):
5212838Sgabeblack@google.com    type = 'RubyPortProxy'
5312838Sgabeblack@google.com
5412939Sgabeblack@google.comclass RubySequencer(RubyPort):
5512939Sgabeblack@google.com    type = 'RubySequencer'
5612939Sgabeblack@google.com    cxx_class = 'Sequencer'
5712939Sgabeblack@google.com    icache = Param.RubyCache("")
5812939Sgabeblack@google.com    dcache = Param.RubyCache("")
5912939Sgabeblack@google.com    max_outstanding_requests = Param.Int(16,
6012939Sgabeblack@google.com        "max requests (incl. prefetches) outstanding")
6112939Sgabeblack@google.com    deadlock_threshold = Param.Int(500000,
6212939Sgabeblack@google.com        "max outstanding cycles for a request before deadlock/livelock declared")
6312939Sgabeblack@google.com
6412939Sgabeblack@google.comclass DMASequencer(RubyPort):
6512939Sgabeblack@google.com    type = 'DMASequencer'
6612939Sgabeblack@google.com