summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
authorRon Dreslinski <rdreslin@umich.edu>2006-10-08 20:30:42 -0400
committerRon Dreslinski <rdreslin@umich.edu>2006-10-08 20:30:42 -0400
commit5cb1840b311a7bba93a658481703ce1e09ccf7bb (patch)
tree6e8a501d2377915270e1b45dbc6d1adede4852f3 /src/mem
parente65f0cef3ca70edf37ff74920def4ac899f6c7e3 (diff)
downloadgem5-5cb1840b311a7bba93a658481703ce1e09ccf7bb.tar.xz
Fixes for functional path.
If the cpu needs to update any state when it gets a functional write (LSQ??) then that code needs to be written. src/cpu/o3/fetch_impl.hh: src/cpu/o3/lsq_impl.hh: src/cpu/ozone/front_end_impl.hh: src/cpu/ozone/lw_lsq_impl.hh: src/cpu/simple/atomic.cc: src/cpu/simple/timing.cc: CPU's can recieve functional accesses, they need to determine if they need to do anything with them. src/mem/bus.cc: src/mem/bus.hh: Make the fuctional path do the correct tye of snoop --HG-- extra : convert_revision : 70d09f954b907a8aa9b8137579cd2b06e02ae2ff
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/bus.cc14
-rw-r--r--src/mem/bus.hh3
2 files changed, 16 insertions, 1 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index daca6f985..1646cbd57 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -200,6 +200,18 @@ Bus::atomicSnoop(Packet *pkt)
}
}
+void
+Bus::functionalSnoop(Packet *pkt)
+{
+ std::vector<int> ports = findSnoopPorts(pkt->getAddr(), pkt->getSrc());
+
+ while (!ports.empty())
+ {
+ interfaces[ports.back()]->sendFunctional(pkt);
+ ports.pop_back();
+ }
+}
+
bool
Bus::timingSnoop(Packet *pkt)
{
@@ -236,7 +248,7 @@ Bus::recvFunctional(Packet *pkt)
DPRINTF(Bus, "recvFunctional: packet src %d dest %d addr 0x%x cmd %s\n",
pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString());
assert(pkt->getDest() == Packet::Broadcast);
- atomicSnoop(pkt);
+ functionalSnoop(pkt);
findPort(pkt->getAddr(), pkt->getSrc())->sendFunctional(pkt);
}
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index 3d7f4ad65..ff4ec9c8c 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -102,6 +102,9 @@ class Bus : public MemObject
/** Snoop all relevant ports atomicly. */
void atomicSnoop(Packet *pkt);
+ /** Snoop all relevant ports functionally. */
+ void functionalSnoop(Packet *pkt);
+
/** Call snoop on caches, be sure to set SNOOP_COMMIT bit if you want
* the snoop to happen
* @return True if succeds.