noncoherent_xbar.hh (10912:b99a6662d7c2) noncoherent_xbar.hh (13808:0a44fbc3a853)
1/*
2 * Copyright (c) 2011-2015 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

--- 90 unchanged lines hidden (view full) ---

99 NoncoherentXBarSlavePort(const std::string &_name,
100 NoncoherentXBar &_xbar, PortID _id)
101 : QueuedSlavePort(_name, &_xbar, queue, _id), xbar(_xbar),
102 queue(_xbar, *this)
103 { }
104
105 protected:
106
1/*
2 * Copyright (c) 2011-2015 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

--- 90 unchanged lines hidden (view full) ---

99 NoncoherentXBarSlavePort(const std::string &_name,
100 NoncoherentXBar &_xbar, PortID _id)
101 : QueuedSlavePort(_name, &_xbar, queue, _id), xbar(_xbar),
102 queue(_xbar, *this)
103 { }
104
105 protected:
106
107 /**
108 * When receiving a timing request, pass it to the crossbar.
109 */
110 virtual bool recvTimingReq(PacketPtr pkt)
111 { return xbar.recvTimingReq(pkt, id); }
107 bool
108 recvTimingReq(PacketPtr pkt) override
109 {
110 return xbar.recvTimingReq(pkt, id);
111 }
112
112
113 /**
114 * When receiving an atomic request, pass it to the crossbar.
115 */
116 virtual Tick recvAtomic(PacketPtr pkt)
117 { return xbar.recvAtomic(pkt, id); }
113 Tick
114 recvAtomic(PacketPtr pkt) override
115 {
116 return xbar.recvAtomic(pkt, id);
117 }
118
118
119 /**
120 * When receiving a functional request, pass it to the crossbar.
121 */
122 virtual void recvFunctional(PacketPtr pkt)
123 { xbar.recvFunctional(pkt, id); }
119 void
120 recvFunctional(PacketPtr pkt) override
121 {
122 xbar.recvFunctional(pkt, id);
123 }
124
124
125 /**
126 * Return the union of all adress ranges seen by this crossbar.
127 */
128 virtual AddrRangeList getAddrRanges() const
129 { return xbar.getAddrRanges(); }
130
125 AddrRangeList
126 getAddrRanges() const override
127 {
128 return xbar.getAddrRanges();
129 }
131 };
132
133 /**
134 * Declaration of the crossbar master port type, one will be
135 * instantiated for each of the slave ports connecting to the
136 * crossbar.
137 */
138 class NoncoherentXBarMasterPort : public MasterPort

--- 7 unchanged lines hidden (view full) ---

146
147 NoncoherentXBarMasterPort(const std::string &_name,
148 NoncoherentXBar &_xbar, PortID _id)
149 : MasterPort(_name, &_xbar, _id), xbar(_xbar)
150 { }
151
152 protected:
153
130 };
131
132 /**
133 * Declaration of the crossbar master port type, one will be
134 * instantiated for each of the slave ports connecting to the
135 * crossbar.
136 */
137 class NoncoherentXBarMasterPort : public MasterPort

--- 7 unchanged lines hidden (view full) ---

145
146 NoncoherentXBarMasterPort(const std::string &_name,
147 NoncoherentXBar &_xbar, PortID _id)
148 : MasterPort(_name, &_xbar, _id), xbar(_xbar)
149 { }
150
151 protected:
152
154 /**
155 * When receiving a timing response, pass it to the crossbar.
156 */
157 virtual bool recvTimingResp(PacketPtr pkt)
158 { return xbar.recvTimingResp(pkt, id); }
153 bool
154 recvTimingResp(PacketPtr pkt) override
155 {
156 return xbar.recvTimingResp(pkt, id);
157 }
159
158
160 /** When reciving a range change from the peer port (at id),
161 pass it to the crossbar. */
162 virtual void recvRangeChange()
163 { xbar.recvRangeChange(id); }
159 void
160 recvRangeChange() override
161 {
162 xbar.recvRangeChange(id);
163 }
164
164
165 /** When reciving a retry from the peer port (at id),
166 pass it to the crossbar. */
167 virtual void recvReqRetry()
168 { xbar.recvReqRetry(id); }
169
165 void
166 recvReqRetry() override
167 {
168 xbar.recvReqRetry(id);
169 }
170 };
171
170 };
171
172 /** Function called by the port when the crossbar is recieving a Timing
173 request packet.*/
174 virtual bool recvTimingReq(PacketPtr pkt, PortID slave_port_id);
172 virtual bool recvTimingReq(PacketPtr pkt, PortID slave_port_id);
175
176 /** Function called by the port when the crossbar is recieving a Timing
177 response packet.*/
178 virtual bool recvTimingResp(PacketPtr pkt, PortID master_port_id);
173 virtual bool recvTimingResp(PacketPtr pkt, PortID master_port_id);
179
180 /** Timing function called by port when it is once again able to process
181 * requests. */
182 void recvReqRetry(PortID master_port_id);
174 void recvReqRetry(PortID master_port_id);
183
184 /** Function called by the port when the crossbar is recieving a Atomic
185 transaction.*/
186 Tick recvAtomic(PacketPtr pkt, PortID slave_port_id);
175 Tick recvAtomic(PacketPtr pkt, PortID slave_port_id);
187
188 /** Function called by the port when the crossbar is recieving a Functional
189 transaction.*/
190 void recvFunctional(PacketPtr pkt, PortID slave_port_id);
191
192 public:
193
194 NoncoherentXBar(const NoncoherentXBarParams *p);
195
196 virtual ~NoncoherentXBar();
197
176 void recvFunctional(PacketPtr pkt, PortID slave_port_id);
177
178 public:
179
180 NoncoherentXBar(const NoncoherentXBarParams *p);
181
182 virtual ~NoncoherentXBar();
183
198 /**
199 * stats
200 */
201 virtual void regStats();
184 void regStats() override;
202 Stats::Scalar totPktSize;
203};
204
205#endif //__MEM_NONCOHERENT_XBAR_HH__
185 Stats::Scalar totPktSize;
186};
187
188#endif //__MEM_NONCOHERENT_XBAR_HH__