port.hh revision 9294
1360SN/A/*
21458SN/A * Copyright (c) 2011-2012 ARM Limited
3360SN/A * All rights reserved
4360SN/A *
5360SN/A * The license below extends only to copyright in the software and shall
6360SN/A * not be construed as granting a license to any other intellectual
7360SN/A * property including but not limited to intellectual property relating
8360SN/A * to a hardware implementation of the functionality of the software
9360SN/A * licensed hereunder.  You may use the software subject to the license
10360SN/A * terms below provided that you ensure that this notice is replicated
11360SN/A * unmodified and in its entirety in all distributions of the software,
12360SN/A * modified or unmodified, in source code or in binary form.
13360SN/A *
14360SN/A * Copyright (c) 2002-2005 The Regents of The University of Michigan
15360SN/A * All rights reserved.
16360SN/A *
17360SN/A * Redistribution and use in source and binary forms, with or without
18360SN/A * modification, are permitted provided that the following conditions are
19360SN/A * met: redistributions of source code must retain the above copyright
20360SN/A * notice, this list of conditions and the following disclaimer;
21360SN/A * redistributions in binary form must reproduce the above copyright
22360SN/A * notice, this list of conditions and the following disclaimer in the
23360SN/A * documentation and/or other materials provided with the distribution;
24360SN/A * neither the name of the copyright holders nor the names of its
25360SN/A * contributors may be used to endorse or promote products derived from
26360SN/A * this software without specific prior written permission.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
292665Ssaidi@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30360SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31360SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
321354SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
331354SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34360SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
352764Sstever@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
362764Sstever@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
372064SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38360SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39360SN/A *
40360SN/A * Authors: Ron Dreslinski
41360SN/A *          Andreas Hansson
42360SN/A *          William Wang
43360SN/A */
441354SN/A
45360SN/A/**
461809SN/A * @file
475543Ssaidi@eecs.umich.edu * Port Object Declaration.
481809SN/A */
493113Sgblack@eecs.umich.edu
503113Sgblack@eecs.umich.edu#ifndef __MEM_PORT_HH__
511999SN/A#define __MEM_PORT_HH__
52360SN/A
532474SN/A#include <list>
545543Ssaidi@eecs.umich.edu
552462SN/A#include "base/addr_range.hh"
561354SN/A#include "mem/packet.hh"
576216Snate@binkert.org
586658Snate@binkert.org/**
592474SN/A * This typedef is used to clean up getAddrRanges(). It's declared
602680Sktlim@umich.edu * outside the Port object since it's also used by some mem objects.
612474SN/A * Eventually we should move this typedef to wherever Addr is
622474SN/A * defined.
636640Svince@csl.cornell.edu */
641354SN/A
65360SN/Atypedef std::list<AddrRange> AddrRangeList;
66360SN/Atypedef std::list<AddrRange>::iterator AddrRangeIter;
67360SN/Atypedef std::list<AddrRange>::const_iterator AddrRangeConstIter;
68360SN/A
69360SN/Aclass MemObject;
70360SN/A
71360SN/A/**
72360SN/A * Ports are used to interface memory objects to each other. A port is
73378SN/A * either a master or a slave and the connected peer is always of the
741450SN/A * opposite role. Each port has a name, an owner, and an identifier.
753114Sgblack@eecs.umich.edu */
76360SN/Aclass Port
775543Ssaidi@eecs.umich.edu{
785543Ssaidi@eecs.umich.edu
795543Ssaidi@eecs.umich.edu  private:
80360SN/A
81360SN/A    /** Descriptive name (for DPRINTF output) */
82360SN/A    std::string portName;
83360SN/A
84360SN/A  protected:
852680Sktlim@umich.edu
86360SN/A    /**
87360SN/A     * A numeric identifier to distinguish ports in a vector, and set
88360SN/A     * to InvalidPortID in case this port is not part of a vector.
89360SN/A     */
90360SN/A    const PortID id;
91360SN/A
92360SN/A    /** A reference to the MemObject that owns this port. */
93360SN/A    MemObject& owner;
94360SN/A
95360SN/A    /**
96360SN/A     * Abstract base class for ports
973114Sgblack@eecs.umich.edu     *
98360SN/A     * @param _name Port name including the owners name
99360SN/A     * @param _owner The MemObject that is the structural owner of this port
100360SN/A     * @param _id A port identifier for vector ports
101360SN/A     */
102360SN/A    Port(const std::string& _name, MemObject& _owner, PortID _id);
103360SN/A
104360SN/A    /**
105360SN/A     * Virtual destructor due to inheritance.
106360SN/A     */
107360SN/A    virtual ~Port();
108360SN/A
109360SN/A  public:
110360SN/A
111360SN/A    /** Return port name (for DPRINTF). */
112360SN/A    const std::string name() const { return portName; }
113360SN/A
114360SN/A    /** Get the port id. */
115360SN/A    PortID getId() const { return id; }
116360SN/A
117360SN/A};
118360SN/A
1192400SN/A/** Forward declaration */
120360SN/Aclass BaseSlavePort;
1212461SN/A
1225543Ssaidi@eecs.umich.edu/**
123360SN/A * A BaseMasterPort is a protocol-agnostic master port, responsible
124360SN/A * only for the structural connection to a slave port. The final
125360SN/A * master port that inherits from the base class must override the
126360SN/A * bind member function for the specific slave port class.
127360SN/A */
1282400SN/Aclass BaseMasterPort : public Port
129360SN/A{
1302461SN/A
1315543Ssaidi@eecs.umich.edu  protected:
132360SN/A
133360SN/A    BaseSlavePort* _baseSlavePort;
134360SN/A
135360SN/A    BaseMasterPort(const std::string& name, MemObject* owner,
136360SN/A                   PortID id = InvalidPortID);
137360SN/A    virtual ~BaseMasterPort();
138360SN/A
139360SN/A  public:
140360SN/A
141360SN/A    virtual void bind(BaseSlavePort& slave_port) = 0;
142360SN/A    virtual void unbind() = 0;
143360SN/A    BaseSlavePort& getSlavePort() const;
144360SN/A    bool isConnected() const;
1455543Ssaidi@eecs.umich.edu
146360SN/A};
147360SN/A
148360SN/A/**
149360SN/A * A BaseSlavePort is a protocol-agnostic slave port, responsible
150360SN/A * only for the structural connection to a master port.
151360SN/A */
152360SN/Aclass BaseSlavePort : public Port
153360SN/A{
154360SN/A
155360SN/A  protected:
156360SN/A
157360SN/A    BaseMasterPort* _baseMasterPort;
158360SN/A
159360SN/A    BaseSlavePort(const std::string& name, MemObject* owner,
160360SN/A                  PortID id = InvalidPortID);
161360SN/A    virtual ~BaseSlavePort();
162360SN/A
1635543Ssaidi@eecs.umich.edu  public:
1645543Ssaidi@eecs.umich.edu
165502SN/A    BaseMasterPort& getMasterPort() const;
166360SN/A    bool isConnected() const;
167360SN/A
168360SN/A};
169360SN/A
170360SN/A/** Forward declaration */
171360SN/Aclass SlavePort;
172360SN/A
173360SN/A/**
174360SN/A * A MasterPort is a specialisation of a BaseMasterPort, which
175360SN/A * implements the default protocol for the three different level of
176360SN/A * transport functions. In addition to the basic functionality of
177378SN/A * sending packets, it also has functions to receive range changes or
1781706SN/A * determine if the port is snooping or not.
1793114Sgblack@eecs.umich.edu */
180378SN/Aclass MasterPort : public BaseMasterPort
181378SN/A{
182378SN/A
183378SN/A    friend class SlavePort;
184378SN/A
1851706SN/A  private:
1863114Sgblack@eecs.umich.edu
187360SN/A    SlavePort* _slavePort;
1886109Ssanchezd@stanford.edu
1891706SN/A  public:
1903114Sgblack@eecs.umich.edu
191378SN/A    MasterPort(const std::string& name, MemObject* owner,
1926109Ssanchezd@stanford.edu               PortID id = InvalidPortID);
1936109Ssanchezd@stanford.edu    virtual ~MasterPort();
1946109Ssanchezd@stanford.edu
1956109Ssanchezd@stanford.edu    /**
196378SN/A     * Bind this master port to a slave port. This also does the
1971706SN/A     * mirror action and binds the slave port to the master port.
1983114Sgblack@eecs.umich.edu     */
199378SN/A    void bind(BaseSlavePort& slave_port);
2005748SSteve.Reinhardt@amd.com
2015748SSteve.Reinhardt@amd.com    /**
2025748SSteve.Reinhardt@amd.com     * Unbind this master port and the associated slave port.
203378SN/A     */
204378SN/A    void unbind();
2051706SN/A
2063114Sgblack@eecs.umich.edu    /**
207378SN/A     * Send an atomic request packet, where the data is moved and the
208378SN/A     * state is updated in zero time, without interleaving with other
2091706SN/A     * memory accesses.
2103114Sgblack@eecs.umich.edu     *
211378SN/A     * @param pkt Packet to send.
212378SN/A     *
2131706SN/A     * @return Estimated latency of access.
2143114Sgblack@eecs.umich.edu     */
215378SN/A    Tick sendAtomic(PacketPtr pkt);
216378SN/A
2171706SN/A    /**
2183114Sgblack@eecs.umich.edu     * Send a functional request packet, where the data is instantly
219378SN/A     * updated everywhere in the memory system, without affecting the
2204118Sgblack@eecs.umich.edu     * current state of any block or moving the block.
2214118Sgblack@eecs.umich.edu     *
2224118Sgblack@eecs.umich.edu     * @param pkt Packet to send.
2234118Sgblack@eecs.umich.edu     */
224378SN/A    void sendFunctional(PacketPtr pkt);
2251706SN/A
2263114Sgblack@eecs.umich.edu    /**
227378SN/A     * Attempt to send a timing request to the slave port by calling
228378SN/A     * its corresponding receive function. If the send does not
2291706SN/A     * succeed, as indicated by the return value, then the sender must
2303114Sgblack@eecs.umich.edu     * wait for a recvRetry at which point it can re-issue a
231360SN/A     * sendTimingReq.
2325513SMichael.Adler@intel.com     *
2335513SMichael.Adler@intel.com     * @param pkt Packet to send.
2345513SMichael.Adler@intel.com     *
2355513SMichael.Adler@intel.com     * @return If the send was succesful or not.
2365513SMichael.Adler@intel.com    */
2375513SMichael.Adler@intel.com    bool sendTimingReq(PacketPtr pkt);
2385513SMichael.Adler@intel.com
2395513SMichael.Adler@intel.com    /**
240511SN/A     * Attempt to send a timing snoop response packet to the slave
2411706SN/A     * port by calling its corresponding receive function. If the send
2423114Sgblack@eecs.umich.edu     * does not succeed, as indicated by the return value, then the
243511SN/A     * sender must wait for a recvRetry at which point it can re-issue
2445513SMichael.Adler@intel.com     * a sendTimingSnoopResp.
2455513SMichael.Adler@intel.com     *
2465513SMichael.Adler@intel.com     * @param pkt Packet to send.
2475513SMichael.Adler@intel.com     */
248511SN/A    bool sendTimingSnoopResp(PacketPtr pkt);
2491706SN/A
2503114Sgblack@eecs.umich.edu    /**
2511706SN/A     * Send a retry to the slave port that previously attempted a
2521706SN/A     * sendTimingResp to this master port and failed.
2531706SN/A     */
2541706SN/A    void sendRetry();
2553114Sgblack@eecs.umich.edu
2561706SN/A    /**
2571706SN/A     * Determine if this master port is snooping or not. The default
2581706SN/A     * implementation returns false and thus tells the neighbour we
2591706SN/A     * are not snooping. Any master port that wants to receive snoop
2603114Sgblack@eecs.umich.edu     * requests (e.g. a cache connected to a bus) has to override this
2611706SN/A     * function.
262511SN/A     *
2635513SMichael.Adler@intel.com     * @return true if the port should be considered a snooper
2645513SMichael.Adler@intel.com     */
2655513SMichael.Adler@intel.com    virtual bool isSnooping() const { return false; }
2665513SMichael.Adler@intel.com
2675513SMichael.Adler@intel.com    /**
2681999SN/A     * Called by a peer port in order to determine the block size of
2691999SN/A     * the owner of this port.
2703114Sgblack@eecs.umich.edu     */
2711999SN/A    virtual unsigned deviceBlockSize() const { return 0; }
2721999SN/A
2731999SN/A    /** Called by the associated device if it wishes to find out the blocksize
2741999SN/A        of the device on attached to the peer port.
2753114Sgblack@eecs.umich.edu    */
2761999SN/A    unsigned peerBlockSize() const;
2773079Sstever@eecs.umich.edu
2783079Sstever@eecs.umich.edu    /**
2793114Sgblack@eecs.umich.edu     * Get the address ranges of the connected slave port.
2803079Sstever@eecs.umich.edu     */
2812093SN/A    AddrRangeList getAddrRanges() const;
2822093SN/A
2833114Sgblack@eecs.umich.edu    /** Inject a PrintReq for the given address to print the state of
2842093SN/A     * that address throughout the memory system.  For debugging.
2852687Sksewell@umich.edu     */
2862687Sksewell@umich.edu    void printAddr(Addr a);
2873114Sgblack@eecs.umich.edu
2882687Sksewell@umich.edu  protected:
2892238SN/A
2902238SN/A    /**
2913114Sgblack@eecs.umich.edu     * Receive an atomic snoop request packet from the slave port.
2922238SN/A     */
2932238SN/A    virtual Tick recvAtomicSnoop(PacketPtr pkt)
2942238SN/A    {
2953114Sgblack@eecs.umich.edu        panic("%s was not expecting an atomic snoop request\n", name());
2962238SN/A        return 0;
2972238SN/A    }
2982238SN/A
2993114Sgblack@eecs.umich.edu    /**
3002238SN/A     * Receive a functional snoop request packet from the slave port.
3012238SN/A     */
3022238SN/A    virtual void recvFunctionalSnoop(PacketPtr pkt)
3033114Sgblack@eecs.umich.edu    {
3042238SN/A        panic("%s was not expecting a functional snoop request\n", name());
3052238SN/A    }
3062238SN/A
3073114Sgblack@eecs.umich.edu    /**
3082238SN/A     * Receive a timing response from the slave port.
3092238SN/A     */
3102238SN/A    virtual bool recvTimingResp(PacketPtr pkt) = 0;
3113114Sgblack@eecs.umich.edu
3122238SN/A    /**
3132238SN/A     * Receive a timing snoop request from the slave port.
3142238SN/A     */
3153114Sgblack@eecs.umich.edu    virtual void recvTimingSnoopReq(PacketPtr pkt)
3162238SN/A    {
3176109Ssanchezd@stanford.edu        panic("%s was not expecting a timing snoop request\n", name());
3186109Ssanchezd@stanford.edu    }
3196109Ssanchezd@stanford.edu
3202238SN/A    /**
3212238SN/A     * Called by the slave port if sendTimingReq or
3222238SN/A     * sendTimingSnoopResp was called on this master port (causing
3232238SN/A     * recvTimingReq and recvTimingSnoopResp to be called on the
3242238SN/A     * slave port) and was unsuccesful.
3253114Sgblack@eecs.umich.edu     */
3262238SN/A    virtual void recvRetry() = 0;
3272238SN/A
3282238SN/A    /**
3293114Sgblack@eecs.umich.edu     * Called to receive an address range change from the peer slave
3302238SN/A     * port. the default implementation ignored the change and does
3312238SN/A     * nothing. Override this function in a derived class if the owner
3322238SN/A     * needs to be aware of he laesddress ranges, e.g. in an
3333114Sgblack@eecs.umich.edu     * interconnect component like a bus.
3342238SN/A     */
3352238SN/A    virtual void recvRangeChange() { }
3362238SN/A};
3373114Sgblack@eecs.umich.edu
3382238SN/A/**
3392238SN/A * A SlavePort is a specialisation of a port. In addition to the
3401354SN/A * basic functionality of sending packets to its master peer, it also
3411354SN/A * has functions specific to a slave, e.g. to send range changes
3421354SN/A * and get the address ranges that the port responds to.
3431354SN/A */
3441354SN/Aclass SlavePort : public BaseSlavePort
3451354SN/A{
3461354SN/A
3471354SN/A    friend class MasterPort;
3481354SN/A
3491354SN/A  private:
3501354SN/A
3511354SN/A    MasterPort* _masterPort;
3521354SN/A
3531354SN/A  public:
3541609SN/A
3551354SN/A    SlavePort(const std::string& name, MemObject* owner,
3561354SN/A              PortID id = InvalidPortID);
3571354SN/A    virtual ~SlavePort();
3581354SN/A
359360SN/A    /**
360360SN/A     * Send an atomic snoop request packet, where the data is moved
361360SN/A     * and the state is updated in zero time, without interleaving
362360SN/A     * with other memory accesses.
363360SN/A     *
364360SN/A     * @param pkt Snoop packet to send.
365360SN/A     *
3663113Sgblack@eecs.umich.edu     * @return Estimated latency of access.
3673113Sgblack@eecs.umich.edu     */
3683113Sgblack@eecs.umich.edu    Tick sendAtomicSnoop(PacketPtr pkt);
3693113Sgblack@eecs.umich.edu
3703113Sgblack@eecs.umich.edu    /**
3713113Sgblack@eecs.umich.edu     * Send a functional snoop request packet, where the data is
3723113Sgblack@eecs.umich.edu     * instantly updated everywhere in the memory system, without
3733113Sgblack@eecs.umich.edu     * affecting the current state of any block or moving the block.
3743113Sgblack@eecs.umich.edu     *
3753113Sgblack@eecs.umich.edu     * @param pkt Snoop packet to send.
3763113Sgblack@eecs.umich.edu     */
3773113Sgblack@eecs.umich.edu    void sendFunctionalSnoop(PacketPtr pkt);
3783113Sgblack@eecs.umich.edu
3793113Sgblack@eecs.umich.edu    /**
3803113Sgblack@eecs.umich.edu     * Attempt to send a timing response to the master port by calling
3813113Sgblack@eecs.umich.edu     * its corresponding receive function. If the send does not
3824189Sgblack@eecs.umich.edu     * succeed, as indicated by the return value, then the sender must
3834189Sgblack@eecs.umich.edu     * wait for a recvRetry at which point it can re-issue a
3843113Sgblack@eecs.umich.edu     * sendTimingResp.
3853113Sgblack@eecs.umich.edu     *
3863113Sgblack@eecs.umich.edu     * @param pkt Packet to send.
3873113Sgblack@eecs.umich.edu     *
3883113Sgblack@eecs.umich.edu     * @return If the send was succesful or not.
3893113Sgblack@eecs.umich.edu    */
3903113Sgblack@eecs.umich.edu    bool sendTimingResp(PacketPtr pkt);
3913277Sgblack@eecs.umich.edu
3925515SMichael.Adler@intel.com    /**
3935515SMichael.Adler@intel.com     * Attempt to send a timing snoop request packet to the master port
3945515SMichael.Adler@intel.com     * by calling its corresponding receive function. Snoop requests
3955515SMichael.Adler@intel.com     * always succeed and hence no return value is needed.
3965515SMichael.Adler@intel.com     *
3973277Sgblack@eecs.umich.edu     * @param pkt Packet to send.
3983277Sgblack@eecs.umich.edu     */
3993277Sgblack@eecs.umich.edu    void sendTimingSnoopReq(PacketPtr pkt);
4003277Sgblack@eecs.umich.edu
4013277Sgblack@eecs.umich.edu    /**
4023277Sgblack@eecs.umich.edu     * Send a retry to the master port that previously attempted a
4033277Sgblack@eecs.umich.edu     * sendTimingReq or sendTimingSnoopResp to this slave port and
4043113Sgblack@eecs.umich.edu     * failed.
4053113Sgblack@eecs.umich.edu     */
4063113Sgblack@eecs.umich.edu    void sendRetry();
4073113Sgblack@eecs.umich.edu
4083113Sgblack@eecs.umich.edu    /**
4093113Sgblack@eecs.umich.edu     * Called by a peer port in order to determine the block size of
4103113Sgblack@eecs.umich.edu     * the owner of this port.
4113114Sgblack@eecs.umich.edu     */
4123113Sgblack@eecs.umich.edu    virtual unsigned deviceBlockSize() const { return 0; }
4133114Sgblack@eecs.umich.edu
4143113Sgblack@eecs.umich.edu    /** Called by the associated device if it wishes to find out the blocksize
4153114Sgblack@eecs.umich.edu        of the device on attached to the peer port.
4163113Sgblack@eecs.umich.edu    */
4174061Sgblack@eecs.umich.edu    unsigned peerBlockSize() const;
4184061Sgblack@eecs.umich.edu
4194061Sgblack@eecs.umich.edu    /**
4203113Sgblack@eecs.umich.edu     * Find out if the peer master port is snooping or not.
4213113Sgblack@eecs.umich.edu     *
4223113Sgblack@eecs.umich.edu     * @return true if the peer master port is snooping
4233113Sgblack@eecs.umich.edu     */
4243113Sgblack@eecs.umich.edu    bool isSnooping() const { return _masterPort->isSnooping(); }
4253113Sgblack@eecs.umich.edu
4263113Sgblack@eecs.umich.edu    /**
4273113Sgblack@eecs.umich.edu     * Called by the owner to send a range change
4283113Sgblack@eecs.umich.edu     */
4293113Sgblack@eecs.umich.edu    void sendRangeChange() const { _masterPort->recvRangeChange(); }
4303113Sgblack@eecs.umich.edu
4314189Sgblack@eecs.umich.edu    /**
4324189Sgblack@eecs.umich.edu     * Get a list of the non-overlapping address ranges the owner is
4333113Sgblack@eecs.umich.edu     * responsible for. All slave ports must override this function
4343113Sgblack@eecs.umich.edu     * and return a populated list with at least one item.
4353113Sgblack@eecs.umich.edu     *
4363113Sgblack@eecs.umich.edu     * @return a list of ranges responded to
4373113Sgblack@eecs.umich.edu     */
4383113Sgblack@eecs.umich.edu    virtual AddrRangeList getAddrRanges() const = 0;
4393113Sgblack@eecs.umich.edu
4403113Sgblack@eecs.umich.edu  protected:
4413113Sgblack@eecs.umich.edu
4423113Sgblack@eecs.umich.edu    /**
4433113Sgblack@eecs.umich.edu     * Called by the master port to unbind. Should never be called
4443113Sgblack@eecs.umich.edu     * directly.
4453113Sgblack@eecs.umich.edu     */
4463113Sgblack@eecs.umich.edu    void unbind();
4473113Sgblack@eecs.umich.edu
4483113Sgblack@eecs.umich.edu    /**
4493113Sgblack@eecs.umich.edu     * Called by the master port to bind. Should never be called
4503113Sgblack@eecs.umich.edu     * directly.
4513113Sgblack@eecs.umich.edu     */
4523113Sgblack@eecs.umich.edu    void bind(MasterPort& master_port);
4533113Sgblack@eecs.umich.edu
4543113Sgblack@eecs.umich.edu    /**
4553113Sgblack@eecs.umich.edu     * Receive an atomic request packet from the master port.
4563113Sgblack@eecs.umich.edu     */
4573113Sgblack@eecs.umich.edu    virtual Tick recvAtomic(PacketPtr pkt) = 0;
4583113Sgblack@eecs.umich.edu
4593113Sgblack@eecs.umich.edu    /**
4603113Sgblack@eecs.umich.edu     * Receive a functional request packet from the master port.
4613113Sgblack@eecs.umich.edu     */
4623113Sgblack@eecs.umich.edu    virtual void recvFunctional(PacketPtr pkt) = 0;
4633113Sgblack@eecs.umich.edu
4643113Sgblack@eecs.umich.edu    /**
4653113Sgblack@eecs.umich.edu     * Receive a timing request from the master port.
4663113Sgblack@eecs.umich.edu     */
4673113Sgblack@eecs.umich.edu    virtual bool recvTimingReq(PacketPtr pkt) = 0;
4683113Sgblack@eecs.umich.edu
4693113Sgblack@eecs.umich.edu    /**
4703113Sgblack@eecs.umich.edu     * Receive a timing snoop response from the master port.
471378SN/A     */
472378SN/A    virtual bool recvTimingSnoopResp(PacketPtr pkt)
473378SN/A    {
474360SN/A        panic("%s was not expecting a timing snoop response\n", name());
4751450SN/A    }
4763114Sgblack@eecs.umich.edu
4772680Sktlim@umich.edu    /**
478360SN/A     * Called by the master port if sendTimingResp was called on this
4795958Sgblack@eecs.umich.edu     * slave port (causing recvTimingResp to be called on the master
4805958Sgblack@eecs.umich.edu     * port) and was unsuccesful.
481360SN/A     */
4821969SN/A    virtual void recvRetry() = 0;
483360SN/A
484360SN/A};
485360SN/A
4861458SN/A#endif //__MEM_PORT_HH__
487360SN/A