diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-28 15:37:48 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-04-28 15:37:48 -0400 |
commit | 53d93ef9182aade99faa5996dece522d9aba88d1 (patch) | |
tree | 53edf6abec2b845dfad7ce70f8b96dafc353895a /mem/bus.hh | |
parent | c819a1c0e188a388cd1891fa5a36e81adcd6c279 (diff) | |
download | gem5-53d93ef9182aade99faa5996dece522d9aba88d1.tar.xz |
add a bridge object, modify bus object to be able to connect to other buses or bridges without panicing
SConscript:
add new cc files to scons
mem/bus.cc:
mem/bus.hh:
implement addressRanges() on the bus.
propigate address ranges to anyone who is interested stripping out ranges of who your propigating to (to avoid livelock)
mem/packet.hh:
add intersect function that returns true if two packets touch at least one byte of the same data (for functional access)
add fixPacket() that will eventually take the correct action giving a timing and functional packet, right now it panics
mem/physical.cc:
Don't panic if the physical memory recieves a status change, just ignore.
--HG--
extra : convert_revision : d470d51f2fb1db2700ad271e09792315ef33ba01
Diffstat (limited to 'mem/bus.hh')
-rw-r--r-- | mem/bus.hh | 21 |
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) {} }; |