@@ -54,6 +54,7 @@ void usage()
54
54
cout << " \t -q, --quiet \t\t\t flag to suppress simulation output (except final stats) [default=no]" <<endl;
55
55
cout << " \t -o, --option=OPTION_A=234\t\t\t overwrite any ini file option from the command line" <<endl;
56
56
cout << " \t -p, --pwd=DIRECTORY\t\t Set the working directory (i.e. usually DRAMSim directory where ini/ and results/ are)" <<endl;
57
+ cout << " \t -S, --size=# \t\t\t Size of the memory system in megabytes" <<endl;
57
58
}
58
59
#endif
59
60
@@ -241,14 +242,15 @@ int main(int argc, char **argv)
241
242
string systemIniFilename = " ini/system.ini" ;
242
243
string deviceIniFilename = " " ;
243
244
string pwdString = " " ;
245
+ unsigned megsOfMemory=2048 ;
244
246
245
247
bool overrideOpt = false ;
246
248
string overrideKey = " " ;
247
249
string overrideVal = " " ;
248
250
string tmp = " " ;
249
251
size_t equalsign;
250
252
251
- uint numCycles=30 ;
253
+ uint numCycles=100 ;
252
254
// getopt stuff
253
255
while (1 )
254
256
{
@@ -262,10 +264,11 @@ int main(int argc, char **argv)
262
264
{" option" , required_argument, 0 , ' o' },
263
265
{" quiet" , no_argument, &SHOW_SIM_OUTPUT, ' q' },
264
266
{" help" , no_argument, 0 , ' h' },
267
+ {" size" , required_argument, 0 , ' S' },
265
268
{0 , 0 , 0 , 0 }
266
269
};
267
270
int option_index=0 ; // for getopt
268
- c = getopt_long (argc, argv, " t:s:c:d:o:p:bkq" , long_options, &option_index);
271
+ c = getopt_long (argc, argv, " t:s:c:d:o:p:S: bkq" , long_options, &option_index);
269
272
if (c == -1 )
270
273
{
271
274
break ;
@@ -301,6 +304,9 @@ int main(int argc, char **argv)
301
304
case ' c' :
302
305
numCycles = atoi (optarg );
303
306
break ;
307
+ case ' S' :
308
+ megsOfMemory=atoi (optarg );
309
+ break ;
304
310
case ' p' :
305
311
pwdString = string (optarg );
306
312
break ;
@@ -366,8 +372,7 @@ int main(int argc, char **argv)
366
372
string line;
367
373
368
374
369
- MemorySystem *memorySystem;
370
- memorySystem = new MemorySystem (0 , deviceIniFilename, systemIniFilename, pwdString, traceFileName, 0 );
375
+ MemorySystem *memorySystem = new MemorySystem (0 , deviceIniFilename, systemIniFilename, pwdString, traceFileName, megsOfMemory);
371
376
372
377
uint64_t addr;
373
378
uint64_t clockCycle=0 ;
0 commit comments