summaryrefslogtreecommitdiff
path: root/mem/bus.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-04-28 15:41:22 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-04-28 15:41:22 -0400
commitca8a659394e96a0a0c11693cbaae59e6b027795a (patch)
tree79f9509a48359bbc870ae34ce8b6e2fc6bc027de /mem/bus.hh
parent7bb70e3e30f30c669e475c47b950f0abd24367d0 (diff)
parentb43d1a00fb69015c751fba57d22a6fa94a292f04 (diff)
downloadgem5-ca8a659394e96a0a0c11693cbaae59e6b027795a.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : d6f7c4dd146613eeba39249f2d916a77108bc8c1
Diffstat (limited to 'mem/bus.hh')
-rw-r--r--mem/bus.hh21
1 files changed, 18 insertions, 3 deletions
diff --git a/mem/bus.hh b/mem/bus.hh
index fad44aba5..de9259a90 100644
--- a/mem/bus.hh
+++ b/mem/bus.hh
@@ -45,6 +45,9 @@
class Bus : public MemObject
{
+ /** a globally unique id for this bus. */
+ int busId;
+
struct DevMap {
int portId;
Range<Addr> range;
@@ -77,6 +80,14 @@ class Bus : public MemObject
Port *
Bus::findPort(Addr addr, int id);
+ /** Process address range request.
+ * @param resp addresses that we can respond to
+ * @param snoop addresses that we would like to snoop
+ * @param id ide of the busport that made the request.
+ */
+ void addressRanges(AddrRangeList &resp, AddrRangeList &snoop, int id);
+
+
/** Decleration of the buses port type, one will be instantiated for each
of the interfaces connecting to the bus. */
class BusPort : public Port
@@ -120,7 +131,8 @@ class Bus : public MemObject
// downstream from this bus, yes? That is, the union of all
// the 'owned' address ranges of all the other interfaces on
// this bus...
- virtual void addressRanges(AddrRangeList &resp, AddrRangeList &snoop);
+ virtual void getDeviceAddressRanges(AddrRangeList &resp, AddrRangeList &snoop)
+ { bus->addressRanges(resp, snoop, id); }
// Hack to make translating port work without changes
virtual int deviceBlockSize() { return 32; }
@@ -141,8 +153,11 @@ class Bus : public MemObject
interfaces.push_back(new BusPort(this, id));
return interfaces.back();
}
- Bus(const std::string &n)
- : MemObject(n) {}
+
+ virtual void init();
+
+ Bus(const std::string &n, int bus_id)
+ : MemObject(n), busId(bus_id) {}
};