OpenCores
URL https://opencores.org/ocsvn/theia_gpu/theia_gpu/trunk

Subversion Repositories theia_gpu

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /theia_gpu/branches/icarus_version/scripts
    from Rev 194 to Rev 195
    Reverse comparison

Rev 194 → Rev 195

/run_regressions.pl
82,17 → 82,17
copy("$TestPath/Instructions.mem","$TestDir/") or die "-E- $TestPath/Instructions.ppm $!\n";
copy("$TestPath/Instructions.mem","$TestDir/") or die "-E- $TestPath/Instructions.ppm $!\n";
#Print some information about the scene
my $Line = `grep -i width $TestDir/Params.mem`;
my ($Width,$Height) = split(" ", $Line);
$Width = (hex $Width)/$Scale;
$Height = (hex $Height)/$Scale;
my $Width = $TestList{$TestName}->{'width'};
my $Height = $TestList{$TestName}->{'height'};
print LOG "Scene Resolution: $Width x $Height\n";
$Line = `grep -i texture $TestDir/Params.mem`;
my ($Width,$Height) = split(" ", $Line);
$Width = (hex $Width)/$Scale;
$Height = (hex $Height)/$Scale;
print LOG "Texture: $Width x $Height\n";
my $Line = `grep -i texture $TestDir/Params.mem`;
my ($tWidth,$tHeight) = split(" ", $Line);
$tWidth = (hex $tWidth)/$Scale;
$tHeight = (hex $tHeight)/$Scale;
print LOG "Texture: $tWidth x $tHeight\n";
my $TringleCount = `grep -A 1 -i child $TestDir/Vertex.mem | grep -v -i child`;
print LOG "Triangle count: $TringleCount\n";
114,7 → 114,7
";
chdir "../simulation";
if ( system("make compile GPUCORES=$CoreCount GPUMEMBANKS=$MemBankCount") != 0)
if ( system("make compile GPUCORES=$CoreCount GPUMEMBANKS=$MemBankCount WIDTH=$Width HEIGHT=$Height") != 0)
{
die "-E- Error compiling test code! ($!)\n";
}
182,6 → 182,13
close F;
return $string;
}
#-------------------------------------------------------------------------------
sub Round
{
my $number = shift;
my $rounded = sprintf("%.3f", $number);
return $rounded;
}
#----------------------------------------------------------------
sub ParseOutputPPM()
{
209,5 → 216,22
$i++;
}
close FILE;
my $TotalTime = 0;
open F, "$TestDir/Simulation.log" or die "$TestDir/Simulation.log' : $!\n";
 
 
local $/=undef;
my $Temp = <F>;
close F;
my($junk,$StartSimTime) = split /Simulation start time \:\s+/,$Temp;
my($junk,$EndSimTime) = split /Simulation end time \:\s+/,$Temp;
$StartSimTime =~ s/ns//;
$EndSimTime =~ s/ns//;
$TotalTime = ($EndSimTime-$StartSimTime)/1000000000;
print LOG "Simulated start time: $StartSimTime\n";
print LOG "Simulated end time: $EndSimTime\n";
print LOG "Total Time: $TotalTime seconds\n";
print LOG "Theorical FPS: ". Round( (1 /$TotalTime) )."\n";
}
 
