snoop_filter.cc (10821:581fb2484bd6) | snoop_filter.cc (10883:9294c4a60251) |
---|---|
1/* 2 * Copyright (c) 2013 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 --- 120 unchanged lines hidden (view full) --- 129 panic_if(sf_item.requested & req_port, "double request :( "\ 130 "SF value %x.%x\n", sf_item.requested, sf_item.holder); 131 panic_if(!(sf_item.holder & req_port), "requester %x is not a "\ 132 "holder :( SF value %x.%x\n", req_port, 133 sf_item.requested, sf_item.holder); 134 // Writebacks -> the sender does not have the line anymore 135 sf_item.holder &= ~req_port; 136 } else { | 1/* 2 * Copyright (c) 2013 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 --- 120 unchanged lines hidden (view full) --- 129 panic_if(sf_item.requested & req_port, "double request :( "\ 130 "SF value %x.%x\n", sf_item.requested, sf_item.holder); 131 panic_if(!(sf_item.holder & req_port), "requester %x is not a "\ 132 "holder :( SF value %x.%x\n", req_port, 133 sf_item.requested, sf_item.holder); 134 // Writebacks -> the sender does not have the line anymore 135 sf_item.holder &= ~req_port; 136 } else { |
137 assert(0 == "Handle non-writeback, here"); | 137 // @todo Add CleanEvicts 138 assert(cpkt->cmd == MemCmd::CleanEvict); |
138 } 139 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 140 __func__, sf_item.requested, sf_item.holder); 141 } 142} 143 144std::pair<SnoopFilter::SnoopList, Cycles> 145SnoopFilter::lookupSnoop(const Packet* cpkt) --- 23 unchanged lines hidden (view full) --- 169 totSnoops++; 170 if (is_hit) { 171 // Single bit set -> value is a power of two 172 if (isPow2(interested)) 173 hitSingleSnoops++; 174 else 175 hitMultiSnoops++; 176 } | 139 } 140 DPRINTF(SnoopFilter, "%s: new SF value %x.%x\n", 141 __func__, sf_item.requested, sf_item.holder); 142 } 143} 144 145std::pair<SnoopFilter::SnoopList, Cycles> 146SnoopFilter::lookupSnoop(const Packet* cpkt) --- 23 unchanged lines hidden (view full) --- 170 totSnoops++; 171 if (is_hit) { 172 // Single bit set -> value is a power of two 173 if (isPow2(interested)) 174 hitSingleSnoops++; 175 else 176 hitMultiSnoops++; 177 } |
177 178 assert(cpkt->isInvalidate() == cpkt->needsExclusive()); | 178 // ReadEx and Writes require both invalidation and exlusivity, while reads 179 // require neither. Writebacks on the other hand require exclusivity but 180 // not the invalidation. Previously Writebacks did not generate upward 181 // snoops so this was never an aissue. Now that Writebacks generate snoops 182 // we need to special case for Writebacks. 183 assert(cpkt->cmd == MemCmd::Writeback || 184 (cpkt->isInvalidate() == cpkt->needsExclusive())); |
179 if (cpkt->isInvalidate() && !sf_item.requested) { 180 // Early clear of the holder, if no other request is currently going on 181 // @todo: This should possibly be updated even though we do not filter 182 // upward snoops 183 sf_item.holder = 0; 184 } 185 186 DPRINTF(SnoopFilter, "%s: new SF value %x.%x interest: %x \n", --- 154 unchanged lines hidden --- | 185 if (cpkt->isInvalidate() && !sf_item.requested) { 186 // Early clear of the holder, if no other request is currently going on 187 // @todo: This should possibly be updated even though we do not filter 188 // upward snoops 189 sf_item.holder = 0; 190 } 191 192 DPRINTF(SnoopFilter, "%s: new SF value %x.%x interest: %x \n", --- 154 unchanged lines hidden --- |