summaryrefslogtreecommitdiff
path: root/src/mem/bus.hh
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-05 16:26:16 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-10-05 16:26:16 -0400
commitd9172c8f462511cde474040581063180be18540a (patch)
tree9bff3f3dc9e1ea6d5ee18398d8ca543feb0eb4dc /src/mem/bus.hh
parent51c8eab7b336a6c83e545b741cb975883fe56440 (diff)
downloadgem5-d9172c8f462511cde474040581063180be18540a.tar.xz
Partial reimplementation of the bus. The "clock" and "width" parameters have been added, and the HasData flag has been partially added to packets.
--HG-- extra : convert_revision : abb2a259fcf843457abbc0bd36f9504fbe6d7d39
Diffstat (limited to 'src/mem/bus.hh')
-rw-r--r--src/mem/bus.hh16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/mem/bus.hh b/src/mem/bus.hh
index 941389296..9dd666304 100644
--- a/src/mem/bus.hh
+++ b/src/mem/bus.hh
@@ -51,6 +51,14 @@ class Bus : public MemObject
{
/** a globally unique id for this bus. */
int busId;
+ /** the clock speed for the bus */
+ int clock;
+ /** the width of the bus in bits */
+ int width;
+ /** the last tick the address bus was used */
+ Tick tickAddrLastUsed;
+ /** the last tick the data bus was used */
+ Tick tickDataLastUsed;
static const int defaultId = -1;
@@ -199,8 +207,12 @@ class Bus : public MemObject
virtual void init();
- Bus(const std::string &n, int bus_id)
- : MemObject(n), busId(bus_id), defaultPort(NULL) {}
+ Bus(const std::string &n, int bus_id, int _clock, int _width)
+ : MemObject(n), busId(bus_id), clock(_clock), width(_width),
+ tickAddrLastUsed(0), tickDataLastUsed(0), defaultPort(NULL)
+ {
+ assert(width);
+ }
};