config_constants.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00049 #define STALL_TIME 50
00050
00051 uint NO_OF_THREADS=2;
00052 uint NO_OF_CHANNELS=1;
00053 uint NO_OF_RANKS=32;
00054 uint NO_OF_BANKS=8;
00055 uint NO_OF_BUFFERS = NO_OF_BANKS;
00056 uint NO_OF_ROWS = 8192;
00057 uint NO_OF_COLUMNS = 128;
00058 uint COLUMN_SIZE = 64;
00059 uint BLOCKS_PER_ROW = 128;
00060 uint CACHE_BLOCK_SIZE = 64;
00061 uint ROW_SIZE = NO_OF_COLUMNS*COLUMN_SIZE;
00062 uint DRAM_SIZE = NO_OF_CHANNELS*NO_OF_RANKS*NO_OF_BANKS*NO_OF_ROWS*ROW_SIZE;
00063 uint TAG_BITS=8;
00064
00065 uint USE_MSHR = 1;
00066 uint MSHR_SIZE = 8;
00067
00068 uint GLOBAL_XOR = 0;
00069
00070
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
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
00090
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;
00121 const unsigned long long int REFRESH_INC = (ullint)floor(REFRESH_PERIOD/(8192)) - BUS_CYCLE;
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