summaryrefslogtreecommitdiff
path: root/src/mem/bus.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-05-26 18:40:08 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-05-26 18:40:08 -0400
commit5df77b865ddc29a00629a679437dee2578997559 (patch)
tree57f7c93f29e8787b42e7399182c12a8b933ef193 /src/mem/bus.hh
parente04f60667af9884fa871935e4c1274bdf0311707 (diff)
parent53510f184452c46868a9e6ece9ccb7f30ab70843 (diff)
downloadgem5-5df77b865ddc29a00629a679437dee2578997559.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : 3a34dbab3101281786a4b70724c5aee3e4730843
Diffstat (limited to 'src/mem/bus.hh')
-rw-r--r--src/mem/bus.hh18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index 38573e514..5eeb07904 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -100,8 +100,8 @@ class Bus : public MemObject
public:
/** Constructor for the BusPort.*/
- BusPort(Bus *_bus, int _id)
- : bus(_bus), id(_id)
+ BusPort(const std::string &_name, Bus *_bus, int _id)
+ : Port(_name), bus(_bus), id(_id)
{ }
protected:
@@ -109,17 +109,17 @@ class Bus : public MemObject
/** When reciving a timing request from the peer port (at id),
pass it to the bus. */
virtual bool recvTiming(Packet *pkt)
- { pkt->src = id; return bus->recvTiming(pkt); }
+ { pkt->setSrc(id); return bus->recvTiming(pkt); }
/** When reciving a Atomic requestfrom the peer port (at id),
pass it to the bus. */
virtual Tick recvAtomic(Packet *pkt)
- { pkt->src = id; return bus->recvAtomic(pkt); }
+ { pkt->setSrc(id); return bus->recvAtomic(pkt); }
/** When reciving a Functional requestfrom the peer port (at id),
pass it to the bus. */
virtual void recvFunctional(Packet *pkt)
- { pkt->src = id; bus->recvFunctional(pkt); }
+ { pkt->setSrc(id); bus->recvFunctional(pkt); }
/** When reciving a status changefrom the peer port (at id),
pass it to the bus. */
@@ -146,13 +146,7 @@ class Bus : public MemObject
public:
/** A function used to return the port associated with this bus object. */
- virtual Port *getPort(const std::string &if_name)
- {
- // if_name ignored? forced to be empty?
- int id = interfaces.size();
- interfaces.push_back(new BusPort(this, id));
- return interfaces.back();
- }
+ virtual Port *getPort(const std::string &if_name);
virtual void init();