changeset 083a6806dd96 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=083a6806dd96
description:
        ruby: apply some fixes that were overwritten by the recent ruby import.

diffstat:

29 files changed, 1303 insertions(+), 1227 deletions(-)
src/mem/gems_common/std-includes.hh             |    2 
src/mem/gems_common/util.cc                     |    5 
src/mem/ruby/SConsopts                          |    5 
src/mem/ruby/buffers/MessageBuffer.cc           |    2 
src/mem/ruby/common/DataBlock.cc                |   28 
src/mem/ruby/common/Debug.cc                    |   42 
src/mem/ruby/common/Debug.hh                    |   40 
src/mem/ruby/common/Driver.hh                   |    2 
src/mem/ruby/common/Set.cc                      |    2 
src/mem/ruby/config/MI_example-homogeneous.rb   |    2 
src/mem/ruby/config/RubyConfig.cc               |    2 
src/mem/ruby/config/RubyConfig.hh               |    5 
src/mem/ruby/filters/H3BloomFilter.cc           | 1154 ++++++++++++++++++++++
src/mem/ruby/filters/H3BloomFilter.hh           | 1155 -----------------------
src/mem/ruby/filters/LSB_CountingBloomFilter.cc |    1 
src/mem/ruby/filters/MultiGrainBloomFilter.cc   |    6 
src/mem/ruby/libruby.cc                         |    6 
src/mem/ruby/network/simple/PerfectSwitch.cc    |    1 
src/mem/ruby/network/simple/Throttle.cc         |    2 
src/mem/ruby/network/simple/Topology.cc         |    2 
src/mem/ruby/profiler/Profiler.cc               |    4 
src/mem/ruby/storebuffer/stb_interface.cc       |    2 
src/mem/ruby/storebuffer/storebuffer.cc         |   28 
src/mem/ruby/storebuffer/storebuffer.hh         |   18 
src/mem/ruby/system/CacheMemory.hh              |    1 
src/mem/ruby/system/MemoryControl.cc            |    1 
src/mem/ruby/system/Sequencer.cc                |    1 
src/mem/ruby/system/System.cc                   |    7 
src/mem/slicc/parser/parser.yy                  |    4 

diffs (truncated from 3054 to 300 lines):

diff -r d60118c43d60 -r 083a6806dd96 src/mem/gems_common/std-includes.hh
--- a/src/mem/gems_common/std-includes.hh       Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/gems_common/std-includes.hh       Mon Jul 06 15:49:47 2009 -0700
@@ -52,4 +52,6 @@
 using namespace std;
 using namespace __gnu_cxx;
 
+typedef unsigned int uint;
+
 #endif //INCLUDES_H
diff -r d60118c43d60 -r 083a6806dd96 src/mem/gems_common/util.cc
--- a/src/mem/gems_common/util.cc       Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/gems_common/util.cc       Mon Jul 06 15:49:47 2009 -0700
@@ -30,7 +30,8 @@
  * $Id$
  */
 
-#include "assert.hh"
+#include <cassert>
+
 #include "mem/gems_common/util.hh"
 
 // Split a string into a head and tail strings on the specified
@@ -101,6 +102,8 @@
     return false;
   else
     assert(0);
+
+  return false;
 }
 
 // Log functions
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/SConsopts
--- a/src/mem/ruby/SConsopts    Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/SConsopts    Mon Jul 06 15:49:47 2009 -0700
@@ -35,7 +35,8 @@
 
 sticky_vars.AddVariables(
     BoolVariable('NO_VECTOR_BOUNDS_CHECKS', "Don't do bounds checks", True),
-    BoolVariable('RUBY_DEBUG', "Add debugging stuff to Ruby", False))
+    BoolVariable('RUBY_DEBUG', "Add debugging stuff to Ruby", False),
+    ('GEMS_ROOT', "Add debugging stuff to Ruby", Dir('..').srcnode().abspath))
 
