diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:34:33 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2009-11-18 16:34:33 -0800 |
commit | 5d8a669539a142ece820cf0c82722ea1c755d7cd (patch) | |
tree | b17fb03643674b83785859378296ed4690e3d715 /src/mem/ruby/common | |
parent | c6182199c54a874315a97338879d5bfaf3895a6f (diff) | |
download | gem5-5d8a669539a142ece820cf0c82722ea1c755d7cd.tar.xz |
Resurrection of the CMP token protocol to GEM5
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r-- | src/mem/ruby/common/NetDest.cc | 5 | ||||
-rw-r--r-- | src/mem/ruby/common/NetDest.hh | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mem/ruby/common/NetDest.cc b/src/mem/ruby/common/NetDest.cc index 32771235f..35bb4ec43 100644 --- a/src/mem/ruby/common/NetDest.cc +++ b/src/mem/ruby/common/NetDest.cc @@ -133,13 +133,14 @@ NodeID NetDest::elementAt(MachineID index) { return m_bits[vecIndex(index)].elementAt(bitIndex(index.num)); } -NodeID NetDest::smallestElement() const +MachineID NetDest::smallestElement() const { assert(count() > 0); for (int i=0; i<m_bits.size(); i++) { for (int j=0; j<m_bits[i].getSize(); j++) { if (m_bits[i].isElement(j)) { - return j; + MachineID mach = {MachineType_from_base_level(i), j}; + return mach; } } } diff --git a/src/mem/ruby/common/NetDest.hh b/src/mem/ruby/common/NetDest.hh index 7301409ce..071106623 100644 --- a/src/mem/ruby/common/NetDest.hh +++ b/src/mem/ruby/common/NetDest.hh @@ -96,7 +96,7 @@ public: //For Princeton Network Vector<NodeID> getAllDest(); - NodeID smallestElement() const; + MachineID smallestElement() const; MachineID smallestElement(MachineType machine) const; void setSize(); |