/testlist.pl
7,16 → 7,33
%TestList
=
(
'test_1' => {run_index => 1, path => "../examples/scenes/example1/", core_count => 2, mem_bank_count => 2, },
'test_2' => {run_index => 2, path => "../examples/scenes/example1/", core_count => 4, mem_bank_count => 4, },
'test_3' => {run_index => 3, path => "../examples/scenes/example1/", core_count => 8, mem_bank_count => 8, },
'test_4' => {run_index => 4, path => "../examples/scenes/example1/", core_count => 16, mem_bank_count => 16,},
'test_5' => {run_index => 5, path => "../examples/scenes/example2/", core_count => 4, mem_bank_count => 4, },
'test_6' => {run_index => 6, path => "../examples/scenes/example2/", core_count => 8, mem_bank_count => 8, },
'test_7' => {run_index => 7, path => "../examples/scenes/example2/", core_count => 16, mem_bank_count => 16, },
'test_8' => {run_index => 8, path => "../examples/scenes/example3/", core_count => 4, mem_bank_count => 4, },
'test_9' => {run_index => 9, path => "../examples/scenes/example3/", core_count => 8, mem_bank_count => 8, },
'test_10' => {run_index => 10, path => "../examples/scenes/example3/", core_count => 16, mem_bank_count => 16, },
'test_1' => {run_index => 1, path => "../examples/scenes/example1/", core_count => 2, mem_bank_count => 2, width => 512, height => 512 },
'test_2' => {run_index => 2, path => "../examples/scenes/example1/", core_count => 4, mem_bank_count => 4, width => 512, height => 512 },
'test_3' => {run_index => 3, path => "../examples/scenes/example1/", core_count => 8, mem_bank_count => 8, width => 512, height => 512 },
'test_4' => {run_index => 4, path => "../examples/scenes/example1/", core_count => 16, mem_bank_count => 16,width => 512, height => 512},
'test_5' => {run_index => 5, path => "../examples/scenes/example1/", core_count => 32, mem_bank_count => 32, width => 512, height => 512},
'test_6' => {run_index => 6, path => "../examples/scenes/example1/", core_count => 64, mem_bank_count => 64, width => 512, height => 512},
'test_7' => {run_index => 7, path => "../examples/scenes/example1/", core_count => 128, mem_bank_count => 128, width => 512, height => 512},
'test_8' => {run_index => 8, path => "../examples/scenes/example1/", core_count => 256, mem_bank_count => 256, width => 512, height => 512},
'test_9' => {run_index => 9, path => "../examples/scenes/example1/", core_count => 512, mem_bank_count => 512, width => 512, height => 512},
'test_10' => {run_index => 10, path => "../examples/scenes/example2/", core_count => 2, mem_bank_count => 2, width => 512, height => 512 },
'test_11' => {run_index => 11, path => "../examples/scenes/example2/", core_count => 4, mem_bank_count => 4, width => 512, height => 512 },
'test_12' => {run_index => 12, path => "../examples/scenes/example2/", core_count => 8, mem_bank_count => 8, width => 512, height => 512 },
'test_13' => {run_index => 13, path => "../examples/scenes/example2/", core_count => 16, mem_bank_count => 16, width => 512, height => 512 },
'test_14' => {run_index => 14, path => "../examples/scenes/example2/", core_count => 32, mem_bank_count => 32, width => 512, height => 512 },
'test_15' => {run_index => 15, path => "../examples/scenes/example2/", core_count => 64, mem_bank_count => 64, width => 512, height => 512 },
'test_16' => {run_index => 16, path => "../examples/scenes/example2/", core_count => 128, mem_bank_count => 128, width => 512, height => 512 },
'test_17' => {run_index => 17, path => "../examples/scenes/example2/", core_count => 256, mem_bank_count => 256, width => 512, height => 512 },
'test_18' => {run_index => 18, path => "../examples/scenes/example2/", core_count => 512, mem_bank_count => 512, width => 512, height => 512 },
'test_19' => {run_index => 19, path => "../examples/scenes/example3/", core_count => 2, mem_bank_count => 2, width => 512, height => 512 },
'test_20' => {run_index => 20, path => "../examples/scenes/example3/", core_count => 4, mem_bank_count => 4, width => 512, height => 512 },
'test_21' => {run_index => 21, path => "../examples/scenes/example3/", core_count => 8, mem_bank_count => 8, width => 512, height => 512 },
'test_22' => {run_index => 22, path => "../examples/scenes/example3/", core_count => 16, mem_bank_count => 16, width => 512, height => 512 },
'test_23' => {run_index => 23, path => "../examples/scenes/example3/", core_count => 32, mem_bank_count => 32, width => 512, height => 512 },
'test_24' => {run_index => 24, path => "../examples/scenes/example3/", core_count => 64, mem_bank_count => 64, width => 512, height => 512 },
'test_25' => {run_index => 25, path => "../examples/scenes/example3/", core_count => 128, mem_bank_count => 128, width => 512, height => 512 },
'test_25' => {run_index => 26, path => "../examples/scenes/example3/", core_count => 256, mem_bank_count => 256, width => 512, height => 512 },
'test_27' => {run_index => 27, path => "../examples/scenes/example3/", core_count => 512, mem_bank_count => 512, width => 512, height => 512 },
 
);
/configure_gpu.pl
21,9 → 21,12
use Tie::File;
$NumberOfCores = $ARGV[0];
$NumberOfBanks = $ARGV[1];
$MaxVertexBufferSize = $ARGV[2];
$MaxTextureBufferSize = $ARGV[3];
 
 
 
 
die "\nusage:\nconfigure_gpu.pl number_of_cores width height\n\n" if (not defined $NumberOfCores );
 
 
30,11 → 33,22
if (not defined $NumberOfBanks)
{
$NumberOfBanks = $NumberOfCores;
print "Number of TMEM banks not specified, making default to Number of execution cores ($NumberOfCores)\n";
print "Number of TMEM banks not specified, making default to Number of execution cores ($NumberOfCores)\n";;
}
if (not defined $MaxVertexBufferSize)
{
$MaxVertexBufferSize = 7000;
print "Vertex Buffer Size was no defined\n, making vertex buffer size default value of $MaxVertexBufferSize Bytes\n";
}
if (not defined $MaxTextureBufferSize)
{
print "Texture Buffer Size was no defined\n, making texture buffer big enough to store 256x256 textures\n";
$MaxTextureBufferSize = 256*256*3;
}
 
