summaryrefslogtreecommitdiff
path: root/src/cpu/ozone
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-04-14 05:45:55 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-04-14 05:45:55 -0400
commit750f33a90194f3f827ef887fb7e151235e61c919 (patch)
tree0146b730df44c6be8a77ac6ab86795558e394d22 /src/cpu/ozone
parentdccca0d3a9c985972d3d603190e62899d03825e8 (diff)
downloadgem5-750f33a90194f3f827ef887fb7e151235e61c919.tar.xz
MEM: Remove the Broadcast destination from the packet
This patch simplifies the packet by removing the broadcast flag and instead more firmly relying on (and enforcing) the semantics of transactions in the classic memory system, i.e. request packets are routed from a master to a slave based on the address, and when they are created they have neither a valid source, nor destination. On their way to the slave, the request packet is updated with a source field for all modules that multiplex packets from multiple master (e.g. a bus). When a request packet is turned into a response packet (at the final slave), it moves the potentially populated source field to the destination field, and the response packet is routed through any multiplexing components back to the master based on the destination field. Modules that connect multiplexing components, such as caches and bridges store any existing source and destination field in the sender state as a stack (just as before). The packet constructor is simplified in that there is no longer a need to pass the Packet::Broadcast as the destination (this was always the case for the classic memory system). In the case of Ruby, rather than using the parameter to the constructor we now rely on setDest, as there is already another three-argument constructor in the packet class. In many places where the packet information was printed as part of DPRINTFs, request packets would be printed with a numeric "dest" that would always be -1 (Broadcast) and that field is now removed from the printing.
Diffstat (limited to 'src/cpu/ozone')
-rw-r--r--src/cpu/ozone/front_end_impl.hh3
-rw-r--r--src/cpu/ozone/lw_lsq.hh5
-rw-r--r--src/cpu/ozone/lw_lsq_impl.hh2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/cpu/ozone/front_end_impl.hh b/src/cpu/ozone/front_end_impl.hh
index 12aa0a321..66bcc6227 100644
--- a/src/cpu/ozone/front_end_impl.hh
+++ b/src/cpu/ozone/front_end_impl.hh
@@ -477,8 +477,7 @@ FrontEnd<Impl>::fetchCacheLine()
#endif
// Build packet here.
- PacketPtr data_pkt = new Packet(memReq,
- Packet::ReadReq, Packet::Broadcast);
+ PacketPtr data_pkt = new Packet(memReq, Packet::ReadReq);
data_pkt->dataStatic(cacheData);
if (!icachePort.sendTiming(data_pkt)) {
diff --git a/src/cpu/ozone/lw_lsq.hh b/src/cpu/ozone/lw_lsq.hh
index a581b242f..db8e53b43 100644
--- a/src/cpu/ozone/lw_lsq.hh
+++ b/src/cpu/ozone/lw_lsq.hh
@@ -571,7 +571,7 @@ OzoneLWLSQ<Impl>::read(RequestPtr req, T &data, int load_idx)
(*sq_it).inst->seqNum, inst->seqNum, req->getVaddr(),
*(inst->memData));
- PacketPtr data_pkt = new Packet(req, Packet::ReadReq, Packet::Broadcast);
+ PacketPtr data_pkt = new Packet(req, Packet::ReadReq);
data_pkt->dataStatic(inst->memData);
WritebackEvent *wb = new WritebackEvent(inst, data_pkt, this);
@@ -635,8 +635,7 @@ OzoneLWLSQ<Impl>::read(RequestPtr req, T &data, int load_idx)
PacketPtr data_pkt =
new Packet(req,
(req->isLLSC() ?
- MemCmd::LoadLockedReq : Packet::ReadReq),
- Packet::Broadcast);
+ MemCmd::LoadLockedReq : Packet::ReadReq));
data_pkt->dataStatic(inst->memData);
LSQSenderState *state = new LSQSenderState;
diff --git a/src/cpu/ozone/lw_lsq_impl.hh b/src/cpu/ozone/lw_lsq_impl.hh
index c0c6d7276..79b2b8f16 100644
--- a/src/cpu/ozone/lw_lsq_impl.hh
+++ b/src/cpu/ozone/lw_lsq_impl.hh
@@ -577,7 +577,7 @@ OzoneLWLSQ<Impl>::writebackStores()
MemCmd command =
req->isSwap() ? MemCmd::SwapReq :
(req->isLLSC() ? MemCmd::WriteReq : MemCmd::StoreCondReq);
- PacketPtr data_pkt = new Packet(req, command, Packet::Broadcast);
+ PacketPtr data_pkt = new Packet(req, command);
data_pkt->dataStatic(inst->memData);
LSQSenderState *state = new LSQSenderState;