changeset e9a8bb75c3a8 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=e9a8bb75c3a8
description:
        ruby: rename config.include to config.hh and clean up the macro stuff.
        I did the macro cleanup because I was worried that the SCons scanner
        would get confused.  This code will hopefully go away soon anyway.

diffstat:

7 files changed, 331 insertions(+), 341 deletions(-)
src/mem/gems_common/ioutil/initvar.cc |   18 -
src/mem/gems_common/ioutil/initvar.hh |    3 
src/mem/gems_common/ioutil/vardecl.hh |    2 
src/mem/ruby/config/RubyConfig.cc     |    2 
src/mem/ruby/config/RubyConfig.hh     |    1 
src/mem/ruby/config/config.hh         |  323 +++++++++++++++++++++++++++++++++
src/mem/ruby/config/config.include    |  323 ---------------------------------

diffs (truncated from 772 to 300 lines):

diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/gems_common/ioutil/initvar.cc
--- a/src/mem/gems_common/ioutil/initvar.cc     Mon May 11 10:38:44 2009 -0700
+++ b/src/mem/gems_common/ioutil/initvar.cc     Mon May 11 10:38:44 2009 -0700
@@ -78,12 +78,6 @@
 #include "initvar.hh"
 
 /*------------------------------------------------------------------------*/
-/* Macro declarations                                                     */
-/*------------------------------------------------------------------------*/
-
-#define  CONFIG_VAR_FILENAME "config.include"
-
-/*------------------------------------------------------------------------*/
 /* Variable declarations                                                  */
 /*------------------------------------------------------------------------*/
 
@@ -102,7 +96,7 @@
    char  *NAME;
 #define PARAM_ARRAY( PTYPE, NAME, ARRAY_SIZE ) \
    PTYPE  NAME[ARRAY_SIZE];
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
@@ -162,7 +156,7 @@
       NAME = NULL;           \
    }
 #define PARAM_ARRAY( PTYPE, NAME, ARRAY_SIZE )
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
@@ -215,7 +209,7 @@
                                      initvar_get_attr, (void *) name,   \
                                      initvar_set_attr, (void *) name );
 
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
@@ -391,7 +385,7 @@
     return (ret);                                         \
   }
 
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
@@ -475,7 +469,7 @@
     return Sim_Set_Ok;                                        \
   }
 
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
@@ -575,7 +569,7 @@
   }                                                     \
   fprintf( fp, ")\n" );
 
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/gems_common/ioutil/initvar.hh
--- a/src/mem/gems_common/ioutil/initvar.hh     Mon May 11 10:38:44 2009 -0700
+++ b/src/mem/gems_common/ioutil/initvar.hh     Mon May 11 10:38:44 2009 -0700
@@ -46,9 +46,6 @@
 * setting the varibles (from the command line), printing the configuration,
 * and saving it to a file.
 *
-* Before including this file, you must define the variable CONFIG_VAR_FILENAME
-* to define which variables are to be used.
-*
 * @see     confio_t
 * @author  cmauer
 * @version $Id$
diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/gems_common/ioutil/vardecl.hh
--- a/src/mem/gems_common/ioutil/vardecl.hh     Mon May 11 10:38:44 2009 -0700
+++ b/src/mem/gems_common/ioutil/vardecl.hh     Mon May 11 10:38:44 2009 -0700
@@ -59,7 +59,7 @@
    extern char  *NAME;
 #define PARAM_ARRAY( PTYPE, NAME, ARRAY_SIZE ) \
    extern PTYPE  NAME[ARRAY_SIZE];
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/ruby/config/RubyConfig.cc
--- a/src/mem/ruby/config/RubyConfig.cc Mon May 11 10:38:44 2009 -0700
+++ b/src/mem/ruby/config/RubyConfig.cc Mon May 11 10:38:44 2009 -0700
@@ -164,7 +164,7 @@
   }                                            \
 
 
-#include CONFIG_VAR_FILENAME
+#include "config.hh"
 #undef PARAM
 #undef PARAM_UINT
 #undef PARAM_ULONG
diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/ruby/config/RubyConfig.hh
--- a/src/mem/ruby/config/RubyConfig.hh Mon May 11 10:38:44 2009 -0700
+++ b/src/mem/ruby/config/RubyConfig.hh Mon May 11 10:38:44 2009 -0700
@@ -41,7 +41,6 @@
 #define RUBYCONFIG_H
 
 #include "Global.hh"
