summaryrefslogtreecommitdiff
path: root/src/mem/bus.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-05-26 13:48:35 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2006-05-26 13:48:35 -0400
commitda6a7b1263cf624790f06a5f944366fb113dffc8 (patch)
tree16110f2f8efa8b98a42d3b85c43a3a7b8ae1f1ce /src/mem/bus.cc
parentcf826ae296a4277bdf2ce46e4484295efde5a3c2 (diff)
downloadgem5-da6a7b1263cf624790f06a5f944366fb113dffc8.tar.xz
Add names to memory Port objects for tracing.
--HG-- extra : convert_revision : ddf30084e343e8656e4812ab20356292b35507ee
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r--src/mem/bus.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index e8dfbc2e6..4139bf643 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -35,6 +35,16 @@
#include "mem/bus.hh"
#include "sim/builder.hh"
+Port *
+Bus::getPort(const std::string &if_name)
+{
+ // if_name ignored? forced to be empty?
+ int id = interfaces.size();
+ BusPort *bp = new BusPort(csprintf("%s-p%d", name(), id), this, id);
+ interfaces.push_back(bp);
+ return bp;
+}
+
/** Get the ranges of anyone that we are connected to. */
void
Bus::init()