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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [icarus_version/] [scripts/] [configure_gpu.pl] - Diff between revs 169 and 177

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 169 Rev 177
Line 18... Line 18...
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  #02110-1301, USA.
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  #02110-1301, USA.
################################################################
################################################################
 
 
use Tie::File;
use Tie::File;
$NumberOfCores = $ARGV[0];
$NumberOfCores = $ARGV[0];
 
$NumberOfBanks = $ARGV[1];
 
 
 
 
 
 
die "\nusage:\nconfigure_gpu.pl number_of_cores width height\n\n" if (not defined $NumberOfCores );
die "\nusage:\nconfigure_gpu.pl number_of_cores width height\n\n" if (not defined $NumberOfCores );
 
 
 
 
 
if (not defined $NumberOfBanks)
 
{
 
  $NumberOfBanks = $NumberOfCores;
 
  print "Number of TMEM banks not specified, making default to Number of execution cores ($NumberOfCores)\n";
 
}
 
 
$DefsPath = "../rtl/aDefinitions.v";
$DefsPath = "../rtl/aDefinitions.v";
$TopPath = "../rtl/Theia.v";
$TopPath = "../rtl/Theia.v";
$TestBenchPath = "../rtl/TestBench_THEIA.v";
$TestBenchPath = "../rtl/TestBench_THEIA.v";
$RCOMMIT_O = "assign RCOMMIT_O = wRCommited[0]";
$RCOMMIT_O = "assign RCOMMIT_O = wRCommited[0]";
$HDL_O = "assign HDL_O = wHostDataLatched[0]";
$HDL_O = "assign HDL_O = wHostDataLatched[0]";
Line 34... Line 45...
 
 
$Scale = 17;
$Scale = 17;
 
 
print
print
"
"
Applying configuration for $NumberOfCores cores
Applying configuration for:
 
    $NumberOfCores execution cores
 
        $NumberOfBanks TMEM banks
";
";
 
 
#------------------------------------------------------------------
#------------------------------------------------------------------
for ($i = 1; $i < $NumberOfCores; $i++)
for ($i = 1; $i < $NumberOfCores; $i++)
{
{
Line 54... Line 67...
 
 
tie my @array, 'Tie::File', $DefsPath or die "Can't open $DefsPath: $!";
tie my @array, 'Tie::File', $DefsPath or die "Can't open $DefsPath: $!";
foreach (@array)
foreach (@array)
{
{
    s/define MAX_CORES .*(\/\/.*)/define MAX_CORES $NumberOfCores \t\t$1/;
    s/define MAX_CORES .*(\/\/.*)/define MAX_CORES $NumberOfCores \t\t$1/;
        s/define MAX_TMEM_BANKS .*(\/\/.*)/define MAX_TMEM_BANKS $NumberOfCores \t\t$1/;
        s/define MAX_TMEM_BANKS .*(\/\/.*)/define MAX_TMEM_BANKS $NumberOfBanks \t\t$1/;
        $MaxBits = log( $NumberOfCores ) / log(2);
        $MaxCoreBits = log( $NumberOfCores ) / log(2);
        s/define MAX_CORE_BITS .*(\/\/.*)/define MAX_CORE_BITS $MaxBits \t\t$1/;
        $MaxBankBits = log( $NumberOfBanks ) / log(2);
 
        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 SELECT_ALL_CORES .*(\/\/.*)/$SELECT_ALL_CORES \t\t$1/;
 
        s/define MAX_TMEM_BITS .*(\/\/.*)/define MAX_TMEM_BITS $MaxBankBits \t\t$1/;
 
 
}
}
untie @array;
untie @array;
 
 
 
 

powered by: WebSVN 2.1.0

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