Deleted Added
sdiff udiff text old ( 12345:70c783a93195 ) new ( 12346:9b1144d046ca )
full compact
1/*
2 * Copyright (c) 2011-2017 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

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

178 Tick xbar_delay = (frontendLatency + forwardLatency) * clockPeriod();
179
180 // set the packet header and payload delay
181 calcPacketTiming(pkt, xbar_delay);
182
183 // determine how long to be crossbar layer is busy
184 Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay;
185
186 const bool snoop_caches = !system->bypassCaches() &&
187 pkt->cmd != MemCmd::WriteClean;
188 if (snoop_caches) {
189 assert(pkt->snoopDelay == 0);
190
191 // the packet is a memory-mapped request and should be
192 // broadcasted to our snoopers but the source
193 if (snoopFilter) {

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

238 // modify the address upon a sendTimingRequest
239 const Addr addr(pkt->getAddr());
240 if (sink_packet) {
241 DPRINTF(CoherentXBar, "%s: Not forwarding %s\n", __func__,
242 pkt->print());
243 } else {
244 // determine if we are forwarding the packet, or responding to
245 // it
246 if (!pointOfCoherency || pkt->isRead() || pkt->isWrite()) {
247 // if we are passing on, rather than sinking, a packet to
248 // which an upstream cache has committed to responding,
249 // the line was needs writable, and the responding only
250 // had an Owned copy, so we need to immidiately let the
251 // downstream caches know, bypass any flow control
252 if (pkt->cacheResponding()) {
253 pkt->setExpressSnoop();
254 }
255
256 // since it is a normal request, attempt to send the packet
257 success = masterPorts[master_port_id]->sendTimingReq(pkt);
258 } else {
259 // no need to forward, turn this packet around and respond
260 // directly
261 assert(pkt->needsResponse());
262
263 respond_directly = true;

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

641 slavePorts[slave_port_id]->name(), pkt->print());
642
643 unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0;
644 unsigned int pkt_cmd = pkt->cmdToIndex();
645
646 MemCmd snoop_response_cmd = MemCmd::InvalidCmd;
647 Tick snoop_response_latency = 0;
648
649 const bool snoop_caches = !system->bypassCaches() &&
650 pkt->cmd != MemCmd::WriteClean;
651 if (snoop_caches) {
652 // forward to all snoopers but the source
653 std::pair<MemCmd, Tick> snoop_result;
654 if (snoopFilter) {
655 // check with the snoop filter where to forward this packet
656 auto sf_res =

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

693 // even if we had a snoop response, we must continue and also
694 // perform the actual request at the destination
695 PortID master_port_id = findPort(pkt->getAddr());
696
697 if (sink_packet) {
698 DPRINTF(CoherentXBar, "%s: Not forwarding %s\n", __func__,
699 pkt->print());
700 } else {
701 if (!pointOfCoherency || pkt->isRead() || pkt->isWrite()) {
702 // forward the request to the appropriate destination
703 response_latency = masterPorts[master_port_id]->sendAtomic(pkt);
704 } else {
705 // if it does not need a response we sink the packet above
706 assert(pkt->needsResponse());
707
708 pkt->makeResponse();
709 }

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

953 return (pointOfCoherency && pkt->cacheResponding()) ||
954 (pointOfCoherency && !(pkt->isRead() || pkt->isWrite()) &&
955 !pkt->needsResponse()) ||
956 (pkt->isCleanEviction() && pkt->isBlockCached()) ||
957 (pkt->cacheResponding() &&
958 (!pkt->needsWritable() || pkt->responderHadWritable()));
959}
960
961void
962CoherentXBar::regStats()
963{
964 // register the stats of the base class and our layers
965 BaseXBar::regStats();
966 for (auto l: reqLayers)
967 l->regStats();
968 for (auto l: respLayers)

--- 26 unchanged lines hidden ---