changeset 71ac9dda5432 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=71ac9dda5432
description:
Ruby Port: Add a list of cpu ports attached to this port
diffstat:
src/mem/ruby/system/RubyPort.cc | 6 ++++--
src/mem/ruby/system/RubyPort.hh | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 2854ed06ce05 -r 71ac9dda5432 src/mem/ruby/system/RubyPort.cc
--- a/src/mem/ruby/system/RubyPort.cc Wed Jan 11 13:31:04 2012 -0600
+++ b/src/mem/ruby/system/RubyPort.cc Wed Jan 11 13:39:58 2012 -0600
@@ -66,8 +66,10 @@
RubyPort::getPort(const std::string &if_name, int idx)
{
if (if_name == "port") {
- return new M5Port(csprintf("%s-port%d", name(), idx), this,
- ruby_system, access_phys_mem);
+ M5Port* cpuPort = new M5Port(csprintf("%s-port%d", name(), idx),
+ this, ruby_system, access_phys_mem);
+ cpu_ports.push_back(cpuPort);
+ return cpuPort;
}
if (if_name == "pio_port") {
diff -r 2854ed06ce05 -r 71ac9dda5432 src/mem/ruby/system/RubyPort.hh
--- a/src/mem/ruby/system/RubyPort.hh Wed Jan 11 13:31:04 2012 -0600
+++ b/src/mem/ruby/system/RubyPort.hh Wed Jan 11 13:39:58 2012 -0600
@@ -148,6 +148,10 @@
M5Port* physMemPort;
+ /*! Vector of CPU Port attached to this Ruby port. */
+ typedef std::vector<M5Port*>::iterator CpuPortIter;
+ std::vector<M5Port*> cpu_ports;
+
PhysicalMemory* physmem;
RubySystem* ruby_system;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev