config_constants.h

Go to the documentation of this file.
00001 /*
00002  * =====================================================================================
00003  *
00004  *       Filename:  constants.h
00005  *
00006  *    Description:  
00007  *
00008  *        Version:  1.0
00009  *        Created:  02/25/2010 11:18:28 PM
00010  *       Revision:  none
00011  *       Compiler:  gcc
00012  *
00013  *         Author:  SYED MINHAJ HASSAN
00014  *        Company:  Georgia Institute of Technology
00015  *
00016  * =====================================================================================
00017  */
00018 #ifndef _2CONSTANTS_H
00019 #define _2CONSTANTS_H
00020 #include <math.h>
00021 #include <stdint.h>
00022 #include "simIrisComponentHeader.h"
00023 
00024 typedef unsigned long long int Time;
00025 typedef unsigned long long int Addr_t;
00026 typedef unsigned int UInt;
00027 
00028 enum DRAM_PAGE_POLICY { OPEN_PAGE_POLICY, CLOSE_PAGE_POLICY};
00029 enum MC_SCHEDULLING_ALGO { PAR_BS, FR_FCFS, FC_FS, NFQ};
00030 enum ADDR_MAP_SCHEME { PAGE_INTERLEAVING, PERMUTATION, CACHELINE_INTERLEAVING, SWAPPING, GENERIC, NO_SCHEME, LOCAL_ADDR_MAP};
00031 
00032 DRAM_PAGE_POLICY dram_page_policy = OPEN_PAGE_POLICY; 
00033 MC_SCHEDULLING_ALGO mc_scheduling_algorithm = FR_FCFS;
00034 ADDR_MAP_SCHEME addr_map_scheme = PAGE_INTERLEAVING;
00035 
00036 unsigned int THREAD_BITS_POSITION = 25;
00037 unsigned int MC_ADDR_BITS = 12;
00038 unsigned int BANK_BITS = 13;
00039 
00047 
00048 //#define CLUBBED 1 // Uncomment this for dhruvs classy clubbing optimizations
00049 #define STALL_TIME 50   
00050 
00051 uint NO_OF_THREADS=2;
00052 uint NO_OF_CHANNELS=1;          //  (int)log2() = k bits. 
00053 uint NO_OF_RANKS=32;                    //  (int)log2() = l bits.
00054 uint NO_OF_BANKS=8;                     //  (int)log2() = b bits. 
00055 uint NO_OF_BUFFERS = NO_OF_BANKS;
00056 uint NO_OF_ROWS = 8192;                 //4096 //  (int)log2() = r bits. 
00057 uint NO_OF_COLUMNS = 128;               //  (int)log2() = c bits. 
00058 uint COLUMN_SIZE = 64;                  //  (int)log2() = v bits.  Column Size = 2bytes
00059 uint BLOCKS_PER_ROW = 128;              //  (int)log2() = n bits.  Cache line Per Row
00060 uint CACHE_BLOCK_SIZE = 64;             //  (int)log2() = z bits.  L2 Cache Block Size
00061 uint ROW_SIZE = NO_OF_COLUMNS*COLUMN_SIZE; //(Also equal to BLOCKS_PER_ROW*CACHE_BLOCK_SIZE)
00062 uint DRAM_SIZE = NO_OF_CHANNELS*NO_OF_RANKS*NO_OF_BANKS*NO_OF_ROWS*ROW_SIZE;
00063 uint TAG_BITS=8;                // t bits
00064 
00065 uint USE_MSHR = 1;
00066 uint MSHR_SIZE = 8;
00067 
00068 uint GLOBAL_XOR = 0;
00069 
00070 //#define CORE_UNCORE_RATIO 1
00071 uint MAX_BUFFER_SIZE = 8;
00072 uint MAX_CMD_BUFFER_SIZE = 16;
00073 uint RESPONSE_BUFFER_SIZE = 56*8; 
00074 
00075 uint BATCH_FORM_TIME = 2000;
00076 //#define MAX_BATCH_TIME 2000;
00077 uint MAX_BATCH_SIZE = 5;
00078 uint MAX_READ_OV_WRITE = 8;
00079 
00080 uint NETWORK_ADDRESS_BITS = 48;
00081 uint NETWORK_THREADID_BITS = 6;
00082 uint NETWORK_COMMAND_BITS = 3;
00083 
00084 const uint READ_SIZE = CACHE_BLOCK_SIZE;
00085 const uint WRITE_SIZE = CACHE_BLOCK_SIZE;
00086 const uint PREFETCH_SIZE = CACHE_BLOCK_SIZE;
00087 const uint WRITEBACK_SIZE = CACHE_BLOCK_SIZE;
00088 
00089 /* DRAM Timing parameters. Init for these variables is done in mc_constants.cc
00090  * depending on clock speeds and dram sizes. */
00091 uint DDR_BUS_WIDTH;
00092 uint BUS_SPEED;
00093 uint CORE_SPEED;
00094 uint MEM_SPEED;
00095 uint MEM_CYCLE;
00096 uint BUS_CYCLE;
00097 uint CYCLE;
00098 uint tREFI;
00099 uint tRFC;
00100 uint tRC;
00101 uint tRAS;
00102 uint t_CMD;
00103 uint t_RCD;
00104 uint t_RRD;
00105 uint t_RAS;
00106 uint t_CAS;
00107 uint t_RTRS;
00108 uint t_OST;
00109 uint t_WR;
00110 uint t_WTR;
00111 uint t_RP;
00112 uint t_CCD;
00113 uint t_AL;
00114 uint t_CWD;
00115 uint t_RC;
00116 uint t_RTP;
00117 uint t_RFC;
00118 
00119 
00120 const unsigned long long int REFRESH_PERIOD = CORE_SPEED*64000;                 // 64ms
00121 const unsigned long long int REFRESH_INC = (ullint)floor(REFRESH_PERIOD/(8192)) - BUS_CYCLE;    // -1 BUS_CYCLE to be on the safe side
00122 
00123 enum DRAM_CONFIG { DDR3_1333_9_9_9, 
00124     DDR3_1600_10_10_10,
00125     DDR3_1333_6_6_6,
00126     DDR2_533_4_4_4,
00127     DDR2_667_4_4_4
00128 };
00129 
00130 DRAM_CONFIG dram_config_string = DDR3_1333_9_9_9;
00131 
00132 #endif
00133 

Generated on Tue Oct 19 17:22:00 2010 for IRIS by  doxygen 1.5.8