14 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 15 * Copyright (c) 2009 Advanced Micro Devices, Inc. 16 * All rights reserved. 17 * 18 * Redistribution and use in source and binary forms, with or without 19 * modification, are permitted provided that the following conditions are 20 * met: redistributions of source code must retain the above copyright 21 * notice, this list of conditions and the following disclaimer; 22 * redistributions in binary form must reproduce the above copyright 23 * notice, this list of conditions and the following disclaimer in the 24 * documentation and/or other materials provided with the distribution; 25 * neither the name of the copyright holders nor the names of its 26 * contributors may be used to endorse or promote products derived from 27 * this software without specific prior written permission. 28 * 29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 */ 41 42#ifndef __CPU_RUBYTEST_RUBYTESTER_HH__ 43#define __CPU_RUBYTEST_RUBYTESTER_HH__ 44 45#include <iostream> 46#include <string> 47#include <vector> 48 49#include "cpu/testers/rubytest/CheckTable.hh" 50#include "mem/ruby/common/Global.hh" 51#include "mem/ruby/common/SubBlock.hh" 52#include "mem/ruby/system/RubyPort.hh" 53#include "mem/mem_object.hh" 54#include "mem/packet.hh" 55#include "params/RubyTester.hh" 56 57class RubyTester : public MemObject 58{ 59 public: 60 class CpuPort : public MasterPort 61 { 62 private: 63 RubyTester *tester; 64 65 public: 66 // 67 // Currently, each instatiation of the RubyTester::CpuPort supports 68 // only instruction or data requests, not both. However, for those 69 // RubyPorts that support both types of requests, separate InstOnly 70 // and DataOnly CpuPorts will map to that RubyPort 71 72 CpuPort(const std::string &_name, RubyTester *_tester, PortID _id) 73 : MasterPort(_name, _tester, _id), tester(_tester) 74 {} 75 76 protected: 77 virtual bool recvTimingResp(PacketPtr pkt); 78 virtual void recvRetry() 79 { panic("%s does not expect a retry\n", name()); } 80 }; 81 82 struct SenderState : public Packet::SenderState 83 {
|