coherent_xbar.hh (10656:bd376adfb7d4) | coherent_xbar.hh (10713:eddb533708cb) |
---|---|
1/* 2 * Copyright (c) 2011-2014 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 --- 61 unchanged lines hidden (view full) --- 70{ 71 72 protected: 73 74 /** 75 * Declare the layers of this crossbar, one vector for requests, 76 * one for responses, and one for snoop responses 77 */ | 1/* 2 * Copyright (c) 2011-2014 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 --- 61 unchanged lines hidden (view full) --- 70{ 71 72 protected: 73 74 /** 75 * Declare the layers of this crossbar, one vector for requests, 76 * one for responses, and one for snoop responses 77 */ |
78 typedef Layer<SlavePort,MasterPort> ReqLayer; 79 typedef Layer<MasterPort,SlavePort> RespLayer; 80 typedef Layer<SlavePort,MasterPort> SnoopLayer; | |
81 std::vector<ReqLayer*> reqLayers; 82 std::vector<RespLayer*> respLayers; | 78 std::vector<ReqLayer*> reqLayers; 79 std::vector<RespLayer*> respLayers; |
83 std::vector | 80 std::vector<SnoopRespLayer*> snoopLayers; |
84 85 /** 86 * Declaration of the coherent crossbar slave port type, one will 87 * be instantiated for each of the master ports connecting to the 88 * crossbar. 89 */ 90 class CoherentXBarSlavePort : public SlavePort 91 { --- 34 unchanged lines hidden (view full) --- 126 * When receiving a functional request, pass it to the crossbar. 127 */ 128 virtual void recvFunctional(PacketPtr pkt) 129 { xbar.recvFunctional(pkt, id); } 130 131 /** 132 * When receiving a retry, pass it to the crossbar. 133 */ | 81 82 /** 83 * Declaration of the coherent crossbar slave port type, one will 84 * be instantiated for each of the master ports connecting to the 85 * crossbar. 86 */ 87 class CoherentXBarSlavePort : public SlavePort 88 { --- 34 unchanged lines hidden (view full) --- 123 * When receiving a functional request, pass it to the crossbar. 124 */ 125 virtual void recvFunctional(PacketPtr pkt) 126 { xbar.recvFunctional(pkt, id); } 127 128 /** 129 * When receiving a retry, pass it to the crossbar. 130 */ |
134 virtual void recvRetry() | 131 virtual void recvRespRetry() |
135 { panic("Crossbar slave ports should never retry.\n"); } 136 137 /** 138 * Return the union of all adress ranges seen by this crossbar. 139 */ 140 virtual AddrRangeList getAddrRanges() const 141 { return xbar.getAddrRanges(); } 142 --- 54 unchanged lines hidden (view full) --- 197 198 /** When reciving a range change from the peer port (at id), 199 pass it to the crossbar. */ 200 virtual void recvRangeChange() 201 { xbar.recvRangeChange(id); } 202 203 /** When reciving a retry from the peer port (at id), 204 pass it to the crossbar. */ | 132 { panic("Crossbar slave ports should never retry.\n"); } 133 134 /** 135 * Return the union of all adress ranges seen by this crossbar. 136 */ 137 virtual AddrRangeList getAddrRanges() const 138 { return xbar.getAddrRanges(); } 139 --- 54 unchanged lines hidden (view full) --- 194 195 /** When reciving a range change from the peer port (at id), 196 pass it to the crossbar. */ 197 virtual void recvRangeChange() 198 { xbar.recvRangeChange(id); } 199 200 /** When reciving a retry from the peer port (at id), 201 pass it to the crossbar. */ |
205 virtual void recvRetry() 206 { xbar.recvRetry(id); } | 202 virtual void recvReqRetry() 203 { xbar.recvReqRetry(id); } |
207 208 }; 209 210 /** 211 * Internal class to bridge between an incoming snoop response 212 * from a slave port and forwarding it through an outgoing slave 213 * port. It is effectively a dangling master port. 214 */ --- 13 unchanged lines hidden (view full) --- 228 SnoopRespPort(SlavePort& slave_port, CoherentXBar& _xbar) : 229 MasterPort(slave_port.name() + ".snoopRespPort", &_xbar), 230 slavePort(slave_port) { } 231 232 /** 233 * Override the sending of retries and pass them on through 234 * the mirrored slave port. 235 */ | 204 205 }; 206 207 /** 208 * Internal class to bridge between an incoming snoop response 209 * from a slave port and forwarding it through an outgoing slave 210 * port. It is effectively a dangling master port. 211 */ --- 13 unchanged lines hidden (view full) --- 225 SnoopRespPort(SlavePort& slave_port, CoherentXBar& _xbar) : 226 MasterPort(slave_port.name() + ".snoopRespPort", &_xbar), 227 slavePort(slave_port) { } 228 229 /** 230 * Override the sending of retries and pass them on through 231 * the mirrored slave port. 232 */ |
236 void sendRetry() { 237 slavePort.sendRetry(); | 233 void sendRetryResp() { 234 // forward it as a snoop response retry 235 slavePort.sendRetrySnoopResp(); |
238 } 239 240 /** 241 * Provided as necessary. 242 */ | 236 } 237 238 /** 239 * Provided as necessary. 240 */ |
243 void recvRetry() { panic("SnoopRespPort should never see retry\n"); } | 241 void recvReqRetry() { panic("SnoopRespPort should never see retry\n"); } |
244 245 /** 246 * Provided as necessary. 247 */ 248 bool recvTimingResp(PacketPtr pkt) 249 { 250 panic("SnoopRespPort should never see timing response\n"); 251 return false; --- 35 unchanged lines hidden (view full) --- 287 void recvTimingSnoopReq(PacketPtr pkt, PortID master_port_id); 288 289 /** Function called by the port when the crossbar is recieving a timing 290 snoop response.*/ 291 bool recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id); 292 293 /** Timing function called by port when it is once again able to process 294 * requests. */ | 242 243 /** 244 * Provided as necessary. 245 */ 246 bool recvTimingResp(PacketPtr pkt) 247 { 248 panic("SnoopRespPort should never see timing response\n"); 249 return false; --- 35 unchanged lines hidden (view full) --- 285 void recvTimingSnoopReq(PacketPtr pkt, PortID master_port_id); 286 287 /** Function called by the port when the crossbar is recieving a timing 288 snoop response.*/ 289 bool recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id); 290 291 /** Timing function called by port when it is once again able to process 292 * requests. */ |
295 void recvRetry(PortID master_port_id); | 293 void recvReqRetry(PortID master_port_id); |
296 297 /** 298 * Forward a timing packet to our snoopers, potentially excluding 299 * one of the connected coherent masters to avoid sending a packet 300 * back to where it came from. 301 * 302 * @param pkt Packet to forward 303 * @param exclude_slave_port_id Id of slave port to exclude --- 93 unchanged lines hidden --- | 294 295 /** 296 * Forward a timing packet to our snoopers, potentially excluding 297 * one of the connected coherent masters to avoid sending a packet 298 * back to where it came from. 299 * 300 * @param pkt Packet to forward 301 * @param exclude_slave_port_id Id of slave port to exclude --- 93 unchanged lines hidden --- |