-export_vars += [ 'NO_VECTOR_BOUNDS_CHECKS', 'RUBY_DEBUG' ]
+export_vars += [ 'NO_VECTOR_BOUNDS_CHECKS', 'RUBY_DEBUG', 'GEMS_ROOT' ]
 
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/buffers/MessageBuffer.cc
--- a/src/mem/ruby/buffers/MessageBuffer.cc     Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/buffers/MessageBuffer.cc     Mon Jul 06 15:49:47 2009 -0700
@@ -296,7 +296,7 @@
 {
   DEBUG_MSG(QUEUE_COMP,MedPrio,"pop from " + m_name);
   assert(isReady());
-  Time ready_time = m_prio_heap.extractMin().m_time;
+  m_prio_heap.extractMin();
   // record previous size and time so the current buffer size isn't adjusted 
until next cycle
   if (m_time_last_time_pop < g_eventQueue_ptr->getTime()) {
     m_size_at_cycle_start = m_size;
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/common/DataBlock.cc
--- a/src/mem/ruby/common/DataBlock.cc  Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/common/DataBlock.cc  Mon Jul 06 15:49:47 2009 -0700
@@ -1,3 +1,31 @@
+
+/*
+ * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
 #include "mem/ruby/common/DataBlock.hh"
 
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/common/Debug.cc
--- a/src/mem/ruby/common/Debug.cc      Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/common/Debug.cc      Mon Jul 06 15:49:47 2009 -0700
@@ -45,21 +45,31 @@
 std::ostream * debug_cout_ptr;
 
 bool Debug::m_protocol_trace = false;
+struct DebugComponentData
+{
+    const char *desc;
+    const char ch;
+};
 
 // component character list
-const char DEFINE_COMP_CHAR[] =
+DebugComponentData debugComponents[] =
 {
-#undef DEFINE_COMP
-#define DEFINE_COMP(component, character, description) character,
-#include "Debug.def"
-};
-
-// component description list
-const char* DEFINE_COMP_DESCRIPTION[] =
-{
-#undef DEFINE_COMP
-#define DEFINE_COMP(component, character, description) description,
-#include "Debug.def"
+    {"System",            's' },
+    {"Node",              'N' },
+    {"Queue",             'q' },
+    {"Event Queue",       'e' },
+    {"Network",           'n' },
+    {"Sequencer",         'S' },
+    {"Tester",            't' },
+    {"Generated",         'g' },
+    {"SLICC",             'l' },
+    {"Network Queues",    'Q' },
+    {"Time",              'T' },
+    {"Network Internals", 'i' },
+    {"Store Buffer",      'b' },
+    {"Cache",             'c' },
+    {"Predictor",         'p' },
+    {"Allocator",         'a' },
 };
 
 extern "C" void changeDebugVerbosity(VerbosityLevel vb);
@@ -226,7 +236,7 @@
 {
   for (int i=0; i<NUMBER_OF_COMPS; i++) {
     // Look at all components to find a character match
-    if (DEFINE_COMP_CHAR[i] == ch) {
+    if (debugComponents[i].ch == ch) {
       // We found a match - return no error
       return false; // no error
     }
@@ -292,9 +302,9 @@
 {
   for (int i=0; i<NUMBER_OF_COMPS; i++) {
     // Look at all components to find a character match
-    if (DEFINE_COMP_CHAR[i] == ch) {
+    if (debugComponents[i].ch == ch) {
       // We found a match - update the filter bit mask
-      cout << "  Debug: Adding to filter: '" << ch << "' (" << 
DEFINE_COMP_DESCRIPTION[i] << ")" << endl;
+      cout << "  Debug: Adding to filter: '" << ch << "' (" << 
debugComponents[i].desc << ")" << endl;
       m_filter |= (1 << i);
       return false; // no error
     }
@@ -320,7 +330,7 @@
 {
   cerr << "Debug components: " << endl;
   for (int i=0; i<NUMBER_OF_COMPS; i++) {
-    cerr << "  " << DEFINE_COMP_CHAR[i] << ": " << DEFINE_COMP_DESCRIPTION[i] 
<< endl;
+    cerr << "  " << debugComponents[i].ch << ": " << debugComponents[i].desc 
<< endl;
   }
 }
 
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/common/Debug.hh
--- a/src/mem/ruby/common/Debug.hh      Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/common/Debug.hh      Mon Jul 06 15:49:47 2009 -0700
@@ -31,21 +31,39 @@
  * $Id$
  */
 
-#ifndef DEBUG_H
-#define DEBUG_H
+#ifndef __MEM_RUBY_DEBUG_HH__
+#define __MEM_RUBY_DEBUG_HH__
 
 #include <unistd.h>
 #include <iostream>
+#include <string>
+#include <vector>
+
+#include "config/ruby_debug.hh"
+#include "mem/ruby/common/Global.hh"
 
 extern std::ostream * debug_cout_ptr;
 
 // component enumeration
 enum DebugComponents
 {
-#undef DEFINE_COMP
-#define DEFINE_COMP(component, character, description) component,
-#include "Debug.def"
-  NUMBER_OF_COMPS
+    SYSTEM_COMP,
+    NODE_COMP,
+    QUEUE_COMP,
+    EVENTQUEUE_COMP,
+    NETWORK_COMP,
+    SEQUENCER_COMP,
+    TESTER_COMP,
+    GENERATED_COMP,
+    SLICC_COMP,
+    NETWORKQUEUE_COMP,
+    TIME_COMP,
+    NETWORK_INTERNALS_COMP,
+    STOREBUFFER_COMP,
+    CACHE_COMP,
+    PREDICTOR_COMP,
+    ALLOCATOR_COMP,
+    NUMBER_OF_COMPS
 };
 
 enum PriorityLevel {HighPrio, MedPrio, LowPrio};
@@ -55,7 +73,7 @@
 public:
   // Constructors
   Debug();
-  Debug( const string & name, const vector<string> & argv );
+  Debug(const std::string & name, const std::vector<std::string> & argv);
   Debug( const char *filterString, const char *verboseString,
          Time filterStartTime, const char *filename );
 
@@ -65,7 +83,7 @@
   // Public Methods
   static bool getProtocolTrace() { return m_protocol_trace; }
   bool validDebug(int module, PriorityLevel priority);
-  void printVerbosity(ostream& out) const;
+  void printVerbosity(std::ostream& out) const;
   void setVerbosity(VerbosityLevel vb);
   static bool checkVerbosityString(const char *verb_str);
   bool setVerbosityString(const char *);
@@ -79,7 +97,7 @@
   bool addFilter(char);
   void clearFilter();
   void allFilter();
-  void print(ostream& out) const;
+  void print(std::ostream& out) const;
   /* old school debugging "vararg": sends messages to screen and log */
   void debugMsg( const char *fmt, ... );
 
@@ -104,13 +122,13 @@
 };
 
 // Output operator declaration
-ostream& operator<<(ostream& out, const Debug& obj);
+std::ostream& operator<<(std::ostream& out, const Debug& obj);
 
 // ******************* Definitions *******************
 
 // Output operator definition
 extern inline
-ostream& operator<<(ostream& out, const Debug& obj)
+std::ostream& operator<<(std::ostream& out, const Debug& obj)
 {
   obj.print(out);
   out << flush;
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/common/Driver.hh
--- a/src/mem/ruby/common/Driver.hh     Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/common/Driver.hh     Mon Jul 06 15:49:47 2009 -0700
@@ -60,7 +60,7 @@
   virtual void get_network_config() {}
   virtual void dmaHitCallback() = 0;
   virtual void hitCallback(NodeID proc, SubBlock& data, CacheRequestType type, 
int thread) = 0; // Called by sequencer
-  virtual void conflictCallback(NodeID proc, SubBlock& data, CacheRequestType 
type, int thread) { assert(0) }; // Called by sequencer
+  virtual void conflictCallback(NodeID proc, SubBlock& data, CacheRequestType 
type, int thread) { assert(0); }; // Called by sequencer
   virtual integer_t getInstructionCount(int procID) const { return 1; }
   virtual integer_t getCycleCount(int procID) const { return 1; }
   virtual void addThreadDependency(int procID, int requestor_thread, int 
conflict_thread) const { assert(0);}
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/common/Set.cc
--- a/src/mem/ruby/common/Set.cc        Mon Jul 06 15:49:47 2009 -0700
+++ b/src/mem/ruby/common/Set.cc        Mon Jul 06 15:49:47 2009 -0700
@@ -566,7 +566,7 @@
 #ifdef __32BITS__
     sprintf(buff,"%08X ",m_p_nArray[i]);
 #else
-    sprintf(buff,"0x %016llX ",m_p_nArray[i]);
+    sprintf(buff,"0x %016llX ", (long long)m_p_nArray[i]);
 #endif // __32BITS__
     out << buff;
   }
diff -r d60118c43d60 -r 083a6806dd96 
src/mem/ruby/config/MI_example-homogeneous.rb
--- a/src/mem/ruby/config/MI_example-homogeneous.rb     Mon Jul 06 15:49:47 
2009 -0700
+++ b/src/mem/ruby/config/MI_example-homogeneous.rb     Mon Jul 06 15:49:47 
2009 -0700
@@ -13,7 +13,7 @@
 num_cores = 16
 L1_CACHE_SIZE_KB = 32
 L1_CACHE_ASSOC = 8
-L1_CACHE_LATENCY = "auto"
+L1_CACHE_LATENCY = 2
 num_memories = 2
 memory_size_mb = 1024
 NUM_DMA = 1
diff -r d60118c43d60 -r 083a6806dd96 src/mem/ruby/config/RubyConfig.cc
--- a/src/mem/ruby/config/RubyConfig.cc Mon Jul 06 15:49:47 2009 -0700
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to