summaryrefslogtreecommitdiff
path: root/src/mem/ruby/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/config')
-rw-r--r--src/mem/ruby/config/RubyConfig.cc250
-rw-r--r--src/mem/ruby/config/RubyConfig.hh229
2 files changed, 0 insertions, 479 deletions
diff --git a/src/mem/ruby/config/RubyConfig.cc b/src/mem/ruby/config/RubyConfig.cc
deleted file mode 100644
index 4ecec4da6..000000000
--- a/src/mem/ruby/config/RubyConfig.cc
+++ /dev/null
@@ -1,250 +0,0 @@
-
-/*
- * 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.
- */
-
-/*
- * RubyConfig.cc
- *
- * Description: See RubyConfig.hh
- *
- * $Id$
- *
- */
-
-#include "mem/ruby/config/RubyConfig.hh"
-//#include "mem/protocol/protocol_name.hh"
-#include "mem/gems_common/util.hh"
-
-#define CONFIG_DEF_FILE "mem/ruby/config/config.hh"
-
-#define ERROR_MSG(MESSAGE)\
-{\
- cerr << "Fatal Error: in fn "\
- << __PRETTY_FUNCTION__ << " in "\
- << __FILE__ << ":"\
- << __LINE__ << ": "\
- << (MESSAGE) << endl << flush;\
- abort();\
-}
-
-// declare all configuration variables
-#define PARAM_BOOL( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- bool RubyConfig::m_##NAME = DEFAULT_VALUE;
-#define PARAM_STRING( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- const char* RubyConfig::m_##NAME = DEFAULT_VALUE;
-#define PARAM_ULONG( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- uint64 RubyConfig::m_##NAME = DEFAULT_VALUE;
-#define PARAM( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- int RubyConfig::m_##NAME = DEFAULT_VALUE;
-#define PARAM_ARRAY( NAME, TYPE, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- TYPE* RubyConfig::m_##NAME = NULL;
-#define PARAM_ARRAY2D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- TYPE** RubyConfig::m_##NAME = NULL;
-#define PARAM_ARRAY3D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, D3_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- TYPE*** RubyConfig::m_##NAME = NULL;
-#include CONFIG_DEF_FILE
-#undef PARAM_BOOL
-#undef PARAM_STRING
-#undef PARAM_ULONG
-#undef PARAM
-#undef PARAM_ARRAY
-#undef PARAM_ARRAY2D
-#undef PARAM_ARRAY3D
-
-#define CHECK_POWER_OF_2(N) { if (!is_power_of_2(N)) { ERROR_MSG(#N " must be a power of 2."); }}
-#define CHECK_ZERO(N) { if (N != 0) { ERROR_MSG(#N " must be zero at initialization."); }}
-#define CHECK_NON_ZERO(N) { if (N == 0) { ERROR_MSG(#N " must be non-zero."); }}
-
-uint32 RubyConfig::m_data_block_mask;
-
-void RubyConfig::reset()
-{
- #define PARAM_BOOL( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = DEFAULT_VALUE;
-#define PARAM_STRING( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = DEFAULT_VALUE;
-#define PARAM_ULONG( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = DEFAULT_VALUE;
-#define PARAM( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = DEFAULT_VALUE;
-#define PARAM_ARRAY( NAME, TYPE, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = new TYPE[DEFAULT_ARRAY_SIZE]; \
- for (int i=0; i<DEFAULT_ARRAY_SIZE; i++) \
- m_##NAME[i] = DEFAULT_VALUE;
-#define PARAM_ARRAY2D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = new TYPE*[D1_DEFAULT_ARRAY_SIZE]; \
- for (int i=0; i<D1_DEFAULT_ARRAY_SIZE; i++) { \
- m_##NAME[i] = new TYPE[D2_DEFAULT_ARRAY_SIZE]; \
- for (int j=0; j<D2_DEFAULT_ARRAY_SIZE; j++) \
- m_##NAME[i][j] = DEFAULT_VALUE; \
- }
-#define PARAM_ARRAY3D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, D3_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- m_##NAME = new TYPE**[D1_DEFAULT_ARRAY_SIZE]; \
- for (int i=0; i<D1_DEFAULT_ARRAY_SIZE; i++) { \
- m_##NAME[i] = new TYPE*[D2_DEFAULT_ARRAY_SIZE]; \
- for (int j=0; j<D2_DEFAULT_ARRAY_SIZE; j++) { \
- m_##NAME[i][j] = new TYPE[D3_DEFAULT_ARRAY_SIZE]; \
- for (int k=0; k<D3_DEFAULT_ARRAY_SIZE; k++) \
- m_##NAME[i][j][k] = DEFUALT_VALUE; \
- } \
- }
-#include CONFIG_DEF_FILE
-#undef PARAM_BOOL
-#undef PARAM_STRING
-#undef PARAM_ULONG
-#undef PARAM
-#undef PARAM_ARRAY
-#undef PARAM_ARRAY2D
-#undef PARAM_ARRAY3D
-}
-
-void RubyConfig::init()
-{
- /*
- // MemoryControl:
- CHECK_NON_ZERO(m_MEM_BUS_CYCLE_MULTIPLIER);
- CHECK_NON_ZERO(m_BANKS_PER_RANK);
- CHECK_NON_ZERO(m_RANKS_PER_DIMM);
- CHECK_NON_ZERO(m_DIMMS_PER_CHANNEL);
- CHECK_NON_ZERO(m_BANK_QUEUE_SIZE);
- CHECK_NON_ZERO(m_BankBusyTime);
- CHECK_NON_ZERO(m_MEM_CTL_LATENCY);
- CHECK_NON_ZERO(m_REFRESH_PERIOD);
- CHECK_NON_ZERO(m_BASIC_BUS_BUSY_TIME);
-
- CHECK_POWER_OF_2(m_BANKS_PER_RANK);
- CHECK_POWER_OF_2(m_RANKS_PER_DIMM);
- CHECK_POWER_OF_2(m_DIMMS_PER_CHANNEL);
-
- CHECK_NON_ZERO(m_MemorySizeBytes);
- // CHECK_NON_ZERO(m_DATA_BLOCK_BYTES);
- CHECK_NON_ZERO(m_NUM_PROCESSORS);
- CHECK_NON_ZERO(m_ProcsPerChip);
-
- if (m_NUM_L2_BANKS == 0) { // defaults to number of ruby nodes
- m_NUM_L2_BANKS = m_NUM_PROCESSORS;
- }
- if (m_NUM_MEMORIES == 0) { // defaults to number of ruby nodes
- m_NUM_MEMORIES = m_NUM_PROCESSORS;
- }
-
- CHECK_ZERO(m_MEMORY_SIZE_BITS);
- CHECK_ZERO(m_NUM_PROCESSORS_BITS);
- CHECK_ZERO(m_NUM_CHIP_BITS);
- CHECK_ZERO(m_NUM_L2_BANKS_BITS);
- CHECK_ZERO(m_NUM_MEMORIES_BITS);
- CHECK_ZERO(m_PROCS_PER_CHIP_BITS);
- CHECK_ZERO(m_NUM_L2_BANKS_PER_CHIP);
- CHECK_ZERO(m_NUM_L2_BANKS_PER_CHIP_BITS);
- CHECK_ZERO(m_NUM_MEMORIES_BITS);
- CHECK_ZERO(m_MEMORY_MODULE_BLOCKS);
- CHECK_ZERO(m_MEMORY_MODULE_BITS);
- CHECK_ZERO(m_NUM_MEMORIES_PER_CHIP);
-
- CHECK_POWER_OF_2(m_MemorySizeBytes);
- CHECK_POWER_OF_2(m_NUM_PROCESSORS);
- CHECK_POWER_OF_2(m_NUM_L2_BANKS);
- CHECK_POWER_OF_2(m_NUM_MEMORIES);
- CHECK_POWER_OF_2(m_ProcsPerChip);
-
- assert(m_NUM_PROCESSORS >= m_ProcsPerChip); // obviously can't have less processors than procs/chip
- m_NUM_CHIPS = m_NUM_PROCESSORS/m_ProcsPerChip;
- assert(m_NUM_L2_BANKS >= m_NUM_CHIPS); // cannot have a single L2cache across multiple chips
-
- m_NUM_L2_BANKS_PER_CHIP = m_NUM_L2_BANKS/m_NUM_CHIPS;
-
- if (m_NUM_CHIPS > m_NUM_MEMORIES) {
- m_NUM_MEMORIES_PER_CHIP = 1; // some chips have a memory, others don't
- } else {
- m_NUM_MEMORIES_PER_CHIP = m_NUM_MEMORIES/m_NUM_CHIPS;
- }
-
- m_NUM_CHIP_BITS = log_int(m_NUM_CHIPS);
- m_MEMORY_SIZE_BITS = log_int(m_MemorySizeBytes);
-
- m_data_block_mask = ~ (~0 << m_DATA_BLOCK_BITS);
-
- m_NUM_PROCESSORS_BITS = log_int(m_NUM_PROCESSORS);
- m_NUM_L2_BANKS_BITS = log_int(m_NUM_L2_BANKS);
- m_NUM_L2_BANKS_PER_CHIP_BITS = log_int(m_NUM_L2_BANKS_PER_CHIP);
- m_NUM_MEMORIES_BITS = log_int(m_NUM_MEMORIES);
- m_PROCS_PER_CHIP_BITS = log_int(m_ProcsPerChip);
-
- m_MEMORY_MODULE_BITS = m_MEMORY_SIZE_BITS - m_DATA_BLOCK_BITS - m_NUM_MEMORIES_BITS;
- m_MEMORY_MODULE_BLOCKS = (int64(1) << m_MEMORY_MODULE_BITS);
-
- */
-
- // Randomize the execution
- // srandom(m_RandomSeed);
-}
-
-static void print_parameters(ostream& out)
-{
-
-#define print_true(NAME)
-#define print_false(NAME) \
- out << #NAME << ": " << RubyConfig::get##NAME () << endl
-
-#define PARAM(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_UINT(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_ULONG(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_BOOL(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_DOUBLE(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_STRING(NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR) { print_##CUSTOM_ACCESSOR(NAME); }
-#define PARAM_ARRAY( NAME, TYPE, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) { out << #NAME << ": ARRAY" << endl; }
-#define PARAM_ARRAY2D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) { out << #NAME << ": ARRAY2D" << endl; }
-#define PARAM_ARRAY3D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, D3_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) { out << #NAME << ": ARRAY3D" << endl; }
-#include "mem/ruby/config/config.hh"
-#undef PARAM
-#undef PARAM_UINT
-#undef PARAM_ULONG
-#undef PARAM_BOOL
-#undef PARAM_DOUBLE
-#undef PARAM_STRING
-#undef PARAM_ARRAY
-#undef PARAM_ARRAY2D
-#undef PARAM_ARRAY3D
-}
-
-void RubyConfig::printConfiguration(ostream& out) {
- out << "Ruby Configuration" << endl;
- out << "------------------" << endl;
-
- //out << "protocol: " << CURRENT_PROTOCOL << endl;
- out << "compiled_at: " << __TIME__ << ", " << __DATE__ << endl;
- // out << "RUBY_DEBUG: " << bool_to_string(RUBY_DEBUG) << endl;
-
- char buffer[100];
- gethostname(buffer, 50);
- out << "hostname: " << buffer << endl;
-
- print_parameters(out);
-}
-
-
diff --git a/src/mem/ruby/config/RubyConfig.hh b/src/mem/ruby/config/RubyConfig.hh
deleted file mode 100644
index 8ad733385..000000000
--- a/src/mem/ruby/config/RubyConfig.hh
+++ /dev/null
@@ -1,229 +0,0 @@
-
-/*
- * 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.
- */
-
-/*
- * RubyConfig.hh
- *
- * Description: This class has only static members and class methods,
- * and thus should never need to be instantiated.
- *
- * $Id$
- *
- */
-
-#ifndef RUBYCONFIG_H
-#define RUBYCONFIG_H
-
-#include <cstdlib>
-#include <string>
-#include <ostream>
-#include <assert.h>
-
-#include "mem/ruby/common/TypeDefines.hh"
-
-// Set paramterization
-/*
- * This defines the number of longs (32-bits on 32 bit machines,
- * 64-bit on 64-bit AMD machines) to use to hold the set...
- * the default is 4, allowing 128 or 256 different members
- * of the set.
- *
- * This should never need to be changed for correctness reasons,
- * though increasing it will increase performance for larger
- * set sizes at the cost of a (much) larger memory footprint
- *
- */
-const int NUMBER_WORDS_PER_SET = 4;
-
-using namespace std;
-
-class RubyConfig {
-public:
-
- // CACHE BLOCK CONFIG VARIBLES
- static uint32 dataBlockMask() { return m_data_block_mask; }
-
- static int numberOfDMA() { return 1; }
- static int numberOfDMAPerChip() { return 1; }
- static int DMATransitionsPerCycle() { return 1; }
-
- // SUPPORTED PHYSICAL MEMORY CONFIG VARIABLES
- // static int memoryModuleBits() { return m_MEMORY_MODULE_BITS; }
- // static int64 memoryModuleBlocks() { return m_MEMORY_MODULE_BLOCKS; }
-
- // defines the number of simics processors (power of 2)
- // static int numberOfProcessors() { return m_NUM_PROCESSORS; }
- // static int procsPerChipBits() { return m_PROCS_PER_CHIP_BITS; }
- // static int numberOfProcsPerChip() { return m_ProcsPerChip; }
- // static int numberOfChips() { return m_NUM_CHIPS; }
-
- // MACHINE INSTANIATION CONFIG VARIABLES
- // -------------------------------------
- // L1 CACHE MACHINES
- // defines the number of L1banks - idependent of ruby chips (power of 2)
- // NOTE - no protocols currently supports L1s != processors, just a placeholder
-
- // DIRECTORY/MEMORY MACHINES
- // defines the number of ruby memories - idependent of ruby chips (power of 2)
- // static int memoryBits() { return m_NUM_MEMORIES_BITS; }
- // static int numberOfDirectory() { return numberOfMemories(); }
- // static int numberOfMemories() { return m_NUM_MEMORIES; }
- // static int numberOfDirectoryPerChip() { return m_NUM_MEMORIES_PER_CHIP; }
- // static int DirectoryTransitionsPerCycle() { return m_DIRECTORY_TRANSITIONS_PER_RUBY_CYCLE; }
-
- // ---- END MACHINE SPECIFIC VARIABLES ----
-
- // VARIABLE MEMORY RESPONSE LATENCY
- // *** NOTE *** This is where variation is added to the simulation
- // see Alameldeen et al. HPCA 2003 for further details
-// static int getMemoryLatency() { return m_MEMORY_RESPONSE_LATENCY_MINUS_2+(random() % 5); }
-
- static void reset();
- static void init();
- static void printConfiguration(std::ostream& out);
-
- // Memory Controller
-
-// static int memBusCycleMultiplier () { return m_MEM_BUS_CYCLE_MULTIPLIER; }
-/* static int banksPerRank () { return m_BANKS_PER_RANK; }
- static int ranksPerDimm () { return m_RANKS_PER_DIMM; }
- static int dimmsPerChannel () { return m_DIMMS_PER_CHANNEL; }
- static int bankBit0 () { return m_BANK_BIT_0; }
- static int rankBit0 () { return m_RANK_BIT_0; }
- static int dimmBit0 () { return m_DIMM_BIT_0; }
- static int bankQueueSize () { return m_BANK_QUEUE_SIZE; }
- static int bankBusyTime () { return m_BankBusyTime; }
- static int rankRankDelay () { return m_RANK_RANK_DELAY; }
- static int readWriteDelay () { return m_READ_WRITE_DELAY; }
- static int basicBusBusyTime () { return m_BASIC_BUS_BUSY_TIME; }
- static int memCtlLatency () { return m_MEM_CTL_LATENCY; }
- static int refreshPeriod () { return m_REFRESH_PERIOD; }
- static int tFaw () { return m_TFAW; }
- static int memRandomArbitrate () { return m_MEM_RANDOM_ARBITRATE; }
- static int memFixedDelay () { return m_MEM_FIXED_DELAY; }
-*/
- /* cache accessors */
- static int getCacheIDFromParams(int level, int num, string split_type) {
- // TODO: this function
- return 0;
- }
-
-#define accessor_true( TYPE, NAME )
-#define accessor_false( TYPE, NAME ) \
- static TYPE get##NAME() { return m_##NAME; } \
- static void set##NAME(TYPE val) { m_##NAME = val; }
-
-#define array_accessor_true( TYPE, NAME, DEFAULT_ARRAY_SIZE )
-#define array_accessor_false( TYPE, NAME, DEFAULT_ARRAY_SIZE ) \
- static TYPE get##NAME(int idx) { \
- assert(m_##NAME != NULL); \
- return m_##NAME[idx]; \
- } \
- static void set##NAME(int idx, TYPE val) { \
- if(m_##NAME == NULL) { \
- assert(DEFAULT_ARRAY_SIZE > 0); \
- m_##NAME = new TYPE[DEFAULT_ARRAY_SIZE]; \
- } \
- m_##NAME[idx] = val; \
- }
-
-#define array2d_accessor_true( TYPE, NAME )
-#define array2d_accessor_false( TYPE, NAME ) \
- static TYPE get##NAME(int idx1, int idx2) { return m_##NAME[idx1][idx2]; } \
- static void set##NAME(int idx1, int idx2, TYPE val) { m_##NAME[idx1][idx2] = val; }
-
-#define array3d_accessor_true( TYPE, NAME )
-#define array3d_accessor_false( TYPE, NAME ) \
- static TYPE get##NAME(int idx1, int idx2, int idx3) { return m_##NAME[idx1][idx2][idx3]; } \
- static void set##NAME(int idx1, int idx2, int idx3, TYPE val) { m_##NAME[idx1][idx2][idx3] = val; }
-
-#define PARAM( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(int32,NAME)
-#define PARAM_UINT( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(uint32,NAME)
-#define PARAM_ULONG( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(uint64,NAME)
-#define PARAM_BOOL( NAME, DEFAULT_VALUE,CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(bool,NAME)
-#define PARAM_DOUBLE( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(double,NAME)
-#define PARAM_STRING( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- accessor_##CUSTOM_ACCESSOR(const char*,NAME)
-#define PARAM_ARRAY( NAME, TYPE, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- array_accessor_##CUSTOM_ACCESSOR(TYPE, NAME, DEFAULT_ARRAY_SIZE)
-#define PARAM_ARRAY2D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- array2d_accessor_##CUSTOM_ACCESSOR(TYPE, NAME)
-#define PARAM_ARRAY3D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, D3_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- array3d_accessor_##CUSTOM_ACCESSOR(TYPE, NAME)
-#include "mem/ruby/config/config.hh"
-#undef PARAM
-#undef PARAM_UINT
-#undef PARAM_ULONG
-#undef PARAM_BOOL
-#undef PARAM_DOUBLE
-#undef PARAM_STRING
-#undef PARAM_ARRAY
-#undef PARAM_ARRAY2D
-#undef PARAM_ARRAY3D
-
-private:
- static uint32 m_data_block_mask;
-
-#define PARAM( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static int32 m_##NAME;
-#define PARAM_UINT( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static uint32 m_##NAME;
-#define PARAM_ULONG( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static uint64 m_##NAME;
-#define PARAM_BOOL( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static bool m_##NAME;
-#define PARAM_DOUBLE( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static double m_##NAME;
-#define PARAM_STRING( NAME, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static const char *m_##NAME;
-#define PARAM_ARRAY( NAME, TYPE, DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static TYPE* m_##NAME;
-#define PARAM_ARRAY2D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static TYPE** m_##NAME;
-#define PARAM_ARRAY3D( NAME, TYPE, D1_DEFAULT_ARRAY_SIZE, D2_DEFAULT_ARRAY_SIZE, D3_DEFAULT_ARRAY_SIZE, DEFAULT_VALUE, CUSTOM_ACCESSOR ) \
- static TYPE*** m_##NAME;
-#include "mem/ruby/config/config.hh"
-#undef PARAM
-#undef PARAM_UINT
-#undef PARAM_ULONG
-#undef PARAM_BOOL
-#undef PARAM_DOUBLE
-#undef PARAM_STRING
-#undef PARAM_ARRAY
-#undef PARAM_ARRAY2D
-#undef PARAM_ARRAY3D
-
-};
-
-#endif //RUBYCONFIG_H