From 750f33a90194f3f827ef887fb7e151235e61c919 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Sat, 14 Apr 2012 05:45:55 -0400 Subject: 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. --- src/cpu/testers/networktest/networktest.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cpu/testers/networktest') diff --git a/src/cpu/testers/networktest/networktest.cc b/src/cpu/testers/networktest/networktest.cc index 45a414539..aa8b54b8e 100644 --- a/src/cpu/testers/networktest/networktest.cc +++ b/src/cpu/testers/networktest/networktest.cc @@ -259,8 +259,7 @@ NetworkTest::generatePkt() "Generated packet with destination %d, embedded in address %x\n", destination, req->getPaddr()); - PacketPtr pkt = new Packet(req, requestType, 0); - pkt->setSrc(0); //Not used + PacketPtr pkt = new Packet(req, requestType); pkt->dataDynamicArray(new uint8_t[req->getSize()]); pkt->senderState = NULL; -- cgit v1.2.3