added a script for generating the memory hog traces
This commit is contained in:
21
DRAMSys/simulator/resources/scripts/memoryHog.pl
Normal file
21
DRAMSys/simulator/resources/scripts/memoryHog.pl
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/perl -w
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
open(LINEAR, "> ../traces/linear.stl");
|
||||
open(RANDOM, "> ../traces/random.stl");
|
||||
|
||||
my $length = shift || die ("please give length of traces");
|
||||
my $size = 0x40;
|
||||
|
||||
for(my $i=0; $i < $length; $i++)
|
||||
{
|
||||
my $r = int(rand($length));
|
||||
#print $r." ".($size*$r)."\n";
|
||||
print LINEAR "$i: read ".sprintf("0x%x",($size*$i))."\n";
|
||||
print RANDOM "$i: read ".sprintf("0x%x",($size*$r))."\n";
|
||||
}
|
||||
|
||||
|
||||
close(LINEAR);
|
||||
close(RANDOM);
|
||||
Reference in New Issue
Block a user