gem5  v20.1.0.0
noncoherent_xbar.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2015, 2019 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Copyright (c) 2002-2005 The Regents of The University of Michigan
15  * All rights reserved.
16  *
17  * Redistribution and use in source and binary forms, with or without
18  * modification, are permitted provided that the following conditions are
19  * met: redistributions of source code must retain the above copyright
20  * notice, this list of conditions and the following disclaimer;
21  * redistributions in binary form must reproduce the above copyright
22  * notice, this list of conditions and the following disclaimer in the
23  * documentation and/or other materials provided with the distribution;
24  * neither the name of the copyright holders nor the names of its
25  * contributors may be used to endorse or promote products derived from
26  * this software without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39  */
40 
46 #ifndef __MEM_NONCOHERENT_XBAR_HH__
47 #define __MEM_NONCOHERENT_XBAR_HH__
48 
49 #include "mem/xbar.hh"
50 #include "params/NoncoherentXBar.hh"
51 
65 class NoncoherentXBar : public BaseXBar
66 {
67 
68  protected:
69 
76 
83  {
84  private:
85 
88 
91 
92  public:
93 
94  NoncoherentXBarResponsePort(const std::string &_name,
95  NoncoherentXBar &_xbar, PortID _id)
96  : QueuedResponsePort(_name, &_xbar, queue, _id), xbar(_xbar),
97  queue(_xbar, *this)
98  { }
99 
100  protected:
101 
102  bool
103  recvTimingReq(PacketPtr pkt) override
104  {
105  return xbar.recvTimingReq(pkt, id);
106  }
107 
108  Tick
109  recvAtomic(PacketPtr pkt) override
110  {
111  return xbar.recvAtomicBackdoor(pkt, id);
112  }
113 
114  Tick
115  recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
116  {
117  return xbar.recvAtomicBackdoor(pkt, id, &backdoor);
118  }
119 
120  void
121  recvFunctional(PacketPtr pkt) override
122  {
123  xbar.recvFunctional(pkt, id);
124  }
125 
127  getAddrRanges() const override
128  {
129  return xbar.getAddrRanges();
130  }
131  };
132 
139  {
140  private:
141 
144 
145  public:
146 
147  NoncoherentXBarRequestPort(const std::string &_name,
148  NoncoherentXBar &_xbar, PortID _id)
149  : RequestPort(_name, &_xbar, _id), xbar(_xbar)
150  { }
151 
152  protected:
153 
154  bool
155  recvTimingResp(PacketPtr pkt) override
156  {
157  return xbar.recvTimingResp(pkt, id);
158  }
159 
160  void
161  recvRangeChange() override
162  {
163  xbar.recvRangeChange(id);
164  }
165 
166  void
167  recvReqRetry() override
168  {
169  xbar.recvReqRetry(id);
170  }
171  };
172 
173  virtual bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id);
174  virtual bool recvTimingResp(PacketPtr pkt, PortID mem_side_port_id);
175  void recvReqRetry(PortID mem_side_port_id);
176  Tick recvAtomicBackdoor(PacketPtr pkt, PortID cpu_side_port_id,
177  MemBackdoorPtr *backdoor=nullptr);
178  void recvFunctional(PacketPtr pkt, PortID cpu_side_port_id);
179 
180  public:
181 
182  NoncoherentXBar(const NoncoherentXBarParams *p);
183 
184  virtual ~NoncoherentXBar();
185 };
186 
187 #endif //__MEM_NONCOHERENT_XBAR_HH__
NoncoherentXBar::NoncoherentXBarResponsePort::getAddrRanges
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Definition: noncoherent_xbar.hh:127
NoncoherentXBar::NoncoherentXBarRequestPort::NoncoherentXBarRequestPort
NoncoherentXBarRequestPort(const std::string &_name, NoncoherentXBar &_xbar, PortID _id)
Definition: noncoherent_xbar.hh:147
NoncoherentXBar::NoncoherentXBarRequestPort::recvTimingResp
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
Definition: noncoherent_xbar.hh:155
MemBackdoor
Definition: backdoor.hh:38
NoncoherentXBar::NoncoherentXBarResponsePort::xbar
NoncoherentXBar & xbar
A reference to the crossbar to which this port belongs.
Definition: noncoherent_xbar.hh:87
NoncoherentXBar::NoncoherentXBarResponsePort::NoncoherentXBarResponsePort
NoncoherentXBarResponsePort(const std::string &_name, NoncoherentXBar &_xbar, PortID _id)
Definition: noncoherent_xbar.hh:94
NoncoherentXBar::recvFunctional
void recvFunctional(PacketPtr pkt, PortID cpu_side_port_id)
Definition: noncoherent_xbar.cc:285
xbar.hh
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
PortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
Definition: types.hh:237
NoncoherentXBar::recvTimingResp
virtual bool recvTimingResp(PacketPtr pkt, PortID mem_side_port_id)
Definition: noncoherent_xbar.cc:177
std::vector< ReqLayer * >
BaseXBar::getAddrRanges
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
Definition: xbar.cc:522
NoncoherentXBar::recvReqRetry
void recvReqRetry(PortID mem_side_port_id)
Definition: noncoherent_xbar.cc:235
NoncoherentXBar::recvTimingReq
virtual bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id)
Definition: noncoherent_xbar.cc:99
NoncoherentXBar::NoncoherentXBarResponsePort::recvFunctional
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
Definition: noncoherent_xbar.hh:121
NoncoherentXBar::NoncoherentXBarResponsePort::recvAtomic
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
Definition: noncoherent_xbar.hh:109
NoncoherentXBar::NoncoherentXBarResponsePort::recvTimingReq
bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
Definition: noncoherent_xbar.hh:103
NoncoherentXBar::NoncoherentXBarRequestPort::xbar
NoncoherentXBar & xbar
A reference to the crossbar to which this port belongs.
Definition: noncoherent_xbar.hh:143
NoncoherentXBar::NoncoherentXBarResponsePort
Declaration of the non-coherent crossbar CPU-side port type, one will be instantiated for each of the...
Definition: noncoherent_xbar.hh:82
NoncoherentXBar::NoncoherentXBarRequestPort::recvRangeChange
void recvRangeChange() override
Called to receive an address range change from the peer response port.
Definition: noncoherent_xbar.hh:161
NoncoherentXBar::NoncoherentXBarRequestPort::recvReqRetry
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
Definition: noncoherent_xbar.hh:167
QueuedResponsePort
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Definition: qport.hh:58
RequestPort
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Definition: port.hh:74
NoncoherentXBar::NoncoherentXBarRequestPort
Declaration of the crossbar memory-side port type, one will be instantiated for each of the CPU-side ...
Definition: noncoherent_xbar.hh:138
NoncoherentXBar::~NoncoherentXBar
virtual ~NoncoherentXBar()
Definition: noncoherent_xbar.cc:90
RespPacketQueue
Definition: packet_queue.hh:296
BaseXBar::recvRangeChange
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
Definition: xbar.cc:360
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
NoncoherentXBar::NoncoherentXBarResponsePort::queue
RespPacketQueue queue
A normal packet queue used to store responses.
Definition: noncoherent_xbar.hh:90
NoncoherentXBar::recvAtomicBackdoor
Tick recvAtomicBackdoor(PacketPtr pkt, PortID cpu_side_port_id, MemBackdoorPtr *backdoor=nullptr)
Definition: noncoherent_xbar.cc:244
NoncoherentXBar::NoncoherentXBarResponsePort::recvAtomicBackdoor
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Receive an atomic request packet from the peer, and optionally provide a backdoor to the data being a...
Definition: noncoherent_xbar.hh:115
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< AddrRange >
NoncoherentXBar::reqLayers
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests and one for responses.
Definition: noncoherent_xbar.hh:74
BaseXBar
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
Definition: xbar.hh:68
NoncoherentXBar::NoncoherentXBar
NoncoherentXBar(const NoncoherentXBarParams *p)
Definition: noncoherent_xbar.cc:53
NoncoherentXBar
A non-coherent crossbar connects a number of non-snooping memory-side ports and cpu_sides,...
Definition: noncoherent_xbar.hh:65
NoncoherentXBar::respLayers
std::vector< RespLayer * > respLayers
Definition: noncoherent_xbar.hh:75

Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17