diff options
Diffstat (limited to 'src/mem/bus.hh')
-rw-r--r-- | src/mem/bus.hh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/mem/bus.hh b/src/mem/bus.hh index cd25fab2c..941389296 100644 --- a/src/mem/bus.hh +++ b/src/mem/bus.hh @@ -60,6 +60,9 @@ class Bus : public MemObject }; std::vector<DevMap> portList; AddrRangeList defaultRange; + std::vector<DevMap> portSnoopList; + + std::vector<int> snoopCallbacks; /** Function called by the port when the bus is recieving a Timing @@ -90,6 +93,29 @@ class Bus : public MemObject */ Port *findPort(Addr addr, int id); + /** Find all ports with a matching snoop range, except src port. Keep in mind + * that the ranges shouldn't overlap or you will get a double snoop to the same + * interface.and the cache will assert out. + * @param addr Address to find snoop prts for. + * @param id Id of the src port of the request to avoid calling snoop on src + * @return vector of IDs to snoop on + */ + std::vector<int> findSnoopPorts(Addr addr, int id); + + /** Snoop all relevant ports atomicly. */ + void atomicSnoop(Packet *pkt); + + /** Snoop for NACK and Blocked in phase 1 + * @return True if succeds. + */ + bool timingSnoopPhase1(Packet *pkt); + + /** @todo Don't need to commit all snoops just those that need it + *(register somehow). */ + /** Commit all snoops now that we know if any of them would have blocked. + */ + void timingSnoopPhase2(Packet *pkt); + /** Process address range request. * @param resp addresses that we can respond to * @param snoop addresses that we would like to snoop |