$DefsPath = "../rtl/aDefinitions.v";
$TopPath = "../rtl/Theia.v";
 
$TestBenchPath = "../rtl/TestBench_THEIA.v";
$RCOMMIT_O = "assign RCOMMIT_O = wRCommited[0]";
$HDL_O = "assign HDL_O = wHostDataLatched[0]";
72,10 → 86,14
s/define MAX_TMEM_BANKS .*(\/\/.*)/define MAX_TMEM_BANKS $NumberOfBanks \t\t$1/;
$MaxCoreBits = log( $NumberOfCores ) / log(2);
$MaxBankBits = log( $NumberOfBanks ) / log(2);
$MaxParamSize = (19 + 3*2*$NumberOfCores);
 
s/define MAX_CORE_BITS .*(\/\/.*)/define MAX_CORE_BITS $MaxCoreBits \t\t$1/;
s/define SELECT_ALL_CORES .*(\/\/.*)/$SELECT_ALL_CORES \t\t$1/;
s/define MAX_TMEM_BITS .*(\/\/.*)/define MAX_TMEM_BITS $MaxBankBits \t\t$1/;
s/define PARAMS_ARRAY_SIZE .*(\/\/.*)/define PARAMS_ARRAY_SIZE $MaxParamSize \t\t$1/;
s/define VERTEX_ARRAY_SIZE .*(\/\/.*)/define VERTEX_ARRAY_SIZE $MaxVertexBufferSize \t\t$1/;
s/define TEXTURE_BUFFER_SIZE .*(\/\/.*)/define TEXTURE_BUFFER_SIZE $MaxTextureBufferSize \t\t$1/;
}
untie @array;
 
/configure_params.pl
42,6 → 42,10
$array[5] =~ m/(\w+)\s+(\w+).*/g;
$Widht = hex($1) / (2 ** $Scale);
$Height = hex($2) / (2 ** $Scale)
} else {
$array[5] = hex($Widht*2)."0000 ".hex($Height*2)."0000 0";
}
 
print

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.