-#define   CONFIG_VAR_FILENAME "config.include"
 #include "vardecl.hh"
 #include "NodeID.hh"
 
diff -r 0390b60a0b51 -r e9a8bb75c3a8 src/mem/ruby/config/config.hh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/src/mem/ruby/config/config.hh     Mon May 11 10:38:44 2009 -0700
@@ -0,0 +1,323 @@
+//
+// This file has been modified by Kevin Moore and Dan Nussbaum of the
+// Scalable Systems Research Group at Sun Microsystems Laboratories
+// (http://research.sun.com/scalable/) to support the Adaptive
+// Transactional Memory Test Platform (ATMTP).  For information about
+// ATMTP, see the GEMS website: http://www.cs.wisc.edu/gems/.
+//
+// Please send email to [email protected] with feedback, questions, or
+// to request future announcements about ATMTP.
+//
+// ----------------------------------------------------------------------
+//
+// File modification date: 2008-02-23
+//
+// ----------------------------------------------------------------------
+//
+// ATMTP is distributed as part of the GEMS software toolset and is
+// available for use and modification under the terms of version 2 of the
+// GNU General Public License.  The GNU General Public License is contained
+// in the file $GEMS/LICENSE.
+//
+// Multifacet GEMS is free software; you can redistribute it and/or modify
+// it under the terms of version 2 of the GNU General Public License as
+// published by the Free Software Foundation.
+//
+// Multifacet GEMS is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with the Multifacet GEMS; if not, write to the Free Software Foundation,
+// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+//
+// ----------------------------------------------------------------------
+//
+
+// see rubyconfig.defaults for some explanations
+
+PARAM( g_RANDOM_SEED );
+
+// Maximum number of cycles a request is can be outstanding before the
+// Sequencer of StoreBuffer declares we're in deadlock/livelock
+PARAM( g_DEADLOCK_THRESHOLD );
+PARAM_BOOL(  RANDOMIZATION );
+PARAM_BOOL(  g_SYNTHETIC_DRIVER );
+PARAM_BOOL(  g_DETERMINISTIC_DRIVER );
+
+// FOR MOESI_CMP_token
+PARAM_BOOL(  g_FILTERING_ENABLED );
+PARAM_BOOL(  g_DISTRIBUTED_PERSISTENT_ENABLED );
+PARAM_BOOL(  g_DYNAMIC_TIMEOUT_ENABLED );
+PARAM( g_RETRY_THRESHOLD );
+PARAM( g_FIXED_TIMEOUT_LATENCY );
+
+PARAM(  g_trace_warmup_length );
+PARAM_DOUBLE( g_bash_bandwidth_adaptive_threshold );
+
+PARAM( g_tester_length );
+PARAM( g_synthetic_locks );
+PARAM( g_deterministic_addrs );
+// Specified Generator: See SpecifiedGeneratorType in external.sm for valid 
values
+PARAM_STRING( g_SpecifiedGenerator );
+PARAM( g_callback_counter );
+PARAM( g_NUM_COMPLETIONS_BEFORE_PASS );
+
+PARAM( g_NUM_SMT_THREADS );
+
+PARAM( g_think_time );
+PARAM( g_hold_time );
+PARAM( g_wait_time );
+
+// For debugging purposes, one can enable a trace of all the protocol
+// state machine changes. Unfortunately, the code to generate the
+// trace is protocol specific. To enable the code for some of the
+// standard protocols,
+//   1. change "PROTOCOL_DEBUG_TRACE = true"
+//   2. enable debug in Makefile
+//   3. use the "--start 1" command line parameter or
+//      "g_debug_ptr->setDebugTime(1)" to beging the following to set the
+//      debug begin time
+//
+// this use to be ruby/common/Global.h
+
+PARAM_BOOL(  PROTOCOL_DEBUG_TRACE );
+// a string for filtering debugging output (for all g_debug vars see Debug.h)
+PARAM_STRING( DEBUG_FILTER_STRING );
+// filters debugging messages based on priority (low, med, high)
+PARAM_STRING( DEBUG_VERBOSITY_STRING );
+// filters debugging messages based on a ruby time
+PARAM_ULONG( DEBUG_START_TIME );
+// sends debugging messages to a output filename
+PARAM_STRING( DEBUG_OUTPUT_FILENAME );
+
+// defines relative (integer) clock multipliers between ruby, opal, and simics
+PARAM( SIMICS_RUBY_MULTIPLIER );
+PARAM( OPAL_RUBY_MULTIPLIER );
+
+PARAM_BOOL( TRANSACTION_TRACE_ENABLED );
+PARAM_BOOL( USER_MODE_DATA_ONLY );
+PARAM_BOOL( PROFILE_HOT_LINES );
+
+// PROFILE_ALL_INSTRUCTIONS is used if you want Ruby to profile all 
instructions executed
+// The following need to be true for this to work correctly:
+// 1. Disable istc and dstc for this simulation run
+// 2. Add the following line to the object "sim" in the checkpoint you run 
from:
+//     instruction_profile_line_size: 4
+// This is used to have simics report back all instruction requests
+
+// For more details on how to find out how to interpret the output physical 
instruction
+// address, please read the document in the simics-howto directory
+PARAM_BOOL( PROFILE_ALL_INSTRUCTIONS );
+
+// Set the following variable to true if you want a complete trace of
+// PCs (physical address of program counters, with executing processor IDs)
+// to be printed to stdout. Make sure to direct the simics output to a file.
+// Otherwise, the run will take a really long time!
+// A long run may write a file that can exceed the OS limit on file length
+PARAM_BOOL( PRINT_INSTRUCTION_TRACE );
+PARAM( g_DEBUG_CYCLE );
+
+// Don't allow any datablocks to enter the STC
+PARAM_BOOL( BLOCK_STC );
+
+// Make the entire memory system perfect
+PARAM_BOOL( PERFECT_MEMORY_SYSTEM );
+PARAM( PERFECT_MEMORY_SYSTEM_LATENCY );
+
+PARAM_BOOL( DATA_BLOCK ); // Define NO_DATA_BLOCK to make the DataBlock take 
zero space
+
+PARAM_BOOL( REMOVE_SINGLE_CYCLE_DCACHE_FAST_PATH );
+
+// *********************************************
+// CACHE & MEMORY PARAMETERS
+// *********************************************
+
+PARAM_BOOL( g_SIMICS );
+
+PARAM( L1_CACHE_ASSOC );
+PARAM( L1_CACHE_NUM_SETS_BITS );
+PARAM( L2_CACHE_ASSOC );
+PARAM( L2_CACHE_NUM_SETS_BITS );
+
+PARAM_ULONG( g_MEMORY_SIZE_BYTES );
+PARAM( g_DATA_BLOCK_BYTES );
+// The following page size parameter is used by the stride prefetcher
+PARAM( g_PAGE_SIZE_BYTES );
+PARAM_STRING( g_REPLACEMENT_POLICY );
+
+PARAM( g_NUM_PROCESSORS );
+PARAM( g_NUM_L2_BANKS );
+PARAM( g_NUM_MEMORIES );
+PARAM( g_PROCS_PER_CHIP );
+
+// The following group of parameters are calculated.  They must
+// _always_ be left at zero.
+PARAM( g_NUM_CHIPS );
+PARAM( g_NUM_CHIP_BITS );
+PARAM( g_MEMORY_SIZE_BITS );
+PARAM( g_DATA_BLOCK_BITS );
+PARAM( g_PAGE_SIZE_BITS );
+PARAM( g_NUM_PROCESSORS_BITS );
+PARAM( g_PROCS_PER_CHIP_BITS );
+PARAM( g_NUM_L2_BANKS_BITS );
+PARAM( g_NUM_L2_BANKS_PER_CHIP_BITS );
+PARAM( g_NUM_L2_BANKS_PER_CHIP );
+PARAM( g_NUM_MEMORIES_BITS );
+PARAM( g_NUM_MEMORIES_PER_CHIP );
+PARAM( g_MEMORY_MODULE_BITS );
+PARAM_ULONG( g_MEMORY_MODULE_BLOCKS );
+
+// determines the mapping between L2 banks and sets within L2 banks
+PARAM_BOOL( MAP_L2BANKS_TO_LOWEST_BITS );
+
+// TIMING PARAMETERS
+PARAM( DIRECTORY_CACHE_LATENCY );
+
+PARAM( NULL_LATENCY );
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to