changeset 23:90197e3375e2 pygar svn.24

[svn r24] added testing, but something is wrong with our c++ file.
author rlm
date Wed, 28 Apr 2010 08:19:09 -0400
parents 0cfbb1e2de22
children 3871f3530551
files benchmarks/audio_processor_test/README benchmarks/audio_processor_test/null.wav benchmarks/audio_processor_test/reuben_james_1sec.wav benchmarks/audio_processor_test/reuben_james_longer.wav benchmarks/audio_processor_test/reuben_james_quarter_sec.wav benchmarks/audio_processor_test/reuben_james_short.wav benchmarks/audio_processor_test/shift.wav benchmarks/sort_array/1024 benchmarks/sort_array/1048576 benchmarks/sort_array/128 benchmarks/sort_array/131072 benchmarks/sort_array/16 benchmarks/sort_array/16384 benchmarks/sort_array/2 benchmarks/sort_array/2048 benchmarks/sort_array/256 benchmarks/sort_array/262144 benchmarks/sort_array/32 benchmarks/sort_array/32768 benchmarks/sort_array/4 benchmarks/sort_array/4096 benchmarks/sort_array/512 benchmarks/sort_array/524288 benchmarks/sort_array/64 benchmarks/sort_array/65536 benchmarks/sort_array/8 benchmarks/sort_array/8192 config/bm/Pygar/audio_processor_test/cosine_window_benchmark.cfx config/bm/Pygar/audio_processor_test/fft_benchmark.cfx config/bm/Pygar/audio_processor_test/fir_benchmark.cfx config/bm/Pygar/audio_processor_test/null_benchmark.cfx config/bm/Pygar/audio_processor_test/shift_up_benchmark.cfx config/bm/Pygar/audio_processor_test/transform_benchmark.cfx config/bm/Pygar/null/null-connected-app.cfx config/bm/Pygar/processor_test/mips.cfx config/bm/Pygar/processor_test/mips_nonblocking.cfx config/bm/Pygar/sort_test/sort-test.cfx config/bm/README modules/bluespec/Pygar/core/AudioCoreRRR.cpp modules/bluespec/Pygar/core/AudioCoreSystem.cpp modules/bluespec/Pygar/core/Processor.bsv modules/bluespec/Pygar/core/daskjdlaj modules/bluespec/Pygar/lab1/FIRFilter.bsv scripts/bsv-trace.pl scripts/proc-trace.cfg scripts/run-freq.bmark scripts/run-null.bmark scripts/run.bmark scripts/setup-mit-6.375-bmark scripts/setup-mit-6.375-bmark-freq scripts/setup-mit-6.375-bmark-processor scripts/setup-null-bmark tools/audio_processor_test/compare_wavs/Makefile tools/audio_processor_test/compare_wavs/compare_wavs.cpp tools/audio_processor_test/compare_wavs_freq/DFT.cpp tools/audio_processor_test/compare_wavs_freq/Makefile tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq.cpp tools/audio_processor_test/cosine_window/checker/DFT.cpp tools/audio_processor_test/cosine_window/checker/Makefile tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.cpp tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.h tools/audio_processor_test/cosine_window/checker/checker.cpp tools/audio_processor_test/cosine_window/checker/compare_wavs tools/audio_processor_test/fft/checker/DFT.cpp tools/audio_processor_test/fft/checker/Makefile tools/audio_processor_test/fft/checker/SndfileWavUtil.cpp tools/audio_processor_test/fft/checker/SndfileWavUtil.h tools/audio_processor_test/fft/checker/checker.cpp tools/audio_processor_test/fft/checker/compare_wavs tools/audio_processor_test/fir/checker/Makefile tools/audio_processor_test/fir/checker/SndfileWavUtil.cpp tools/audio_processor_test/fir/checker/SndfileWavUtil.h tools/audio_processor_test/fir/checker/checker.cpp tools/audio_processor_test/fir/checker/compare_wavs tools/audio_processor_test/gen_tone/DFT.cpp tools/audio_processor_test/gen_tone/Makefile tools/audio_processor_test/gen_tone/SndfileWavUtil.cpp tools/audio_processor_test/gen_tone/SndfileWavUtil.h tools/audio_processor_test/gen_tone/gen_shift tools/audio_processor_test/gen_tone/gen_tone.cpp tools/audio_processor_test/null/checker/Makefile tools/audio_processor_test/null/checker/SndfileWavUtil.cpp tools/audio_processor_test/null/checker/SndfileWavUtil.h tools/audio_processor_test/null/checker/checker.cpp tools/audio_processor_test/null/checker/compare_wavs tools/audio_processor_test/shift_up/checker/DFT.cpp tools/audio_processor_test/shift_up/checker/Makefile tools/audio_processor_test/shift_up/checker/SndfileWavUtil.cpp tools/audio_processor_test/shift_up/checker/SndfileWavUtil.h tools/audio_processor_test/shift_up/checker/checker.cpp tools/audio_processor_test/shift_up/checker/compare_wavs tools/audio_processor_test/sndfile-tools-special.tar.gz tools/audio_processor_test/transform/checker/DFT.cpp tools/audio_processor_test/transform/checker/Makefile tools/audio_processor_test/transform/checker/SndfileWavUtil.cpp tools/audio_processor_test/transform/checker/SndfileWavUtil.h tools/audio_processor_test/transform/checker/checker.cpp tools/audio_processor_test/transform/checker/compare_wavs
diffstat 99 files changed, 7080 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/benchmarks/audio_processor_test/README	Wed Apr 28 08:19:09 2010 -0400
     1.3 @@ -0,0 +1,1 @@
     1.4 +.wav files must be mono for use by the lab
     1.5 \ No newline at end of file
     2.1 Binary file benchmarks/audio_processor_test/null.wav has changed
     3.1 Binary file benchmarks/audio_processor_test/reuben_james_1sec.wav has changed
     4.1 Binary file benchmarks/audio_processor_test/reuben_james_longer.wav has changed
     5.1 Binary file benchmarks/audio_processor_test/reuben_james_quarter_sec.wav has changed
     6.1 Binary file benchmarks/audio_processor_test/reuben_james_short.wav has changed
     7.1 Binary file benchmarks/audio_processor_test/shift.wav has changed
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/benchmarks/sort_array/1024	Wed Apr 28 08:19:09 2010 -0400
     8.3 @@ -0,0 +1,1 @@
     8.4 +1024
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/benchmarks/sort_array/1048576	Wed Apr 28 08:19:09 2010 -0400
     9.3 @@ -0,0 +1,1 @@
     9.4 +1048576
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/benchmarks/sort_array/128	Wed Apr 28 08:19:09 2010 -0400
    10.3 @@ -0,0 +1,1 @@
    10.4 +128
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/benchmarks/sort_array/131072	Wed Apr 28 08:19:09 2010 -0400
    11.3 @@ -0,0 +1,1 @@
    11.4 +131072
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/benchmarks/sort_array/16	Wed Apr 28 08:19:09 2010 -0400
    12.3 @@ -0,0 +1,1 @@
    12.4 +16
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/benchmarks/sort_array/16384	Wed Apr 28 08:19:09 2010 -0400
    13.3 @@ -0,0 +1,1 @@
    13.4 +16384
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/benchmarks/sort_array/2	Wed Apr 28 08:19:09 2010 -0400
    14.3 @@ -0,0 +1,1 @@
    14.4 +2
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/benchmarks/sort_array/2048	Wed Apr 28 08:19:09 2010 -0400
    15.3 @@ -0,0 +1,1 @@
    15.4 +2048
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/benchmarks/sort_array/256	Wed Apr 28 08:19:09 2010 -0400
    16.3 @@ -0,0 +1,1 @@
    16.4 +256
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/benchmarks/sort_array/262144	Wed Apr 28 08:19:09 2010 -0400
    17.3 @@ -0,0 +1,1 @@
    17.4 +262144
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/benchmarks/sort_array/32	Wed Apr 28 08:19:09 2010 -0400
    18.3 @@ -0,0 +1,1 @@
    18.4 +32
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/benchmarks/sort_array/32768	Wed Apr 28 08:19:09 2010 -0400
    19.3 @@ -0,0 +1,1 @@
    19.4 +32768
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/benchmarks/sort_array/4	Wed Apr 28 08:19:09 2010 -0400
    20.3 @@ -0,0 +1,1 @@
    20.4 +4
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/benchmarks/sort_array/4096	Wed Apr 28 08:19:09 2010 -0400
    21.3 @@ -0,0 +1,1 @@
    21.4 +4096
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/benchmarks/sort_array/512	Wed Apr 28 08:19:09 2010 -0400
    22.3 @@ -0,0 +1,1 @@
    22.4 +512
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/benchmarks/sort_array/524288	Wed Apr 28 08:19:09 2010 -0400
    23.3 @@ -0,0 +1,1 @@
    23.4 +524288
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/benchmarks/sort_array/64	Wed Apr 28 08:19:09 2010 -0400
    24.3 @@ -0,0 +1,1 @@
    24.4 +64
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/benchmarks/sort_array/65536	Wed Apr 28 08:19:09 2010 -0400
    25.3 @@ -0,0 +1,1 @@
    25.4 +65536
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/benchmarks/sort_array/8	Wed Apr 28 08:19:09 2010 -0400
    26.3 @@ -0,0 +1,1 @@
    26.4 +8
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/benchmarks/sort_array/8192	Wed Apr 28 08:19:09 2010 -0400
    27.3 @@ -0,0 +1,1 @@
    27.4 +8192
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/config/bm/Pygar/audio_processor_test/cosine_window_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    28.3 @@ -0,0 +1,26 @@
    28.4 +: # -*-Perl-*-
    28.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    28.6 +   if 0;
    28.7 +
    28.8 +##
    28.9 +## Directory of hasim benchmarks
   28.10 +##     Remember to set this file as executable
   28.11 +
   28.12 +use Asim;
   28.13 +use strict;
   28.14 +
   28.15 +my $gcfg = Asim::GenCFG->new();
   28.16 +
   28.17 +
   28.18 +my @bmark_tests = ("null.wav", "shift.wav");
   28.19 +
   28.20 +foreach my $bmark (@bmark_tests) {
   28.21 +    $gcfg->add(name => $bmark,
   28.22 +               tree => [ "benchmarks" ],
   28.23 +               setup => "scripts/setup-mit-6.375-bmark-freq --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/cosine_window/checker",
   28.24 +               feeder => "none",
   28.25 +               ccount => 800000,  #Hmmm.... may need to edit
   28.26 +              );
   28.27 +}
   28.28 + 
   28.29 +$gcfg->action(@ARGV);
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/config/bm/Pygar/audio_processor_test/fft_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    29.3 @@ -0,0 +1,26 @@
    29.4 +: # -*-Perl-*-
    29.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    29.6 +   if 0;
    29.7 +
    29.8 +##
    29.9 +## Directory of hasim benchmarks
   29.10 +##     Remember to set this file as executable
   29.11 +
   29.12 +use Asim;
   29.13 +use strict;
   29.14 +
   29.15 +my $gcfg = Asim::GenCFG->new();
   29.16 +
   29.17 +
   29.18 +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav");
   29.19 +
   29.20 +foreach my $bmark (@bmark_tests) {
   29.21 +    $gcfg->add(name => $bmark,
   29.22 +               tree => [ "benchmarks" ],
   29.23 +               setup => "scripts/setup-mit-6.375-bmark --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/fft/checker",
   29.24 +               feeder => "none",
   29.25 +               ccount => 800000,  #Hmmm.... may need to edit
   29.26 +              );
   29.27 +}
   29.28 + 
   29.29 +$gcfg->action(@ARGV);
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/config/bm/Pygar/audio_processor_test/fir_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    30.3 @@ -0,0 +1,25 @@
    30.4 +: # -*-Perl-*-
    30.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    30.6 +   if 0;
    30.7 +
    30.8 +##
    30.9 +## Directory of hasim benchmarks
   30.10 +##     Remember to set this file as executable
   30.11 +
   30.12 +use Asim;
   30.13 +use strict;
   30.14 +
   30.15 +my $gcfg = Asim::GenCFG->new();
   30.16 +
   30.17 +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav");
   30.18 +
   30.19 +foreach my $bmark (@bmark_tests) {
   30.20 +    $gcfg->add(name => $bmark,
   30.21 +               tree => [ "benchmarks" ],
   30.22 +               setup => "scripts/setup-mit-6.375-bmark --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/fir/checker",
   30.23 +               feeder => "none",
   30.24 +               ccount => 800000,  #Hmmm.... may need to edit
   30.25 +              );
   30.26 +}
   30.27 + 
   30.28 +$gcfg->action(@ARGV);
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/config/bm/Pygar/audio_processor_test/null_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    31.3 @@ -0,0 +1,25 @@
    31.4 +: # -*-Perl-*-
    31.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    31.6 +   if 0;
    31.7 +
    31.8 +##
    31.9 +## Directory of hasim benchmarks
   31.10 +##     Remember to set this file as executable
   31.11 +
   31.12 +use Asim;
   31.13 +use strict;
   31.14 +
   31.15 +my $gcfg = Asim::GenCFG->new();
   31.16 +
   31.17 +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav");
   31.18 +
   31.19 +foreach my $bmark (@bmark_tests) {
   31.20 +    $gcfg->add(name => $bmark,
   31.21 +               tree => [ "benchmarks" ],
   31.22 +               setup => "scripts/setup-mit-6.375-bmark --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/null/checker",
   31.23 +               feeder => "none",
   31.24 +               ccount => 800000,  #Hmmm.... may need to edit
   31.25 +              );
   31.26 +}
   31.27 + 
   31.28 +$gcfg->action(@ARGV);
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/config/bm/Pygar/audio_processor_test/shift_up_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    32.3 @@ -0,0 +1,26 @@
    32.4 +: # -*-Perl-*-
    32.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    32.6 +   if 0;
    32.7 +
    32.8 +##
    32.9 +## Directory of hasim benchmarks
   32.10 +##     Remember to set this file as executable
   32.11 +
   32.12 +use Asim;
   32.13 +use strict;
   32.14 +
   32.15 +my $gcfg = Asim::GenCFG->new();
   32.16 +
   32.17 +
   32.18 +my @bmark_tests = ("null.wav", "shift.wav");
   32.19 +
   32.20 +foreach my $bmark (@bmark_tests) {
   32.21 +    $gcfg->add(name => $bmark,
   32.22 +               tree => [ "benchmarks" ],
   32.23 +               setup => "scripts/setup-mit-6.375-bmark-freq --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/shift_up/checker",
   32.24 +               feeder => "none",
   32.25 +               ccount => 800000,  #Hmmm.... may need to edit
   32.26 +              );
   32.27 +}
   32.28 + 
   32.29 +$gcfg->action(@ARGV);
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/config/bm/Pygar/audio_processor_test/transform_benchmark.cfx	Wed Apr 28 08:19:09 2010 -0400
    33.3 @@ -0,0 +1,26 @@
    33.4 +: # -*-Perl-*-
    33.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    33.6 +   if 0;
    33.7 +
    33.8 +##
    33.9 +## Directory of hasim benchmarks
   33.10 +##     Remember to set this file as executable
   33.11 +
   33.12 +use Asim;
   33.13 +use strict;
   33.14 +
   33.15 +my $gcfg = Asim::GenCFG->new();
   33.16 +
   33.17 +
   33.18 +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav");
   33.19 +
   33.20 +foreach my $bmark (@bmark_tests) {
   33.21 +    $gcfg->add(name => $bmark,
   33.22 +               tree => [ "benchmarks" ],
   33.23 +               setup => "scripts/setup-mit-6.375-bmark --silent=1 --compare=1 --data=../benchmarks/audio_processor_test/$bmark $bmark --linkto=../tools/audio_processor_test/transform/checker",
   33.24 +               feeder => "none",
   33.25 +               ccount => 800000,  #Hmmm.... may need to edit
   33.26 +              );
   33.27 +}
   33.28 + 
   33.29 +$gcfg->action(@ARGV);
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/config/bm/Pygar/null/null-connected-app.cfx	Wed Apr 28 08:19:09 2010 -0400
    34.3 @@ -0,0 +1,28 @@
    34.4 +: # -*-Perl-*-
    34.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    34.6 +   if 0;
    34.7 +
    34.8 +## --linkto=../tools/audio_processor_test/fft/checker
    34.9 +
   34.10 +##
   34.11 +## Directory of hasim benchmarks
   34.12 +##     Remember to set this file as executable
   34.13 +
   34.14 +use Asim;
   34.15 +use strict;
   34.16 +
   34.17 +my $gcfg = Asim::GenCFG->new();
   34.18 +
   34.19 +
   34.20 +my @bmark_tests = ("null");
   34.21 +
   34.22 +foreach my $bmark (@bmark_tests) {
   34.23 +    $gcfg->add(name => $bmark,
   34.24 +               tree => [ "benchmarks" ],
   34.25 +               setup => "scripts/setup-null-bmark --silent=1 --compare=1 --data=../benchmarks/sort_array/$bmark $bmark", 
   34.26 +               feeder => "none",
   34.27 +               ccount => 800000,  #Hmmm.... may need to edit
   34.28 +              );
   34.29 +}
   34.30 + 
   34.31 +$gcfg->action(@ARGV);
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/config/bm/Pygar/processor_test/mips.cfx	Wed Apr 28 08:19:09 2010 -0400
    35.3 @@ -0,0 +1,78 @@
    35.4 +: # -*-Perl-*-
    35.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    35.6 +   if 0;
    35.7 +
    35.8 +use Asim;
    35.9 +use strict;
   35.10 +
   35.11 +##
   35.12 +## Generate cfg files for 6.375 tests and benchmarks.
   35.13 +##
   35.14 +
   35.15 +my $gcfg = Asim::GenCFG->new();
   35.16 +
   35.17 +my @tests = ("smipsv1_simple",
   35.18 +	      "smipsv1_addiu",
   35.19 +	      "smipsv1_bne",
   35.20 +	      "smipsv1_lw",
   35.21 +	      "smipsv1_sw",
   35.22 +	      "smipsv2_addiu",
   35.23 +	      "smipsv2_addu",
   35.24 +	      "smipsv2_andi",
   35.25 +	      "smipsv2_and",
   35.26 +	      "smipsv2_beq",
   35.27 +	      "smipsv2_bgez",
   35.28 +	      "smipsv2_bgtz",
   35.29 +	      "smipsv2_blez",
   35.30 +	      "smipsv2_bltz",
   35.31 +	      "smipsv2_bne",
   35.32 +	      "smipsv2_jalr",
   35.33 +	      "smipsv2_jal",
   35.34 +	      "smipsv2_jr",
   35.35 +	      "smipsv2_j",
   35.36 +	      "smipsv2_lui",
   35.37 +	      "smipsv2_lw",
   35.38 +	      "smipsv2_nor",
   35.39 +	      "smipsv2_ori",
   35.40 +	      "smipsv2_or",
   35.41 +	      "smipsv2_simple",
   35.42 +	      "smipsv2_sll",
   35.43 +	      "smipsv2_sllv",
   35.44 +	      "smipsv2_slti",
   35.45 +	      "smipsv2_sltiu",
   35.46 +	      "smipsv2_slt",
   35.47 +	      "smipsv2_sltu",
   35.48 +	      "smipsv2_sra",
   35.49 +	      "smipsv2_srav",
   35.50 +	      "smipsv2_srl",
   35.51 +	      "smipsv2_srlv",
   35.52 +	      "smipsv2_subu",
   35.53 +	      "smipsv2_sw",
   35.54 +	      "smipsv2_xori",
   35.55 +	      "smipsv2_xor");
   35.56 +
   35.57 +my @bmarks = ("median",
   35.58 +              "multiply",
   35.59 +	      "towers",
   35.60 +	      "qsort",
   35.61 +	      "vvadd");
   35.62 +	      
   35.63 +foreach my $test (@tests) {
   35.64 +    $gcfg->add(name => $test,
   35.65 +               tree => [ "tests" ],
   35.66 +               setup => "scripts/setup-mit-6.375-bmark-processor --group instruction-tests --isa smips $test",
   35.67 +               feeder => "vcs",
   35.68 +               feedflags => "program.0/${test}.smips.vmh",
   35.69 +              );
   35.70 +}
   35.71 +     
   35.72 +foreach my $bmark (@bmarks) {
   35.73 +    $gcfg->add(name => $bmark,
   35.74 +               tree => [ "benchmarks" ],
   35.75 +               setup => "scripts/setup-mit-6.375-bmark-processor --isa smips $bmark",
   35.76 +               feeder => "vcs",
   35.77 +               feedflags => "program.0/${bmark}.smips.vmh",
   35.78 +              );
   35.79 +}
   35.80 +
   35.81 +$gcfg->action(@ARGV);
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/config/bm/Pygar/processor_test/mips_nonblocking.cfx	Wed Apr 28 08:19:09 2010 -0400
    36.3 @@ -0,0 +1,30 @@
    36.4 +: # -*-Perl-*-
    36.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    36.6 +   if 0;
    36.7 +
    36.8 +use Asim;
    36.9 +use strict;
   36.10 +
   36.11 +##
   36.12 +## Generate cfg files for 6.375 tests and benchmarks.
   36.13 +##
   36.14 +
   36.15 +my $gcfg = Asim::GenCFG->new();
   36.16 +
   36.17 +
   36.18 +my @bmarks = ("median_noprealloc",
   36.19 +              "multiply_noprealloc",
   36.20 +	      "towers_noprealloc",
   36.21 +	      "qsort_noprealloc",
   36.22 +	      "vvadd_noprealloc");
   36.23 +	      
   36.24 +foreach my $bmark (@bmarks) {
   36.25 +    $gcfg->add(name => $bmark,
   36.26 +               tree => [ "benchmarks" ],
   36.27 +               setup => "scripts/setup-mit-6.375-bmark-processor --isa smips $bmark",
   36.28 +               feeder => "vcs",
   36.29 +               feedflags => "program.0/${bmark}.smips.vmh",
   36.30 +              );
   36.31 +}
   36.32 +
   36.33 +$gcfg->action(@ARGV);
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/config/bm/Pygar/sort_test/sort-test.cfx	Wed Apr 28 08:19:09 2010 -0400
    37.3 @@ -0,0 +1,45 @@
    37.4 +: # -*-Perl-*-
    37.5 +eval 'exec perl -w "$0" ${1+"$@"}'
    37.6 +   if 0;
    37.7 +
    37.8 +##
    37.9 +## Directory of hasim benchmarks
   37.10 +##     Remember to set this file as executable
   37.11 +
   37.12 +use Asim;
   37.13 +use strict;
   37.14 +
   37.15 +my $gcfg = Asim::GenCFG->new();
   37.16 +
   37.17 +my @bmark_tests = ( "2"
   37.18 +		    ,"4"
   37.19 +		    ,"8"
   37.20 +		    ,"16"
   37.21 +		    ,"32"
   37.22 +		    ,"64"
   37.23 +		    ,"128"
   37.24 +		    ,"256"
   37.25 +		    ,"512"
   37.26 +		    ,"1024"
   37.27 +		    ,"2048"
   37.28 +		    ,"4096"
   37.29 +		    ,"8192"
   37.30 +		    ,"16384"
   37.31 +		    ,"32768"
   37.32 +		    ,"65536"
   37.33 +		    ,"131072"
   37.34 +		    ,"262144"
   37.35 +		    ,"524288"
   37.36 +		    ,"1048576");
   37.37 +
   37.38 +
   37.39 +foreach my $bmark (@bmark_tests) {
   37.40 +    $gcfg->add(name => $bmark,
   37.41 +               tree => [ "benchmarks" ],
   37.42 +               setup => "scripts/setup-null-bmark --silent=1 --compare=1 --data=../benchmarks/sort_array/$bmark $bmark", 
   37.43 +               feeder => "none",
   37.44 +               ccount => 800000,  #Hmmm.... may need to edit
   37.45 +              );
   37.46 +}
   37.47 + 
   37.48 +$gcfg->action(@ARGV);
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/config/bm/README	Wed Apr 28 08:19:09 2010 -0400
    38.3 @@ -0,0 +1,1 @@
    38.4 +User defined benchmark configurations go here
    39.1 --- a/modules/bluespec/Pygar/core/AudioCoreRRR.cpp	Wed Apr 28 00:40:15 2010 -0400
    39.2 +++ b/modules/bluespec/Pygar/core/AudioCoreRRR.cpp	Wed Apr 28 08:19:09 2010 -0400
    39.3 @@ -19,7 +19,8 @@
    39.4    serverStub(new AUDIOCORERRR_SERVER_STUB_CLASS(this))
    39.5  {
    39.6      // instantiate stub
    39.7 -    printf("AUDIOCORERRR init called\n");
    39.8 +
    39.9 +    printf("rlm: init called\n\n");
   39.10      outputFile = NULL;
   39.11      memory = NULL;
   39.12      fflush(stdout);
   39.13 @@ -28,6 +29,7 @@
   39.14  // destructor
   39.15  AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()
   39.16  {
   39.17 +  printf("rlm:  AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()\n");
   39.18      Cleanup();
   39.19  }
   39.20  
   39.21 @@ -35,21 +37,24 @@
   39.22  void
   39.23  AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)
   39.24  {
   39.25 -    parent = p;
   39.26 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)\n");
   39.27 +  parent = p;
   39.28  }
   39.29  
   39.30  // uninit
   39.31  void
   39.32  AUDIOCORERRR_SERVER_CLASS::Uninit()
   39.33  {
   39.34 -    Cleanup();
   39.35 +  printf("rlm:  AUDIOCORERRR_SERVER_CLASS::Uninit()\n");
   39.36 +  Cleanup();
   39.37  }
   39.38  
   39.39  // cleanup
   39.40  void
   39.41  AUDIOCORERRR_SERVER_CLASS::Cleanup()
   39.42  {
   39.43 -    delete serverStub;
   39.44 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::Cleanup() \n\n");
   39.45 +  delete serverStub;
   39.46  }
   39.47  
   39.48  
   39.49 @@ -61,7 +66,7 @@
   39.50  AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address)
   39.51  {
   39.52    UINT32 returnVal;
   39.53 -  
   39.54 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address)\n");
   39.55    if(memory == NULL) {
   39.56      memory = new FUNCP_SIMULATED_MEMORY_CLASS();
   39.57    }
   39.58 @@ -74,6 +79,7 @@
   39.59  void
   39.60  AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data)
   39.61  {
   39.62 +  printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data)\n");
   39.63    if(memory == NULL) {
   39.64      memory = new FUNCP_SIMULATED_MEMORY_CLASS();
   39.65    }
   39.66 @@ -86,14 +92,17 @@
   39.67  AUDIOCORERRR_SERVER_CLASS::SendProcessedStream(UINT16 control, UINT16 data)
   39.68  {
   39.69  
   39.70 +  printf("rlm: SendProcessedStream called,\n");
   39.71    AudioProcessorControl audioProcessorControl = (AudioProcessorControl) control;
   39.72    switch(control) {
   39.73      case EndOfFile:
   39.74        if(outputFile != NULL) {
   39.75 +	printf("rlm: FILE is NULL\n");
   39.76          fflush(outputFile);
   39.77          fclose(outputFile);
   39.78          outputFile = NULL;
   39.79        } else {
   39.80 +	printf("rlm: Opening file for output.\n");
   39.81          outputFile = fopen("out_hw.pcm","w");
   39.82          assert(outputFile);
   39.83          fflush(outputFile);
   39.84 @@ -110,7 +119,8 @@
   39.85          assert(outputFile);
   39.86        }
   39.87  
   39.88 -      CONNECTED_APPLICATION_CLASS::UpdateSemaphore();  
   39.89 +      CONNECTED_APPLICATION_CLASS::UpdateSemaphore(); 
   39.90 +      printf("rlm: writing data to out_hw.pcm\n");
   39.91        fwrite(&data, 2,1 , outputFile);
   39.92      break;
   39.93    }
    40.1 --- a/modules/bluespec/Pygar/core/AudioCoreSystem.cpp	Wed Apr 28 00:40:15 2010 -0400
    40.2 +++ b/modules/bluespec/Pygar/core/AudioCoreSystem.cpp	Wed Apr 28 08:19:09 2010 -0400
    40.3 @@ -16,7 +16,8 @@
    40.4  
    40.5  // constructor
    40.6  CONNECTED_APPLICATION_CLASS::CONNECTED_APPLICATION_CLASS(VIRTUAL_PLATFORM vp) :
    40.7 -    clientStub(new AUDIOCORERRR_CLIENT_STUB_CLASS(this))
    40.8 +   
    40.9 +  clientStub(new AUDIOCORERRR_CLIENT_STUB_CLASS(this))
   40.10  {
   40.11  }
   40.12  
   40.13 @@ -74,13 +75,14 @@
   40.14  
   40.15    int count = 0;
   40.16  
   40.17 -  printf("main: about to enter loop %d\n", count);  
   40.18 +  printf("main:PROCESSOR about to enter loop %d\n", count);  
   40.19  
   40.20    while(fread(&sample, 2, 1, inputFile)) {
   40.21      if(count%1000 == 0)
   40.22        printf("main: %d\n", count);
   40.23      count++;
   40.24      sem_wait(&throttle);
   40.25 +    printf("rlm:sending data to processor (%d)\n", count);
   40.26      clientStub->SendUnprocessedStream(Data,(UINT32)sample);
   40.27    } 
   40.28  
   40.29 @@ -95,7 +97,7 @@
   40.30    pthread_cond_wait(&cond, &lock);
   40.31    pthread_mutex_unlock(&lock);
   40.32  
   40.33 -  printf("main: lastt data out\n");
   40.34 +  printf("main: last data out\n");
   40.35  
   40.36    // Convert input wav to pcm
   40.37    generate_wav("out_hw.pcm","input.wav","out_hw.wav");
    41.1 --- a/modules/bluespec/Pygar/core/Processor.bsv	Wed Apr 28 00:40:15 2010 -0400
    41.2 +++ b/modules/bluespec/Pygar/core/Processor.bsv	Wed Apr 28 08:19:09 2010 -0400
    41.3 @@ -573,9 +573,9 @@
    41.4  
    41.5   // for now, we don't do anything.
    41.6    rule connectAudioReqResp;
    41.7 -    $display("FIR copies a data");
    41.8 -    outAudioFifo.enq(inAudioFifo.first);
    41.9 -    outAudioFifo.deq;
   41.10 +    $display("rlm: PROCESSOR copies a datum\n");
   41.11 +    outAudioFifo.enq(inAudioFifo.first());
   41.12 +    inAudioFifo.deq;
   41.13    endrule
   41.14  
   41.15    // Server items & rules:
   41.16 @@ -583,7 +583,7 @@
   41.17     rule feedInput;
   41.18       let command <- server_stub.acceptRequest_SendUnprocessedStream();
   41.19       AudioProcessorControl ctrl = unpack(truncate(command.ctrl));
   41.20 -
   41.21 +      $display("rlm: PROCESSOR: recieved data\n");
   41.22       if(ctrl == EndOfFile)
   41.23  	begin  
   41.24            inAudioFifo.enq(tagged EndOfFile);
    42.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    42.2 +++ b/modules/bluespec/Pygar/core/daskjdlaj	Wed Apr 28 08:19:09 2010 -0400
    42.3 @@ -0,0 +1,2647 @@
    42.4 +el=/afs/csail.mit.edu/u/r/rlm/pygar-workspace/src/Pygar/config/pm/Pygar/audio_core/audio_core_exe.apm --builddir="/afs/csail.mit.edu/u/r/rlm/pygar-workspace/build/default/audio_core_exe/pm" --benchmark=/afs/csail.mit.edu/u/r/rlm/pygar-workspace/src/Pygar/config/bm/Pygar/audio_processor_test/cosine_window_benchmark.cfx/benchmarks/null.wav.cfg --rundir="/afs/csail.mit.edu/u/r/rlm/pygar-workspace/build/default/audio_core_exe/bm/null.wav" --runopt=" " -run
    42.5 +asimstarter WARNING: perl version 5.10.1 not supported, please use version 5.10.1 (*) !
    42.6 +Running model. . . 
    42.7 +AUDIOCORERRR init called
    42.8 +a
    42.9 +
   42.10 +RLMRLMRLM: init called
   42.11 +
   42.12 +
   42.13 +
   42.14 + => Cycle =           0
   42.15 + => mkDataCacheBlocking:stage i
   42.16 + => mkInstCacheBlocking:stage i
   42.17 + => mkProc:pc 00001000
   42.18 + => mkProc:pcgen P
   42.19 + => Cycle =           0
   42.20 + => mkDataCacheBlocking:stage i
   42.21 + => mkInstCacheBlocking:stage i
   42.22 + => mkProc:pc 00001000
   42.23 + => mkProc:pcgen P
   42.24 + => Cycle =           1
   42.25 + => mkDataCacheBlocking:stage i
   42.26 + => mkInstCacheBlocking:stage i
   42.27 + => Cycle =           2
   42.28 + => mkDataCacheBlocking:stage i
   42.29 + => mkInstCacheBlocking:stage i
   42.30 + => Cycle =           3
   42.31 + => mkDataCacheBlocking:stage i
   42.32 + => mkInstCacheBlocking:stage i
   42.33 + => Cycle =           4
   42.34 + => mkDataCacheBlocking:stage i
   42.35 + => mkInstCacheBlocking:stage i
   42.36 + => Cycle =           5
   42.37 + => mkDataCacheBlocking:stage i
   42.38 + => mkInstCacheBlocking:stage i
   42.39 + => Cycle =           6
   42.40 + => mkDataCacheBlocking:stage i
   42.41 + => mkInstCacheBlocking:stage i
   42.42 + => Cycle =           7
   42.43 + => mkDataCacheBlocking:stage i
   42.44 + => mkInstCacheBlocking:stage i
   42.45 + => Cycle =           8
   42.46 + => mkDataCacheBlocking:stage i
   42.47 + => mkInstCacheBlocking:stage i
   42.48 + => Cycle =           9
   42.49 + => mkDataCacheBlocking:stage i
   42.50 + => mkInstCacheBlocking:stage i
   42.51 + => Cycle =          10
   42.52 + => mkDataCacheBlocking:stage i
   42.53 + => mkInstCacheBlocking:stage i
   42.54 + => Cycle =          11
   42.55 + => mkDataCacheBlocking:stage i
   42.56 + => mkInstCacheBlocking:stage i
   42.57 + => Cycle =          12
   42.58 + => mkDataCacheBlocking:stage i
   42.59 + => mkInstCacheBlocking:stage i
   42.60 + => Cycle =          13
   42.61 + => mkDataCacheBlocking:stage i
   42.62 + => mkInstCacheBlocking:stage i
   42.63 + => Cycle =          14
   42.64 + => mkDataCacheBlocking:stage i
   42.65 + => mkInstCacheBlocking:stage i
   42.66 + => Cycle =          15
   42.67 + => mkDataCacheBlocking:stage i
   42.68 + => mkInstCacheBlocking:stage i
   42.69 + => Cycle =          16
   42.70 + => mkDataCacheBlocking:stage i
   42.71 + => mkInstCacheBlocking:stage i
   42.72 + => Cycle =          17
   42.73 + => mkDataCacheBlocking:stage i
   42.74 + => mkInstCacheBlocking:stage i
   42.75 + => Cycle =          18
   42.76 + => mkDataCacheBlocking:stage i
   42.77 + => mkInstCacheBlocking:stage i
   42.78 + => Cycle =          19
   42.79 + => mkDataCacheBlocking:stage i
   42.80 + => mkInstCacheBlocking:stage i
   42.81 + => Cycle =          20
   42.82 + => mkDataCacheBlocking:stage i
   42.83 + => mkInstCacheBlocking:stage i
   42.84 + => Cycle =          21
   42.85 + => mkDataCacheBlocking:stage i
   42.86 + => mkInstCacheBlocking:stage i
   42.87 + => Cycle =          22
   42.88 + => mkDataCacheBlocking:stage i
   42.89 + => mkInstCacheBlocking:stage i
   42.90 + => Cycle =          23
   42.91 + => mkDataCacheBlocking:stage i
   42.92 + => mkInstCacheBlocking:stage i
   42.93 + => Cycle =          24
   42.94 + => mkDataCacheBlocking:stage i
   42.95 + => mkInstCacheBlocking:stage i
   42.96 + => Cycle =          25
   42.97 + => mkDataCacheBlocking:stage i
   42.98 + => mkInstCacheBlocking:stage i
   42.99 + => Cycle =          26
  42.100 + => mkDataCacheBlocking:stage i
  42.101 + => mkInstCacheBlocking:stage i
  42.102 + => Cycle =          27
  42.103 + => mkDataCacheBlocking:stage i
  42.104 + => mkInstCacheBlocking:stage i
  42.105 + => Cycle =          28
  42.106 + => mkDataCacheBlocking:stage i
  42.107 + => mkInstCacheBlocking:stage i
  42.108 + => Cycle =          29
  42.109 + => mkDataCacheBlocking:stage i
  42.110 + => mkInstCacheBlocking:stage i
  42.111 + => Cycle =          30
  42.112 + => mkDataCacheBlocking:stage i
  42.113 + => mkInstCacheBlocking:stage i
  42.114 + => Cycle =          31
  42.115 + => mkDataCacheBlocking:stage i
  42.116 + => mkInstCacheBlocking:stage i
  42.117 + => Cycle =          32
  42.118 + => mkDataCacheBlocking:stage i
  42.119 + => mkInstCacheBlocking:stage i
  42.120 + => Cycle =          33
  42.121 + => mkDataCacheBlocking:stage i
  42.122 + => mkInstCacheBlocking:stage i
  42.123 + => Cycle =          34
  42.124 + => mkDataCacheBlocking:stage i
  42.125 + => mkInstCacheBlocking:stage i
  42.126 + => Cycle =          35
  42.127 + => mkDataCacheBlocking:stage i
  42.128 + => mkInstCacheBlocking:stage i
  42.129 + => Cycle =          36
  42.130 + => mkDataCacheBlocking:stage i
  42.131 + => mkInstCacheBlocking:stage i
  42.132 + => Cycle =          37
  42.133 + => mkDataCacheBlocking:stage i
  42.134 + => mkInstCacheBlocking:stage i
  42.135 + => Cycle =          38
  42.136 + => mkDataCacheBlocking:stage i
  42.137 + => mkInstCacheBlocking:stage i
  42.138 + => Cycle =          39
  42.139 + => mkDataCacheBlocking:stage i
  42.140 + => mkInstCacheBlocking:stage i
  42.141 + => Cycle =          40
  42.142 + => mkDataCacheBlocking:stage i
  42.143 + => mkInstCacheBlocking:stage i
  42.144 + => Cycle =          41
  42.145 + => mkDataCacheBlocking:stage i
  42.146 + => mkInstCacheBlocking:stage i
  42.147 + => Cycle =          42
  42.148 + => mkDataCacheBlocking:stage i
  42.149 + => mkInstCacheBlocking:stage i
  42.150 + => Cycle =          43
  42.151 + => mkDataCacheBlocking:stage i
  42.152 + => mkInstCacheBlocking:stage i
  42.153 + => Cycle =          44
  42.154 + => mkDataCacheBlocking:stage i
  42.155 + => mkInstCacheBlocking:stage i
  42.156 + => Cycle =          45
  42.157 + => mkDataCacheBlocking:stage i
  42.158 + => mkInstCacheBlocking:stage i
  42.159 + => Cycle =          46
  42.160 + => mkDataCacheBlocking:stage i
  42.161 + => mkInstCacheBlocking:stage i
  42.162 + => Cycle =          47
  42.163 + => mkDataCacheBlocking:stage i
  42.164 + => mkInstCacheBlocking:stage i
  42.165 + => Cycle =          48
  42.166 + => mkDataCacheBlocking:stage i
  42.167 + => mkInstCacheBlocking:stage i
  42.168 + => Cycle =          49
  42.169 + => mkDataCacheBlocking:stage i
  42.170 + => mkInstCacheBlocking:stage i
  42.171 + => Cycle =          50
  42.172 + => mkDataCacheBlocking:stage i
  42.173 + => mkInstCacheBlocking:stage i
  42.174 + => Cycle =          51
  42.175 + => mkDataCacheBlocking:stage i
  42.176 + => mkInstCacheBlocking:stage i
  42.177 + => Cycle =          52
  42.178 + => mkDataCacheBlocking:stage i
  42.179 + => mkInstCacheBlocking:stage i
  42.180 + => Cycle =          53
  42.181 + => mkDataCacheBlocking:stage i
  42.182 + => mkInstCacheBlocking:stage i
  42.183 + => Cycle =          54
  42.184 + => mkDataCacheBlocking:stage i
  42.185 + => mkInstCacheBlocking:stage i
  42.186 + => Cycle =          55
  42.187 + => mkDataCacheBlocking:stage i
  42.188 + => mkInstCacheBlocking:stage i
  42.189 + => Cycle =          56
  42.190 + => mkDataCacheBlocking:stage i
  42.191 + => mkInstCacheBlocking:stage i
  42.192 + => Cycle =          57
  42.193 + => mkDataCacheBlocking:stage i
  42.194 + => mkInstCacheBlocking:stage i
  42.195 + => Cycle =          58
  42.196 + => mkDataCacheBlocking:stage i
  42.197 + => mkInstCacheBlocking:stage i
  42.198 + => Cycle =          59
  42.199 + => mkDataCacheBlocking:stage i
  42.200 + => mkInstCacheBlocking:stage i
  42.201 + => Cycle =          60
  42.202 + => mkDataCacheBlocking:stage i
  42.203 + => mkInstCacheBlocking:stage i
  42.204 + => Cycle =          61
  42.205 + => mkDataCacheBlocking:stage i
  42.206 + => mkInstCacheBlocking:stage i
  42.207 + => Cycle =          62
  42.208 + => mkDataCacheBlocking:stage i
  42.209 + => mkInstCacheBlocking:stage i
  42.210 + => Cycle =          63
  42.211 + => mkDataCacheBlocking:stage i
  42.212 + => mkInstCacheBlocking:stage i
  42.213 + => Cycle =          64
  42.214 + => mkDataCacheBlocking:stage i
  42.215 + => mkInstCacheBlocking:stage i
  42.216 + => Cycle =          65
  42.217 + => mkDataCacheBlocking:stage i
  42.218 + => mkInstCacheBlocking:stage i
  42.219 + => Cycle =          66
  42.220 + => mkDataCacheBlocking:stage i
  42.221 + => mkInstCacheBlocking:stage i
  42.222 + => Cycle =          67
  42.223 + => mkDataCacheBlocking:stage i
  42.224 + => mkInstCacheBlocking:stage i
  42.225 + => Cycle =          68
  42.226 + => mkDataCacheBlocking:stage i
  42.227 + => mkInstCacheBlocking:stage i
  42.228 + => Cycle =          69
  42.229 + => mkDataCacheBlocking:stage i
  42.230 + => mkInstCacheBlocking:stage i
  42.231 + => Cycle =          70
  42.232 + => mkDataCacheBlocking:stage i
  42.233 + => mkInstCacheBlocking:stage i
  42.234 + => Cycle =          71
  42.235 + => mkDataCacheBlocking:stage i
  42.236 + => mkInstCacheBlocking:stage i
  42.237 + => Cycle =          72
  42.238 + => mkDataCacheBlocking:stage i
  42.239 + => mkInstCacheBlocking:stage i
  42.240 + => Cycle =          73
  42.241 + => mkDataCacheBlocking:stage i
  42.242 + => mkInstCacheBlocking:stage i
  42.243 + => Cycle =          74
  42.244 + => mkDataCacheBlocking:stage i
  42.245 + => mkInstCacheBlocking:stage i
  42.246 + => Cycle =          75
  42.247 + => mkDataCacheBlocking:stage i
  42.248 + => mkInstCacheBlocking:stage i
  42.249 + => Cycle =          76
  42.250 + => mkDataCacheBlocking:stage i
  42.251 + => mkInstCacheBlocking:stage i
  42.252 + => Cycle =          77
  42.253 + => mkDataCacheBlocking:stage i
  42.254 + => mkInstCacheBlocking:stage i
  42.255 + => Cycle =          78
  42.256 + => mkDataCacheBlocking:stage i
  42.257 + => mkInstCacheBlocking:stage i
  42.258 + => Cycle =          79
  42.259 + => mkDataCacheBlocking:stage i
  42.260 + => mkInstCacheBlocking:stage i
  42.261 + => Cycle =          80
  42.262 + => mkDataCacheBlocking:stage i
  42.263 + => mkInstCacheBlocking:stage i
  42.264 + => Cycle =          81
  42.265 + => mkDataCacheBlocking:stage i
  42.266 + => mkInstCacheBlocking:stage i
  42.267 + => Cycle =          82
  42.268 + => mkDataCacheBlocking:stage i
  42.269 + => mkInstCacheBlocking:stage i
  42.270 + => Cycle =          83
  42.271 + => mkDataCacheBlocking:stage i
  42.272 + => mkInstCacheBlocking:stage i
  42.273 + => Cycle =          84
  42.274 + => mkDataCacheBlocking:stage i
  42.275 + => mkInstCacheBlocking:stage i
  42.276 + => Cycle =          85
  42.277 + => mkDataCacheBlocking:stage i
  42.278 + => mkInstCacheBlocking:stage i
  42.279 + => Cycle =          86
  42.280 + => mkDataCacheBlocking:stage i
  42.281 + => mkInstCacheBlocking:stage i
  42.282 + => Cycle =          87
  42.283 + => mkDataCacheBlocking:stage i
  42.284 + => mkInstCacheBlocking:stage i
  42.285 + => Cycle =          88
  42.286 + => mkDataCacheBlocking:stage i
  42.287 + => mkInstCacheBlocking:stage i
  42.288 + => Cycle =          89
  42.289 + => mkDataCacheBlocking:stage i
  42.290 + => mkInstCacheBlocking:stage i
  42.291 + => Cycle =          90
  42.292 + => mkDataCacheBlocking:stage i
  42.293 + => mkInstCacheBlocking:stage i
  42.294 + => Cycle =          91
  42.295 + => mkDataCacheBlocking:stage i
  42.296 + => mkInstCacheBlocking:stage i
  42.297 + => Cycle =          92
  42.298 + => mkDataCacheBlocking:stage i
  42.299 + => mkInstCacheBlocking:stage i
  42.300 + => Cycle =          93
  42.301 + => mkDataCacheBlocking:stage i
  42.302 + => mkInstCacheBlocking:stage i
  42.303 + => Cycle =          94
  42.304 + => mkDataCacheBlocking:stage i
  42.305 + => mkInstCacheBlocking:stage i
  42.306 + => Cycle =          95
  42.307 + => mkDataCacheBlocking:stage i
  42.308 + => mkInstCacheBlocking:stage i
  42.309 + => Cycle =          96
  42.310 + => mkDataCacheBlocking:stage i
  42.311 + => mkInstCacheBlocking:stage i
  42.312 + => Cycle =          97
  42.313 + => mkDataCacheBlocking:stage i
  42.314 + => mkInstCacheBlocking:stage i
  42.315 + => Cycle =          98
  42.316 + => mkDataCacheBlocking:stage i
  42.317 + => mkInstCacheBlocking:stage i
  42.318 + => Cycle =          99
  42.319 + => mkDataCacheBlocking:stage i
  42.320 + => mkInstCacheBlocking:stage i
  42.321 + => Cycle =         100
  42.322 + => mkDataCacheBlocking:stage i
  42.323 + => mkInstCacheBlocking:stage i
  42.324 + => Cycle =         101
  42.325 + => mkDataCacheBlocking:stage i
  42.326 + => mkInstCacheBlocking:stage i
  42.327 + => Cycle =         102
  42.328 + => mkDataCacheBlocking:stage i
  42.329 + => mkInstCacheBlocking:stage i
  42.330 + => Cycle =         103
  42.331 + => mkDataCacheBlocking:stage i
  42.332 + => mkInstCacheBlocking:stage i
  42.333 + => Cycle =         104
  42.334 + => mkDataCacheBlocking:stage i
  42.335 + => mkInstCacheBlocking:stage i
  42.336 + => Cycle =         105
  42.337 + => mkDataCacheBlocking:stage i
  42.338 + => mkInstCacheBlocking:stage i
  42.339 + => Cycle =         106
  42.340 + => mkDataCacheBlocking:stage i
  42.341 + => mkInstCacheBlocking:stage i
  42.342 + => Cycle =         107
  42.343 + => mkDataCacheBlocking:stage i
  42.344 + => mkInstCacheBlocking:stage i
  42.345 + => Cycle =         108
  42.346 + => mkDataCacheBlocking:stage i
  42.347 + => mkInstCacheBlocking:stage i
  42.348 + => Cycle =         109
  42.349 + => mkDataCacheBlocking:stage i
  42.350 + => mkInstCacheBlocking:stage i
  42.351 + => Cycle =         110
  42.352 + => mkDataCacheBlocking:stage i
  42.353 + => mkInstCacheBlocking:stage i
  42.354 + => Cycle =         111
  42.355 + => mkDataCacheBlocking:stage i
  42.356 + => mkInstCacheBlocking:stage i
  42.357 + => Cycle =         112
  42.358 + => mkDataCacheBlocking:stage i
  42.359 + => mkInstCacheBlocking:stage i
  42.360 + => Cycle =         113
  42.361 + => mkDataCacheBlocking:stage i
  42.362 + => mkInstCacheBlocking:stage i
  42.363 + => Cycle =         114
  42.364 + => mkDataCacheBlocking:stage i
  42.365 + => mkInstCacheBlocking:stage i
  42.366 + => Cycle =         115
  42.367 + => mkDataCacheBlocking:stage i
  42.368 + => mkInstCacheBlocking:stage i
  42.369 + => Cycle =         116
  42.370 + => mkDataCacheBlocking:stage i
  42.371 + => mkInstCacheBlocking:stage i
  42.372 + => Cycle =         117
  42.373 + => mkDataCacheBlocking:stage i
  42.374 + => mkInstCacheBlocking:stage i
  42.375 + => Cycle =         118
  42.376 + => mkDataCacheBlocking:stage i
  42.377 + => mkInstCacheBlocking:stage i
  42.378 + => Cycle =         119
  42.379 + => mkDataCacheBlocking:stage i
  42.380 + => mkInstCacheBlocking:stage i
  42.381 + => Cycle =         120
  42.382 + => mkDataCacheBlocking:stage i
  42.383 + => mkInstCacheBlocking:stage i
  42.384 + => Cycle =         121
  42.385 + => mkDataCacheBlocking:stage i
  42.386 + => mkInstCacheBlocking:stage i
  42.387 + => Cycle =         122
  42.388 + => mkDataCacheBlocking:stage i
  42.389 + => mkInstCacheBlocking:stage i
  42.390 + => Cycle =         123
  42.391 + => mkDataCacheBlocking:stage i
  42.392 + => mkInstCacheBlocking:stage i
  42.393 + => Cycle =         124
  42.394 + => mkDataCacheBlocking:stage i
  42.395 + => mkInstCacheBlocking:stage i
  42.396 + => Cycle =         125
  42.397 + => mkDataCacheBlocking:stage i
  42.398 + => mkInstCacheBlocking:stage i
  42.399 + => Cycle =         126
  42.400 + => mkDataCacheBlocking:stage i
  42.401 + => mkInstCacheBlocking:stage i
  42.402 + => Cycle =         127
  42.403 + => mkDataCacheBlocking:stage i
  42.404 + => mkInstCacheBlocking:stage i
  42.405 + => Cycle =         128
  42.406 + => mkDataCacheBlocking:stage i
  42.407 + => mkInstCacheBlocking:stage i
  42.408 + => Cycle =         129
  42.409 + => mkDataCacheBlocking:stage i
  42.410 + => mkInstCacheBlocking:stage i
  42.411 + => Cycle =         130
  42.412 + => mkDataCacheBlocking:stage i
  42.413 + => mkInstCacheBlocking:stage i
  42.414 + => Cycle =         131
  42.415 + => mkDataCacheBlocking:stage i
  42.416 + => mkInstCacheBlocking:stage i
  42.417 + => Cycle =         132
  42.418 + => mkDataCacheBlocking:stage i
  42.419 + => mkInstCacheBlocking:stage i
  42.420 + => Cycle =         133
  42.421 + => mkDataCacheBlocking:stage i
  42.422 + => mkInstCacheBlocking:stage i
  42.423 + => Cycle =         134
  42.424 + => mkDataCacheBlocking:stage i
  42.425 + => mkInstCacheBlocking:stage i
  42.426 + => Cycle =         135
  42.427 + => mkDataCacheBlocking:stage i
  42.428 + => mkInstCacheBlocking:stage i
  42.429 + => Cycle =         136
  42.430 + => mkDataCacheBlocking:stage i
  42.431 + => mkInstCacheBlocking:stage i
  42.432 + => Cycle =         137
  42.433 + => mkDataCacheBlocking:stage i
  42.434 + => mkInstCacheBlocking:stage i
  42.435 + => Cycle =         138
  42.436 + => mkDataCacheBlocking:stage i
  42.437 + => mkInstCacheBlocking:stage i
  42.438 + => Cycle =         139
  42.439 + => mkDataCacheBlocking:stage i
  42.440 + => mkInstCacheBlocking:stage i
  42.441 + => Cycle =         140
  42.442 + => mkDataCacheBlocking:stage i
  42.443 + => mkInstCacheBlocking:stage i
  42.444 + => Cycle =         141
  42.445 + => mkDataCacheBlocking:stage i
  42.446 + => mkInstCacheBlocking:stage i
  42.447 + => Cycle =         142
  42.448 + => mkDataCacheBlocking:stage i
  42.449 + => mkInstCacheBlocking:stage i
  42.450 + => Cycle =         143
  42.451 + => mkDataCacheBlocking:stage i
  42.452 + => mkInstCacheBlocking:stage i
  42.453 + => Cycle =         144
  42.454 + => mkDataCacheBlocking:stage i
  42.455 + => mkInstCacheBlocking:stage i
  42.456 + => Cycle =         145
  42.457 + => mkDataCacheBlocking:stage i
  42.458 + => mkInstCacheBlocking:stage i
  42.459 + => Cycle =         146
  42.460 + => mkDataCacheBlocking:stage i
  42.461 + => mkInstCacheBlocking:stage i
  42.462 + => Cycle =         147
  42.463 + => mkDataCacheBlocking:stage i
  42.464 + => mkInstCacheBlocking:stage i
  42.465 + => Cycle =         148
  42.466 + => mkDataCacheBlocking:stage i
  42.467 + => mkInstCacheBlocking:stage i
  42.468 + => Cycle =         149
  42.469 + => mkDataCacheBlocking:stage i
  42.470 + => mkInstCacheBlocking:stage i
  42.471 + => Cycle =         150
  42.472 + => mkDataCacheBlocking:stage i
  42.473 + => mkInstCacheBlocking:stage i
  42.474 + => Cycle =         151
  42.475 + => mkDataCacheBlocking:stage i
  42.476 + => mkInstCacheBlocking:stage i
  42.477 + => Cycle =         152
  42.478 + => mkDataCacheBlocking:stage i
  42.479 + => mkInstCacheBlocking:stage i
  42.480 + => Cycle =         153
  42.481 + => mkDataCacheBlocking:stage i
  42.482 + => mkInstCacheBlocking:stage i
  42.483 + => Cycle =         154
  42.484 + => mkDataCacheBlocking:stage i
  42.485 + => mkInstCacheBlocking:stage i
  42.486 + => Cycle =         155
  42.487 + => mkDataCacheBlocking:stage i
  42.488 + => mkInstCacheBlocking:stage i
  42.489 + => Cycle =         156
  42.490 + => mkDataCacheBlocking:stage i
  42.491 + => mkInstCacheBlocking:stage i
  42.492 + => Cycle =         157
  42.493 + => mkDataCacheBlocking:stage i
  42.494 + => mkInstCacheBlocking:stage i
  42.495 + => Cycle =         158
  42.496 + => mkDataCacheBlocking:stage i
  42.497 + => mkInstCacheBlocking:stage i
  42.498 + => Cycle =         159
  42.499 + => mkDataCacheBlocking:stage i
  42.500 + => mkInstCacheBlocking:stage i
  42.501 + => Cycle =         160
  42.502 + => mkDataCacheBlocking:stage i
  42.503 + => mkInstCacheBlocking:stage i
  42.504 + => Cycle =         161
  42.505 + => mkDataCacheBlocking:stage i
  42.506 + => mkInstCacheBlocking:stage i
  42.507 + => Cycle =         162
  42.508 + => mkDataCacheBlocking:stage i
  42.509 + => mkInstCacheBlocking:stage i
  42.510 + => Cycle =         163
  42.511 + => mkDataCacheBlocking:stage i
  42.512 + => mkInstCacheBlocking:stage i
  42.513 + => Cycle =         164
  42.514 + => mkDataCacheBlocking:stage i
  42.515 + => mkInstCacheBlocking:stage i
  42.516 + => Cycle =         165
  42.517 + => mkDataCacheBlocking:stage i
  42.518 + => mkInstCacheBlocking:stage i
  42.519 + => Cycle =         166
  42.520 + => mkDataCacheBlocking:stage i
  42.521 + => mkInstCacheBlocking:stage i
  42.522 + => Cycle =         167
  42.523 + => mkDataCacheBlocking:stage i
  42.524 + => mkInstCacheBlocking:stage i
  42.525 + => Cycle =         168
  42.526 + => mkDataCacheBlocking:stage i
  42.527 + => mkInstCacheBlocking:stage i
  42.528 + => Cycle =         169
  42.529 + => mkDataCacheBlocking:stage i
  42.530 + => mkInstCacheBlocking:stage i
  42.531 + => Cycle =         170
  42.532 + => mkDataCacheBlocking:stage i
  42.533 + => mkInstCacheBlocking:stage i
  42.534 + => Cycle =         171
  42.535 + => mkDataCacheBlocking:stage i
  42.536 + => mkInstCacheBlocking:stage i
  42.537 + => Cycle =         172
  42.538 + => mkDataCacheBlocking:stage i
  42.539 + => mkInstCacheBlocking:stage i
  42.540 + => Cycle =         173
  42.541 + => mkDataCacheBlocking:stage i
  42.542 + => mkInstCacheBlocking:stage i
  42.543 + => Cycle =         174
  42.544 + => mkDataCacheBlocking:stage i
  42.545 + => mkInstCacheBlocking:stage i
  42.546 + => Cycle =         175
  42.547 + => mkDataCacheBlocking:stage i
  42.548 + => mkInstCacheBlocking:stage i
  42.549 + => Cycle =         176
  42.550 + => mkDataCacheBlocking:stage i
  42.551 + => mkInstCacheBlocking:stage i
  42.552 + => Cycle =         177
  42.553 + => mkDataCacheBlocking:stage i
  42.554 + => mkInstCacheBlocking:stage i
  42.555 + => Cycle =         178
  42.556 + => mkDataCacheBlocking:stage i
  42.557 + => mkInstCacheBlocking:stage i
  42.558 + => Cycle =         179
  42.559 + => mkDataCacheBlocking:stage i
  42.560 + => mkInstCacheBlocking:stage i
  42.561 + => Cycle =         180
  42.562 + => mkDataCacheBlocking:stage i
  42.563 + => mkInstCacheBlocking:stage i
  42.564 + => Cycle =         181
  42.565 + => mkDataCacheBlocking:stage i
  42.566 + => mkInstCacheBlocking:stage i
  42.567 + => Cycle =         182
  42.568 + => mkDataCacheBlocking:stage i
  42.569 + => mkInstCacheBlocking:stage i
  42.570 + => Cycle =         183
  42.571 + => mkDataCacheBlocking:stage i
  42.572 + => mkInstCacheBlocking:stage i
  42.573 + => Cycle =         184
  42.574 + => mkDataCacheBlocking:stage i
  42.575 + => mkInstCacheBlocking:stage i
  42.576 + => Cycle =         185
  42.577 + => mkDataCacheBlocking:stage i
  42.578 + => mkInstCacheBlocking:stage i
  42.579 + => Cycle =         186
  42.580 + => mkDataCacheBlocking:stage i
  42.581 + => mkInstCacheBlocking:stage i
  42.582 + => Cycle =         187
  42.583 + => mkDataCacheBlocking:stage i
  42.584 + => mkInstCacheBlocking:stage i
  42.585 + => Cycle =         188
  42.586 + => mkDataCacheBlocking:stage i
  42.587 + => mkInstCacheBlocking:stage i
  42.588 + => Cycle =         189
  42.589 + => mkDataCacheBlocking:stage i
  42.590 + => mkInstCacheBlocking:stage i
  42.591 + => Cycle =         190
  42.592 + => mkDataCacheBlocking:stage i
  42.593 + => mkInstCacheBlocking:stage i
  42.594 + => Cycle =         191
  42.595 + => mkDataCacheBlocking:stage i
  42.596 + => mkInstCacheBlocking:stage i
  42.597 + => Cycle =         192
  42.598 + => mkDataCacheBlocking:stage i
  42.599 + => mkInstCacheBlocking:stage i
  42.600 + => Cycle =         193
  42.601 + => mkDataCacheBlocking:stage i
  42.602 + => mkInstCacheBlocking:stage i
  42.603 + => Cycle =         194
  42.604 + => mkDataCacheBlocking:stage i
  42.605 + => mkInstCacheBlocking:stage i
  42.606 + => Cycle =         195
  42.607 + => mkDataCacheBlocking:stage i
  42.608 + => mkInstCacheBlocking:stage i
  42.609 + => Cycle =         196
  42.610 + => mkDataCacheBlocking:stage i
  42.611 + => mkInstCacheBlocking:stage i
  42.612 + => Cycle =         197
  42.613 + => mkDataCacheBlocking:stage i
  42.614 + => mkInstCacheBlocking:stage i
  42.615 + => Cycle =         198
  42.616 + => mkDataCacheBlocking:stage i
  42.617 + => mkInstCacheBlocking:stage i
  42.618 + => Cycle =         199
  42.619 + => mkDataCacheBlocking:stage i
  42.620 + => mkInstCacheBlocking:stage i
  42.621 + => Cycle =         200
  42.622 + => mkDataCacheBlocking:stage i
  42.623 + => mkInstCacheBlocking:stage i
  42.624 + => Cycle =         201
  42.625 + => mkDataCacheBlocking:stage i
  42.626 + => mkInstCacheBlocking:stage i
  42.627 + => Cycle =         202
  42.628 + => mkDataCacheBlocking:stage i
  42.629 + => mkInstCacheBlocking:stage i
  42.630 + => Cycle =         203
  42.631 + => mkDataCacheBlocking:stage i
  42.632 + => mkInstCacheBlocking:stage i
  42.633 + => Cycle =         204
  42.634 + => mkDataCacheBlocking:stage i
  42.635 + => mkInstCacheBlocking:stage i
  42.636 + => Cycle =         205
  42.637 + => mkDataCacheBlocking:stage i
  42.638 + => mkInstCacheBlocking:stage i
  42.639 + => Cycle =         206
  42.640 + => mkDataCacheBlocking:stage i
  42.641 + => mkInstCacheBlocking:stage i
  42.642 + => Cycle =         207
  42.643 + => mkDataCacheBlocking:stage i
  42.644 + => mkInstCacheBlocking:stage i
  42.645 + => Cycle =         208
  42.646 + => mkDataCacheBlocking:stage i
  42.647 + => mkInstCacheBlocking:stage i
  42.648 + => Cycle =         209
  42.649 + => mkDataCacheBlocking:stage i
  42.650 + => mkInstCacheBlocking:stage i
  42.651 + => Cycle =         210
  42.652 + => mkDataCacheBlocking:stage i
  42.653 + => mkInstCacheBlocking:stage i
  42.654 + => Cycle =         211
  42.655 + => mkDataCacheBlocking:stage i
  42.656 + => mkInstCacheBlocking:stage i
  42.657 + => Cycle =         212
  42.658 + => mkDataCacheBlocking:stage i
  42.659 + => mkInstCacheBlocking:stage i
  42.660 + => Cycle =         213
  42.661 + => mkDataCacheBlocking:stage i
  42.662 + => mkInstCacheBlocking:stage i
  42.663 + => Cycle =         214
  42.664 + => mkDataCacheBlocking:stage i
  42.665 + => mkInstCacheBlocking:stage i
  42.666 + => Cycle =         215
  42.667 + => mkDataCacheBlocking:stage i
  42.668 + => mkInstCacheBlocking:stage i
  42.669 + => Cycle =         216
  42.670 + => mkDataCacheBlocking:stage i
  42.671 + => mkInstCacheBlocking:stage i
  42.672 + => Cycle =         217
  42.673 + => mkDataCacheBlocking:stage i
  42.674 + => mkInstCacheBlocking:stage i
  42.675 + => Cycle =         218
  42.676 + => mkDataCacheBlocking:stage i
  42.677 + => mkInstCacheBlocking:stage i
  42.678 + => Cycle =         219
  42.679 + => mkDataCacheBlocking:stage i
  42.680 + => mkInstCacheBlocking:stage i
  42.681 + => Cycle =         220
  42.682 + => mkDataCacheBlocking:stage i
  42.683 + => mkInstCacheBlocking:stage i
  42.684 + => Cycle =         221
  42.685 + => mkDataCacheBlocking:stage i
  42.686 + => mkInstCacheBlocking:stage i
  42.687 + => Cycle =         222
  42.688 + => mkDataCacheBlocking:stage i
  42.689 + => mkInstCacheBlocking:stage i
  42.690 + => Cycle =         223
  42.691 + => mkDataCacheBlocking:stage i
  42.692 + => mkInstCacheBlocking:stage i
  42.693 + => Cycle =         224
  42.694 + => mkDataCacheBlocking:stage i
  42.695 + => mkInstCacheBlocking:stage i
  42.696 + => Cycle =         225
  42.697 + => mkDataCacheBlocking:stage i
  42.698 + => mkInstCacheBlocking:stage i
  42.699 + => Cycle =         226
  42.700 + => mkDataCacheBlocking:stage i
  42.701 + => mkInstCacheBlocking:stage i
  42.702 + => Cycle =         227
  42.703 + => mkDataCacheBlocking:stage i
  42.704 + => mkInstCacheBlocking:stage i
  42.705 + => Cycle =         228
  42.706 + => mkDataCacheBlocking:stage i
  42.707 + => mkInstCacheBlocking:stage i
  42.708 + => Cycle =         229
  42.709 + => mkDataCacheBlocking:stage i
  42.710 + => mkInstCacheBlocking:stage i
  42.711 + => Cycle =         230
  42.712 + => mkDataCacheBlocking:stage i
  42.713 + => mkInstCacheBlocking:stage i
  42.714 + => Cycle =         231
  42.715 + => mkDataCacheBlocking:stage i
  42.716 + => mkInstCacheBlocking:stage i
  42.717 + => Cycle =         232
  42.718 + => mkDataCacheBlocking:stage i
  42.719 + => mkInstCacheBlocking:stage i
  42.720 + => Cycle =         233
  42.721 + => mkDataCacheBlocking:stage i
  42.722 + => mkInstCacheBlocking:stage i
  42.723 + => Cycle =         234
  42.724 + => mkDataCacheBlocking:stage i
  42.725 + => mkInstCacheBlocking:stage i
  42.726 + => Cycle =         235
  42.727 + => mkDataCacheBlocking:stage i
  42.728 + => mkInstCacheBlocking:stage i
  42.729 + => Cycle =         236
  42.730 + => mkDataCacheBlocking:stage i
  42.731 + => mkInstCacheBlocking:stage i
  42.732 + => Cycle =         237
  42.733 + => mkDataCacheBlocking:stage i
  42.734 + => mkInstCacheBlocking:stage i
  42.735 + => Cycle =         238
  42.736 + => mkDataCacheBlocking:stage i
  42.737 + => mkInstCacheBlocking:stage i
  42.738 + => Cycle =         239
  42.739 + => mkDataCacheBlocking:stage i
  42.740 + => mkInstCacheBlocking:stage i
  42.741 + => Cycle =         240
  42.742 + => mkDataCacheBlocking:stage i
  42.743 + => mkInstCacheBlocking:stage i
  42.744 + => Cycle =         241
  42.745 + => mkDataCacheBlocking:stage i
  42.746 + => mkInstCacheBlocking:stage i
  42.747 + => Cycle =         242
  42.748 + => mkDataCacheBlocking:stage i
  42.749 + => mkInstCacheBlocking:stage i
  42.750 + => Cycle =         243
  42.751 + => mkDataCacheBlocking:stage i
  42.752 + => mkInstCacheBlocking:stage i
  42.753 + => Cycle =         244
  42.754 + => mkDataCacheBlocking:stage i
  42.755 + => mkInstCacheBlocking:stage i
  42.756 + => Cycle =         245
  42.757 + => mkDataCacheBlocking:stage i
  42.758 + => mkInstCacheBlocking:stage i
  42.759 + => Cycle =         246
  42.760 + => mkDataCacheBlocking:stage i
  42.761 + => mkInstCacheBlocking:stage i
  42.762 + => Cycle =         247
  42.763 + => mkDataCacheBlocking:stage i
  42.764 + => mkInstCacheBlocking:stage i
  42.765 + => Cycle =         248
  42.766 + => mkDataCacheBlocking:stage i
  42.767 + => mkInstCacheBlocking:stage i
  42.768 + => Cycle =         249
  42.769 + => mkDataCacheBlocking:stage i
  42.770 + => mkInstCacheBlocking:stage i
  42.771 + => Cycle =         250
  42.772 + => mkDataCacheBlocking:stage i
  42.773 + => mkInstCacheBlocking:stage i
  42.774 + => Cycle =         251
  42.775 + => mkDataCacheBlocking:stage i
  42.776 + => mkInstCacheBlocking:stage i
  42.777 + => Cycle =         252
  42.778 + => mkDataCacheBlocking:stage i
  42.779 + => mkInstCacheBlocking:stage i
  42.780 + => Cycle =         253
  42.781 + => mkDataCacheBlocking:stage i
  42.782 + => mkInstCacheBlocking:stage i
  42.783 + => Cycle =         254
  42.784 + => mkDataCacheBlocking:stage i
  42.785 + => mkInstCacheBlocking:stage i
  42.786 + => Cycle =         255
  42.787 + => mkDataCacheBlocking:stage i
  42.788 + => mkInstCacheBlocking:stage i
  42.789 + => Cycle =         256
  42.790 + => mkDataCacheBlocking:stage i
  42.791 + => mkInstCacheBlocking:stage i
  42.792 + => Cycle =         257
  42.793 + => mkDataCacheBlocking:stage i
  42.794 + => mkInstCacheBlocking:stage i
  42.795 + => Cycle =         258
  42.796 + => mkDataCacheBlocking:stage i
  42.797 + => mkInstCacheBlocking:stage i
  42.798 + => Cycle =         259
  42.799 + => mkDataCacheBlocking:stage i
  42.800 + => mkInstCacheBlocking:stage i
  42.801 + => Cycle =         260
  42.802 + => mkDataCacheBlocking:stage i
  42.803 + => mkInstCacheBlocking:stage i
  42.804 + => Cycle =         261
  42.805 + => mkDataCacheBlocking:stage i
  42.806 + => mkInstCacheBlocking:stage i
  42.807 + => Cycle =         262
  42.808 + => mkDataCacheBlocking:stage i
  42.809 + => mkInstCacheBlocking:stage i
  42.810 + => Cycle =         263
  42.811 + => mkDataCacheBlocking:stage i
  42.812 + => mkInstCacheBlocking:stage i
  42.813 + => Cycle =         264
  42.814 + => mkDataCacheBlocking:stage i
  42.815 + => mkInstCacheBlocking:stage i
  42.816 + => Cycle =         265
  42.817 + => mkDataCacheBlocking:stage i
  42.818 + => mkInstCacheBlocking:stage i
  42.819 + => Cycle =         266
  42.820 + => mkDataCacheBlocking:stage i
  42.821 + => mkInstCacheBlocking:stage i
  42.822 + => Cycle =         267
  42.823 + => mkDataCacheBlocking:stage i
  42.824 + => mkInstCacheBlocking:stage i
  42.825 + => Cycle =         268
  42.826 + => mkDataCacheBlocking:stage i
  42.827 + => mkInstCacheBlocking:stage i
  42.828 + => Cycle =         269
  42.829 + => mkDataCacheBlocking:stage i
  42.830 + => mkInstCacheBlocking:stage i
  42.831 + => Cycle =         270
  42.832 + => mkDataCacheBlocking:stage i
  42.833 + => mkInstCacheBlocking:stage i
  42.834 + => Cycle =         271
  42.835 + => mkDataCacheBlocking:stage i
  42.836 + => mkInstCacheBlocking:stage i
  42.837 + => Cycle =         272
  42.838 + => mkDataCacheBlocking:stage i
  42.839 + => mkInstCacheBlocking:stage i
  42.840 + => Cycle =         273
  42.841 + => mkDataCacheBlocking:stage i
  42.842 + => mkInstCacheBlocking:stage i
  42.843 + => Cycle =         274
  42.844 + => mkDataCacheBlocking:stage i
  42.845 + => mkInstCacheBlocking:stage i
  42.846 + => Cycle =         275
  42.847 + => mkDataCacheBlocking:stage i
  42.848 + => mkInstCacheBlocking:stage i
  42.849 + => Cycle =         276
  42.850 + => mkDataCacheBlocking:stage i
  42.851 + => mkInstCacheBlocking:stage i
  42.852 + => Cycle =         277
  42.853 + => mkDataCacheBlocking:stage i
  42.854 + => mkInstCacheBlocking:stage i
  42.855 + => Cycle =         278
  42.856 + => mkDataCacheBlocking:stage i
  42.857 + => mkInstCacheBlocking:stage i
  42.858 + => Cycle =         279
  42.859 + => mkDataCacheBlocking:stage i
  42.860 + => mkInstCacheBlocking:stage i
  42.861 + => Cycle =         280
  42.862 + => mkDataCacheBlocking:stage i
  42.863 + => mkInstCacheBlocking:stage i
  42.864 + => Cycle =         281
  42.865 + => mkDataCacheBlocking:stage i
  42.866 + => mkInstCacheBlocking:stage i
  42.867 + => Cycle =         282
  42.868 + => mkDataCacheBlocking:stage i
  42.869 + => mkInstCacheBlocking:stage i
  42.870 + => Cycle =         283
  42.871 + => mkDataCacheBlocking:stage i
  42.872 + => mkInstCacheBlocking:stage i
  42.873 + => Cycle =         284
  42.874 + => mkDataCacheBlocking:stage i
  42.875 + => mkInstCacheBlocking:stage i
  42.876 + => Cycle =         285
  42.877 + => mkDataCacheBlocking:stage i
  42.878 + => mkInstCacheBlocking:stage i
  42.879 + => Cycle =         286
  42.880 + => mkDataCacheBlocking:stage i
  42.881 + => mkInstCacheBlocking:stage i
  42.882 + => Cycle =         287
  42.883 + => mkDataCacheBlocking:stage i
  42.884 + => mkInstCacheBlocking:stage i
  42.885 + => Cycle =         288
  42.886 + => mkDataCacheBlocking:stage i
  42.887 + => mkInstCacheBlocking:stage i
  42.888 + => Cycle =         289
  42.889 + => mkDataCacheBlocking:stage i
  42.890 + => mkInstCacheBlocking:stage i
  42.891 + => Cycle =         290
  42.892 + => mkDataCacheBlocking:stage i
  42.893 + => mkInstCacheBlocking:stage i
  42.894 + => Cycle =         291
  42.895 + => mkDataCacheBlocking:stage i
  42.896 + => mkInstCacheBlocking:stage i
  42.897 + => Cycle =         292
  42.898 + => mkDataCacheBlocking:stage i
  42.899 + => mkInstCacheBlocking:stage i
  42.900 + => Cycle =         293
  42.901 + => mkDataCacheBlocking:stage i
  42.902 + => mkInstCacheBlocking:stage i
  42.903 + => Cycle =         294
  42.904 + => mkDataCacheBlocking:stage i
  42.905 + => mkInstCacheBlocking:stage i
  42.906 + => Cycle =         295
  42.907 + => mkDataCacheBlocking:stage i
  42.908 + => mkInstCacheBlocking:stage i
  42.909 + => Cycle =         296
  42.910 + => mkDataCacheBlocking:stage i
  42.911 + => mkInstCacheBlocking:stage i
  42.912 + => Cycle =         297
  42.913 + => mkDataCacheBlocking:stage i
  42.914 + => mkInstCacheBlocking:stage i
  42.915 + => Cycle =         298
  42.916 + => mkDataCacheBlocking:stage i
  42.917 + => mkInstCacheBlocking:stage i
  42.918 + => Cycle =         299
  42.919 + => mkDataCacheBlocking:stage i
  42.920 + => mkInstCacheBlocking:stage i
  42.921 + => Cycle =         300
  42.922 + => mkDataCacheBlocking:stage i
  42.923 + => mkInstCacheBlocking:stage i
  42.924 + => Cycle =         301
  42.925 + => mkDataCacheBlocking:stage i
  42.926 + => mkInstCacheBlocking:stage i
  42.927 + => Cycle =         302
  42.928 + => mkDataCacheBlocking:stage i
  42.929 + => mkInstCacheBlocking:stage i
  42.930 + => Cycle =         303
  42.931 + => mkDataCacheBlocking:stage i
  42.932 + => mkInstCacheBlocking:stage i
  42.933 + => Cycle =         304
  42.934 + => mkDataCacheBlocking:stage i
  42.935 + => mkInstCacheBlocking:stage i
  42.936 + => Cycle =         305
  42.937 + => mkDataCacheBlocking:stage i
  42.938 + => mkInstCacheBlocking:stage i
  42.939 + => Cycle =         306
  42.940 + => mkDataCacheBlocking:stage i
  42.941 + => mkInstCacheBlocking:stage i
  42.942 + => Cycle =         307
  42.943 + => mkDataCacheBlocking:stage i
  42.944 + => mkInstCacheBlocking:stage i
  42.945 + => Cycle =         308
  42.946 + => mkDataCacheBlocking:stage i
  42.947 + => mkInstCacheBlocking:stage i
  42.948 + => Cycle =         309
  42.949 + => mkDataCacheBlocking:stage i
  42.950 + => mkInstCacheBlocking:stage i
  42.951 + => Cycle =         310
  42.952 + => mkDataCacheBlocking:stage i
  42.953 + => mkInstCacheBlocking:stage i
  42.954 + => Cycle =         311
  42.955 + => mkDataCacheBlocking:stage i
  42.956 + => mkInstCacheBlocking:stage i
  42.957 + => Cycle =         312
  42.958 + => mkDataCacheBlocking:stage i
  42.959 + => mkInstCacheBlocking:stage i
  42.960 + => Cycle =         313
  42.961 + => mkDataCacheBlocking:stage i
  42.962 + => mkInstCacheBlocking:stage i
  42.963 + => Cycle =         314
  42.964 + => mkDataCacheBlocking:stage i
  42.965 + => mkInstCacheBlocking:stage i
  42.966 + => Cycle =         315
  42.967 + => mkDataCacheBlocking:stage i
  42.968 + => mkInstCacheBlocking:stage i
  42.969 + => Cycle =         316
  42.970 + => mkDataCacheBlocking:stage i
  42.971 + => mkInstCacheBlocking:stage i
  42.972 + => Cycle =         317
  42.973 + => mkDataCacheBlocking:stage i
  42.974 + => mkInstCacheBlocking:stage i
  42.975 + => Cycle =         318
  42.976 + => mkDataCacheBlocking:stage i
  42.977 + => mkInstCacheBlocking:stage i
  42.978 + => Cycle =         319
  42.979 + => mkDataCacheBlocking:stage i
  42.980 + => mkInstCacheBlocking:stage i
  42.981 + => Cycle =         320
  42.982 + => mkDataCacheBlocking:stage i
  42.983 + => mkInstCacheBlocking:stage i
  42.984 + => Cycle =         321
  42.985 + => mkDataCacheBlocking:stage i
  42.986 + => mkInstCacheBlocking:stage i
  42.987 + => Cycle =         322
  42.988 + => mkDataCacheBlocking:stage i
  42.989 + => mkInstCacheBlocking:stage i
  42.990 + => Cycle =         323
  42.991 + => mkDataCacheBlocking:stage i
  42.992 + => mkInstCacheBlocking:stage i
  42.993 + => Cycle =         324
  42.994 + => mkDataCacheBlocking:stage i
  42.995 + => mkInstCacheBlocking:stage i
  42.996 + => Cycle =         325
  42.997 + => mkDataCacheBlocking:stage i
  42.998 + => mkInstCacheBlocking:stage i
  42.999 + => Cycle =         326
 42.1000 + => mkDataCacheBlocking:stage i
 42.1001 + => mkInstCacheBlocking:stage i
 42.1002 + => Cycle =         327
 42.1003 + => mkDataCacheBlocking:stage i
 42.1004 + => mkInstCacheBlocking:stage i
 42.1005 + => Cycle =         328
 42.1006 + => mkDataCacheBlocking:stage i
 42.1007 + => mkInstCacheBlocking:stage i
 42.1008 + => Cycle =         329
 42.1009 + => mkDataCacheBlocking:stage i
 42.1010 + => mkInstCacheBlocking:stage i
 42.1011 + => Cycle =         330
 42.1012 + => mkDataCacheBlocking:stage i
 42.1013 + => mkInstCacheBlocking:stage i
 42.1014 + => Cycle =         331
 42.1015 + => mkDataCacheBlocking:stage i
 42.1016 + => mkInstCacheBlocking:stage i
 42.1017 + => Cycle =         332
 42.1018 + => mkDataCacheBlocking:stage i
 42.1019 + => mkInstCacheBlocking:stage i
 42.1020 + => Cycle =         333
 42.1021 + => mkDataCacheBlocking:stage i
 42.1022 + => mkInstCacheBlocking:stage i
 42.1023 + => Cycle =         334
 42.1024 + => mkDataCacheBlocking:stage i
 42.1025 + => mkInstCacheBlocking:stage i
 42.1026 + => Cycle =         335
 42.1027 + => mkDataCacheBlocking:stage i
 42.1028 + => mkInstCacheBlocking:stage i
 42.1029 + => Cycle =         336
 42.1030 + => mkDataCacheBlocking:stage i
 42.1031 + => mkInstCacheBlocking:stage i
 42.1032 + => Cycle =         337
 42.1033 + => mkDataCacheBlocking:stage i
 42.1034 + => mkInstCacheBlocking:stage i
 42.1035 + => Cycle =         338
 42.1036 + => mkDataCacheBlocking:stage i
 42.1037 + => mkInstCacheBlocking:stage i
 42.1038 + => Cycle =         339
 42.1039 + => mkDataCacheBlocking:stage i
 42.1040 + => mkInstCacheBlocking:stage i
 42.1041 + => Cycle =         340
 42.1042 + => mkDataCacheBlocking:stage i
 42.1043 + => mkInstCacheBlocking:stage i
 42.1044 + => Cycle =         341
 42.1045 + => mkDataCacheBlocking:stage i
 42.1046 + => mkInstCacheBlocking:stage i
 42.1047 + => Cycle =         342
 42.1048 + => mkDataCacheBlocking:stage i
 42.1049 + => mkInstCacheBlocking:stage i
 42.1050 + => Cycle =         343
 42.1051 + => mkDataCacheBlocking:stage i
 42.1052 + => mkInstCacheBlocking:stage i
 42.1053 + => Cycle =         344
 42.1054 + => mkDataCacheBlocking:stage i
 42.1055 + => mkInstCacheBlocking:stage i
 42.1056 + => Cycle =         345
 42.1057 + => mkDataCacheBlocking:stage i
 42.1058 + => mkInstCacheBlocking:stage i
 42.1059 + => Cycle =         346
 42.1060 + => mkDataCacheBlocking:stage i
 42.1061 + => mkInstCacheBlocking:stage i
 42.1062 + => Cycle =         347
 42.1063 + => mkDataCacheBlocking:stage i
 42.1064 + => mkInstCacheBlocking:stage i
 42.1065 + => Cycle =         348
 42.1066 + => mkDataCacheBlocking:stage i
 42.1067 + => mkInstCacheBlocking:stage i
 42.1068 + => Cycle =         349
 42.1069 + => mkDataCacheBlocking:stage i
 42.1070 + => mkInstCacheBlocking:stage i
 42.1071 + => Cycle =         350
 42.1072 + => mkDataCacheBlocking:stage i
 42.1073 + => mkInstCacheBlocking:stage i
 42.1074 + => Cycle =         351
 42.1075 + => mkDataCacheBlocking:stage i
 42.1076 + => mkInstCacheBlocking:stage i
 42.1077 + => Cycle =         352
 42.1078 + => mkDataCacheBlocking:stage i
 42.1079 + => mkInstCacheBlocking:stage i
 42.1080 + => Cycle =         353
 42.1081 + => mkDataCacheBlocking:stage i
 42.1082 + => mkInstCacheBlocking:stage i
 42.1083 + => Cycle =         354
 42.1084 + => mkDataCacheBlocking:stage i
 42.1085 + => mkInstCacheBlocking:stage i
 42.1086 + => Cycle =         355
 42.1087 + => mkDataCacheBlocking:stage i
 42.1088 + => mkInstCacheBlocking:stage i
 42.1089 + => Cycle =         356
 42.1090 + => mkDataCacheBlocking:stage i
 42.1091 + => mkInstCacheBlocking:stage i
 42.1092 + => Cycle =         357
 42.1093 + => mkDataCacheBlocking:stage i
 42.1094 + => mkInstCacheBlocking:stage i
 42.1095 + => Cycle =         358
 42.1096 + => mkDataCacheBlocking:stage i
 42.1097 + => mkInstCacheBlocking:stage i
 42.1098 + => Cycle =         359
 42.1099 + => mkDataCacheBlocking:stage i
 42.1100 + => mkInstCacheBlocking:stage i
 42.1101 + => Cycle =         360
 42.1102 + => mkDataCacheBlocking:stage i
 42.1103 + => mkInstCacheBlocking:stage i
 42.1104 + => Cycle =         361
 42.1105 + => mkDataCacheBlocking:stage i
 42.1106 + => mkInstCacheBlocking:stage i
 42.1107 + => Cycle =         362
 42.1108 + => mkDataCacheBlocking:stage i
 42.1109 + => mkInstCacheBlocking:stage i
 42.1110 + => Cycle =         363
 42.1111 + => mkDataCacheBlocking:stage i
 42.1112 + => mkInstCacheBlocking:stage i
 42.1113 + => Cycle =         364
 42.1114 + => mkDataCacheBlocking:stage i
 42.1115 + => mkInstCacheBlocking:stage i
 42.1116 + => Cycle =         365
 42.1117 + => mkDataCacheBlocking:stage i
 42.1118 + => mkInstCacheBlocking:stage i
 42.1119 + => Cycle =         366
 42.1120 + => mkDataCacheBlocking:stage i
 42.1121 + => mkInstCacheBlocking:stage i
 42.1122 + => Cycle =         367
 42.1123 + => mkDataCacheBlocking:stage i
 42.1124 + => mkInstCacheBlocking:stage i
 42.1125 + => Cycle =         368
 42.1126 + => mkDataCacheBlocking:stage i
 42.1127 + => mkInstCacheBlocking:stage i
 42.1128 + => Cycle =         369
 42.1129 + => mkDataCacheBlocking:stage i
 42.1130 + => mkInstCacheBlocking:stage i
 42.1131 + => Cycle =         370
 42.1132 + => mkDataCacheBlocking:stage i
 42.1133 + => mkInstCacheBlocking:stage i
 42.1134 + => Cycle =         371
 42.1135 + => mkDataCacheBlocking:stage i
 42.1136 + => mkInstCacheBlocking:stage i
 42.1137 + => Cycle =         372
 42.1138 + => mkDataCacheBlocking:stage i
 42.1139 + => mkInstCacheBlocking:stage i
 42.1140 + => Cycle =         373
 42.1141 + => mkDataCacheBlocking:stage i
 42.1142 + => mkInstCacheBlocking:stage i
 42.1143 + => Cycle =         374
 42.1144 + => mkDataCacheBlocking:stage i
 42.1145 + => mkInstCacheBlocking:stage i
 42.1146 + => Cycle =         375
 42.1147 + => mkDataCacheBlocking:stage i
 42.1148 + => mkInstCacheBlocking:stage i
 42.1149 + => Cycle =         376
 42.1150 + => mkDataCacheBlocking:stage i
 42.1151 + => mkInstCacheBlocking:stage i
 42.1152 + => Cycle =         377
 42.1153 + => mkDataCacheBlocking:stage i
 42.1154 + => mkInstCacheBlocking:stage i
 42.1155 + => Cycle =         378
 42.1156 + => mkDataCacheBlocking:stage i
 42.1157 + => mkInstCacheBlocking:stage i
 42.1158 + => Cycle =         379
 42.1159 + => mkDataCacheBlocking:stage i
 42.1160 + => mkInstCacheBlocking:stage i
 42.1161 + => Cycle =         380
 42.1162 + => mkDataCacheBlocking:stage i
 42.1163 + => mkInstCacheBlocking:stage i
 42.1164 + => Cycle =         381
 42.1165 + => mkDataCacheBlocking:stage i
 42.1166 + => mkInstCacheBlocking:stage i
 42.1167 + => Cycle =         382
 42.1168 + => mkDataCacheBlocking:stage i
 42.1169 + => mkInstCacheBlocking:stage i
 42.1170 + => Cycle =         383
 42.1171 + => mkDataCacheBlocking:stage i
 42.1172 + => mkInstCacheBlocking:stage i
 42.1173 + => Cycle =         384
 42.1174 + => mkDataCacheBlocking:stage i
 42.1175 + => mkInstCacheBlocking:stage i
 42.1176 + => Cycle =         385
 42.1177 + => mkDataCacheBlocking:stage i
 42.1178 + => mkInstCacheBlocking:stage i
 42.1179 + => Cycle =         386
 42.1180 + => mkDataCacheBlocking:stage i
 42.1181 + => mkInstCacheBlocking:stage i
 42.1182 + => Cycle =         387
 42.1183 + => mkDataCacheBlocking:stage i
 42.1184 + => mkInstCacheBlocking:stage i
 42.1185 + => Cycle =         388
 42.1186 + => mkDataCacheBlocking:stage i
 42.1187 + => mkInstCacheBlocking:stage i
 42.1188 + => Cycle =         389
 42.1189 + => mkDataCacheBlocking:stage i
 42.1190 + => mkInstCacheBlocking:stage i
 42.1191 + => Cycle =         390
 42.1192 + => mkDataCacheBlocking:stage i
 42.1193 + => mkInstCacheBlocking:stage i
 42.1194 + => Cycle =         391
 42.1195 + => mkDataCacheBlocking:stage i
 42.1196 + => mkInstCacheBlocking:stage i
 42.1197 + => Cycle =         392
 42.1198 + => mkDataCacheBlocking:stage i
 42.1199 + => mkInstCacheBlocking:stage i
 42.1200 + => Cycle =         393
 42.1201 + => mkDataCacheBlocking:stage i
 42.1202 + => mkInstCacheBlocking:stage i
 42.1203 + => Cycle =         394
 42.1204 + => mkDataCacheBlocking:stage i
 42.1205 + => mkInstCacheBlocking:stage i
 42.1206 + => Cycle =         395
 42.1207 + => mkDataCacheBlocking:stage i
 42.1208 + => mkInstCacheBlocking:stage i
 42.1209 + => Cycle =         396
 42.1210 + => mkDataCacheBlocking:stage i
 42.1211 + => mkInstCacheBlocking:stage i
 42.1212 + => Cycle =         397
 42.1213 + => mkDataCacheBlocking:stage i
 42.1214 + => mkInstCacheBlocking:stage i
 42.1215 + => Cycle =         398
 42.1216 + => mkDataCacheBlocking:stage i
 42.1217 + => mkInstCacheBlocking:stage i
 42.1218 + => Cycle =         399
 42.1219 + => mkDataCacheBlocking:stage i
 42.1220 + => mkInstCacheBlocking:stage i
 42.1221 + => Cycle =         400
 42.1222 + => mkDataCacheBlocking:stage i
 42.1223 + => mkInstCacheBlocking:stage i
 42.1224 + => Cycle =         401
 42.1225 + => mkDataCacheBlocking:stage i
 42.1226 + => mkInstCacheBlocking:stage i
 42.1227 + => Cycle =         402
 42.1228 + => mkDataCacheBlocking:stage i
 42.1229 + => mkInstCacheBlocking:stage i
 42.1230 + => Cycle =         403
 42.1231 + => mkDataCacheBlocking:stage i
 42.1232 + => mkInstCacheBlocking:stage i
 42.1233 + => Cycle =         404
 42.1234 + => mkDataCacheBlocking:stage i
 42.1235 + => mkInstCacheBlocking:stage i
 42.1236 + => Cycle =         405
 42.1237 + => mkDataCacheBlocking:stage i
 42.1238 + => mkInstCacheBlocking:stage i
 42.1239 + => Cycle =         406
 42.1240 + => mkDataCacheBlocking:stage i
 42.1241 + => mkInstCacheBlocking:stage i
 42.1242 + => Cycle =         407
 42.1243 + => mkDataCacheBlocking:stage i
 42.1244 + => mkInstCacheBlocking:stage i
 42.1245 + => Cycle =         408
 42.1246 + => mkDataCacheBlocking:stage i
 42.1247 + => mkInstCacheBlocking:stage i
 42.1248 + => Cycle =         409
 42.1249 + => mkDataCacheBlocking:stage i
 42.1250 + => mkInstCacheBlocking:stage i
 42.1251 + => Cycle =         410
 42.1252 + => mkDataCacheBlocking:stage i
 42.1253 + => mkInstCacheBlocking:stage i
 42.1254 + => Cycle =         411
 42.1255 + => mkDataCacheBlocking:stage i
 42.1256 + => mkInstCacheBlocking:stage i
 42.1257 + => Cycle =         412
 42.1258 + => mkDataCacheBlocking:stage i
 42.1259 + => mkInstCacheBlocking:stage i
 42.1260 + => Cycle =         413
 42.1261 + => mkDataCacheBlocking:stage i
 42.1262 + => mkInstCacheBlocking:stage i
 42.1263 + => Cycle =         414
 42.1264 + => mkDataCacheBlocking:stage i
 42.1265 + => mkInstCacheBlocking:stage i
 42.1266 + => Cycle =         415
 42.1267 + => mkDataCacheBlocking:stage i
 42.1268 + => mkInstCacheBlocking:stage i
 42.1269 + => Cycle =         416
 42.1270 + => mkDataCacheBlocking:stage i
 42.1271 + => mkInstCacheBlocking:stage i
 42.1272 + => Cycle =         417
 42.1273 + => mkDataCacheBlocking:stage i
 42.1274 + => mkInstCacheBlocking:stage i
 42.1275 + => Cycle =         418
 42.1276 + => mkDataCacheBlocking:stage i
 42.1277 + => mkInstCacheBlocking:stage i
 42.1278 + => Cycle =         419
 42.1279 + => mkDataCacheBlocking:stage i
 42.1280 + => mkInstCacheBlocking:stage i
 42.1281 + => Cycle =         420
 42.1282 + => mkDataCacheBlocking:stage i
 42.1283 + => mkInstCacheBlocking:stage i
 42.1284 + => Cycle =         421
 42.1285 + => mkDataCacheBlocking:stage i
 42.1286 + => mkInstCacheBlocking:stage i
 42.1287 + => Cycle =         422
 42.1288 + => mkDataCacheBlocking:stage i
 42.1289 + => mkInstCacheBlocking:stage i
 42.1290 + => Cycle =         423
 42.1291 + => mkDataCacheBlocking:stage i
 42.1292 + => mkInstCacheBlocking:stage i
 42.1293 + => Cycle =         424
 42.1294 + => mkDataCacheBlocking:stage i
 42.1295 + => mkInstCacheBlocking:stage i
 42.1296 + => Cycle =         425
 42.1297 + => mkDataCacheBlocking:stage i
 42.1298 + => mkInstCacheBlocking:stage i
 42.1299 + => Cycle =         426
 42.1300 + => mkDataCacheBlocking:stage i
 42.1301 + => mkInstCacheBlocking:stage i
 42.1302 + => Cycle =         427
 42.1303 + => mkDataCacheBlocking:stage i
 42.1304 + => mkInstCacheBlocking:stage i
 42.1305 + => Cycle =         428
 42.1306 + => mkDataCacheBlocking:stage i
 42.1307 + => mkInstCacheBlocking:stage i
 42.1308 + => Cycle =         429
 42.1309 + => mkDataCacheBlocking:stage i
 42.1310 + => mkInstCacheBlocking:stage i
 42.1311 + => Cycle =         430
 42.1312 + => mkDataCacheBlocking:stage i
 42.1313 + => mkInstCacheBlocking:stage i
 42.1314 + => Cycle =         431
 42.1315 + => mkDataCacheBlocking:stage i
 42.1316 + => mkInstCacheBlocking:stage i
 42.1317 + => Cycle =         432
 42.1318 + => mkDataCacheBlocking:stage i
 42.1319 + => mkInstCacheBlocking:stage i
 42.1320 + => Cycle =         433
 42.1321 + => mkDataCacheBlocking:stage i
 42.1322 + => mkInstCacheBlocking:stage i
 42.1323 + => Cycle =         434
 42.1324 + => mkDataCacheBlocking:stage i
 42.1325 + => mkInstCacheBlocking:stage i
 42.1326 + => Cycle =         435
 42.1327 + => mkDataCacheBlocking:stage i
 42.1328 + => mkInstCacheBlocking:stage i
 42.1329 + => Cycle =         436
 42.1330 + => mkDataCacheBlocking:stage i
 42.1331 + => mkInstCacheBlocking:stage i
 42.1332 + => Cycle =         437
 42.1333 + => mkDataCacheBlocking:stage i
 42.1334 + => mkInstCacheBlocking:stage i
 42.1335 + => Cycle =         438
 42.1336 + => mkDataCacheBlocking:stage i
 42.1337 + => mkInstCacheBlocking:stage i
 42.1338 + => Cycle =         439
 42.1339 + => mkDataCacheBlocking:stage i
 42.1340 + => mkInstCacheBlocking:stage i
 42.1341 + => Cycle =         440
 42.1342 + => mkDataCacheBlocking:stage i
 42.1343 + => mkInstCacheBlocking:stage i
 42.1344 + => Cycle =         441
 42.1345 + => mkDataCacheBlocking:stage i
 42.1346 + => mkInstCacheBlocking:stage i
 42.1347 + => Cycle =         442
 42.1348 + => mkDataCacheBlocking:stage i
 42.1349 + => mkInstCacheBlocking:stage i
 42.1350 + => Cycle =         443
 42.1351 + => mkDataCacheBlocking:stage i
 42.1352 + => mkInstCacheBlocking:stage i
 42.1353 + => Cycle =         444
 42.1354 + => mkDataCacheBlocking:stage i
 42.1355 + => mkInstCacheBlocking:stage i
 42.1356 + => Cycle =         445
 42.1357 + => mkDataCacheBlocking:stage i
 42.1358 + => mkInstCacheBlocking:stage i
 42.1359 + => Cycle =         446
 42.1360 + => mkDataCacheBlocking:stage i
 42.1361 + => mkInstCacheBlocking:stage i
 42.1362 + => Cycle =         447
 42.1363 + => mkDataCacheBlocking:stage i
 42.1364 + => mkInstCacheBlocking:stage i
 42.1365 + => Cycle =         448
 42.1366 + => mkDataCacheBlocking:stage i
 42.1367 + => mkInstCacheBlocking:stage i
 42.1368 + => Cycle =         449
 42.1369 + => mkDataCacheBlocking:stage i
 42.1370 + => mkInstCacheBlocking:stage i
 42.1371 + => Cycle =         450
 42.1372 + => mkDataCacheBlocking:stage i
 42.1373 + => mkInstCacheBlocking:stage i
 42.1374 + => Cycle =         451
 42.1375 + => mkDataCacheBlocking:stage i
 42.1376 + => mkInstCacheBlocking:stage i
 42.1377 + => Cycle =         452
 42.1378 + => mkDataCacheBlocking:stage i
 42.1379 + => mkInstCacheBlocking:stage i
 42.1380 + => Cycle =         453
 42.1381 + => mkDataCacheBlocking:stage i
 42.1382 + => mkInstCacheBlocking:stage i
 42.1383 + => Cycle =         454
 42.1384 + => mkDataCacheBlocking:stage i
 42.1385 + => mkInstCacheBlocking:stage i
 42.1386 + => Cycle =         455
 42.1387 + => mkDataCacheBlocking:stage i
 42.1388 + => mkInstCacheBlocking:stage i
 42.1389 + => Cycle =         456
 42.1390 + => mkDataCacheBlocking:stage i
 42.1391 + => mkInstCacheBlocking:stage i
 42.1392 + => Cycle =         457
 42.1393 + => mkDataCacheBlocking:stage i
 42.1394 + => mkInstCacheBlocking:stage i
 42.1395 + => Cycle =         458
 42.1396 + => mkDataCacheBlocking:stage i
 42.1397 + => mkInstCacheBlocking:stage i
 42.1398 + => Cycle =         459
 42.1399 + => mkDataCacheBlocking:stage i
 42.1400 + => mkInstCacheBlocking:stage i
 42.1401 + => Cycle =         460
 42.1402 + => mkDataCacheBlocking:stage i
 42.1403 + => mkInstCacheBlocking:stage i
 42.1404 + => Cycle =         461
 42.1405 + => mkDataCacheBlocking:stage i
 42.1406 + => mkInstCacheBlocking:stage i
 42.1407 + => Cycle =         462
 42.1408 + => mkDataCacheBlocking:stage i
 42.1409 + => mkInstCacheBlocking:stage i
 42.1410 + => Cycle =         463
 42.1411 + => mkDataCacheBlocking:stage i
 42.1412 + => mkInstCacheBlocking:stage i
 42.1413 + => Cycle =         464
 42.1414 + => mkDataCacheBlocking:stage i
 42.1415 + => mkInstCacheBlocking:stage i
 42.1416 + => Cycle =         465
 42.1417 + => mkDataCacheBlocking:stage i
 42.1418 + => mkInstCacheBlocking:stage i
 42.1419 + => Cycle =         466
 42.1420 + => mkDataCacheBlocking:stage i
 42.1421 + => mkInstCacheBlocking:stage i
 42.1422 + => Cycle =         467
 42.1423 + => mkDataCacheBlocking:stage i
 42.1424 + => mkInstCacheBlocking:stage i
 42.1425 + => Cycle =         468
 42.1426 + => mkDataCacheBlocking:stage i
 42.1427 + => mkInstCacheBlocking:stage i
 42.1428 + => Cycle =         469
 42.1429 + => mkDataCacheBlocking:stage i
 42.1430 + => mkInstCacheBlocking:stage i
 42.1431 + => Cycle =         470
 42.1432 + => mkDataCacheBlocking:stage i
 42.1433 + => mkInstCacheBlocking:stage i
 42.1434 + => Cycle =         471
 42.1435 + => mkDataCacheBlocking:stage i
 42.1436 + => mkInstCacheBlocking:stage i
 42.1437 + => Cycle =         472
 42.1438 + => mkDataCacheBlocking:stage i
 42.1439 + => mkInstCacheBlocking:stage i
 42.1440 + => Cycle =         473
 42.1441 + => mkDataCacheBlocking:stage i
 42.1442 + => mkInstCacheBlocking:stage i
 42.1443 + => Cycle =         474
 42.1444 + => mkDataCacheBlocking:stage i
 42.1445 + => mkInstCacheBlocking:stage i
 42.1446 + => Cycle =         475
 42.1447 + => mkDataCacheBlocking:stage i
 42.1448 + => mkInstCacheBlocking:stage i
 42.1449 + => Cycle =         476
 42.1450 + => mkDataCacheBlocking:stage i
 42.1451 + => mkInstCacheBlocking:stage i
 42.1452 + => Cycle =         477
 42.1453 + => mkDataCacheBlocking:stage i
 42.1454 + => mkInstCacheBlocking:stage i
 42.1455 + => Cycle =         478
 42.1456 + => mkDataCacheBlocking:stage i
 42.1457 + => mkInstCacheBlocking:stage i
 42.1458 + => Cycle =         479
 42.1459 + => mkDataCacheBlocking:stage i
 42.1460 + => mkInstCacheBlocking:stage i
 42.1461 + => Cycle =         480
 42.1462 + => mkDataCacheBlocking:stage i
 42.1463 + => mkInstCacheBlocking:stage i
 42.1464 + => Cycle =         481
 42.1465 + => mkDataCacheBlocking:stage i
 42.1466 + => mkInstCacheBlocking:stage i
 42.1467 + => Cycle =         482
 42.1468 + => mkDataCacheBlocking:stage i
 42.1469 + => mkInstCacheBlocking:stage i
 42.1470 + => Cycle =         483
 42.1471 + => mkDataCacheBlocking:stage i
 42.1472 + => mkInstCacheBlocking:stage i
 42.1473 + => Cycle =         484
 42.1474 + => mkDataCacheBlocking:stage i
 42.1475 + => mkInstCacheBlocking:stage i
 42.1476 + => Cycle =         485
 42.1477 + => mkDataCacheBlocking:stage i
 42.1478 + => mkInstCacheBlocking:stage i
 42.1479 + => Cycle =         486
 42.1480 + => mkDataCacheBlocking:stage i
 42.1481 + => mkInstCacheBlocking:stage i
 42.1482 + => Cycle =         487
 42.1483 + => mkDataCacheBlocking:stage i
 42.1484 + => mkInstCacheBlocking:stage i
 42.1485 + => Cycle =         488
 42.1486 + => mkDataCacheBlocking:stage i
 42.1487 + => mkInstCacheBlocking:stage i
 42.1488 + => Cycle =         489
 42.1489 + => mkDataCacheBlocking:stage i
 42.1490 + => mkInstCacheBlocking:stage i
 42.1491 + => Cycle =         490
 42.1492 + => mkDataCacheBlocking:stage i
 42.1493 + => mkInstCacheBlocking:stage i
 42.1494 + => Cycle =         491
 42.1495 + => mkDataCacheBlocking:stage i
 42.1496 + => mkInstCacheBlocking:stage i
 42.1497 + => Cycle =         492
 42.1498 + => mkDataCacheBlocking:stage i
 42.1499 + => mkInstCacheBlocking:stage i
 42.1500 + => Cycle =         493
 42.1501 + => mkDataCacheBlocking:stage i
 42.1502 + => mkInstCacheBlocking:stage i
 42.1503 + => Cycle =         494
 42.1504 + => mkDataCacheBlocking:stage i
 42.1505 + => mkInstCacheBlocking:stage i
 42.1506 + => Cycle =         495
 42.1507 + => mkDataCacheBlocking:stage i
 42.1508 + => mkInstCacheBlocking:stage i
 42.1509 + => Cycle =         496
 42.1510 + => mkDataCacheBlocking:stage i
 42.1511 + => mkInstCacheBlocking:stage i
 42.1512 + => Cycle =         497
 42.1513 + => mkDataCacheBlocking:stage i
 42.1514 + => mkInstCacheBlocking:stage i
 42.1515 + => Cycle =         498
 42.1516 + => mkDataCacheBlocking:stage i
 42.1517 + => mkInstCacheBlocking:stage i
 42.1518 + => Cycle =         499
 42.1519 + => mkDataCacheBlocking:stage i
 42.1520 + => mkInstCacheBlocking:stage i
 42.1521 + => Cycle =         500
 42.1522 + => mkDataCacheBlocking:stage i
 42.1523 + => mkInstCacheBlocking:stage i
 42.1524 + => Cycle =         501
 42.1525 + => mkDataCacheBlocking:stage i
 42.1526 + => mkInstCacheBlocking:stage i
 42.1527 + => Cycle =         502
 42.1528 + => mkDataCacheBlocking:stage i
 42.1529 + => mkInstCacheBlocking:stage i
 42.1530 + => Cycle =         503
 42.1531 + => mkDataCacheBlocking:stage i
 42.1532 + => mkInstCacheBlocking:stage i
 42.1533 + => Cycle =         504
 42.1534 + => mkDataCacheBlocking:stage i
 42.1535 + => mkInstCacheBlocking:stage i
 42.1536 + => Cycle =         505
 42.1537 + => mkDataCacheBlocking:stage i
 42.1538 + => mkInstCacheBlocking:stage i
 42.1539 + => Cycle =         506
 42.1540 + => mkDataCacheBlocking:stage i
 42.1541 + => mkInstCacheBlocking:stage i
 42.1542 + => Cycle =         507
 42.1543 + => mkDataCacheBlocking:stage i
 42.1544 + => mkInstCacheBlocking:stage i
 42.1545 + => Cycle =         508
 42.1546 + => mkDataCacheBlocking:stage i
 42.1547 + => mkInstCacheBlocking:stage i
 42.1548 + => Cycle =         509
 42.1549 + => mkDataCacheBlocking:stage i
 42.1550 + => mkInstCacheBlocking:stage i
 42.1551 + => Cycle =         510
 42.1552 + => mkDataCacheBlocking:stage i
 42.1553 + => mkInstCacheBlocking:stage i
 42.1554 + => Cycle =         511
 42.1555 + => mkDataCacheBlocking:stage i
 42.1556 + => mkInstCacheBlocking:stage i
 42.1557 + => Cycle =         512
 42.1558 + => mkDataCacheBlocking:stage i
 42.1559 + => mkInstCacheBlocking:stage i
 42.1560 + => Cycle =         513
 42.1561 + => mkDataCacheBlocking:stage i
 42.1562 + => mkInstCacheBlocking:stage i
 42.1563 + => Cycle =         514
 42.1564 + => mkDataCacheBlocking:stage i
 42.1565 + => mkInstCacheBlocking:stage i
 42.1566 + => Cycle =         515
 42.1567 + => mkDataCacheBlocking:stage i
 42.1568 + => mkInstCacheBlocking:stage i
 42.1569 + => Cycle =         516
 42.1570 + => mkDataCacheBlocking:stage i
 42.1571 + => mkInstCacheBlocking:stage i
 42.1572 + => Cycle =         517
 42.1573 + => mkDataCacheBlocking:stage i
 42.1574 + => mkInstCacheBlocking:stage i
 42.1575 + => Cycle =         518
 42.1576 + => mkDataCacheBlocking:stage i
 42.1577 + => mkInstCacheBlocking:stage i
 42.1578 + => Cycle =         519
 42.1579 + => mkDataCacheBlocking:stage i
 42.1580 + => mkInstCacheBlocking:stage i
 42.1581 + => Cycle =         520
 42.1582 + => mkDataCacheBlocking:stage i
 42.1583 + => mkInstCacheBlocking:stage i
 42.1584 + => Cycle =         521
 42.1585 + => mkDataCacheBlocking:stage i
 42.1586 + => mkInstCacheBlocking:stage i
 42.1587 + => Cycle =         522
 42.1588 + => mkDataCacheBlocking:stage i
 42.1589 + => mkInstCacheBlocking:stage i
 42.1590 + => Cycle =         523
 42.1591 + => mkDataCacheBlocking:stage i
 42.1592 + => mkInstCacheBlocking:stage i
 42.1593 + => Cycle =         524
 42.1594 + => mkDataCacheBlocking:stage i
 42.1595 + => mkInstCacheBlocking:stage i
 42.1596 + => Cycle =         525
 42.1597 + => mkDataCacheBlocking:stage i
 42.1598 + => mkInstCacheBlocking:stage i
 42.1599 + => Cycle =         526
 42.1600 + => mkDataCacheBlocking:stage i
 42.1601 + => mkInstCacheBlocking:stage i
 42.1602 + => Cycle =         527
 42.1603 + => mkDataCacheBlocking:stage i
 42.1604 + => mkInstCacheBlocking:stage i
 42.1605 + => Cycle =         528
 42.1606 + => mkDataCacheBlocking:stage i
 42.1607 + => mkInstCacheBlocking:stage i
 42.1608 + => Cycle =         529
 42.1609 + => mkDataCacheBlocking:stage i
 42.1610 + => mkInstCacheBlocking:stage i
 42.1611 + => Cycle =         530
 42.1612 + => mkDataCacheBlocking:stage i
 42.1613 + => mkInstCacheBlocking:stage i
 42.1614 + => Cycle =         531
 42.1615 + => mkDataCacheBlocking:stage i
 42.1616 + => mkInstCacheBlocking:stage i
 42.1617 + => Cycle =         532
 42.1618 + => mkDataCacheBlocking:stage i
 42.1619 + => mkInstCacheBlocking:stage i
 42.1620 + => Cycle =         533
 42.1621 + => mkDataCacheBlocking:stage i
 42.1622 + => mkInstCacheBlocking:stage i
 42.1623 + => Cycle =         534
 42.1624 + => mkDataCacheBlocking:stage i
 42.1625 + => mkInstCacheBlocking:stage i
 42.1626 + => Cycle =         535
 42.1627 + => mkDataCacheBlocking:stage i
 42.1628 + => mkInstCacheBlocking:stage i
 42.1629 + => Cycle =         536
 42.1630 + => mkDataCacheBlocking:stage i
 42.1631 + => mkInstCacheBlocking:stage i
 42.1632 + => Cycle =         537
 42.1633 + => mkDataCacheBlocking:stage i
 42.1634 + => mkInstCacheBlocking:stage i
 42.1635 + => Cycle =         538
 42.1636 + => mkDataCacheBlocking:stage i
 42.1637 + => mkInstCacheBlocking:stage i
 42.1638 + => Cycle =         539
 42.1639 + => mkDataCacheBlocking:stage i
 42.1640 + => mkInstCacheBlocking:stage i
 42.1641 + => Cycle =         540
 42.1642 + => mkDataCacheBlocking:stage i
 42.1643 + => mkInstCacheBlocking:stage i
 42.1644 + => Cycle =         541
 42.1645 + => mkDataCacheBlocking:stage i
 42.1646 + => mkInstCacheBlocking:stage i
 42.1647 + => Cycle =         542
 42.1648 + => mkDataCacheBlocking:stage i
 42.1649 + => mkInstCacheBlocking:stage i
 42.1650 + => Cycle =         543
 42.1651 + => mkDataCacheBlocking:stage i
 42.1652 + => mkInstCacheBlocking:stage i
 42.1653 + => Cycle =         544
 42.1654 + => mkDataCacheBlocking:stage i
 42.1655 + => mkInstCacheBlocking:stage i
 42.1656 + => Cycle =         545
 42.1657 + => mkDataCacheBlocking:stage i
 42.1658 + => mkInstCacheBlocking:stage i
 42.1659 + => Cycle =         546
 42.1660 + => mkDataCacheBlocking:stage i
 42.1661 + => mkInstCacheBlocking:stage i
 42.1662 + => Cycle =         547
 42.1663 + => mkDataCacheBlocking:stage i
 42.1664 + => mkInstCacheBlocking:stage i
 42.1665 + => Cycle =         548
 42.1666 + => mkDataCacheBlocking:stage i
 42.1667 + => mkInstCacheBlocking:stage i
 42.1668 + => Cycle =         549
 42.1669 + => mkDataCacheBlocking:stage i
 42.1670 + => mkInstCacheBlocking:stage i
 42.1671 + => Cycle =         550
 42.1672 + => mkDataCacheBlocking:stage i
 42.1673 + => mkInstCacheBlocking:stage i
 42.1674 + => Cycle =         551
 42.1675 + => mkDataCacheBlocking:stage i
 42.1676 + => mkInstCacheBlocking:stage i
 42.1677 + => Cycle =         552
 42.1678 + => mkDataCacheBlocking:stage i
 42.1679 + => mkInstCacheBlocking:stage i
 42.1680 + => Cycle =         553
 42.1681 + => mkDataCacheBlocking:stage i
 42.1682 + => mkInstCacheBlocking:stage i
 42.1683 + => Cycle =         554
 42.1684 + => mkDataCacheBlocking:stage i
 42.1685 + => mkInstCacheBlocking:stage i
 42.1686 + => Cycle =         555
 42.1687 + => mkDataCacheBlocking:stage i
 42.1688 + => mkInstCacheBlocking:stage i
 42.1689 + => Cycle =         556
 42.1690 + => mkDataCacheBlocking:stage i
 42.1691 + => mkInstCacheBlocking:stage i
 42.1692 + => Cycle =         557
 42.1693 + => mkDataCacheBlocking:stage i
 42.1694 + => mkInstCacheBlocking:stage i
 42.1695 + => Cycle =         558
 42.1696 + => mkDataCacheBlocking:stage i
 42.1697 + => mkInstCacheBlocking:stage i
 42.1698 + => Cycle =         559
 42.1699 + => mkDataCacheBlocking:stage i
 42.1700 + => mkInstCacheBlocking:stage i
 42.1701 + => Cycle =         560
 42.1702 + => mkDataCacheBlocking:stage i
 42.1703 + => mkInstCacheBlocking:stage i
 42.1704 + => Cycle =         561
 42.1705 + => mkDataCacheBlocking:stage i
 42.1706 + => mkInstCacheBlocking:stage i
 42.1707 + => Cycle =         562
 42.1708 + => mkDataCacheBlocking:stage i
 42.1709 + => mkInstCacheBlocking:stage i
 42.1710 + => Cycle =         563
 42.1711 + => mkDataCacheBlocking:stage i
 42.1712 + => mkInstCacheBlocking:stage i
 42.1713 + => Cycle =         564
 42.1714 + => mkDataCacheBlocking:stage i
 42.1715 + => mkInstCacheBlocking:stage i
 42.1716 + => Cycle =         565
 42.1717 + => mkDataCacheBlocking:stage i
 42.1718 + => mkInstCacheBlocking:stage i
 42.1719 + => Cycle =         566
 42.1720 + => mkDataCacheBlocking:stage i
 42.1721 + => mkInstCacheBlocking:stage i
 42.1722 + => Cycle =         567
 42.1723 + => mkDataCacheBlocking:stage i
 42.1724 + => mkInstCacheBlocking:stage i
 42.1725 + => Cycle =         568
 42.1726 + => mkDataCacheBlocking:stage i
 42.1727 + => mkInstCacheBlocking:stage i
 42.1728 + => Cycle =         569
 42.1729 + => mkDataCacheBlocking:stage i
 42.1730 + => mkInstCacheBlocking:stage i
 42.1731 + => Cycle =         570
 42.1732 + => mkDataCacheBlocking:stage i
 42.1733 + => mkInstCacheBlocking:stage i
 42.1734 + => Cycle =         571
 42.1735 + => mkDataCacheBlocking:stage i
 42.1736 + => mkInstCacheBlocking:stage i
 42.1737 + => Cycle =         572
 42.1738 + => mkDataCacheBlocking:stage i
 42.1739 + => mkInstCacheBlocking:stage i
 42.1740 + => Cycle =         573
 42.1741 + => mkDataCacheBlocking:stage i
 42.1742 + => mkInstCacheBlocking:stage i
 42.1743 + => Cycle =         574
 42.1744 + => mkDataCacheBlocking:stage i
 42.1745 + => mkInstCacheBlocking:stage i
 42.1746 + => Cycle =     RLMRLMRLM: AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)main:PROCESSOR about to enter loop 0
 42.1747 +    575
 42.1748 +main: out of loop
 42.1749 +main: wait for end of file
 42.1750 + => mkDataCacheBlocking:stage i
 42.1751 + => mkInstCacheBlocking:stage i
 42.1752 + => Cycle =         576
 42.1753 + => mkDataCacheBlocking:stage i
 42.1754 + => mkInstCacheBlocking:stage i
 42.1755 + => Cycle =         577
 42.1756 + => mkDataCacheBlocking:stage i
 42.1757 + => mkInstCacheBlocking:stage i
 42.1758 + => Cycle =         578
 42.1759 + => mkDataCacheBlocking:stage i
 42.1760 + => mkInstCacheBlocking:stage i
 42.1761 + => Cycle =         579
 42.1762 + => mkDataCacheBlocking:stage i
 42.1763 + => mkInstCacheBlocking:stage i
 42.1764 + => Cycle =         580
 42.1765 + => mkDataCacheBlocking:stage i
 42.1766 + => mkInstCacheBlocking:stage i
 42.1767 + => Cycle =         581
 42.1768 + => mkDataCacheBlocking:stage i
 42.1769 + => mkInstCacheBlocking:stage i
 42.1770 + => Cycle =         582
 42.1771 + => mkDataCacheBlocking:stage i
 42.1772 + => mkInstCacheBlocking:stage i
 42.1773 + => Cycle =         583
 42.1774 + => mkDataCacheBlocking:stage i
 42.1775 + => mkInstCacheBlocking:stage i
 42.1776 + => Cycle =         584
 42.1777 + => mkDataCacheBlocking:stage i
 42.1778 + => mkInstCacheBlocking:stage i
 42.1779 + => Cycle =         585
 42.1780 + => mkDataCacheBlocking:stage i
 42.1781 + => mkInstCacheBlocking:stage i
 42.1782 + => Cycle =         586
 42.1783 + => mkDataCacheBlocking:stage i
 42.1784 + => mkInstCacheBlocking:stage i
 42.1785 + => Cycle =         587
 42.1786 + => mkDataCacheBlocking:stage i
 42.1787 + => mkInstCacheBlocking:stage i
 42.1788 + => Cycle =         588
 42.1789 + => mkDataCacheBlocking:stage i
 42.1790 + => mkInstCacheBlocking:stage i
 42.1791 + => Cycle =         589
 42.1792 + => mkDataCacheBlocking:stage i
 42.1793 + => mkInstCacheBlocking:stage i
 42.1794 + => Cycle =         590
 42.1795 + => mkDataCacheBlocking:stage i
 42.1796 + => mkInstCacheBlocking:stage i
 42.1797 + => Cycle =         591
 42.1798 + => mkDataCacheBlocking:stage i
 42.1799 + => mkInstCacheBlocking:stage i
 42.1800 + => Cycle =         592
 42.1801 + => mkDataCacheBlocking:stage i
 42.1802 + => mkInstCacheBlocking:stage i
 42.1803 + => Cycle =         593
 42.1804 + => mkDataCacheBlocking:stage i
 42.1805 + => mkInstCacheBlocking:stage i
 42.1806 + => Cycle =         594
 42.1807 + => mkDataCacheBlocking:stage i
 42.1808 + => mkInstCacheBlocking:stage i
 42.1809 + => Cycle =         595
 42.1810 + => mkDataCacheBlocking:stage i
 42.1811 + => mkInstCacheBlocking:stage i
 42.1812 + => Cycle =         596
 42.1813 + => mkDataCacheBlocking:stage i
 42.1814 + => mkInstCacheBlocking:stage i
 42.1815 + => Cycle =         597
 42.1816 + => mkDataCacheBlocking:stage i
 42.1817 + => mkInstCacheBlocking:stage i
 42.1818 + => Cycle =         598
 42.1819 + => mkDataCacheBlocking:stage i
 42.1820 + => mkInstCacheBlocking:stage i
 42.1821 + => Cycle =         599
 42.1822 + => mkDataCacheBlocking:stage i
 42.1823 + => mkInstCacheBlocking:stage i
 42.1824 + => Cycle =         600
 42.1825 + => mkDataCacheBlocking:stage i
 42.1826 + => mkInstCacheBlocking:stage i
 42.1827 + => Cycle =         601
 42.1828 + => mkDataCacheBlocking:stage i
 42.1829 + => mkInstCacheBlocking:stage i
 42.1830 + => Cycle =         602
 42.1831 + => mkDataCacheBlocking:stage i
 42.1832 + => mkInstCacheBlocking:stage i
 42.1833 + => Cycle =         603
 42.1834 + => mkDataCacheBlocking:stage i
 42.1835 + => mkInstCacheBlocking:stage i
 42.1836 + => Cycle =         604
 42.1837 + => mkDataCacheBlocking:stage i
 42.1838 + => mkInstCacheBlocking:stage i
 42.1839 + => Cycle =         605
 42.1840 + => mkDataCacheBlocking:stage i
 42.1841 + => mkInstCacheBlocking:stage i
 42.1842 + => Cycle =         606
 42.1843 + => mkDataCacheBlocking:stage i
 42.1844 + => mkInstCacheBlocking:stage i
 42.1845 + => Cycle =         607
 42.1846 + => mkDataCacheBlocking:stage i
 42.1847 + => mkInstCacheBlocking:stage i
 42.1848 + => Cycle =         608
 42.1849 + => mkDataCacheBlocking:stage i
 42.1850 + => mkInstCacheBlocking:stage i
 42.1851 + => Cycle =         609
 42.1852 + => mkDataCacheBlocking:stage i
 42.1853 + => mkInstCacheBlocking:stage i
 42.1854 + => Cycle =         610
 42.1855 + => mkDataCacheBlocking:stage i
 42.1856 + => mkInstCacheBlocking:stage i
 42.1857 + => Cycle =         611
 42.1858 + => mkDataCacheBlocking:stage i
 42.1859 + => mkInstCacheBlocking:stage i
 42.1860 + => Cycle =         612
 42.1861 + => mkDataCacheBlocking:stage i
 42.1862 + => mkInstCacheBlocking:stage i
 42.1863 + => Cycle =         613
 42.1864 + => mkDataCacheBlocking:stage i
 42.1865 + => mkInstCacheBlocking:stage i
 42.1866 + => Cycle =         614
 42.1867 + => mkDataCacheBlocking:stage i
 42.1868 + => mkInstCacheBlocking:stage i
 42.1869 + => Cycle =         615
 42.1870 + => mkDataCacheBlocking:stage i
 42.1871 + => mkInstCacheBlocking:stage i
 42.1872 + => Cycle =         616
 42.1873 + => mkDataCacheBlocking:stage i
 42.1874 + => mkInstCacheBlocking:stage i
 42.1875 + => Cycle =         617
 42.1876 + => mkDataCacheBlocking:stage i
 42.1877 + => mkInstCacheBlocking:stage i
 42.1878 + => Cycle =         618
 42.1879 + => mkDataCacheBlocking:stage i
 42.1880 + => mkInstCacheBlocking:stage i
 42.1881 + => Cycle =         619
 42.1882 + => mkDataCacheBlocking:stage i
 42.1883 + => mkInstCacheBlocking:stage i
 42.1884 + => Cycle =         620
 42.1885 + => mkDataCacheBlocking:stage i
 42.1886 + => mkInstCacheBlocking:stage i
 42.1887 + => Cycle =         621
 42.1888 + => mkDataCacheBlocking:stage i
 42.1889 + => mkInstCacheBlocking:stage i
 42.1890 + => Cycle =         622
 42.1891 + => mkDataCacheBlocking:stage i
 42.1892 + => mkInstCacheBlocking:stage i
 42.1893 + => Cycle =         623
 42.1894 + => mkDataCacheBlocking:stage i
 42.1895 + => mkInstCacheBlocking:stage i
 42.1896 + => Cycle =         624
 42.1897 + => mkDataCacheBlocking:stage i
 42.1898 + => mkInstCacheBlocking:stage i
 42.1899 + => Cycle =         625
 42.1900 + => mkDataCacheBlocking:stage i
 42.1901 + => mkInstCacheBlocking:stage i
 42.1902 + => Cycle =         626
 42.1903 + => mkDataCacheBlocking:stage i
 42.1904 + => mkInstCacheBlocking:stage i
 42.1905 + => Cycle =         627
 42.1906 + => mkDataCacheBlocking:stage i
 42.1907 + => mkInstCacheBlocking:stage i
 42.1908 + => Cycle =         628
 42.1909 + => mkDataCacheBlocking:stage i
 42.1910 + => mkInstCacheBlocking:stage i
 42.1911 + => Cycle =         629
 42.1912 + => mkDataCacheBlocking:stage i
 42.1913 + => mkInstCacheBlocking:stage i
 42.1914 + => Cycle =         630
 42.1915 + => mkDataCacheBlocking:stage i
 42.1916 + => mkInstCacheBlocking:stage i
 42.1917 + => Cycle =         631
 42.1918 + => mkDataCacheBlocking:stage i
 42.1919 + => mkInstCacheBlocking:stage i
 42.1920 + => Cycle =         632
 42.1921 + => mkDataCacheBlocking:stage i
 42.1922 + => mkInstCacheBlocking:stage i
 42.1923 + => Cycle =         633
 42.1924 + => mkDataCacheBlocking:stage i
 42.1925 + => mkInstCacheBlocking:stage i
 42.1926 + => Cycle =         634
 42.1927 + => mkDataCacheBlocking:stage i
 42.1928 + => mkInstCacheBlocking:stage i
 42.1929 + => Cycle =         635
 42.1930 + => mkDataCacheBlocking:stage i
 42.1931 + => mkInstCacheBlocking:stage i
 42.1932 + => Cycle =         636
 42.1933 + => mkDataCacheBlocking:stage i
 42.1934 + => mkInstCacheBlocking:stage i
 42.1935 + => Cycle =         637
 42.1936 + => mkDataCacheBlocking:stage i
 42.1937 + => mkInstCacheBlocking:stage i
 42.1938 + => Cycle =         638
 42.1939 + => mkDataCacheBlocking:stage i
 42.1940 + => mkInstCacheBlocking:stage i
 42.1941 + => Cycle =         639
 42.1942 + => mkDataCacheBlocking:stage i
 42.1943 + => mkInstCacheBlocking:stage i
 42.1944 + => Cycle =         640
 42.1945 + => mkDataCacheBlocking:stage i
 42.1946 + => mkInstCacheBlocking:stage i
 42.1947 + => Cycle =         641
 42.1948 + => mkDataCacheBlocking:stage i
 42.1949 + => mkInstCacheBlocking:stage i
 42.1950 + => Cycle =         642
 42.1951 + => mkDataCacheBlocking:stage i
 42.1952 + => mkInstCacheBlocking:stage i
 42.1953 + => Cycle =         643
 42.1954 + => mkDataCacheBlocking:stage i
 42.1955 + => mkInstCacheBlocking:stage i
 42.1956 + => Cycle =         644
 42.1957 + => mkDataCacheBlocking:stage i
 42.1958 + => mkInstCacheBlocking:stage i
 42.1959 + => Cycle =         645
 42.1960 + => mkDataCacheBlocking:stage i
 42.1961 + => mkInstCacheBlocking:stage i
 42.1962 + => Cycle =         646
 42.1963 + => mkDataCacheBlocking:stage i
 42.1964 + => mkInstCacheBlocking:stage i
 42.1965 + => Cycle =         647
 42.1966 + => mkDataCacheBlocking:stage i
 42.1967 + => mkInstCacheBlocking:stage i
 42.1968 + => Cycle =         648
 42.1969 + => mkDataCacheBlocking:stage i
 42.1970 + => mkInstCacheBlocking:stage i
 42.1971 + => Cycle =         649
 42.1972 + => mkDataCacheBlocking:stage i
 42.1973 + => mkInstCacheBlocking:stage i
 42.1974 + => Cycle =         650
 42.1975 + => mkDataCacheBlocking:stage i
 42.1976 + => mkInstCacheBlocking:stage i
 42.1977 + => Cycle =         651
 42.1978 + => mkDataCacheBlocking:stage i
 42.1979 + => mkInstCacheBlocking:stage i
 42.1980 + => Cycle =         652
 42.1981 + => mkDataCacheBlocking:stage i
 42.1982 + => mkInstCacheBlocking:stage i
 42.1983 + => Cycle =         653
 42.1984 + => mkDataCacheBlocking:stage i
 42.1985 + => mkInstCacheBlocking:stage i
 42.1986 + => Cycle =         654
 42.1987 + => mkDataCacheBlocking:stage i
 42.1988 + => mkInstCacheBlocking:stage i
 42.1989 + => Cycle =         655
 42.1990 + => mkDataCacheBlocking:stage i
 42.1991 + => mkInstCacheBlocking:stage i
 42.1992 + => Cycle =         656
 42.1993 + => mkDataCacheBlocking:stage i
 42.1994 + => mkInstCacheBlocking:stage i
 42.1995 + => Cycle =         657
 42.1996 + => mkDataCacheBlocking:stage i
 42.1997 + => mkInstCacheBlocking:stage i
 42.1998 + => Cycle =         658
 42.1999 + => mkDataCacheBlocking:stage i
 42.2000 + => mkInstCacheBlocking:stage i
 42.2001 + => Cycle =         659
 42.2002 + => mkDataCacheBlocking:stage i
 42.2003 + => mkInstCacheBlocking:stage i
 42.2004 + => Cycle =         660
 42.2005 + => mkDataCacheBlocking:stage i
 42.2006 + => mkInstCacheBlocking:stage i
 42.2007 + => Cycle =         661
 42.2008 + => mkDataCacheBlocking:stage i
 42.2009 + => mkInstCacheBlocking:stage i
 42.2010 + => Cycle =         662
 42.2011 + => mkDataCacheBlocking:stage i
 42.2012 + => mkInstCacheBlocking:stage i
 42.2013 + => Cycle =         663
 42.2014 + => mkDataCacheBlocking:stage i
 42.2015 + => mkInstCacheBlocking:stage i
 42.2016 + => Cycle =         664
 42.2017 + => mkDataCacheBlocking:stage i
 42.2018 + => mkInstCacheBlocking:stage i
 42.2019 + => Cycle =         665
 42.2020 + => mkDataCacheBlocking:stage i
 42.2021 + => mkInstCacheBlocking:stage i
 42.2022 + => Cycle =         666
 42.2023 + => mkDataCacheBlocking:stage i
 42.2024 + => mkInstCacheBlocking:stage i
 42.2025 + => Cycle =         667
 42.2026 + => mkDataCacheBlocking:stage i
 42.2027 + => mkInstCacheBlocking:stage i
 42.2028 + => Cycle =         668
 42.2029 + => mkDataCacheBlocking:stage i
 42.2030 + => mkInstCacheBlocking:stage i
 42.2031 +
 42.2032 +
 42.2033 +
 42.2034 +
 42.2035 +
 42.2036 +
 42.2037 +
 42.2038 +PROCESSOR FIR copies a data
 42.2039 +
 42.2040 +
 42.2041 +
 42.2042 +
 42.2043 +
 42.2044 +
 42.2045 + => Cycle =         669
 42.2046 + => mkDataCacheBlocking:stage i
 42.2047 + => mkInstCacheBlocking:stage i
 42.2048 + => Cycle =         670
 42.2049 + => mkDataCacheBlocking:stage i
 42.2050 + => mkInstCacheBlocking:stage i
 42.2051 + => Cycle =         671
 42.2052 + => mkDataCacheBlocking:stage i
 42.2053 + => mkInstCacheBlocking:stage i
 42.2054 + => Cycle =         672
 42.2055 + => mkDataCacheBlocking:stage i
 42.2056 + => mkInstCacheBlocking:stage i
 42.2057 + => Cycle =         673
 42.2058 + => mkDataCacheBlocking:stage i
 42.2059 + => mkInstCacheBlocking:stage i
 42.2060 + => Cycle =         674
 42.2061 + => mkDataCacheBlocking:stage i
 42.2062 + => mkInstCacheBlocking:stage i
 42.2063 + => Cycle =    
 42.2064 +
 42.2065 +RLMRLMRLM
 42.2066 +
 42.2067 +: SendProcessedStream called,
 42.2068 +
 42.2069 +
 42.2070 +RLMRLMRLM: Opening file for output.
 42.2071 +
 42.2072 +
 42.2073 +     675
 42.2074 + => mkDataCacheBlocking:stage i
 42.2075 + => mkInstCacheBlocking:stage i
 42.2076 + => Cycle =         676
 42.2077 + => mkDataCacheBlocking:stage i
 42.2078 + => mkInstCacheBlocking:stage i
 42.2079 + => Cycle =         677
 42.2080 + => mkDataCacheBlocking:stage i
 42.2081 + => mkInstCacheBlocking:stage i
 42.2082 + => Cycle =         678
 42.2083 + => mkDataCacheBlocking:stage i
 42.2084 + => mkInstCacheBlocking:stage i
 42.2085 + => Cycle =         679
 42.2086 + => mkDataCacheBlocking:stage i
 42.2087 + => mkInstCacheBlocking:stage i
 42.2088 + => Cycle =         680
 42.2089 + => mkDataCacheBlocking:stage i
 42.2090 + => mkInstCacheBlocking:stage i
 42.2091 + => Cycle =         681
 42.2092 + => mkDataCacheBlocking:stage i
 42.2093 + => mkInstCacheBlocking:stage i
 42.2094 + => Cycle =         682
 42.2095 + => mkDataCacheBlocking:stage i
 42.2096 + => mkInstCacheBlocking:stage i
 42.2097 + => Cycle =         683
 42.2098 + => mkDataCacheBlocking:stage i
 42.2099 + => mkInstCacheBlocking:stage i
 42.2100 + => Cycle =         684
 42.2101 + => mkDataCacheBlocking:stage i
 42.2102 + => mkInstCacheBlocking:stage i
 42.2103 + => Cycle =         685
 42.2104 + => mkDataCacheBlocking:stage i
 42.2105 + => mkInstCacheBlocking:stage i
 42.2106 + => Cycle =         686
 42.2107 + => mkDataCacheBlocking:stage i
 42.2108 + => mkInstCacheBlocking:stage i
 42.2109 + => Cycle =         687
 42.2110 + => mkDataCacheBlocking:stage i
 42.2111 + => mkInstCacheBlocking:stage i
 42.2112 + => Cycle =         688
 42.2113 + => mkDataCacheBlocking:stage i
 42.2114 + => mkInstCacheBlocking:stage i
 42.2115 + => Cycle =         689
 42.2116 + => mkDataCacheBlocking:stage i
 42.2117 + => mkInstCacheBlocking:stage i
 42.2118 + => Cycle =         690
 42.2119 + => mkDataCacheBlocking:stage i
 42.2120 + => mkInstCacheBlocking:stage i
 42.2121 + => Cycle =         691
 42.2122 + => mkDataCacheBlocking:stage i
 42.2123 + => mkInstCacheBlocking:stage i
 42.2124 + => Cycle =         692
 42.2125 + => mkDataCacheBlocking:stage i
 42.2126 + => mkInstCacheBlocking:stage i
 42.2127 + => Cycle =         693
 42.2128 + => mkDataCacheBlocking:stage i
 42.2129 + => mkInstCacheBlocking:stage i
 42.2130 + => Cycle =         694
 42.2131 + => mkDataCacheBlocking:stage i
 42.2132 + => mkInstCacheBlocking:stage i
 42.2133 + => Cycle =         695
 42.2134 + => mkDataCacheBlocking:stage i
 42.2135 + => mkInstCacheBlocking:stage i
 42.2136 + => Cycle =         696
 42.2137 + => mkDataCacheBlocking:stage i
 42.2138 + => mkInstCacheBlocking:stage i
 42.2139 + => Cycle =         697
 42.2140 + => mkDataCacheBlocking:stage i
 42.2141 + => mkInstCacheBlocking:stage i
 42.2142 + => Cycle =         698
 42.2143 + => mkDataCacheBlocking:stage i
 42.2144 + => mkInstCacheBlocking:stage i
 42.2145 + => Cycle =         699
 42.2146 + => mkDataCacheBlocking:stage i
 42.2147 + => mkInstCacheBlocking:stage i
 42.2148 + => Cycle =         700
 42.2149 + => mkDataCacheBlocking:stage i
 42.2150 + => mkInstCacheBlocking:stage i
 42.2151 + => Cycle =         701
 42.2152 + => mkDataCacheBlocking:stage i
 42.2153 + => mkInstCacheBlocking:stage i
 42.2154 + => Cycle =         702
 42.2155 + => mkDataCacheBlocking:stage i
 42.2156 + => mkInstCacheBlocking:stage i
 42.2157 + => Cycle =         703
 42.2158 + => mkDataCacheBlocking:stage i
 42.2159 + => mkInstCacheBlocking:stage i
 42.2160 + => Cycle =         704
 42.2161 + => mkDataCacheBlocking:stage i
 42.2162 + => mkInstCacheBlocking:stage i
 42.2163 + => Cycle =         705
 42.2164 + => mkDataCacheBlocking:stage i
 42.2165 + => mkInstCacheBlocking:stage i
 42.2166 + => Cycle =         706
 42.2167 + => mkDataCacheBlocking:stage i
 42.2168 + => mkInstCacheBlocking:stage i
 42.2169 + => Cycle =         707
 42.2170 + => mkDataCacheBlocking:stage i
 42.2171 + => mkInstCacheBlocking:stage i
 42.2172 + => Cycle =         708
 42.2173 + => mkDataCacheBlocking:stage i
 42.2174 + => mkInstCacheBlocking:stage i
 42.2175 + => Cycle =         709
 42.2176 + => mkDataCacheBlocking:stage i
 42.2177 + => mkInstCacheBlocking:stage i
 42.2178 + => Cycle =         710
 42.2179 + => mkDataCacheBlocking:stage i
 42.2180 + => mkInstCacheBlocking:stage i
 42.2181 + => Cycle =         711
 42.2182 + => mkDataCacheBlocking:stage i
 42.2183 + => mkInstCacheBlocking:stage i
 42.2184 + => Cycle =     EndSimulation Called
 42.2185 +    712
 42.2186 + => mkDamain: lastt data out
 42.2187 +taCacheBlocking:stage i
 42.2188 + => mkInstCacheBlocking:stage i
 42.2189 + => Cycle =         713
 42.2190 + => mkDataCacheBlocking:stage i
 42.2191 + => mkInstCacheBlocking:stage i
 42.2192 +WAV format: 10002
 42.2193 + => Cycle =         714
 42.2194 + => mkDataCacheBlocking:stage i
 42.2195 + => mkInstCacheBlocking:stage i
 42.2196 + => Cycle =       EndSimulation done
 42.2197 +  715
 42.2198 + => mkDataCacheBlocking:stage i
 42.2199 + => mkInstCacheBlocking:stage i
 42.2200 + => Cycle =         716
 42.2201 + => mkDataCacheBlocking:stage i
 42.2202 + => mkInstCacheBlocking:stage i
 42.2203 + => Cycle =         717
 42.2204 + => mkDataCacheBlocking:stage i
 42.2205 + => mkInstCacheBlocking:stage i
 42.2206 + => Cycle =         718
 42.2207 + => mkDataCacheBlocking:stage i
 42.2208 + => mkInstCacheBlocking:stage i
 42.2209 + => Cycle =         719
 42.2210 + => mkDataCacheBlocking:stage i
 42.2211 + => mkInstCacheBlocking:stage i
 42.2212 + => Cycle =         720
 42.2213 + => mkDataCacheBlocking:stage i
 42.2214 + => mkInstCacheBlocking:stage i
 42.2215 + => Cycle =         721
 42.2216 + => mkDataCacheBlocking:stage i
 42.2217 + => mkInstCacheBlocking:stage i
 42.2218 + => Cycle =         722
 42.2219 + => mkDataCacheBlocking:stage i
 42.2220 + => mkInstCacheBlocking:stage i
 42.2221 + => Cycle =         723
 42.2222 + => mkDataCacheBlocking:stage i
 42.2223 + => mkInstCacheBlocking:stage i
 42.2224 + => Cycle =         724
 42.2225 + => mkDataCacheBlocking:stage i
 42.2226 + => mkInstCacheBlocking:stage i
 42.2227 + => Cycle =         725
 42.2228 + => mkDataCacheBlocking:stage i
 42.2229 + => mkInstCacheBlocking:stage i
 42.2230 + => Cycle =         726
 42.2231 + => mkDataCacheBlocking:stage i
 42.2232 + => mkInstCacheBlocking:stage i
 42.2233 + => Cycle =         727
 42.2234 + => mkDataCacheBlocking:stage i
 42.2235 + => mkInstCacheBlocking:stage i
 42.2236 + => Cycle =         728
 42.2237 + => mkDataCacheBlocking:stage i
 42.2238 + => mkInstCacheBlocking:stage i
 42.2239 + => Cycle =         729
 42.2240 + => mkDataCacheBlocking:stage i
 42.2241 + => mkInstCacheBlocking:stage i
 42.2242 + => Cycle =         730
 42.2243 + => mkDataCacheBlocking:stage i
 42.2244 + => mkInstCacheBlocking:stage i
 42.2245 + => Cycle =         731
 42.2246 + => mkDataCacheBlocking:stage i
 42.2247 + => mkInstCacheBlocking:stage i
 42.2248 + => Cycle =         732
 42.2249 + => mkDataCacheBlocking:stage i
 42.2250 + => mkInstCacheBlocking:stage i
 42.2251 + => Cycle =         733
 42.2252 + => mkDataCacheBlocking:stage i
 42.2253 + => mkInstCacheBlocking:stage i
 42.2254 + => Cycle =         734
 42.2255 + => mkDataCacheBlocking:stage i
 42.2256 + => mkInstCacheBlocking:stage i
 42.2257 + => Cycle =         735
 42.2258 + => mkDataCacheBlocking:stage i
 42.2259 + => mkInstCacheBlocking:stage i
 42.2260 + => Cycle =         736
 42.2261 + => mkDataCacheBlocking:stage i
 42.2262 + => mkInstCacheBlocking:stage i
 42.2263 + => Cycle =         737
 42.2264 + => mkDataCacheBlocking:stage i
 42.2265 + => mkInstCacheBlocking:stage i
 42.2266 + => Cycle =         738
 42.2267 + => mkDataCacheBlocking:stage i
 42.2268 + => mkInstCacheBlocking:stage i
 42.2269 + => Cycle =         739
 42.2270 + => mkDataCacheBlocking:stage i
 42.2271 + => mkInstCacheBlocking:stage i
 42.2272 + => Cycle =         740
 42.2273 + => mkDataCacheBlocking:stage i
 42.2274 + => mkInstCacheBlocking:stage i
 42.2275 + => Cycle =         741
 42.2276 + => mkDataCacheBlocking:stage i
 42.2277 + => mkInstCacheBlocking:stage i
 42.2278 + => Cycle =         742
 42.2279 + => mkDataCacheBlocking:stage i
 42.2280 + => mkInstCacheBlocking:stage i
 42.2281 + => Cycle =         743
 42.2282 + => mkDataCacheBlocking:stage i
 42.2283 + => mkInstCacheBlocking:stage i
 42.2284 + => Cycle =         744
 42.2285 + => mkDataCacheBlocking:stage i
 42.2286 + => mkInstCacheBlocking:stage i
 42.2287 + => Cycle =         745
 42.2288 + => mkDataCacheBlocking:stage i
 42.2289 + => mkInstCacheBlocking:stage i
 42.2290 + => Cycle =         746
 42.2291 + => mkDataCacheBlocking:stage i
 42.2292 + => mkInstCacheBlocking:stage i
 42.2293 + => Cycle =         747
 42.2294 + => mkDataCacheBlocking:stage i
 42.2295 + => mkInstCacheBlocking:stage i
 42.2296 + => Cycle =         748
 42.2297 + => mkDataCacheBlocking:stage i
 42.2298 + => mkInstCacheBlocking:stage i
 42.2299 + => Cycle =         749
 42.2300 + => mkDataCacheBlocking:stage i
 42.2301 + => mkInstCacheBlocking:stage i
 42.2302 + => Cycle =         750
 42.2303 + => mkDataCacheBlocking:stage i
 42.2304 + => mkInstCacheBlocking:stage i
 42.2305 + => Cycle =         751
 42.2306 + => mkDataCacheBlocking:stage i
 42.2307 + => mkInstCacheBlocking:stage i
 42.2308 + => Cycle =         752
 42.2309 + => mkDataCacheBlocking:stage i
 42.2310 + => mkInstCacheBlocking:stage i
 42.2311 + => Cycle =         753
 42.2312 + => mkDataCacheBlocking:stage i
 42.2313 + => mkInstCacheBlocking:stage i
 42.2314 + => Cycle =         754
 42.2315 + => mkDataCacheBlocking:stage i
 42.2316 + => mkInstCacheBlocking:stage i
 42.2317 + => Cycle =         755
 42.2318 + => mkDataCacheBlocking:stage i
 42.2319 + => mkInstCacheBlocking:stage i
 42.2320 + => Cycle =         756
 42.2321 + => mkDataCacheBlocking:stage i
 42.2322 + => mkInstCacheBlocking:stage i
 42.2323 + => Cycle =         757
 42.2324 + => mkDataCacheBlocking:stage i
 42.2325 + => mkInstCacheBlocking:stage i
 42.2326 + => Cycle =         758
 42.2327 + => mkDataCacheBlocking:stage i
 42.2328 + => mkInstCacheBlocking:stage i
 42.2329 + => Cycle =         759
 42.2330 + => mkDataCacheBlocking:stage i
 42.2331 + => mkInstCacheBlocking:stage i
 42.2332 + => Cycle =         760
 42.2333 + => mkDataCacheBlocking:stage i
 42.2334 + => mkInstCacheBlocking:stage i
 42.2335 + => Cycle =         761
 42.2336 + => mkDataCacheBlocking:stage i
 42.2337 + => mkInstCacheBlocking:stage i
 42.2338 + => Cycle =         762
 42.2339 + => mkDataCacheBlocking:stage i
 42.2340 + => mkInstCacheBlocking:stage i
 42.2341 + => Cycle =         763
 42.2342 + => mkDataCacheBlocking:stage i
 42.2343 + => mkInstCacheBlocking:stage i
 42.2344 + => Cycle =         764
 42.2345 + => mkDataCacheBlocking:stage i
 42.2346 + => mkInstCacheBlocking:stage i
 42.2347 + => Cycle =         765
 42.2348 + => mkDataCacheBlocking:stage i
 42.2349 + => mkInstCacheBlocking:stage i
 42.2350 + => Cycle =         766
 42.2351 + => mkDataCacheBlocking:stage i
 42.2352 + => mkInstCacheBlocking:stage i
 42.2353 + => Cycle =         767
 42.2354 + => mkDataCacheBlocking:stage i
 42.2355 + => mkInstCacheBlocking:stage i
 42.2356 + => Cycle =         768
 42.2357 + => mkDataCacheBlocking:stage i
 42.2358 + => mkInstCacheBlocking:stage i
 42.2359 + => Cycle =         769
 42.2360 + => mkDataCacheBlocking:stage i
 42.2361 + => mkInstCacheBlocking:stage i
 42.2362 + => Cycle =         770
 42.2363 + => mkDataCacheBlocking:stage i
 42.2364 + => mkInstCacheBlocking:stage i
 42.2365 + => Cycle =         771
 42.2366 + => mkDataCacheBlocking:stage i
 42.2367 + => mkInstCacheBlocking:stage i
 42.2368 + => Cycle =         772
 42.2369 + => mkDataCacheBlocking:stage i
 42.2370 + => mkInstCacheBlocking:stage i
 42.2371 + => Cycle =         773
 42.2372 + => mkDataCacheBlocking:stage i
 42.2373 + => mkInstCacheBlocking:stage i
 42.2374 + => Cycle =         774
 42.2375 + => mkDataCacheBlocking:stage i
 42.2376 + => mkInstCacheBlocking:stage i
 42.2377 + => Cycle =         775
 42.2378 + => mkDataCacheBlocking:stage i
 42.2379 + => mkInstCacheBlocking:stage i
 42.2380 + => Cycle =         776
 42.2381 + => mkDataCacheBlocking:stage i
 42.2382 + => mkInstCacheBlocking:stage i
 42.2383 + => Cycle =         777
 42.2384 + => mkDataCacheBlocking:stage i
 42.2385 + => mkInstCacheBlocking:stage i
 42.2386 + => Cycle =         778
 42.2387 + => mkDataCacheBlocking:stage i
 42.2388 + => mkInstCacheBlocking:stage i
 42.2389 + => Cycle =         779
 42.2390 + => mkDataCacheBlocking:stage i
 42.2391 + => mkInstCacheBlocking:stage i
 42.2392 + => Cycle =         780
 42.2393 + => mkDataCacheBlocking:stage i
 42.2394 + => mkInstCacheBlocking:stage i
 42.2395 + => Cycle =         781
 42.2396 + => mkDataCacheBlocking:stage i
 42.2397 + => mkInstCacheBlocking:stage i
 42.2398 + => Cycle =         782
 42.2399 + => mkDataCacheBlocking:stage i
 42.2400 + => mkInstCacheBlocking:stage i
 42.2401 + => Cycle =         783
 42.2402 + => mkDataCacheBlocking:stage i
 42.2403 + => mkInstCacheBlocking:stage i
 42.2404 + => Cycle =         784
 42.2405 + => mkDataCacheBlocking:stage i
 42.2406 + => mkInstCacheBlocking:stage i
 42.2407 + => Cycle =         785
 42.2408 + => mkDataCacheBlocking:stage i
 42.2409 + => mkInstCacheBlocking:stage i
 42.2410 + => Cycle =         786
 42.2411 + => mkDataCacheBlocking:stage i
 42.2412 + => mkInstCacheBlocking:stage i
 42.2413 + => Cycle =         787
 42.2414 + => mkDataCacheBlocking:stage i
 42.2415 + => mkInstCacheBlocking:stage i
 42.2416 + => Cycle =         788
 42.2417 + => mkDataCacheBlocking:stage i
 42.2418 + => mkInstCacheBlocking:stage i
 42.2419 + => Cycle =         789
 42.2420 + => mkDataCacheBlocking:stage i
 42.2421 + => mkInstCacheBlocking:stage i
 42.2422 + => Cycle =         790
 42.2423 + => mkDataCacheBlocking:stage i
 42.2424 + => mkInstCacheBlocking:stage i
 42.2425 + => Cycle =         791
 42.2426 + => mkDataCacheBlocking:stage i
 42.2427 + => mkInstCacheBlocking:stage i
 42.2428 + => Cycle =         792
 42.2429 + => mkDataCacheBlocking:stage i
 42.2430 + => mkInstCacheBlocking:stage i
 42.2431 + => Cycle =         793
 42.2432 + => mkDataCacheBlocking:stage i
 42.2433 + => mkInstCacheBlocking:stage i
 42.2434 + => Cycle =         794
 42.2435 + => mkDataCacheBlocking:stage i
 42.2436 + => mkInstCacheBlocking:stage i
 42.2437 + => Cycle =         795
 42.2438 + => mkDataCacheBlocking:stage i
 42.2439 + => mkInstCacheBlocking:stage i
 42.2440 + => Cycle =         796
 42.2441 + => mkDataCacheBlocking:stage i
 42.2442 + => mkInstCacheBlocking:stage i
 42.2443 + => Cycle =         797
 42.2444 + => mkDataCacheBlocking:stage i
 42.2445 + => mkInstCacheBlocking:stage i
 42.2446 + => Cycle =         798
 42.2447 + => mkDataCacheBlocking:stage i
 42.2448 + => mkInstCacheBlocking:stage i
 42.2449 + => Cycle =         799
 42.2450 + => mkDataCacheBlocking:stage i
 42.2451 + => mkInstCacheBlocking:stage i
 42.2452 + => Cycle =         800
 42.2453 + => mkDataCacheBlocking:stage i
 42.2454 + => mkInstCacheBlocking:stage i
 42.2455 + => Cycle =         801
 42.2456 + => mkDataCacheBlocking:stage i
 42.2457 + => mkInstCacheBlocking:stage i
 42.2458 + => Cycle =         802
 42.2459 + => mkDataCacheBlocking:stage i
 42.2460 + => mkInstCacheBlocking:stage i
 42.2461 +g++: DFT.cpp: No such file or directory
 42.2462 +g++: SndfileWavUtil.cpp: No such file or directory
 42.2463 +checker.cpp:7:28: error: SndfileWavUtil.h: No such file or directory
 42.2464 +checker.cpp: In function ‘int main(int, char**)’:
 42.2465 +checker.cpp:84: error: ‘generate_pcm’ was not declared in this scope
 42.2466 +checker.cpp:245: error: ‘generate_wav’ was not declared in this scope
 42.2467 +make: *** [all] Error 1
 42.2468 +Can't exec "./checker/checker": No such file or directory at /afs/csail.mit.edu/u/r/rlm/pygar-workspace/build/default/audio_core_exe/bm/null.wav/run line 483, <CONFIG> line 21.
 42.2469 + => Cycle =         803
 42.2470 + => mkDataCacheBlocking:stage i
 42.2471 + => mkInstCacheBlocking:stage i
 42.2472 + => Cycle =         804
 42.2473 + => mkDataCacheBlocking:stage i
 42.2474 + => mkInstCacheBlocking:stage i
 42.2475 + => Cycle =         805
 42.2476 + => mkDataCacheBlocking:stage i
 42.2477 + => mkInstCacheBlocking:stage i
 42.2478 + => Cycle =         806
 42.2479 + => mkDataCacheBlocking:stage i
 42.2480 + => mkInstCacheBlocking:stage i
 42.2481 + => Cycle =         807
 42.2482 + => mkDataCacheBlocking:stage i
 42.2483 + => mkInstCacheBlocking:stage i
 42.2484 + => Cycle =         808
 42.2485 + => mkDataCacheBlocking:stage i
 42.2486 + => mkInstCacheBlocking:stage i
 42.2487 + => Cycle =         809
 42.2488 + => mkDataCacheBlocking:stage i
 42.2489 + => mkInstCacheBlocking:stage i
 42.2490 + => Cycle =         810
 42.2491 + => mkDataCacheBlocking:stage i
 42.2492 + => mkInstCacheBlocking:stage i
 42.2493 + => Cycle =         811
 42.2494 + => mkDataCacheBlocking:stage i
 42.2495 + => mkInstCacheBlocking:stage i
 42.2496 + => Cycle =         812
 42.2497 + => mkDataCacheBlocking:stage i
 42.2498 + => mkInstCacheBlocking:stage i
 42.2499 + => Cycle =         813
 42.2500 + => mkDataCacheBlocking:stage i
 42.2501 + => mkInstCacheBlocking:stage i
 42.2502 + => Cycle =         814
 42.2503 + => mkDataCacheBlocking:stage i
 42.2504 + => mkInstCacheBlocking:stage i
 42.2505 + => Cycle =         815
 42.2506 + => mkDataCacheBlocking:stage i
 42.2507 + => mkInstCacheBlocking:stage i
 42.2508 + => Cycle =         816
 42.2509 + => mkDataCacheBlocking:stage i
 42.2510 + => mkInstCacheBlocking:stage i
 42.2511 + => Cycle =         817
 42.2512 + => mkDataCacheBlocking:stage i
 42.2513 + => mkInstCacheBlocking:stage i
 42.2514 + => Cycle =         818
 42.2515 + => mkDataCacheBlocking:stage i
 42.2516 + => mkInstCacheBlocking:stage i
 42.2517 + => Cycle =         819
 42.2518 + => mkDataCacheBlocking:stage i
 42.2519 + => mkInstCacheBlocking:stage i
 42.2520 + => Cycle =         820
 42.2521 + => mkDataCacheBlocking:stage i
 42.2522 + => mkInstCacheBlocking:stage i
 42.2523 + => Cycle =         821
 42.2524 + => mkDataCacheBlocking:stage i
 42.2525 + => mkInstCacheBlocking:stage i
 42.2526 + => Cycle =         822
 42.2527 + => mkDataCacheBlocking:stage i
 42.2528 + => mkInstCacheBlocking:stage i
 42.2529 + => Cycle =         823
 42.2530 + => mkDataCacheBlocking:stage i
 42.2531 + => mkInstCacheBlocking:stage i
 42.2532 + => Cycle =         824
 42.2533 + => mkDataCacheBlocking:stage i
 42.2534 + => mkInstCacheBlocking:stage i
 42.2535 + => Cycle =         825
 42.2536 + => mkDataCacheBlocking:stage i
 42.2537 + => mkInstCacheBlocking:stage i
 42.2538 + => Cycle =         826
 42.2539 + => mkDataCacheBlocking:stage i
 42.2540 + => mkInstCacheBlocking:stage i
 42.2541 + => Cycle =         827
 42.2542 + => mkDataCacheBlocking:stage i
 42.2543 + => mkInstCacheBlocking:stage i
 42.2544 + => Cycle =         828
 42.2545 + => mkDataCacheBlocking:stage i
 42.2546 + => mkInstCacheBlocking:stage i
 42.2547 + => Cycle =         829
 42.2548 + => mkDataCacheBlocking:stage i
 42.2549 + => mkInstCacheBlocking:stage i
 42.2550 + => Cycle =         830
 42.2551 + => mkDataCacheBlocking:stage i
 42.2552 + => mkInstCacheBlocking:stage i
 42.2553 + => Cycle =         831
 42.2554 + => mkDataCacheBlocking:stage i
 42.2555 + => mkInstCacheBlocking:stage i
 42.2556 + => Cycle =         832
 42.2557 + => mkDataCacheBlocking:stage i
 42.2558 + => mkInstCacheBlocking:stage i
 42.2559 + => Cycle =         833
 42.2560 + => mkDataCacheBlocking:stage i
 42.2561 + => mkInstCacheBlocking:stage i
 42.2562 + => Cycle =         834
 42.2563 + => mkDataCacheBlocking:stage i
 42.2564 + => mkInstCacheBlocking:stage i
 42.2565 + => Cycle =         835
 42.2566 + => mkDataCacheBlocking:stage i
 42.2567 + => mkInstCacheBlocking:stage i
 42.2568 + => Cycle =         836
 42.2569 + => mkDataCacheBlocking:stage i
 42.2570 + => mkInstCacheBlocking:stage i
 42.2571 + => Cycle =         837
 42.2572 + => mkDataCacheBlocking:stage i
 42.2573 + => mkInstCacheBlocking:stage i
 42.2574 + => Cycle =         838
 42.2575 + => mkDataCacheBlocking:stage i
 42.2576 + => mkInstCacheBlocking:stage i
 42.2577 + => Cycle =         839
 42.2578 + => mkDataCacheBlocking:stage i
 42.2579 + => mkInstCacheBlocking:stage i
 42.2580 + => Cycle =         840
 42.2581 + => mkDataCacheBlocking:stage i
 42.2582 + => mkInstCacheBlocking:stage i
 42.2583 + => Cycle =         841
 42.2584 + => mkDataCacheBlocking:stage i
 42.2585 + => mkInstCacheBlocking:stage i
 42.2586 + => Cycle =         842
 42.2587 + => mkDataCacheBlocking:stage i
 42.2588 + => mkInstCacheBlocking:stage i
 42.2589 + => Cycle =         843
 42.2590 + => mkDataCacheBlocking:stage i
 42.2591 + => mkInstCacheBlocking:stage i
 42.2592 + => Cycle =         844
 42.2593 + => mkDataCacheBlocking:stage i
 42.2594 + => mkInstCacheBlocking:stage i
 42.2595 + => Cycle =         845
 42.2596 + => mkDataCacheBlocking:stage i
 42.2597 + => mkInstCacheBlocking:stage i
 42.2598 + => Cycle =         846
 42.2599 + => mkDataCacheBlocking:stage i
 42.2600 + => mkInstCacheBlocking:stage i
 42.2601 + => Cycle =         847
 42.2602 + => mkDataCacheBlocking:stage i
 42.2603 + => mkInstCacheBlocking:stage i
 42.2604 + => Cycle =         848
 42.2605 + => mkDataCacheBlocking:stage i
 42.2606 + => mkInstCacheBlocking:stage i
 42.2607 + => Cycle =         849
 42.2608 + => mkDataCacheBlocking:stage i
 42.2609 + => mkInstCacheBlocking:stage i
 42.2610 + => Cycle =         850
 42.2611 + => mkDataCacheBlocking:stage i
 42.2612 + => mkInstgenerate wav done
 42.2613 +CacheBlocking:stage i
 42.2614 +
 42.2615 +
 42.2616 +RLMRLMRLM:  AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()
 42.2617 + => Cycle =         851
 42.2618 + => mkDataCacheBlocki
 42.2619 +ng:stage i
 42.2620 + => mkIn
 42.2621 +
 42.2622 +RLMRLMRLM: AUDIOCORERRR_SERVER_CLASS::Cleanup() 
 42.2623 +
 42.2624 +stCacheBlocking:stage i
 42.2625 + => Cycle =         852
 42.2626 + => mkDataCacheBlocking:stage i
 42.2627 + => mkInstCacheBlocking:stage i
 42.2628 + => Cycle =         853
 42.2629 + => mkDataCacheBlocking:stage i
 42.2630 + => mkInstCacheBlocking:stage i
 42.2631 + => Cycle =         854
 42.2632 + => mkDataCacheBlocking:stage i
 42.2633 + => mkInstCacheBlocking:stage i
 42.2634 + => Cycle =         855
 42.2635 + => mkDataCacheBlocking:stage i
 42.2636 + => mkInstCacheBlocking:stage i
 42.2637 + => Cycle =         856
 42.2638 + => mkDataCacheBlocking:stage i
 42.2639 + => mkInstCacheBlocking:stage i
 42.2640 + => Cycle =         857
 42.2641 + => mkDataCacheBlocking:stage i
 42.2642 + => mkInstCacheBlocking:stage i
 42.2643 + => Cycle =         858
 42.2644 + => mkDataCacheBlocking:stage i
 42.2645 + => mkInstCacheBlocking:stage i
 42.2646 +about to call compare_wavs_freq
 42.2647 +*** Output comparison failed ***
 42.2648 +hasim-configure exiting with errors
 42.2649 +
 42.2650 +*******DONE******
 42.2651 \ No newline at end of file
    43.1 --- a/modules/bluespec/Pygar/lab1/FIRFilter.bsv	Wed Apr 28 00:40:15 2010 -0400
    43.2 +++ b/modules/bluespec/Pygar/lab1/FIRFilter.bsv	Wed Apr 28 08:19:09 2010 -0400
    43.3 @@ -10,7 +10,7 @@
    43.4  
    43.5    // for now, we don't do anything.
    43.6    rule connectReqResp;
    43.7 -    $display("FIR copies a data");
    43.8 +    $display("\n\n\n\n\nFIRFILTER-FIR copies a data\n\n\n\n");
    43.9      outfifo.enq(infifo.first);
   43.10      outfifo.deq;
   43.11    endrule
    44.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    44.2 +++ b/scripts/bsv-trace.pl	Wed Apr 28 08:19:09 2010 -0400
    44.3 @@ -0,0 +1,129 @@
    44.4 +#!/usr/bin/perl -w
    44.5 +#==========================================================================
    44.6 +# bsc-trace.pl
    44.7 +#
    44.8 +# Author : Christopher Batten (cbatten@mit.edu)
    44.9 +# Date   : April 12, 2005
   44.10 +#
   44.11 +(our $usageMsg = <<'ENDMSG') =~ s/^\#//gm;
   44.12 +#
   44.13 +# Simple script which converts bsv "one-per-line" trace output into
   44.14 +# a more compact and readable column format.
   44.15 +#
   44.16 +ENDMSG
   44.17 +
   44.18 +use strict "vars";
   44.19 +use warnings;
   44.20 +no  warnings("once");
   44.21 +use Getopt::Long;
   44.22 +use File::Basename;
   44.23 +
   44.24 +#--------------------------------------------------------------------------
   44.25 +# Command line processing
   44.26 +#--------------------------------------------------------------------------
   44.27 +
   44.28 +our %opts;
   44.29 +
   44.30 +sub usage()
   44.31 +{
   44.32 +
   44.33 +  print "\n";
   44.34 +  print " Usage: bsc-trace.pl <format-file> [trace-file]\n";
   44.35 +  print "\n";
   44.36 +  print " Options:\n";
   44.37 +  print "  --help        print this message\n";
   44.38 +  print "  <format-str>  format string\n";
   44.39 +  print "  [trace-file]  output trace from BSV simulation (default is STDIN)\n";
   44.40 +  print "$usageMsg";
   44.41 +
   44.42 +  exit();
   44.43 +}
   44.44 +
   44.45 +sub processCommandLine()
   44.46 +{
   44.47 +
   44.48 +  $opts{"help"}        = 0;
   44.49 +
   44.50 +  Getopt::Long::GetOptions( \%opts, 'help|?' ) or usage();
   44.51 +
   44.52 +  ($opts{"format"}     = shift(@ARGV)) or usage();
   44.53 +  ($opts{"trace-file"} = shift(@ARGV)) or ($opts{"trace-file"} = "-");
   44.54 +  $opts{"help"} and usage();
   44.55 +
   44.56 +}
   44.57 +
   44.58 +#--------------------------------------------------------------------------
   44.59 +# Main
   44.60 +#--------------------------------------------------------------------------
   44.61 +
   44.62 +sub main()
   44.63 +{
   44.64 +
   44.65 +  processCommandLine();
   44.66 +  require $opts{"format"};
   44.67 +
   44.68 +  my $cycle = 0;
   44.69 +  my %traceHash;
   44.70 +
   44.71 +  my $traceFile = $opts{"trace-file"};
   44.72 +  open( FIN, "<$traceFile" ) or die("Could not open BSV trace file ($traceFile)!");
   44.73 +
   44.74 +  print  "           processor-state [     icache            ]  [     dcache            ]  [    mem-arb   ]  executed-instruction\n";
   44.75 +
   44.76 +  my $labelLine = $settings::labelString;
   44.77 +  foreach my $tag ( keys %settings::headers){
   44.78 +      my $theLabel = $settings::headers{$tag};      
   44.79 +      $labelLine =~ s/{$tag}/$theLabel/;
   44.80 +  }
   44.81 +  print "            $labelLine\n";
   44.82 +  
   44.83 +  while ( my $line = <FIN> ) {
   44.84 +  
   44.85 +    if ( $line =~ /^ => Cycle =\s+(\d+)$/ ) {
   44.86 +
   44.87 +      my $tempTraceLine = $settings::traceString;
   44.88 +      foreach my $tag ( keys %settings::fields ) {
   44.89 +
   44.90 +        my $theTraceString = $traceHash{$tag};
   44.91 +        my $theEmptyString = $settings::fields{$tag};
   44.92 +
   44.93 +        # Substitute the trace field in ...
   44.94 +        if ( defined($theTraceString) ) {
   44.95 +
   44.96 +          # If the trace string is shorter than the empty string then
   44.97 +          # add some spaces at the end so things line up ...
   44.98 +          my $theTraceStringLen = length($theTraceString);
   44.99 +          my $theEmptyStringLen = length($theEmptyString);
  44.100 +          if ( $theTraceStringLen < $theEmptyStringLen ) {
  44.101 +            $theTraceString .= (" "x ($theEmptyStringLen-$theTraceStringLen));
  44.102 +          }
  44.103 +
  44.104 +          $tempTraceLine =~ s/{$tag}/$theTraceString/;
  44.105 +
  44.106 +        }
  44.107 +
  44.108 +        # Substitute the empty field in ...
  44.109 +        else {
  44.110 +          $tempTraceLine =~ s/{$tag}/$theEmptyString/;
  44.111 +        }
  44.112 +
  44.113 +      }
  44.114 +
  44.115 +      print " CYC: ".sprintf("%4d",$cycle)."  $tempTraceLine\n";
  44.116 +
  44.117 +      $cycle = $1;
  44.118 +      %traceHash = ();
  44.119 +    }
  44.120 +    elsif ( $line =~ /^ => (\S+) (.*)$/ ) {
  44.121 +      $traceHash{$1} = $2;
  44.122 +    }
  44.123 +    else {
  44.124 +      print $line;
  44.125 +    }
  44.126 +
  44.127 +  }
  44.128 +  close( FIN );
  44.129 +  
  44.130 +}
  44.131 +
  44.132 +main();
    45.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    45.2 +++ b/scripts/proc-trace.cfg	Wed Apr 28 08:19:09 2010 -0400
    45.3 @@ -0,0 +1,99 @@
    45.4 +#=========================================================================
    45.5 +# Trace-bsv.pl Config File
    45.6 +#
    45.7 +
    45.8 +package settings;
    45.9 +
   45.10 +#--------------------------------------------------------------------
   45.11 +# Trace Tags
   45.12 +#--------------------------------------------------------------------
   45.13 +
   45.14 +$base = "mkCoreTH_wrapper.coreTH";
   45.15 +
   45.16 +# This should be a hash of tags to what should be displayed if the 
   45.17 +# tag is not present on a given cycle. The tags correspond to the
   45.18 +# trace tags used in the BSV source code.
   45.19 +
   45.20 +%fields =
   45.21 +(
   45.22 +
   45.23 +  "mkProc:pc"                    => "        ",
   45.24 +  "mkProc:pcgen"                 => " ",
   45.25 +  "mkProc:exec"                  => " ",
   45.26 +  "mkProc:writeback"             => " ",
   45.27 +  "mkProc:exInstFull"            => "                     ",
   45.28 +
   45.29 +  "mkInstCacheBlocking:reqTiny"  => "    ",
   45.30 +  "mkInstCacheBlocking:respTiny" => "    ",
   45.31 +  "mkInstCacheBlocking:stage"    => "    ",
   45.32 +  "mkInstCacheBlocking:hitMiss"  => " ",
   45.33 +
   45.34 +  "mkDataCacheBlocking:reqTiny"  => "    ",
   45.35 +  "mkDataCacheBlocking:respTiny" => "    ",
   45.36 +  "mkDataCacheBlocking:stage"    => "    ",
   45.37 +  "mkDataCacheBlocking:hitMiss"  => " ",
   45.38 +
   45.39 +  "mkMemArb:req0"                => "    ",
   45.40 +  "mkMemArb:req1"                => "    ",
   45.41 +  "mkMemArb:resp"                => "    ",
   45.42 +
   45.43 +);
   45.44 +
   45.45 +%headers =
   45.46 +(
   45.47 +
   45.48 +  "mkProc:pc"                    => "pc      ",
   45.49 +  "mkProc:pcgen"                 => "stage",
   45.50 +  "mkProc:exec"                  => "",
   45.51 +  "mkProc:writeback"             => "",
   45.52 +  "mkProc:exInstFull"            => "exInst ",
   45.53 +
   45.54 +  "mkInstCacheBlocking:reqTiny"  => "req",
   45.55 +  "mkInstCacheBlocking:respTiny" => "resp",
   45.56 +  "mkInstCacheBlocking:stage"    => "stage",
   45.57 +  "mkInstCacheBlocking:hitMiss"  => "hit/miss",
   45.58 +
   45.59 +  "mkDataCacheBlocking:reqTiny"  => "req",
   45.60 +  "mkDataCacheBlocking:respTiny" => "resp",
   45.61 +  "mkDataCacheBlocking:stage"    => "stage",
   45.62 +  "mkDataCacheBlocking:hitMiss"  => "hit/miss",
   45.63 +
   45.64 +  "mkMemArb:req0"                => "req0",
   45.65 +  "mkMemArb:req1"                => "req1",
   45.66 +  "mkMemArb:resp"                => "req2",
   45.67 +
   45.68 +);
   45.69 +
   45.70 +
   45.71 +#--------------------------------------------------------------------
   45.72 +# Trace String
   45.73 +#--------------------------------------------------------------------
   45.74 +
   45.75 +# For the processor we display the PC and what stage we are in.
   45.76 +
   45.77 +$proc   = "pc={mkProc:pc} [{mkProc:pcgen}|{mkProc:exec}|{mkProc:writeback}]";
   45.78 +$procl  = "{mkProc:pc} [{mkProc:pcgen}{mkProc:exec}{mkProc:writeback}]";
   45.79 +
   45.80 +# For the caches we display the current request and response,
   45.81 +# the current cache stage, whether or not the access is a hit or a miss.
   45.82 +
   45.83 +$icache = "[{mkInstCacheBlocking:reqTiny}|{mkInstCacheBlocking:respTiny}|".
   45.84 +           "{mkInstCacheBlocking:stage}|{mkInstCacheBlocking:hitMiss}]";
   45.85 +
   45.86 +$dcache = "[{mkDataCacheBlocking:reqTiny}|{mkDataCacheBlocking:respTiny}|".
   45.87 +           "{mkDataCacheBlocking:stage}|{mkDataCacheBlocking:hitMiss}]";
   45.88 +
   45.89 +# For the memory arbiter we display the two requests from the 
   45.90 +# instruction and data caches and the response (which might be 
   45.91 +# going to either cache)
   45.92 +
   45.93 +$marb   = "[{mkMemArb:req0}|{mkMemArb:req1}|{mkMemArb:resp}]";
   45.94 +
   45.95 +# The trace string is used by bsv-trace.pl to for one line trace 
   45.96 +# output. Basically the current value for a given tag is substituted
   45.97 +# into the trace string every cycle. If the tag is not present then
   45.98 +# the empty field is used form the %fields hash.
   45.99 +
  45.100 +$traceString = "$proc  $icache  $dcache  $marb  {mkProc:exInstFull} ";
  45.101 +$labelString = "$procl $icache  $dcache  $marb  {mkProc:exInstFull} ";
  45.102 +
    46.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    46.2 +++ b/scripts/run-freq.bmark	Wed Apr 28 08:19:09 2010 -0400
    46.3 @@ -0,0 +1,528 @@
    46.4 +#!/usr/bin/env perl
    46.5 +# -*- perl -*-
    46.6 +
    46.7 +use strict;
    46.8 +use warnings;
    46.9 +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through);
   46.10 +use IO::Pty;
   46.11 +
   46.12 +#
   46.13 +# Turn on warnings
   46.14 +#
   46.15 +$^W = 1;
   46.16 +
   46.17 +##
   46.18 +## Benchmark run script
   46.19 +##
   46.20 +
   46.21 +sub ExecModel($);
   46.22 +sub Exec($$);
   46.23 +sub CompareOutput();
   46.24 +sub ReadConfig($$);
   46.25 +
   46.26 +
   46.27 +#############################################################################
   46.28 +#############################################################################
   46.29 +##
   46.30 +## Start by figuring out the model location and type.
   46.31 +##
   46.32 +#############################################################################
   46.33 +#############################################################################
   46.34 +
   46.35 +my %config;
   46.36 +
   46.37 +ReadConfig("config/env.sh", 1);
   46.38 +ReadConfig("$config{modelDir}/config/env.sh", 1);
   46.39 +ReadConfig("$config{modelDir}/config/signature.sh", 0);
   46.40 +
   46.41 +##
   46.42 +## Pseudo-enumeration of possible model types
   46.43 +##
   46.44 +my $MODEL_NONE = 0;
   46.45 +my $MODEL_FPGA = 1;                     # Model runs on FPGA hardware
   46.46 +my $MODEL_BLUESIM = 2;                  # Bluesim
   46.47 +my $MODEL_VSIM = 3;                     # Verilog simulator
   46.48 +
   46.49 +my $mType = $MODEL_NONE;
   46.50 +
   46.51 +
   46.52 +#############################################################################
   46.53 +#############################################################################
   46.54 +##
   46.55 +## Process command line arguments
   46.56 +##
   46.57 +#############################################################################
   46.58 +#############################################################################
   46.59 +
   46.60 +my $help = 0;
   46.61 +my $onlyCompare = 0;
   46.62 +my $noCompare = 0;
   46.63 +my $forceLoad = 0;
   46.64 +my $gdb = 0;
   46.65 +my $noProgram = 0;
   46.66 +my $noReserve = 0;
   46.67 +my $funcpPrefix = "";
   46.68 +my $funcpSuffix = "";
   46.69 +my $noshowfp = 0;
   46.70 +my $printCycle = undef;
   46.71 +my $showfp = undef;
   46.72 +my $bluesimCmd = undef;
   46.73 +my $vcdStart = undef;
   46.74 +my $vcdCycles = 20000;
   46.75 +my $m5run = 0;
   46.76 +
   46.77 +my $status = GetOptions("help!" => \$help,
   46.78 +                        "gdb!" => \$gdb,
   46.79 +                        "noprogram!" => \$noProgram,
   46.80 +                        "noreserve!" => \$noReserve,
   46.81 +                        "force-load!" => \$forceLoad,
   46.82 +                        "funcp-prefix=s" => \$funcpPrefix,
   46.83 +                        "funcp-suffix=s" => \$funcpSuffix,
   46.84 +                        "noshowfp!" => \$noshowfp,
   46.85 +                        "onlycompare!" => \$onlyCompare,
   46.86 +                        "nocompare!" => \$noCompare,
   46.87 +                        "pc=s" => \$printCycle,
   46.88 +                        "showfp:s" => \$showfp,
   46.89 +                        "bluesim=s" => \$bluesimCmd,
   46.90 +                        "vcdstart=i" => \$vcdStart,
   46.91 +                        "vcdcycles=i" => \$vcdCycles,
   46.92 +                        "m5!" => \$m5run,
   46.93 +                       );
   46.94 +
   46.95 +# Put quotation marks back on arguments that have spaces since they will be
   46.96 +# passed through a shell once more.
   46.97 +foreach my $i ( 0 .. $#ARGV ) {
   46.98 +    if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) {
   46.99 +        $ARGV[$i] = '"' . $ARGV[$i] . '"';
  46.100 +    }
  46.101 +}
  46.102 +
  46.103 +if ($onlyCompare != 0) {
  46.104 +    exit(CompareOutput());
  46.105 +}
  46.106 +
  46.107 +if ($m5run != 0) {
  46.108 +    $mType = $MODEL_NONE;
  46.109 +}
  46.110 +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") {
  46.111 +    $mType = $MODEL_FPGA;
  46.112 +}
  46.113 +elsif (-f "$config{modelDir}/$config{model}_hw.exe") {
  46.114 +    $mType = $MODEL_BLUESIM;
  46.115 +}
  46.116 +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") {
  46.117 +    $mType = $MODEL_VSIM;
  46.118 +}
  46.119 +else {
  46.120 +    die("Can't determine model type");
  46.121 +}
  46.122 +
  46.123 +if ($help || ! $status) {
  46.124 +    print STDERR "\nArguments:\n";
  46.125 +    print STDERR "   [--gdb]                 Invokes the software side in gdb\n";
  46.126 +    print STDERR "   [--noprogram]           Skips the FPGA load and reservation steps\n";
  46.127 +    print STDERR "   [--noreserve]           Skips the FPGA reservation steps\n";
  46.128 +    print STDERR "   [--funcp-prefix=\"<prefix>\"]\n";
  46.129 +    print STDERR "                           Prepend prefix to HAsim's --funcp argument\n";
  46.130 +    print STDERR "   [--funcp-suffix=\"<suffix>\"]\n";
  46.131 +    print STDERR "                           Append suffix to HAsim's --funcp argument\n";
  46.132 +    print STDERR "   [--onlycompare]         Only compare output files (without running)\n";
  46.133 +    print STDERR "   [--nocompare]           Skip comparison of output files\n";
  46.134 +    print STDERR "   [--m5]                  Run workload in m5 without HAsim\n";
  46.135 +
  46.136 +    if ($mType == $MODEL_FPGA) {
  46.137 +        print STDERR "   [--force-load]          Load a bitfile to the FPGA even if it has errors\n";
  46.138 +    }
  46.139 +
  46.140 +    if ($mType == $MODEL_BLUESIM) {
  46.141 +        print STDERR "   [--vcdstart=<cycle>]    Generate VCD dump for wave viewer (e.g. gtkwave)\n";
  46.142 +        print STDERR "   [--vcdcycles=<cycles>]  VCD dump length (default = 20000)\n";
  46.143 +    }
  46.144 +
  46.145 +    if ($config{isHybridModel}) {
  46.146 +        my $cmd = "$config{modelDir}/$config{model} --help-run-append";
  46.147 +        system($cmd);
  46.148 +    }
  46.149 +
  46.150 +    exit(1);
  46.151 +}
  46.152 +
  46.153 +#############################################################################
  46.154 +#############################################################################
  46.155 +##
  46.156 +## Adjust model arguments
  46.157 +##
  46.158 +#############################################################################
  46.159 +#############################################################################
  46.160 +
  46.161 +# Show front panel?
  46.162 +if ($noshowfp) {
  46.163 +    $showfp = 'none';
  46.164 +}
  46.165 +elsif (defined($showfp)) {
  46.166 +    # Specified on the run command line
  46.167 +    $showfp = 'gui' if ($showfp eq '');
  46.168 +}
  46.169 +elsif ($config{feeder} eq 'none') {
  46.170 +    # For null feeder default to showing LEDs on stdout
  46.171 +    $showfp = 'stdout';
  46.172 +}
  46.173 +else {
  46.174 +    # Other models have heartbeats
  46.175 +    $showfp = 'none';
  46.176 +}
  46.177 +
  46.178 +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}";
  46.179 +
  46.180 +if ($config{feeder} eq 'm5') {
  46.181 +    # Tell m5 to be quiet and not to enable the remote gdb port.  Under netbatch
  46.182 +    # it appears there are sometimes attempts to connect to the port, which
  46.183 +    # stops simulation.
  46.184 +    $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}";
  46.185 +}
  46.186 +
  46.187 +my $cmd;
  46.188 +
  46.189 +if ($m5run == 0) {
  46.190 +    # Normal run
  46.191 +    $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --showfp=${showfp} --funcp=\"${feedFlags}\" $config{genFlags}";
  46.192 +    foreach my $c (@ARGV) {
  46.193 +        $cmd .= " $c";
  46.194 +    }
  46.195 +
  46.196 +    if (defined($printCycle)) {
  46.197 +        $cmd .= " --pc=${printCycle}";
  46.198 +    }
  46.199 +}
  46.200 +else {
  46.201 +    if ($config{feeder} ne 'm5') {
  46.202 +        die("This workload does not use m5");
  46.203 +    }
  46.204 +
  46.205 +    # Running inside m5 without HAsim
  46.206 +    my $m5cmd;
  46.207 +    if (exists($ENV{M5BIN})) {
  46.208 +        $m5cmd = $ENV{M5BIN};
  46.209 +    }
  46.210 +    else {
  46.211 +        my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt");
  46.212 +        $m5cmd = `awb-resolver ${m5bin}`;
  46.213 +        chomp($m5cmd);
  46.214 +        die("Failed to find $m5bin") if ($m5cmd eq '');
  46.215 +    }
  46.216 +
  46.217 +    $cmd = "${m5cmd} ${feedFlags}";
  46.218 +
  46.219 +    # Drop --hasim-sim
  46.220 +    $cmd =~ s/--hasim-sim //;
  46.221 +    # Drop escaping of quotes
  46.222 +    $cmd =~ s/\\"/"/g;
  46.223 +
  46.224 +    $noProgram = 1;
  46.225 +}
  46.226 +
  46.227 +#
  46.228 +# Bluesim arguments
  46.229 +#
  46.230 +
  46.231 +# Generate dump.vcd for wave viewer (e.g. gtkwave)?
  46.232 +if (defined($vcdStart)) {
  46.233 +    my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop";
  46.234 +    if ($vcdStart > 0) {
  46.235 +        $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}";
  46.236 +    }
  46.237 +
  46.238 +    if (defined($bluesimCmd)) {
  46.239 +        $bluesimCmd .= " ";
  46.240 +    }
  46.241 +    else {
  46.242 +        $bluesimCmd = "";
  46.243 +    }
  46.244 +    $bluesimCmd .= "-c \"$vcdCmd\"";
  46.245 +}
  46.246 +
  46.247 +if (defined($bluesimCmd)) {
  46.248 +    $cmd .= " --bluesim=\'$bluesimCmd\'";
  46.249 +}
  46.250 +
  46.251 +# Adjust the arguments for Bluesim if it is being invoked directly
  46.252 +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) {
  46.253 +    $cmd =~ s/\s--/ +--/g;
  46.254 +
  46.255 +    # Bluesim may expect to load a program from a well known file
  46.256 +    unlink('program.vmh');
  46.257 +    link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh');
  46.258 +}
  46.259 +
  46.260 +
  46.261 +#############################################################################
  46.262 +#############################################################################
  46.263 +##
  46.264 +## Load the FPGA and run the model
  46.265 +##
  46.266 +#############################################################################
  46.267 +#############################################################################
  46.268 +
  46.269 +#
  46.270 +# Move old stats file so we are sure statistics come from this run
  46.271 +#
  46.272 +if (-f "$config{workload}.stats") {
  46.273 +    rename("$config{workload}.stats", "$config{workload}.stats.old");
  46.274 +}
  46.275 +
  46.276 +if ($mType == $MODEL_FPGA) {
  46.277 +    if (! defined($printCycle)) {
  46.278 +        # User didn't specify a cycle printing interval.  Pick one more reasonable
  46.279 +        # for HW.
  46.280 +        #$cmd .= " --pc=10000000";
  46.281 +    }
  46.282 +
  46.283 +    # Load FPGA
  46.284 +    $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit";
  46.285 +
  46.286 +    if (! $noProgram) {
  46.287 +        if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") {
  46.288 +            print STDERR "FPGA bit file has errors:\n\n";
  46.289 +            system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr");
  46.290 +            print STDERR "\nUse --force-load to ignore the error.\n";
  46.291 +            exit(1);
  46.292 +        }
  46.293 +
  46.294 +        if (! $noReserve) {
  46.295 +            Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA");
  46.296 +        }
  46.297 +
  46.298 +        # Does a download script exist to program the FPGA?
  46.299 +        my $needProgram = (-f "$config{modelDir}/config/$config{model}.download");
  46.300 +
  46.301 +        $needProgram = 1;
  46.302 +
  46.303 +        # Is the FPGA already programmed with the correct bit file?
  46.304 +        if (exists($config{signature})) {
  46.305 +            my $curSignature = `hasim-fpga-ctrl --getsignature`;
  46.306 +            chomp($curSignature);
  46.307 +            if ($curSignature eq $config{signature}) {
  46.308 +                print "FPGA is already programmed (signature match)...\n";
  46.309 +                #$needProgram = 0;
  46.310 +            }
  46.311 +        }
  46.312 +
  46.313 +        if ($needProgram) {
  46.314 +            Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode");
  46.315 +
  46.316 +            my $dir = `pwd`;
  46.317 +            chomp($dir);
  46.318 +            Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA");
  46.319 +
  46.320 +            if (exists($config{signature})) {
  46.321 +                Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature");
  46.322 +            }
  46.323 +        }
  46.324 +
  46.325 +        Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver");
  46.326 +    }
  46.327 +}
  46.328 +
  46.329 +# Run the software side or a hardware simulator
  46.330 +my $run_status = 0;
  46.331 +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) {
  46.332 +    $run_status = ExecModel($cmd);
  46.333 +}
  46.334 +
  46.335 +# Create a stats file for null workloads to make regression.launcher happy (HACK)
  46.336 +if ( $config{workload} eq "null" ) {
  46.337 +  system("touch null.stats");
  46.338 +}
  46.339 +
  46.340 +if (-f "hasim_events.out") {
  46.341 +    system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out");
  46.342 +}
  46.343 +if (-f "$config{workload}.stats") {
  46.344 +    system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats");
  46.345 +}
  46.346 +
  46.347 +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  46.348 +    Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation");
  46.349 +}
  46.350 +
  46.351 +if ($run_status != 0) {
  46.352 +    exit($run_status);
  46.353 +}
  46.354 +else {
  46.355 +    exit(CompareOutput());
  46.356 +}
  46.357 +
  46.358 +
  46.359 +sub ErrorExit($) {
  46.360 +    my $msg = shift;
  46.361 +
  46.362 +    print STDERR "${msg}\n";
  46.363 +
  46.364 +    if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  46.365 +        system("hasim-fpga-ctrl --drop-reservation");
  46.366 +    }
  46.367 +
  46.368 +    exit(1);
  46.369 +}
  46.370 +
  46.371 +
  46.372 +##
  46.373 +## ExecModel --
  46.374 +##   This is the routine that actually invokes the model.  stdout and stderr
  46.375 +##   are logged in a file.  The return value is the exit status of the model.
  46.376 +##
  46.377 +sub ExecModel($) {
  46.378 +    my $cmd = shift;
  46.379 +
  46.380 +    if ($gdb) {
  46.381 +        ## gdb needs stdin.  Just use system() and don't do logging.
  46.382 +        system("gdb -args " . $cmd);
  46.383 +        return 0;
  46.384 +    }
  46.385 +
  46.386 +    ##
  46.387 +    ## Invoke the model, but log its output both to stdout and to a file.
  46.388 +    ## Use a pty so the invoked program will use line buffering instead
  46.389 +    ## of fully buffered writes.  (Libc sets up stdout line buffered when
  46.390 +    ## it thinks it is writing to a terminal.  It uses fully buffered
  46.391 +    ## writing to a pipe.)
  46.392 +    ##
  46.393 +
  46.394 +    my $pty = new IO::Pty;
  46.395 +    my $slave = $pty->slave();
  46.396 +
  46.397 +    my $pid = fork();
  46.398 +    die "Couldn't fork: $!" unless defined $pid;
  46.399 +
  46.400 +    if (! $pid) {
  46.401 +        # Child process is the monitoring process
  46.402 +        $pty->make_slave_controlling_terminal();
  46.403 +
  46.404 +        my $output = "$config{workload}.$config{ISA}.out";  
  46.405 +        if(exists($config{silent})) {
  46.406 +	    $output = "/dev/null";
  46.407 +	}
  46.408 +
  46.409 +        if (! open(LOG, ">$output")) {
  46.410 +            print STDERR "Error opening log file $output\n";
  46.411 +        }
  46.412 +
  46.413 +        # Unbuffered I/O loop
  46.414 +        while (1) {
  46.415 +            my $buf;
  46.416 +            my $n = sysread($slave, $buf, 4096);
  46.417 +
  46.418 +            last if ($n == 0);
  46.419 +
  46.420 +            syswrite(STDOUT, $buf);
  46.421 +            syswrite(LOG, $buf);
  46.422 +        }
  46.423 +
  46.424 +        close(LOG);
  46.425 +        exit(0);
  46.426 +    }
  46.427 +
  46.428 +    # Bind new PTY to STDOUT (but save old STDOUT)
  46.429 +    $pty->close_slave();
  46.430 +    open(my $oldOut, ">&", STDOUT) or die $!;
  46.431 +    open(STDOUT, ">&", $pty) or die $!;
  46.432 +
  46.433 +    # Run model
  46.434 +    my $result = system("${cmd} 2>&1");
  46.435 +
  46.436 +    # Send ^d to end child logging thread
  46.437 +    print "\cD";
  46.438 +
  46.439 +    # Return to normal STDOUT
  46.440 +    close(STDOUT);
  46.441 +    open(STDOUT, ">&", $oldOut) or die $!;
  46.442 +    close($oldOut);
  46.443 +
  46.444 +    # Compute exit status of model
  46.445 +    my $status = 0;
  46.446 +    if ($result == -1) {
  46.447 +        print STDERR "Model execution failed\n";
  46.448 +        $status = 1;
  46.449 +    }
  46.450 +    elsif ($result & 127) {
  46.451 +        print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n";
  46.452 +        $status = 1;
  46.453 +    }
  46.454 +    elsif (($result >> 8) != 0) {
  46.455 +        $status = $result >> 8;
  46.456 +        print "Model exited with status $status\n";
  46.457 +    }
  46.458 +
  46.459 +    return $status;
  46.460 +}
  46.461 +
  46.462 +
  46.463 +sub Exec($$) {
  46.464 +    my $cmd = shift;
  46.465 +    my $errmsg = shift;
  46.466 +
  46.467 +    system($cmd);
  46.468 +    if ($? == -1) {
  46.469 +        ErrorExit("Failed to execute $cmd: $!");
  46.470 +    }
  46.471 +    elsif ($? & 127) {
  46.472 +        ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump");
  46.473 +    }
  46.474 +    elsif (($? >> 8) != 0) {
  46.475 +        ErrorExit("${errmsg}");
  46.476 +    }
  46.477 +}
  46.478 +
  46.479 +
  46.480 +sub CompareOutput() {
  46.481 +    return 0 if ($noCompare != 0);
  46.482 +    return 0 if (! exists($config{compare}) || ($config{compare} eq ''));
  46.483 +
  46.484 +    # run the checker 
  46.485 +    `cd ./checker/ && make clean && make`;
  46.486 +    `./checker/checker input.wav out_gold.wav`;
  46.487 +    print "about to call compare_wavs_freq\n";
  46.488 +    my $out=`./checker/compare_wavs/compare_wavs_freq 1 out_gold.wav out_hw.wav`;
  46.489 +   
  46.490 +    if ($out !~ /fail/) {
  46.491 +        print "*** Output comparison passed ***\n";
  46.492 +        system("touch $config{workload}.stats");
  46.493 +        return 0;
  46.494 +    }
  46.495 +    else {
  46.496 +        print "*** Output comparison failed ***\n";
  46.497 +        return 1;
  46.498 +    }
  46.499 +}
  46.500 +
  46.501 +
  46.502 +#
  46.503 +# Read the configuration file
  46.504 +#
  46.505 +sub ReadConfig($$) {
  46.506 +    my $conf = shift;
  46.507 +    my $required = shift;
  46.508 +
  46.509 +    my $status = open(CONFIG, "< $conf");
  46.510 +    if (! $status) {
  46.511 +        return if (! $required);
  46.512 +        die("Failed to open $conf");
  46.513 +    }
  46.514 +
  46.515 +    while (<CONFIG>) {
  46.516 +        chomp;
  46.517 +        my $t = $_;
  46.518 +        $t =~ s/#.*//;
  46.519 +        if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) {
  46.520 +            my $c = $1;
  46.521 +            my $v = $2;
  46.522 +            $v =~ s/^["'](.*)["']$/$1/;         # Drop quotation marks
  46.523 +            $config{$c} = $v;
  46.524 +        }
  46.525 +        elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) {
  46.526 +            my $c = $1;
  46.527 +            my $v = $2;
  46.528 +            $config{$c} = $v;
  46.529 +        }
  46.530 +    }
  46.531 +}
    47.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    47.2 +++ b/scripts/run-null.bmark	Wed Apr 28 08:19:09 2010 -0400
    47.3 @@ -0,0 +1,492 @@
    47.4 +#!/usr/bin/env perl
    47.5 +# -*- perl -*-
    47.6 +
    47.7 +use strict;
    47.8 +use warnings;
    47.9 +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through);
   47.10 +use IO::Pty;
   47.11 +
   47.12 +#
   47.13 +# Turn on warnings
   47.14 +#
   47.15 +$^W = 1;
   47.16 +
   47.17 +##
   47.18 +## Benchmark run script
   47.19 +##
   47.20 +
   47.21 +sub ExecModel($);
   47.22 +sub Exec($$);
   47.23 +sub CompareOutput();
   47.24 +sub ReadConfig($$);
   47.25 +
   47.26 +
   47.27 +#############################################################################
   47.28 +#############################################################################
   47.29 +##
   47.30 +## Start by figuring out the model location and type.
   47.31 +##
   47.32 +#############################################################################
   47.33 +#############################################################################
   47.34 +
   47.35 +my %config;
   47.36 +
   47.37 +ReadConfig("config/env.sh", 1);
   47.38 +ReadConfig("$config{modelDir}/config/env.sh", 1);
   47.39 +ReadConfig("$config{modelDir}/config/signature.sh", 0);
   47.40 +
   47.41 +##
   47.42 +## Pseudo-enumeration of possible model types
   47.43 +##
   47.44 +my $MODEL_NONE = 0;
   47.45 +my $MODEL_FPGA = 1;                     # Model runs on FPGA hardware
   47.46 +my $MODEL_BLUESIM = 2;                  # Bluesim
   47.47 +my $MODEL_VSIM = 3;                     # Verilog simulator
   47.48 +
   47.49 +my $mType = $MODEL_NONE;
   47.50 +
   47.51 +
   47.52 +#############################################################################
   47.53 +#############################################################################
   47.54 +##
   47.55 +## Process command line arguments
   47.56 +##
   47.57 +#############################################################################
   47.58 +#############################################################################
   47.59 +
   47.60 +my $help = 0;
   47.61 +my $onlyCompare = 0;
   47.62 +my $noCompare = 0;
   47.63 +my $forceLoad = 0;
   47.64 +my $gdb = 0;
   47.65 +my $noProgram = 0;
   47.66 +my $noReserve = 0;
   47.67 +my $funcpPrefix = "";
   47.68 +my $funcpSuffix = "";
   47.69 +my $printCycle = undef;
   47.70 +my $bluesimCmd = undef;
   47.71 +my $vcdStart = undef;
   47.72 +my $vcdCycles = 20000;
   47.73 +my $m5run = 0;
   47.74 +
   47.75 +my $status = GetOptions("help!" => \$help,
   47.76 +                        "gdb!" => \$gdb,
   47.77 +                        "noprogram!" => \$noProgram,
   47.78 +                        "noreserve!" => \$noReserve,
   47.79 +                        "force-load!" => \$forceLoad,
   47.80 +                        "funcp-prefix=s" => \$funcpPrefix,
   47.81 +                        "funcp-suffix=s" => \$funcpSuffix,
   47.82 +                        "onlycompare!" => \$onlyCompare,
   47.83 +                        "nocompare!" => \$noCompare,
   47.84 +                        "pc=s" => \$printCycle,
   47.85 +                        "bluesim=s" => \$bluesimCmd,
   47.86 +                        "vcdstart=i" => \$vcdStart,
   47.87 +                        "vcdcycles=i" => \$vcdCycles,
   47.88 +                        "m5!" => \$m5run,
   47.89 +                       );
   47.90 +
   47.91 +# Put quotation marks back on arguments that have spaces since they will be
   47.92 +# passed through a shell once more.
   47.93 +foreach my $i ( 0 .. $#ARGV ) {
   47.94 +    if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) {
   47.95 +        $ARGV[$i] = '"' . $ARGV[$i] . '"';
   47.96 +    }
   47.97 +}
   47.98 +
   47.99 +if ($onlyCompare != 0) {
  47.100 +    exit(CompareOutput());
  47.101 +}
  47.102 +
  47.103 +if ($m5run != 0) {
  47.104 +    $mType = $MODEL_NONE;
  47.105 +}
  47.106 +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") {
  47.107 +    $mType = $MODEL_FPGA;
  47.108 +}
  47.109 +elsif (-f "$config{modelDir}/$config{model}_hw.exe") {
  47.110 +    $mType = $MODEL_BLUESIM;
  47.111 +}
  47.112 +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") {
  47.113 +    $mType = $MODEL_VSIM;
  47.114 +}
  47.115 +else {
  47.116 +    die("Can't determine model type");
  47.117 +}
  47.118 +
  47.119 +if ($help || ! $status) {
  47.120 +    print STDERR "\nArguments:\n";
  47.121 +    print STDERR "   [--gdb]                 Invokes the software side in gdb\n";
  47.122 +    print STDERR "   [--noprogram]           Skips the FPGA load and reservation steps\n";
  47.123 +    print STDERR "   [--noreserve]           Skips the FPGA reservation steps\n";
  47.124 +    print STDERR "   [--funcp-prefix=\"<prefix>\"]\n";
  47.125 +    print STDERR "                           Prepend prefix to HAsim's --funcp argument\n";
  47.126 +    print STDERR "   [--funcp-suffix=\"<suffix>\"]\n";
  47.127 +    print STDERR "                           Append suffix to HAsim's --funcp argument\n";
  47.128 +    print STDERR "   [--onlycompare]         Only compare output files (without running)\n";
  47.129 +    print STDERR "   [--nocompare]           Skip comparison of output files\n";
  47.130 +    print STDERR "   [--m5]                  Run workload in m5 without HAsim\n";
  47.131 +
  47.132 +    if ($mType == $MODEL_FPGA) {
  47.133 +        print STDERR "   [--force-load]          Load a bitfile to the FPGA even if it has errors\n";
  47.134 +    }
  47.135 +
  47.136 +    if ($mType == $MODEL_BLUESIM) {
  47.137 +        print STDERR "   [--vcdstart=<cycle>]    Generate VCD dump for wave viewer (e.g. gtkwave)\n";
  47.138 +        print STDERR "   [--vcdcycles=<cycles>]  VCD dump length (default = 20000)\n";
  47.139 +    }
  47.140 +
  47.141 +    if ($config{isHybridModel}) {
  47.142 +        my $cmd = "$config{modelDir}/$config{model} --help-run-append";
  47.143 +        system($cmd);
  47.144 +    }
  47.145 +
  47.146 +    exit(1);
  47.147 +}
  47.148 +
  47.149 +#############################################################################
  47.150 +#############################################################################
  47.151 +##
  47.152 +## Adjust model arguments
  47.153 +##
  47.154 +#############################################################################
  47.155 +#############################################################################
  47.156 +
  47.157 +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}";
  47.158 +
  47.159 +if ($config{feeder} eq 'm5') {
  47.160 +    # Tell m5 to be quiet and not to enable the remote gdb port.  Under netbatch
  47.161 +    # it appears there are sometimes attempts to connect to the port, which
  47.162 +    # stops simulation.
  47.163 +    $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}";
  47.164 +}
  47.165 +
  47.166 +my $cmd;
  47.167 +
  47.168 +if ($m5run == 0) {
  47.169 +    # Normal run
  47.170 +    $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --funcp=\"${feedFlags}\" $config{genFlags}";
  47.171 +    foreach my $c (@ARGV) {
  47.172 +        $cmd .= " $c";
  47.173 +    }
  47.174 +
  47.175 +    if (defined($printCycle)) {
  47.176 +        $cmd .= " --pc=${printCycle}";
  47.177 +    }
  47.178 +}
  47.179 +else {
  47.180 +    if ($config{feeder} ne 'm5') {
  47.181 +        die("This workload does not use m5");
  47.182 +    }
  47.183 +
  47.184 +    # Running inside m5 without HAsim
  47.185 +    my $m5cmd;
  47.186 +    if (exists($ENV{M5BIN})) {
  47.187 +        $m5cmd = $ENV{M5BIN};
  47.188 +    }
  47.189 +    else {
  47.190 +        my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt");
  47.191 +        $m5cmd = `awb-resolver ${m5bin}`;
  47.192 +        chomp($m5cmd);
  47.193 +        die("Failed to find $m5bin") if ($m5cmd eq '');
  47.194 +    }
  47.195 +
  47.196 +    $cmd = "${m5cmd} ${feedFlags}";
  47.197 +
  47.198 +    # Drop --hasim-sim
  47.199 +    $cmd =~ s/--hasim-sim //;
  47.200 +    # Drop escaping of quotes
  47.201 +    $cmd =~ s/\\"/"/g;
  47.202 +
  47.203 +    $noProgram = 1;
  47.204 +}
  47.205 +
  47.206 +#
  47.207 +# Bluesim arguments
  47.208 +#
  47.209 +
  47.210 +# Generate dump.vcd for wave viewer (e.g. gtkwave)?
  47.211 +if (defined($vcdStart)) {
  47.212 +    my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop";
  47.213 +    if ($vcdStart > 0) {
  47.214 +        $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}";
  47.215 +    }
  47.216 +
  47.217 +    if (defined($bluesimCmd)) {
  47.218 +        $bluesimCmd .= " ";
  47.219 +    }
  47.220 +    else {
  47.221 +        $bluesimCmd = "";
  47.222 +    }
  47.223 +    $bluesimCmd .= "-c \"$vcdCmd\"";
  47.224 +}
  47.225 +
  47.226 +if (defined($bluesimCmd)) {
  47.227 +    $cmd .= " --bluesim=\'$bluesimCmd\'";
  47.228 +}
  47.229 +
  47.230 +# Adjust the arguments for Bluesim if it is being invoked directly
  47.231 +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) {
  47.232 +    $cmd =~ s/\s--/ +--/g;
  47.233 +
  47.234 +    # Bluesim may expect to load a program from a well known file
  47.235 +    unlink('program.vmh');
  47.236 +    link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh');
  47.237 +}
  47.238 +
  47.239 +
  47.240 +#############################################################################
  47.241 +#############################################################################
  47.242 +##
  47.243 +## Load the FPGA and run the model
  47.244 +##
  47.245 +#############################################################################
  47.246 +#############################################################################
  47.247 +
  47.248 +#
  47.249 +# Move old stats file so we are sure statistics come from this run
  47.250 +#
  47.251 +if (-f "$config{workload}.stats") {
  47.252 +    rename("$config{workload}.stats", "$config{workload}.stats.old");
  47.253 +}
  47.254 +
  47.255 +if ($mType == $MODEL_FPGA) {
  47.256 +    if (! defined($printCycle)) {
  47.257 +        # User didn't specify a cycle printing interval.  Pick one more reasonable
  47.258 +        # for HW.
  47.259 +        #$cmd .= " --pc=10000000";
  47.260 +    }
  47.261 +
  47.262 +    # Load FPGA
  47.263 +    $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit";
  47.264 +
  47.265 +    if (! $noProgram) {
  47.266 +        if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") {
  47.267 +            print STDERR "FPGA bit file has errors:\n\n";
  47.268 +            system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr");
  47.269 +            print STDERR "\nUse --force-load to ignore the error.\n";
  47.270 +            exit(1);
  47.271 +        }
  47.272 +
  47.273 +        if (! $noReserve) {
  47.274 +            Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA");
  47.275 +        }
  47.276 +
  47.277 +        # Does a download script exist to program the FPGA?
  47.278 +        my $needProgram = (-f "$config{modelDir}/config/$config{model}.download"); 
  47.279 +
  47.280 +        $needProgram = 1;
  47.281 +
  47.282 +        # Is the FPGA already programmed with the correct bit file?
  47.283 +        if (exists($config{signature})) {
  47.284 +            my $curSignature = `hasim-fpga-ctrl --getsignature`;
  47.285 +            chomp($curSignature);
  47.286 +            if ($curSignature eq $config{signature}) {
  47.287 +                print "FPGA is already programmed (signature match)...\n";
  47.288 +                #$needProgram = 0;
  47.289 +            }
  47.290 +        }
  47.291 +
  47.292 +        if ($needProgram) {
  47.293 +            Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode");
  47.294 +
  47.295 +            my $dir = `pwd`;
  47.296 +            chomp($dir);
  47.297 +            Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA");
  47.298 +
  47.299 +            if (exists($config{signature})) {
  47.300 +                Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature");
  47.301 +            }
  47.302 +        }
  47.303 +
  47.304 +        Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver");
  47.305 +    }
  47.306 +}
  47.307 +
  47.308 +# Run the software side or a hardware simulator
  47.309 +my $run_status = 0;
  47.310 +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) {
  47.311 +    $run_status = ExecModel($cmd);
  47.312 +}
  47.313 +
  47.314 +# Create a stats file for null workloads to make regression.launcher happy (HACK)
  47.315 +if ( $config{workload} eq "null" ) {
  47.316 +  system("touch null.stats");
  47.317 +}
  47.318 +
  47.319 +if (-f "hasim_events.out") {
  47.320 +    system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out");
  47.321 +}
  47.322 +if (-f "$config{workload}.stats") {
  47.323 +    system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats");
  47.324 +}
  47.325 +
  47.326 +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  47.327 +    Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation");
  47.328 +}
  47.329 +
  47.330 +if ($run_status != 0) {
  47.331 +    exit($run_status);
  47.332 +}
  47.333 +else {
  47.334 +    exit(CompareOutput());
  47.335 +}
  47.336 +
  47.337 +
  47.338 +sub ErrorExit($) {
  47.339 +    my $msg = shift;
  47.340 +
  47.341 +    print STDERR "${msg}\n";
  47.342 +
  47.343 +    if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  47.344 +        system("hasim-fpga-ctrl --drop-reservation");
  47.345 +    }
  47.346 +
  47.347 +    exit(1);
  47.348 +}
  47.349 +
  47.350 +
  47.351 +##
  47.352 +## ExecModel --
  47.353 +##   This is the routine that actually invokes the model.  stdout and stderr
  47.354 +##   are logged in a file.  The return value is the exit status of the model.
  47.355 +##
  47.356 +sub ExecModel($) {
  47.357 +    my $cmd = shift;
  47.358 +
  47.359 +    if ($gdb) {
  47.360 +        ## gdb needs stdin.  Just use system() and don't do logging.
  47.361 +        system("gdb -args " . $cmd);
  47.362 +        return 0;
  47.363 +    }
  47.364 +
  47.365 +    ##
  47.366 +    ## Invoke the model, but log its output both to stdout and to a file.
  47.367 +    ## Use a pty so the invoked program will use line buffering instead
  47.368 +    ## of fully buffered writes.  (Libc sets up stdout line buffered when
  47.369 +    ## it thinks it is writing to a terminal.  It uses fully buffered
  47.370 +    ## writing to a pipe.)
  47.371 +    ##
  47.372 +
  47.373 +    my $pty = new IO::Pty;
  47.374 +    my $slave = $pty->slave();
  47.375 +
  47.376 +    my $pid = fork();
  47.377 +    die "Couldn't fork: $!" unless defined $pid;
  47.378 +
  47.379 +    if (! $pid) {
  47.380 +        # Child process is the monitoring process
  47.381 +        $pty->make_slave_controlling_terminal();
  47.382 +
  47.383 +        my $output = "$config{workload}.$config{ISA}.out";  
  47.384 +        if(exists($config{silent})) {
  47.385 +	    $output = "/dev/null";
  47.386 +	}
  47.387 +
  47.388 +        if (! open(LOG, ">$output")) {
  47.389 +            print STDERR "Error opening log file $output\n";
  47.390 +        }
  47.391 +
  47.392 +        # Unbuffered I/O loop
  47.393 +        while (1) {
  47.394 +            my $buf;
  47.395 +            my $n = sysread($slave, $buf, 4096);
  47.396 +
  47.397 +            last if ($n == 0);
  47.398 +
  47.399 +            syswrite(STDOUT, $buf);
  47.400 +            syswrite(LOG, $buf);
  47.401 +        }
  47.402 +
  47.403 +        close(LOG);
  47.404 +        exit(0);
  47.405 +    }
  47.406 +
  47.407 +    # Bind new PTY to STDOUT (but save old STDOUT)
  47.408 +    $pty->close_slave();
  47.409 +    open(my $oldOut, ">&", STDOUT) or die $!;
  47.410 +    open(STDOUT, ">&", $pty) or die $!;
  47.411 +
  47.412 +    # Run model
  47.413 +    my $result = system("${cmd} 2>&1");
  47.414 +
  47.415 +    # Send ^d to end child logging thread
  47.416 +    print "\cD";
  47.417 +
  47.418 +    # Return to normal STDOUT
  47.419 +    close(STDOUT);
  47.420 +    open(STDOUT, ">&", $oldOut) or die $!;
  47.421 +    close($oldOut);
  47.422 +
  47.423 +    # Compute exit status of model
  47.424 +    my $status = 0;
  47.425 +    if ($result == -1) {
  47.426 +        print STDERR "Model execution failed\n";
  47.427 +        $status = 1;
  47.428 +    }
  47.429 +    elsif ($result & 127) {
  47.430 +        print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n";
  47.431 +        $status = 1;
  47.432 +    }
  47.433 +    elsif (($result >> 8) != 0) {
  47.434 +        $status = $result >> 8;
  47.435 +        print "Model exited with status $status\n";
  47.436 +    }
  47.437 +
  47.438 +    return $status;
  47.439 +}
  47.440 +
  47.441 +
  47.442 +sub Exec($$) {
  47.443 +    my $cmd = shift;
  47.444 +    my $errmsg = shift;
  47.445 +
  47.446 +    system($cmd);
  47.447 +    if ($? == -1) {
  47.448 +        ErrorExit("Failed to execute $cmd: $!");
  47.449 +    }
  47.450 +    elsif ($? & 127) {
  47.451 +        ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump");
  47.452 +    }
  47.453 +    elsif (($? >> 8) != 0) {
  47.454 +        ErrorExit("${errmsg}");
  47.455 +    }
  47.456 +}
  47.457 +
  47.458 +
  47.459 +sub CompareOutput() {
  47.460 +    return 0 if ($noCompare != 0);
  47.461 +    return 0 if (! exists($config{compare}) || ($config{compare} eq ''));
  47.462 +
  47.463 +}
  47.464 +
  47.465 +
  47.466 +#
  47.467 +# Read the configuration file
  47.468 +#
  47.469 +sub ReadConfig($$) {
  47.470 +    my $conf = shift;
  47.471 +    my $required = shift;
  47.472 +
  47.473 +    my $status = open(CONFIG, "< $conf");
  47.474 +    if (! $status) {
  47.475 +        return if (! $required);
  47.476 +        die("Failed to open $conf");
  47.477 +    }
  47.478 +
  47.479 +    while (<CONFIG>) {
  47.480 +        chomp;
  47.481 +        my $t = $_;
  47.482 +        $t =~ s/#.*//;
  47.483 +        if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) {
  47.484 +            my $c = $1;
  47.485 +            my $v = $2;
  47.486 +            $v =~ s/^["'](.*)["']$/$1/;         # Drop quotation marks
  47.487 +            $config{$c} = $v;
  47.488 +        }
  47.489 +        elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) {
  47.490 +            my $c = $1;
  47.491 +            my $v = $2;
  47.492 +            $config{$c} = $v;
  47.493 +        }
  47.494 +    }
  47.495 +}
    48.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    48.2 +++ b/scripts/run.bmark	Wed Apr 28 08:19:09 2010 -0400
    48.3 @@ -0,0 +1,528 @@
    48.4 +#!/usr/bin/env perl
    48.5 +# -*- perl -*-
    48.6 +
    48.7 +use strict;
    48.8 +use warnings;
    48.9 +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through);
   48.10 +use IO::Pty;
   48.11 +
   48.12 +#
   48.13 +# Turn on warnings
   48.14 +#
   48.15 +$^W = 1;
   48.16 +
   48.17 +##
   48.18 +## Benchmark run script
   48.19 +##
   48.20 +
   48.21 +sub ExecModel($);
   48.22 +sub Exec($$);
   48.23 +sub CompareOutput();
   48.24 +sub ReadConfig($$);
   48.25 +
   48.26 +
   48.27 +#############################################################################
   48.28 +#############################################################################
   48.29 +##
   48.30 +## Start by figuring out the model location and type.
   48.31 +##
   48.32 +#############################################################################
   48.33 +#############################################################################
   48.34 +
   48.35 +my %config;
   48.36 +
   48.37 +ReadConfig("config/env.sh", 1);
   48.38 +ReadConfig("$config{modelDir}/config/env.sh", 1);
   48.39 +ReadConfig("$config{modelDir}/config/signature.sh", 0);
   48.40 +
   48.41 +##
   48.42 +## Pseudo-enumeration of possible model types
   48.43 +##
   48.44 +my $MODEL_NONE = 0;
   48.45 +my $MODEL_FPGA = 1;                     # Model runs on FPGA hardware
   48.46 +my $MODEL_BLUESIM = 2;                  # Bluesim
   48.47 +my $MODEL_VSIM = 3;                     # Verilog simulator
   48.48 +
   48.49 +my $mType = $MODEL_NONE;
   48.50 +
   48.51 +
   48.52 +#############################################################################
   48.53 +#############################################################################
   48.54 +##
   48.55 +## Process command line arguments
   48.56 +##
   48.57 +#############################################################################
   48.58 +#############################################################################
   48.59 +
   48.60 +my $help = 0;
   48.61 +my $onlyCompare = 0;
   48.62 +my $noCompare = 0;
   48.63 +my $forceLoad = 0;
   48.64 +my $gdb = 0;
   48.65 +my $noProgram = 0;
   48.66 +my $noReserve = 0;
   48.67 +my $funcpPrefix = "";
   48.68 +my $funcpSuffix = "";
   48.69 +my $noshowfp = 0;
   48.70 +my $printCycle = undef;
   48.71 +my $showfp = undef;
   48.72 +my $bluesimCmd = undef;
   48.73 +my $vcdStart = undef;
   48.74 +my $vcdCycles = 20000;
   48.75 +my $m5run = 0;
   48.76 +
   48.77 +my $status = GetOptions("help!" => \$help,
   48.78 +                        "gdb!" => \$gdb,
   48.79 +                        "noprogram!" => \$noProgram,
   48.80 +                        "noreserve!" => \$noReserve,
   48.81 +                        "force-load!" => \$forceLoad,
   48.82 +                        "funcp-prefix=s" => \$funcpPrefix,
   48.83 +                        "funcp-suffix=s" => \$funcpSuffix,
   48.84 +                        "noshowfp!" => \$noshowfp,
   48.85 +                        "onlycompare!" => \$onlyCompare,
   48.86 +                        "nocompare!" => \$noCompare,
   48.87 +                        "pc=s" => \$printCycle,
   48.88 +                        "showfp:s" => \$showfp,
   48.89 +                        "bluesim=s" => \$bluesimCmd,
   48.90 +                        "vcdstart=i" => \$vcdStart,
   48.91 +                        "vcdcycles=i" => \$vcdCycles,
   48.92 +                        "m5!" => \$m5run,
   48.93 +                       );
   48.94 +
   48.95 +# Put quotation marks back on arguments that have spaces since they will be
   48.96 +# passed through a shell once more.
   48.97 +foreach my $i ( 0 .. $#ARGV ) {
   48.98 +    if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) {
   48.99 +        $ARGV[$i] = '"' . $ARGV[$i] . '"';
  48.100 +    }
  48.101 +}
  48.102 +
  48.103 +if ($onlyCompare != 0) {
  48.104 +    exit(CompareOutput());
  48.105 +}
  48.106 +
  48.107 +if ($m5run != 0) {
  48.108 +    $mType = $MODEL_NONE;
  48.109 +}
  48.110 +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") {
  48.111 +    $mType = $MODEL_FPGA;
  48.112 +}
  48.113 +elsif (-f "$config{modelDir}/$config{model}_hw.exe") {
  48.114 +    $mType = $MODEL_BLUESIM;
  48.115 +}
  48.116 +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") {
  48.117 +    $mType = $MODEL_VSIM;
  48.118 +}
  48.119 +else {
  48.120 +    die("Can't determine model type");
  48.121 +}
  48.122 +
  48.123 +if ($help || ! $status) {
  48.124 +    print STDERR "\nArguments:\n";
  48.125 +    print STDERR "   [--gdb]                 Invokes the software side in gdb\n";
  48.126 +    print STDERR "   [--noprogram]           Skips the FPGA load and reservation steps\n";
  48.127 +    print STDERR "   [--noreserve]           Skips the FPGA reservation steps\n";
  48.128 +    print STDERR "   [--funcp-prefix=\"<prefix>\"]\n";
  48.129 +    print STDERR "                           Prepend prefix to HAsim's --funcp argument\n";
  48.130 +    print STDERR "   [--funcp-suffix=\"<suffix>\"]\n";
  48.131 +    print STDERR "                           Append suffix to HAsim's --funcp argument\n";
  48.132 +    print STDERR "   [--onlycompare]         Only compare output files (without running)\n";
  48.133 +    print STDERR "   [--nocompare]           Skip comparison of output files\n";
  48.134 +    print STDERR "   [--m5]                  Run workload in m5 without HAsim\n";
  48.135 +
  48.136 +    if ($mType == $MODEL_FPGA) {
  48.137 +        print STDERR "   [--force-load]          Load a bitfile to the FPGA even if it has errors\n";
  48.138 +    }
  48.139 +
  48.140 +    if ($mType == $MODEL_BLUESIM) {
  48.141 +        print STDERR "   [--vcdstart=<cycle>]    Generate VCD dump for wave viewer (e.g. gtkwave)\n";
  48.142 +        print STDERR "   [--vcdcycles=<cycles>]  VCD dump length (default = 20000)\n";
  48.143 +    }
  48.144 +
  48.145 +    if ($config{isHybridModel}) {
  48.146 +        my $cmd = "$config{modelDir}/$config{model} --help-run-append";
  48.147 +        system($cmd);
  48.148 +    }
  48.149 +
  48.150 +    exit(1);
  48.151 +}
  48.152 +
  48.153 +#############################################################################
  48.154 +#############################################################################
  48.155 +##
  48.156 +## Adjust model arguments
  48.157 +##
  48.158 +#############################################################################
  48.159 +#############################################################################
  48.160 +
  48.161 +# Show front panel?
  48.162 +if ($noshowfp) {
  48.163 +    $showfp = 'none';
  48.164 +}
  48.165 +elsif (defined($showfp)) {
  48.166 +    # Specified on the run command line
  48.167 +    $showfp = 'gui' if ($showfp eq '');
  48.168 +}
  48.169 +elsif ($config{feeder} eq 'none') {
  48.170 +    # For null feeder default to showing LEDs on stdout
  48.171 +    $showfp = 'stdout';
  48.172 +}
  48.173 +else {
  48.174 +    # Other models have heartbeats
  48.175 +    $showfp = 'none';
  48.176 +}
  48.177 +
  48.178 +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}";
  48.179 +
  48.180 +if ($config{feeder} eq 'm5') {
  48.181 +    # Tell m5 to be quiet and not to enable the remote gdb port.  Under netbatch
  48.182 +    # it appears there are sometimes attempts to connect to the port, which
  48.183 +    # stops simulation.
  48.184 +    $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}";
  48.185 +}
  48.186 +
  48.187 +my $cmd;
  48.188 +
  48.189 +if ($m5run == 0) {
  48.190 +    # Normal run
  48.191 +    $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --showfp=${showfp} --funcp=\"${feedFlags}\" $config{genFlags}";
  48.192 +    foreach my $c (@ARGV) {
  48.193 +        $cmd .= " $c";
  48.194 +    }
  48.195 +
  48.196 +    if (defined($printCycle)) {
  48.197 +        $cmd .= " --pc=${printCycle}";
  48.198 +    }
  48.199 +}
  48.200 +else {
  48.201 +    if ($config{feeder} ne 'm5') {
  48.202 +        die("This workload does not use m5");
  48.203 +    }
  48.204 +
  48.205 +    # Running inside m5 without HAsim
  48.206 +    my $m5cmd;
  48.207 +    if (exists($ENV{M5BIN})) {
  48.208 +        $m5cmd = $ENV{M5BIN};
  48.209 +    }
  48.210 +    else {
  48.211 +        my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt");
  48.212 +        $m5cmd = `awb-resolver ${m5bin}`;
  48.213 +        chomp($m5cmd);
  48.214 +        die("Failed to find $m5bin") if ($m5cmd eq '');
  48.215 +    }
  48.216 +
  48.217 +    $cmd = "${m5cmd} ${feedFlags}";
  48.218 +
  48.219 +    # Drop --hasim-sim
  48.220 +    $cmd =~ s/--hasim-sim //;
  48.221 +    # Drop escaping of quotes
  48.222 +    $cmd =~ s/\\"/"/g;
  48.223 +
  48.224 +    $noProgram = 1;
  48.225 +}
  48.226 +
  48.227 +#
  48.228 +# Bluesim arguments
  48.229 +#
  48.230 +
  48.231 +# Generate dump.vcd for wave viewer (e.g. gtkwave)?
  48.232 +if (defined($vcdStart)) {
  48.233 +    my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop";
  48.234 +    if ($vcdStart > 0) {
  48.235 +        $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}";
  48.236 +    }
  48.237 +
  48.238 +    if (defined($bluesimCmd)) {
  48.239 +        $bluesimCmd .= " ";
  48.240 +    }
  48.241 +    else {
  48.242 +        $bluesimCmd = "";
  48.243 +    }
  48.244 +    $bluesimCmd .= "-c \"$vcdCmd\"";
  48.245 +}
  48.246 +
  48.247 +if (defined($bluesimCmd)) {
  48.248 +    $cmd .= " --bluesim=\'$bluesimCmd\'";
  48.249 +}
  48.250 +
  48.251 +# Adjust the arguments for Bluesim if it is being invoked directly
  48.252 +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) {
  48.253 +    $cmd =~ s/\s--/ +--/g;
  48.254 +
  48.255 +    # Bluesim may expect to load a program from a well known file
  48.256 +    unlink('program.vmh');
  48.257 +    link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh');
  48.258 +}
  48.259 +
  48.260 +
  48.261 +#############################################################################
  48.262 +#############################################################################
  48.263 +##
  48.264 +## Load the FPGA and run the model
  48.265 +##
  48.266 +#############################################################################
  48.267 +#############################################################################
  48.268 +
  48.269 +#
  48.270 +# Move old stats file so we are sure statistics come from this run
  48.271 +#
  48.272 +if (-f "$config{workload}.stats") {
  48.273 +    rename("$config{workload}.stats", "$config{workload}.stats.old");
  48.274 +}
  48.275 +
  48.276 +if ($mType == $MODEL_FPGA) {
  48.277 +    if (! defined($printCycle)) {
  48.278 +        # User didn't specify a cycle printing interval.  Pick one more reasonable
  48.279 +        # for HW.
  48.280 +        #$cmd .= " --pc=10000000";
  48.281 +    }
  48.282 +
  48.283 +    # Load FPGA
  48.284 +    $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit";
  48.285 +
  48.286 +    if (! $noProgram) {
  48.287 +        if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") {
  48.288 +            print STDERR "FPGA bit file has errors:\n\n";
  48.289 +            system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr");
  48.290 +            print STDERR "\nUse --force-load to ignore the error.\n";
  48.291 +            exit(1);
  48.292 +        }
  48.293 +
  48.294 +        if (! $noReserve) {
  48.295 +            Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA");
  48.296 +        }
  48.297 +
  48.298 +        # Does a download script exist to program the FPGA?
  48.299 +        my $needProgram = (-f "$config{modelDir}/config/$config{model}.download");
  48.300 +        $needProgram = 1;
  48.301 +
  48.302 +        # Is the FPGA already programmed with the correct bit file?
  48.303 +        if (exists($config{signature})) {
  48.304 +            my $curSignature = `hasim-fpga-ctrl --getsignature`;
  48.305 +            chomp($curSignature);
  48.306 +            if ($curSignature eq $config{signature}) {
  48.307 +                print "FPGA is already programmed (signature match)...\n";
  48.308 +                #$needProgram = 0;
  48.309 +            }
  48.310 +        }
  48.311 +
  48.312 +        if ($needProgram) {
  48.313 +            Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode");
  48.314 +
  48.315 +            my $dir = `pwd`;
  48.316 +            chomp($dir);
  48.317 +            Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA");
  48.318 +
  48.319 +            if (exists($config{signature})) {
  48.320 +                Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature");
  48.321 +            }
  48.322 +        }
  48.323 +
  48.324 +        Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver");
  48.325 +    }
  48.326 +}
  48.327 +
  48.328 +# Run the software side or a hardware simulator
  48.329 +my $run_status = 0;
  48.330 +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) {
  48.331 +    $cmd = $cmd." 2> proc.trace\n";
  48.332 +    $run_status = ExecModel($cmd);
  48.333 +}
  48.334 +
  48.335 +# Create a stats file for null workloads to make regression.launcher happy (HACK)
  48.336 +if ( $config{workload} eq "null" ) {
  48.337 +  system("touch null.stats");
  48.338 +}
  48.339 +
  48.340 +if (-f "hasim_events.out") {
  48.341 +    system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out");
  48.342 +}
  48.343 +if (-f "$config{workload}.stats") {
  48.344 +    system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats");
  48.345 +}
  48.346 +
  48.347 +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  48.348 +    Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation");
  48.349 +}
  48.350 +
  48.351 +if ($run_status != 0) {
  48.352 +    exit($run_status);
  48.353 +}
  48.354 +else {
  48.355 +    exit(CompareOutput());
  48.356 +}
  48.357 +
  48.358 +
  48.359 +sub ErrorExit($) {
  48.360 +    my $msg = shift;
  48.361 +
  48.362 +    print STDERR "${msg}\n";
  48.363 +
  48.364 +    if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) {
  48.365 +        system("hasim-fpga-ctrl --drop-reservation");
  48.366 +    }
  48.367 +
  48.368 +    exit(1);
  48.369 +}
  48.370 +
  48.371 +
  48.372 +##
  48.373 +## ExecModel --
  48.374 +##   This is the routine that actually invokes the model.  stdout and stderr
  48.375 +##   are logged in a file.  The return value is the exit status of the model.
  48.376 +##
  48.377 +sub ExecModel($) {
  48.378 +    my $cmd = shift;
  48.379 +
  48.380 +    if ($gdb) {
  48.381 +        ## gdb needs stdin.  Just use system() and don't do logging.
  48.382 +        system("gdb -args " . $cmd);
  48.383 +        return 0;
  48.384 +    }
  48.385 +
  48.386 +    ##
  48.387 +    ## Invoke the model, but log its output both to stdout and to a file.
  48.388 +    ## Use a pty so the invoked program will use line buffering instead
  48.389 +    ## of fully buffered writes.  (Libc sets up stdout line buffered when
  48.390 +    ## it thinks it is writing to a terminal.  It uses fully buffered
  48.391 +    ## writing to a pipe.)
  48.392 +    ##
  48.393 +
  48.394 +    my $pty = new IO::Pty;
  48.395 +    my $slave = $pty->slave();
  48.396 +
  48.397 +    my $pid = fork();
  48.398 +    die "Couldn't fork: $!" unless defined $pid;
  48.399 +
  48.400 +    if (! $pid) {
  48.401 +        # Child process is the monitoring process
  48.402 +        $pty->make_slave_controlling_terminal();
  48.403 +
  48.404 +        my $output = "$config{workload}.$config{ISA}.out";  
  48.405 +        if(exists($config{silent})) {
  48.406 +	    $output = "/dev/null";
  48.407 +	}
  48.408 +
  48.409 +        if (! open(LOG, ">$output")) {
  48.410 +            print STDERR "Error opening log file $output\n";
  48.411 +        }
  48.412 +
  48.413 +        # Unbuffered I/O loop
  48.414 +        while (1) {
  48.415 +            my $buf;
  48.416 +            my $n = sysread($slave, $buf, 4096);
  48.417 +
  48.418 +            last if ($n == 0);
  48.419 +
  48.420 +            syswrite(STDOUT, $buf);
  48.421 +            syswrite(LOG, $buf);
  48.422 +        }
  48.423 +
  48.424 +        close(LOG);
  48.425 +        exit(0);
  48.426 +    }
  48.427 +
  48.428 +    # Bind new PTY to STDOUT (but save old STDOUT)
  48.429 +    $pty->close_slave();
  48.430 +    open(my $oldOut, ">&", STDOUT) or die $!;
  48.431 +    open(STDOUT, ">&", $pty) or die $!;
  48.432 +
  48.433 +    # Run model
  48.434 +    my $result = system("${cmd} 2>&1");
  48.435 +
  48.436 +    # Send ^d to end child logging thread
  48.437 +    print "\cD";
  48.438 +
  48.439 +    # Return to normal STDOUT
  48.440 +    close(STDOUT);
  48.441 +    open(STDOUT, ">&", $oldOut) or die $!;
  48.442 +    close($oldOut);
  48.443 +
  48.444 +    # Compute exit status of model
  48.445 +    my $status = 0;
  48.446 +    if ($result == -1) {
  48.447 +        print STDERR "Model execution failed\n";
  48.448 +        $status = 1;
  48.449 +    }
  48.450 +    elsif ($result & 127) {
  48.451 +        print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n";
  48.452 +        $status = 1;
  48.453 +    }
  48.454 +    elsif (($result >> 8) != 0) {
  48.455 +        $status = $result >> 8;
  48.456 +        print "Model exited with status $status\n";
  48.457 +    }
  48.458 +
  48.459 +    return $status;
  48.460 +}
  48.461 +
  48.462 +
  48.463 +sub Exec($$) {
  48.464 +    my $cmd = shift;
  48.465 +    my $errmsg = shift;
  48.466 +
  48.467 +    system($cmd);
  48.468 +    if ($? == -1) {
  48.469 +        ErrorExit("Failed to execute $cmd: $!");
  48.470 +    }
  48.471 +    elsif ($? & 127) {
  48.472 +        ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump");
  48.473 +    }
  48.474 +    elsif (($? >> 8) != 0) {
  48.475 +        ErrorExit("${errmsg}");
  48.476 +    }
  48.477 +}
  48.478 +
  48.479 +
  48.480 +sub CompareOutput() {
  48.481 +    return 0 if ($noCompare != 0);
  48.482 +    return 0 if (! exists($config{compare}) || ($config{compare} eq ''));
  48.483 +
  48.484 +    # run the checker 
  48.485 +    `cd ./checker/ && make clean && make`;
  48.486 +    `./checker/checker input.wav out_gold.wav`;
  48.487 +    print "about to call compare_wavs\n";
  48.488 +    my $out=`./checker/compare_wavs/compare_wavs 10 out_gold.wav out_hw.wav`;
  48.489 +   
  48.490 +    if ($out !~ /fail/) {
  48.491 +        print "*** Output comparison passed ***\n";
  48.492 +        system("touch $config{workload}.stats");
  48.493 +        return 0;
  48.494 +    }
  48.495 +    else {
  48.496 +        print "*** Output comparison failed ***\n";
  48.497 +        return 1;
  48.498 +    }
  48.499 +}
  48.500 +
  48.501 +
  48.502 +#
  48.503 +# Read the configuration file
  48.504 +#
  48.505 +sub ReadConfig($$) {
  48.506 +    my $conf = shift;
  48.507 +    my $required = shift;
  48.508 +
  48.509 +    my $status = open(CONFIG, "< $conf");
  48.510 +    if (! $status) {
  48.511 +        return if (! $required);
  48.512 +        die("Failed to open $conf");
  48.513 +    }
  48.514 +
  48.515 +    while (<CONFIG>) {
  48.516 +        chomp;
  48.517 +        my $t = $_;
  48.518 +        $t =~ s/#.*//;
  48.519 +        if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) {
  48.520 +            my $c = $1;
  48.521 +            my $v = $2;
  48.522 +            $v =~ s/^["'](.*)["']$/$1/;         # Drop quotation marks
  48.523 +            $config{$c} = $v;
  48.524 +        }
  48.525 +        elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) {
  48.526 +            my $c = $1;
  48.527 +            my $v = $2;
  48.528 +            $config{$c} = $v;
  48.529 +        }
  48.530 +    }
  48.531 +}
    49.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    49.2 +++ b/scripts/setup-mit-6.375-bmark	Wed Apr 28 08:19:09 2010 -0400
    49.3 @@ -0,0 +1,182 @@
    49.4 +#!/usr/bin/env perl
    49.5 +# -*- perl -*-
    49.6 +  
    49.7 +##############################################################
    49.8 +#
    49.9 +# Benchmark setup for HAsim
   49.10 +#
   49.11 +# Usage: setup-bmark <bmark> <srcdir> <destdir>
   49.12 +#
   49.13 +# Setup benchmark to run in <destdir>
   49.14 +#
   49.15 +##############################################################
   49.16 +
   49.17 +use strict;
   49.18 +use warnings;
   49.19 +use File::Basename;
   49.20 +use Getopt::Long;
   49.21 +
   49.22 +sub Usage();
   49.23 +sub ErrorExit($);
   49.24 +
   49.25 +#
   49.26 +# Turn on warnings
   49.27 +#
   49.28 +$^W = 1;
   49.29 +
   49.30 +my $binary = undef;
   49.31 +my $compare = undef;
   49.32 +my $data = undef;
   49.33 +my $feeder = '';
   49.34 +my $group = undef;
   49.35 +my $isa = "unknown_ISA";
   49.36 +my $linkto = undef;
   49.37 +my $silent = undef;
   49.38 +
   49.39 +#
   49.40 +# Find the root of the benchmarks directory tree.
   49.41 +#
   49.42 +my $benchmark_root = `awb-resolver --config=benchmarkdir`;
   49.43 +chomp($benchmark_root);
   49.44 +ErrorExit("Can't find benchmark root") if ($benchmark_root eq '');
   49.45 +
   49.46 +#
   49.47 +# Parse the command line switches
   49.48 +#
   49.49 +if (! GetOptions('binary=s' => \$binary,
   49.50 +                 'compare=s' => \$compare,
   49.51 +                 'data=s' => \$data,
   49.52 +                 'feeder=s' => \$feeder,
   49.53 +                 'group=s' => \$group,
   49.54 +                 'isa=s' => \$isa,
   49.55 +                 'linkto=s' => \$linkto,
   49.56 +                 'silent=s' => \$silent,
   49.57 +                )) {
   49.58 +    Usage();
   49.59 +}
   49.60 +
   49.61 +if ($#ARGV != 2) {
   49.62 +    Usage();
   49.63 +}
   49.64 +
   49.65 +my $bmark = $ARGV[0];
   49.66 +my $srcdir = $ARGV[1];
   49.67 +my $dstdir = $ARGV[2];
   49.68 +my $basedir = `pwd`;
   49.69 +chomp($basedir);
   49.70 +
   49.71 +print "BMARK: $bmark\n";
   49.72 +print "SRC: $srcdir\n";
   49.73 +print "DST: $dstdir\n";
   49.74 +print "BASE: $basedir\n";
   49.75 +
   49.76 +if (! defined($group)) {
   49.77 +    $group = $bmark;
   49.78 +}
   49.79 +
   49.80 +
   49.81 +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir");
   49.82 +
   49.83 +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory");
   49.84 +
   49.85 +# Set up benchmark for non-null feeders
   49.86 +if ($feeder ne "none") {
   49.87 +    my $src_prog;
   49.88 +
   49.89 +    mkdir('program') or ErrorExit("Failed to make 'program' directory");
   49.90 +
   49.91 +    if (defined($binary)) {
   49.92 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}";
   49.93 +    }
   49.94 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") {
   49.95 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin";
   49.96 +    }
   49.97 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") {
   49.98 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh";
   49.99 +    }
  49.100 +    else {
  49.101 +        print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n";
  49.102 +        exit(1);
  49.103 +    }
  49.104 +
  49.105 +    my $dst_prog = "program/" . basename($src_prog);
  49.106 +
  49.107 +    unlink($dst_prog);
  49.108 +    symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog");
  49.109 +}
  49.110 +
  49.111 +# Copy input data files
  49.112 +if (defined($data)) {
  49.113 +   # No trailing slash. Just link to a single object
  49.114 +   print "data: $data\n";
  49.115 +   symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data");
  49.116 +}
  49.117 +
  49.118 +# Link to files or directories
  49.119 +if (defined($linkto)) {
  49.120 +    foreach my $tgt (split(':', $linkto)) {
  49.121 +        if ($tgt =~ /\/$/) {
  49.122 +            # Trailing slash means link to all the files individually within
  49.123 +            # a directory.
  49.124 +            if (-d $tgt) {
  49.125 +                opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n");
  49.126 +                my @tgt_objs = readdir(DIR);
  49.127 +                closedir(DIR);
  49.128 +                foreach my $t (@tgt_objs) {
  49.129 +                    if (! (($t eq '.') || ($t eq '..'))) {
  49.130 +                        symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}");
  49.131 +                    }
  49.132 +                }
  49.133 +            }
  49.134 +        }
  49.135 +        else {
  49.136 +            # No trailing slash. Just link to a single object
  49.137 +            symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt");
  49.138 +        }
  49.139 +    }
  49.140 +}
  49.141 +
  49.142 +# Store compare rules to config
  49.143 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  49.144 +print ENV "ISA=\"${isa}\"\n";
  49.145 +if (defined($compare)) {
  49.146 +    print ENV "compare=\"${compare}\"\n";
  49.147 +}
  49.148 +close(ENV);
  49.149 +
  49.150 +#store silent mode to config
  49.151 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  49.152 +if (defined($silent)) {
  49.153 +    print ENV "silent=1\n";
  49.154 +}
  49.155 +close(ENV);
  49.156 +
  49.157 +# Set up m5 environment
  49.158 +if ($feeder eq 'm5') {
  49.159 +    system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -");
  49.160 +}
  49.161 +
  49.162 +system("cp -f ${srcdir}/run.bmark run");
  49.163 +chmod(0755, "run");
  49.164 +
  49.165 +exit(0);
  49.166 +
  49.167 +
  49.168 +
  49.169 +sub Usage() {
  49.170 +    print STDERR "Usage: setup-bmark [--binary <name>]\n";
  49.171 +    print STDERR "                   [--compare <compare commands>]\n";
  49.172 +    print STDERR "                   [--data <tar file>]\n";
  49.173 +    print STDERR "                   [--group <name>]\n";
  49.174 +    print STDERR "                   [--isa <name>]\n";
  49.175 +    print STDERR "                   [--linkto <target0>:...:<targetN>]\n";
  49.176 +    print STDERR "                   [--silent] \n";
  49.177 +    print STDERR "                   <bmark> <srcdir> <dstdir>\n";
  49.178 +    exit(1);
  49.179 +}
  49.180 +
  49.181 +
  49.182 +sub ErrorExit($) {
  49.183 +    print STDERR @_ . "\n";
  49.184 +    exit(1);
  49.185 +}
    50.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    50.2 +++ b/scripts/setup-mit-6.375-bmark-freq	Wed Apr 28 08:19:09 2010 -0400
    50.3 @@ -0,0 +1,182 @@
    50.4 +#!/usr/bin/env perl
    50.5 +# -*- perl -*-
    50.6 +  
    50.7 +#############################################################
    50.8 +#
    50.9 +# Benchmark setup for HAsim
   50.10 +#
   50.11 +# Usage: setup-bmark <bmark> <srcdir> <destdir>
   50.12 +#
   50.13 +# Setup benchmark to run in <destdir>
   50.14 +#
   50.15 +#############################################################
   50.16 +
   50.17 +use strict;
   50.18 +use warnings;
   50.19 +use File::Basename;
   50.20 +use Getopt::Long;
   50.21 +
   50.22 +sub Usage();
   50.23 +sub ErrorExit($);
   50.24 +
   50.25 +#
   50.26 +# Turn on warnings
   50.27 +#
   50.28 +$^W = 1;
   50.29 +
   50.30 +my $binary = undef;
   50.31 +my $compare = undef;
   50.32 +my $data = undef;
   50.33 +my $feeder = '';
   50.34 +my $group = undef;
   50.35 +my $isa = "unknown_ISA";
   50.36 +my $linkto = undef;
   50.37 +my $silent = undef;
   50.38 +
   50.39 +#
   50.40 +# Find the root of the benchmarks directory tree.
   50.41 +#
   50.42 +my $benchmark_root = `awb-resolver --config=benchmarkdir`;
   50.43 +chomp($benchmark_root);
   50.44 +ErrorExit("Can't find benchmark root") if ($benchmark_root eq '');
   50.45 +
   50.46 +#
   50.47 +# Parse the command line switches
   50.48 +#
   50.49 +if (! GetOptions('binary=s' => \$binary,
   50.50 +                 'compare=s' => \$compare,
   50.51 +                 'data=s' => \$data,
   50.52 +                 'feeder=s' => \$feeder,
   50.53 +                 'group=s' => \$group,
   50.54 +                 'isa=s' => \$isa,
   50.55 +                 'linkto=s' => \$linkto,
   50.56 +                 'silent=s' => \$silent,
   50.57 +                )) {
   50.58 +    Usage();
   50.59 +}
   50.60 +
   50.61 +if ($#ARGV != 2) {
   50.62 +    Usage();
   50.63 +}
   50.64 +
   50.65 +my $bmark = $ARGV[0];
   50.66 +my $srcdir = $ARGV[1];
   50.67 +my $dstdir = $ARGV[2];
   50.68 +my $basedir = `pwd`;
   50.69 +chomp($basedir);
   50.70 +
   50.71 +print "BMARK: $bmark\n";
   50.72 +print "SRC: $srcdir\n";
   50.73 +print "DST: $dstdir\n";
   50.74 +print "BASE: $basedir\n";
   50.75 +
   50.76 +if (! defined($group)) {
   50.77 +    $group = $bmark;
   50.78 +}
   50.79 +
   50.80 +
   50.81 +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir");
   50.82 +
   50.83 +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory");
   50.84 +
   50.85 +# Set up benchmark for non-null feeders
   50.86 +if ($feeder ne "none") {
   50.87 +    my $src_prog;
   50.88 +
   50.89 +    mkdir('program') or ErrorExit("Failed to make 'program' directory");
   50.90 +
   50.91 +    if (defined($binary)) {
   50.92 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}";
   50.93 +    }
   50.94 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") {
   50.95 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin";
   50.96 +    }
   50.97 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") {
   50.98 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh";
   50.99 +    }
  50.100 +    else {
  50.101 +        print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n";
  50.102 +        exit(1);
  50.103 +    }
  50.104 +
  50.105 +    my $dst_prog = "program/" . basename($src_prog);
  50.106 +
  50.107 +    unlink($dst_prog);
  50.108 +    symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog");
  50.109 +}
  50.110 +
  50.111 +# Copy input data files
  50.112 +if (defined($data)) {
  50.113 +   # No trailing slash. Just link to a single object
  50.114 +   print "data: $data\n";
  50.115 +   symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data");
  50.116 +}
  50.117 +
  50.118 +# Link to files or directories
  50.119 +if (defined($linkto)) {
  50.120 +    foreach my $tgt (split(':', $linkto)) {
  50.121 +        if ($tgt =~ /\/$/) {
  50.122 +            # Trailing slash means link to all the files individually within
  50.123 +            # a directory.
  50.124 +            if (-d $tgt) {
  50.125 +                opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n");
  50.126 +                my @tgt_objs = readdir(DIR);
  50.127 +                closedir(DIR);
  50.128 +                foreach my $t (@tgt_objs) {
  50.129 +                    if (! (($t eq '.') || ($t eq '..'))) {
  50.130 +                        symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}");
  50.131 +                    }
  50.132 +                }
  50.133 +            }
  50.134 +        }
  50.135 +        else {
  50.136 +            # No trailing slash. Just link to a single object
  50.137 +            symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt");
  50.138 +        }
  50.139 +    }
  50.140 +}
  50.141 +
  50.142 +# Store compare rules to config
  50.143 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  50.144 +print ENV "ISA=\"${isa}\"\n";
  50.145 +if (defined($compare)) {
  50.146 +    print ENV "compare=\"${compare}\"\n";
  50.147 +}
  50.148 +close(ENV);
  50.149 +
  50.150 +#store silent mode to config
  50.151 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  50.152 +if (defined($silent)) {
  50.153 +    print ENV "silent=1\n";
  50.154 +}
  50.155 +close(ENV);
  50.156 +
  50.157 +# Set up m5 environment
  50.158 +if ($feeder eq 'm5') {
  50.159 +    system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -");
  50.160 +}
  50.161 +
  50.162 +system("cp -f ${srcdir}/run-freq.bmark run");
  50.163 +chmod(0755, "run");
  50.164 +
  50.165 +exit(0);
  50.166 +
  50.167 +
  50.168 +
  50.169 +sub Usage() {
  50.170 +    print STDERR "Usage: setup-bmark [--binary <name>]\n";
  50.171 +    print STDERR "                   [--compare <compare commands>]\n";
  50.172 +    print STDERR "                   [--data <tar file>]\n";
  50.173 +    print STDERR "                   [--group <name>]\n";
  50.174 +    print STDERR "                   [--isa <name>]\n";
  50.175 +    print STDERR "                   [--linkto <target0>:...:<targetN>]\n";
  50.176 +    print STDERR "                   [--silent] \n";
  50.177 +    print STDERR "                   <bmark> <srcdir> <dstdir>\n";
  50.178 +    exit(1);
  50.179 +}
  50.180 +
  50.181 +
  50.182 +sub ErrorExit($) {
  50.183 +    print STDERR @_ . "\n";
  50.184 +    exit(1);
  50.185 +}
    51.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    51.2 +++ b/scripts/setup-mit-6.375-bmark-processor	Wed Apr 28 08:19:09 2010 -0400
    51.3 @@ -0,0 +1,186 @@
    51.4 +#!/usr/bin/env perl
    51.5 +# -*- perl -*-
    51.6 +
    51.7 +##############################################################
    51.8 +#
    51.9 +# Benchmark setup for HAsim
   51.10 +#
   51.11 +# Usage: setup-bmark <bmark> <srcdir> <destdir>
   51.12 +#
   51.13 +# Setup benchmark to run in <destdir>
   51.14 +#
   51.15 +##############################################################
   51.16 +
   51.17 +use strict;
   51.18 +use warnings;
   51.19 +use File::Basename;
   51.20 +use Getopt::Long;
   51.21 +
   51.22 +sub Usage();
   51.23 +sub ErrorExit($);
   51.24 +
   51.25 +#
   51.26 +# Turn on warnings
   51.27 +#
   51.28 +$^W = 1;
   51.29 +
   51.30 +my $binary = undef;
   51.31 +my $compare = undef;
   51.32 +my $data = undef;
   51.33 +my $feeder = '';
   51.34 +my $group = undef;
   51.35 +my $isa = "unknown_ISA";
   51.36 +my $linkto = undef;
   51.37 +my $numContexts = 1;
   51.38 +
   51.39 +#
   51.40 +# Find the root of the benchmarks directory tree.
   51.41 +#
   51.42 +my $benchmark_root = `awb-resolver --config=benchmarkdir`;
   51.43 +chomp($benchmark_root);
   51.44 +ErrorExit("Can't find benchmark root") if ($benchmark_root eq '');
   51.45 +
   51.46 +#
   51.47 +# Parse the command line switches
   51.48 +#
   51.49 +if (! GetOptions('binary=s' => \$binary,
   51.50 +                 'compare=s' => \$compare,
   51.51 +                 'data=s' => \$data,
   51.52 +                 'feeder=s' => \$feeder,
   51.53 +                 'group=s' => \$group,
   51.54 +                 'isa=s' => \$isa,
   51.55 +                 'linkto=s' => \$linkto,
   51.56 +                 'contexts=i' => \$numContexts,
   51.57 +                )) {
   51.58 +    Usage();
   51.59 +}
   51.60 +
   51.61 +if ($#ARGV != 2) {
   51.62 +    Usage();
   51.63 +}
   51.64 +
   51.65 +my $bmark = $ARGV[0];
   51.66 +my $srcdir = $ARGV[1];
   51.67 +my $dstdir = $ARGV[2];
   51.68 +
   51.69 +print "BMARK: $bmark\n";
   51.70 +print "SRC: $srcdir\n";
   51.71 +print "DST: $dstdir\n";
   51.72 +
   51.73 +if (! defined($group)) {
   51.74 +    $group = $bmark;
   51.75 +}
   51.76 +
   51.77 +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir");
   51.78 +
   51.79 +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory");
   51.80 +
   51.81 +# Set up benchmark for non-null feeders
   51.82 +my $context = 0;
   51.83 +while ($context < $numContexts) {
   51.84 +    if ($feeder ne "none") {
   51.85 +        my $src_prog;
   51.86 +
   51.87 +        mkdir("program.${context}") or ErrorExit("Failed to make program directory");
   51.88 +        chdir("program.${context}") or ErrorExit("Failed to cd to program directory");
   51.89 +
   51.90 +        if (defined($binary)) {
   51.91 +            $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}";
   51.92 +        }
   51.93 +        elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") {
   51.94 +            $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin";
   51.95 +        }
   51.96 +        elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") {
   51.97 +            $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh";
   51.98 +        }
   51.99 +        else {
  51.100 +            print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n";
  51.101 +            exit(1);
  51.102 +        }
  51.103 +
  51.104 +        my $dst_prog = basename($src_prog);
  51.105 +
  51.106 +        unlink($dst_prog);
  51.107 +        symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog");
  51.108 +
  51.109 +        # Copy input data files
  51.110 +        if (defined($data)) {
  51.111 +            if ($data =~ /\.tar\.gz$/) {
  51.112 +                system("tar xzf ${data}");
  51.113 +            }
  51.114 +            elsif ($data =~ /\.tar$/) {
  51.115 +                system("tar xf ${data}");
  51.116 +            }
  51.117 +        }
  51.118 +
  51.119 +        # Link to files or directories
  51.120 +        if (defined($linkto)) {
  51.121 +            foreach my $tgt (split(':', $linkto)) {
  51.122 +                if ($tgt =~ /\/$/) {
  51.123 +                    # Trailing slash means link to all the files individually within
  51.124 +                    # a directory.
  51.125 +                    if (-d $tgt) {
  51.126 +                        opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n");
  51.127 +                        my @tgt_objs = readdir(DIR);
  51.128 +                        closedir(DIR);
  51.129 +                        foreach my $t (@tgt_objs) {
  51.130 +                            if (! (($t eq '.') || ($t eq '..'))) {
  51.131 +                                symlink("${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}");
  51.132 +                            }
  51.133 +                        }
  51.134 +                    }
  51.135 +                }
  51.136 +                else {
  51.137 +                    # No trailing slash. Just link to a single object
  51.138 +                    symlink($tgt, basename($tgt)) or die("Failed to link to $tgt");
  51.139 +                }
  51.140 +            }
  51.141 +        }
  51.142 +
  51.143 +        # Back to main workload directory
  51.144 +        chdir("..");
  51.145 +    }
  51.146 +
  51.147 +    $context += 1;
  51.148 +}
  51.149 +
  51.150 +# Store compare rules to config
  51.151 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  51.152 +print ENV "ISA=\"${isa}\"\n";
  51.153 +if ($numContexts != 0) {
  51.154 +    print ENV "workloadContexts=\"${numContexts}\"\n";
  51.155 +}
  51.156 +if (defined($compare)) {
  51.157 +    print ENV "compare=\"${compare}\"\n";
  51.158 +}
  51.159 +close(ENV);
  51.160 +
  51.161 +# Set up m5 environment
  51.162 +if ($feeder eq 'm5') {
  51.163 +    system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -");
  51.164 +}
  51.165 +
  51.166 +system("cp -f ${srcdir}/run.bmark run");
  51.167 +chmod(0755, "run");
  51.168 +
  51.169 +exit(0);
  51.170 +
  51.171 +
  51.172 +
  51.173 +sub Usage() {
  51.174 +    print STDERR "Usage: setup-bmark [--binary <name>]\n";
  51.175 +    print STDERR "                   [--compare <compare commands>]\n";
  51.176 +    print STDERR "                   [--contexts <num workload contexts>]\n";
  51.177 +    print STDERR "                   [--data <tar file>]\n";
  51.178 +    print STDERR "                   [--group <name>]\n";
  51.179 +    print STDERR "                   [--isa <name>]\n";
  51.180 +    print STDERR "                   [--linkto <target0>:...:<targetN>]\n";
  51.181 +    print STDERR "                   <bmark> <srcdir> <dstdir>\n";
  51.182 +    exit(1);
  51.183 +}
  51.184 +
  51.185 +
  51.186 +sub ErrorExit($) {
  51.187 +    print STDERR @_ . "\n";
  51.188 +    exit(1);
  51.189 +}
    52.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    52.2 +++ b/scripts/setup-null-bmark	Wed Apr 28 08:19:09 2010 -0400
    52.3 @@ -0,0 +1,182 @@
    52.4 +#!/usr/bin/env perl
    52.5 +# -*- perl -*-
    52.6 +  
    52.7 +##############################################################
    52.8 +#
    52.9 +# Benchmark setup for HAsim
   52.10 +#
   52.11 +# Usage: setup-bmark <bmark> <srcdir> <destdir>
   52.12 +#
   52.13 +# Setup benchmark to run in <destdir>
   52.14 +#
   52.15 +##############################################################
   52.16 +
   52.17 +use strict;
   52.18 +use warnings;
   52.19 +use File::Basename;
   52.20 +use Getopt::Long;
   52.21 +
   52.22 +sub Usage();
   52.23 +sub ErrorExit($);
   52.24 +
   52.25 +#
   52.26 +# Turn on warnings
   52.27 +#
   52.28 +$^W = 1;
   52.29 +
   52.30 +my $binary = undef;
   52.31 +my $compare = undef;
   52.32 +my $data = undef;
   52.33 +my $feeder = '';
   52.34 +my $group = undef;
   52.35 +my $isa = "unknown_ISA";
   52.36 +my $linkto = undef;
   52.37 +my $silent = undef;
   52.38 +
   52.39 +#
   52.40 +# Find the root of the benchmarks directory tree.
   52.41 +#
   52.42 +my $benchmark_root = `awb-resolver --config=benchmarkdir`;
   52.43 +chomp($benchmark_root);
   52.44 +ErrorExit("Can't find benchmark root") if ($benchmark_root eq '');
   52.45 +
   52.46 +#
   52.47 +# Parse the command line switches
   52.48 +#
   52.49 +if (! GetOptions('binary=s' => \$binary,
   52.50 +                 'compare=s' => \$compare,
   52.51 +                 'data=s' => \$data,
   52.52 +                 'feeder=s' => \$feeder,
   52.53 +                 'group=s' => \$group,
   52.54 +                 'isa=s' => \$isa,
   52.55 +                 'linkto=s' => \$linkto,
   52.56 +                 'silent=s' => \$silent,
   52.57 +                )) {
   52.58 +    Usage();
   52.59 +}
   52.60 +
   52.61 +if ($#ARGV != 2) {
   52.62 +    Usage();
   52.63 +}
   52.64 +
   52.65 +my $bmark = $ARGV[0];
   52.66 +my $srcdir = $ARGV[1];
   52.67 +my $dstdir = $ARGV[2];
   52.68 +my $basedir = `pwd`;
   52.69 +chomp($basedir);
   52.70 +
   52.71 +print "BMARK: $bmark\n";
   52.72 +print "SRC: $srcdir\n";
   52.73 +print "DST: $dstdir\n";
   52.74 +print "BASE: $basedir\n";
   52.75 +
   52.76 +if (! defined($group)) {
   52.77 +    $group = $bmark;
   52.78 +}
   52.79 +
   52.80 +
   52.81 +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir");
   52.82 +
   52.83 +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory");
   52.84 +
   52.85 +# Set up benchmark for non-null feeders
   52.86 +if ($feeder ne "none") {
   52.87 +    my $src_prog;
   52.88 +
   52.89 +    mkdir('program') or ErrorExit("Failed to make 'program' directory");
   52.90 +
   52.91 +    if (defined($binary)) {
   52.92 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}";
   52.93 +    }
   52.94 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") {
   52.95 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin";
   52.96 +    }
   52.97 +    elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") {
   52.98 +        $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh";
   52.99 +    }
  52.100 +    else {
  52.101 +        print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n";
  52.102 +        exit(1);
  52.103 +    }
  52.104 +
  52.105 +    my $dst_prog = "program/" . basename($src_prog);
  52.106 +
  52.107 +    unlink($dst_prog);
  52.108 +    symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog");
  52.109 +}
  52.110 +
  52.111 +# Copy input data files
  52.112 +if (defined($data)) {
  52.113 +   # No trailing slash. Just link to a single object
  52.114 +   print "data: $data\n";
  52.115 +   symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data");
  52.116 +}
  52.117 +
  52.118 +# Link to files or directories
  52.119 +if (defined($linkto)) {
  52.120 +    foreach my $tgt (split(':', $linkto)) {
  52.121 +        if ($tgt =~ /\/$/) {
  52.122 +            # Trailing slash means link to all the files individually within
  52.123 +            # a directory.
  52.124 +            if (-d $tgt) {
  52.125 +                opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n");
  52.126 +                my @tgt_objs = readdir(DIR);
  52.127 +                closedir(DIR);
  52.128 +                foreach my $t (@tgt_objs) {
  52.129 +                    if (! (($t eq '.') || ($t eq '..'))) {
  52.130 +                        symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}");
  52.131 +                    }
  52.132 +                }
  52.133 +            }
  52.134 +        }
  52.135 +        else {
  52.136 +            # No trailing slash. Just link to a single object
  52.137 +            symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt");
  52.138 +        }
  52.139 +    }
  52.140 +}
  52.141 +
  52.142 +# Store compare rules to config
  52.143 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  52.144 +print ENV "ISA=\"${isa}\"\n";
  52.145 +if (defined($compare)) {
  52.146 +    print ENV "compare=\"${compare}\"\n";
  52.147 +}
  52.148 +close(ENV);
  52.149 +
  52.150 +#store silent mode to config
  52.151 +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh");
  52.152 +if (defined($silent)) {
  52.153 +    print ENV "silent=1\n";
  52.154 +}
  52.155 +close(ENV);
  52.156 +
  52.157 +# Set up m5 environment
  52.158 +if ($feeder eq 'm5') {
  52.159 +    system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -");
  52.160 +}
  52.161 +
  52.162 +system("cp -f ${srcdir}/run-null.bmark run");
  52.163 +chmod(0755, "run");
  52.164 +
  52.165 +exit(0);
  52.166 +
  52.167 +
  52.168 +
  52.169 +sub Usage() {
  52.170 +    print STDERR "Usage: setup-bmark [--binary <name>]\n";
  52.171 +    print STDERR "                   [--compare <compare commands>]\n";
  52.172 +    print STDERR "                   [--data <tar file>]\n";
  52.173 +    print STDERR "                   [--group <name>]\n";
  52.174 +    print STDERR "                   [--isa <name>]\n";
  52.175 +    print STDERR "                   [--linkto <target0>:...:<targetN>]\n";
  52.176 +    print STDERR "                   [--silent] \n";
  52.177 +    print STDERR "                   <bmark> <srcdir> <dstdir>\n";
  52.178 +    exit(1);
  52.179 +}
  52.180 +
  52.181 +
  52.182 +sub ErrorExit($) {
  52.183 +    print STDERR @_ . "\n";
  52.184 +    exit(1);
  52.185 +}
    53.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    53.2 +++ b/tools/audio_processor_test/compare_wavs/Makefile	Wed Apr 28 08:19:09 2010 -0400
    53.3 @@ -0,0 +1,6 @@
    53.4 +default: all
    53.5 +
    53.6 +clean:
    53.7 +	rm -f *.o compare_wavs
    53.8 +all:
    53.9 +	g++  /usr/lib/libsndfile.so compare_wavs.cpp -o compare_wavs
   53.10 \ No newline at end of file
    54.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    54.2 +++ b/tools/audio_processor_test/compare_wavs/compare_wavs.cpp	Wed Apr 28 08:19:09 2010 -0400
    54.3 @@ -0,0 +1,87 @@
    54.4 +#include <stdio.h>
    54.5 +#include <assert.h>
    54.6 +#include <string.h>
    54.7 +#include <sndfile.h>
    54.8 +#include <stdlib.h>
    54.9 +
   54.10 +
   54.11 +
   54.12 +int
   54.13 +do_check (int drop, int argc, char * argv [])
   54.14 +{
   54.15 +  int margin_of_error;
   54.16 +  SNDFILE* goldenWavFile;
   54.17 +  SNDFILE* outputWavFile;
   54.18 +  SF_INFO goldenInfo ;
   54.19 +  SF_INFO outputInfo ;
   54.20 +  short int buffA;
   54.21 +  short int buffB;
   54.22 +
   54.23 +  memset (&goldenInfo, 0, sizeof (goldenInfo)) ;
   54.24 +  memset (&outputInfo, 0, sizeof (outputInfo)) ;
   54.25 +
   54.26 +  margin_of_error = atoi(argv[1]);
   54.27 +
   54.28 +  printf("Checking for Margin of Error %d\n", margin_of_error);
   54.29 +
   54.30 +  goldenWavFile = sf_open(argv[2], SFM_READ, &goldenInfo);
   54.31 +  if (goldenWavFile == NULL){      
   54.32 +    printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[2], sf_strerror (NULL)) ;
   54.33 +    exit (1) ;
   54.34 +  }
   54.35 +
   54.36 +  outputWavFile = sf_open(argv[3], SFM_READ, &outputInfo);
   54.37 +  if (outputWavFile == NULL){      
   54.38 +    printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[3], sf_strerror (NULL)) ;
   54.39 +    exit (1) ;
   54.40 +  }
   54.41 + 
   54.42 +  int max_diff = 0;
   54.43 +
   54.44 +  // it is possible that the modified pipeline might introduce a few
   54.45 +  // dummy tokens at the beginning of the stream, we'll just drop them
   54.46 +  for(int i = 0; i < drop; i++){
   54.47 +    sf_read_short(outputWavFile, &buffB, 1);
   54.48 +  }
   54.49 +
   54.50 +  int count=0;
   54.51 +
   54.52 +  while(sf_read_short(goldenWavFile, &buffA, 1)==1){
   54.53 +
   54.54 +    if(sf_read_short(outputWavFile, &buffB, 1) != 1){
   54.55 +      // the streams are of different length
   54.56 +      printf("failed (length)\n");
   54.57 +      exit(0);
   54.58 +    }
   54.59 +    
   54.60 +    int td =  (buffA > buffB) ? (buffA - buffB) : (buffB - buffA);
   54.61 +    max_diff = (td > max_diff) ? td : max_diff;
   54.62 +    
   54.63 +    if(max_diff > margin_of_error){
   54.64 +      printf("max_diff %x on drop %d (count %d)\n", max_diff, drop,count);
   54.65 +      return 1;
   54.66 +    }
   54.67 +
   54.68 +    count++;
   54.69 +  }
   54.70 +
   54.71 +  printf("max_diff %x on drop %d\n", max_diff, drop);
   54.72 +
   54.73 +  if(max_diff > margin_of_error)
   54.74 +    return 1;
   54.75 +  else
   54.76 +    return 0;
   54.77 +}
   54.78 +
   54.79 +int
   54.80 +main(int argc, char* argv[])
   54.81 +{
   54.82 +  for(int drop = 0; drop < 10; drop++){
   54.83 +    if(do_check(drop, argc, argv)==0){
   54.84 +      printf("passed on drop %d\n", drop);
   54.85 +      exit(0);
   54.86 +    }
   54.87 +  }
   54.88 +  printf("failed\n");
   54.89 +  exit(1);
   54.90 +}
    55.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    55.2 +++ b/tools/audio_processor_test/compare_wavs_freq/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    55.3 @@ -0,0 +1,1 @@
    55.4 +../../../modules/bluespec/mit-6.375/common/DFT.cpp
    55.5 \ No newline at end of file
    56.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    56.2 +++ b/tools/audio_processor_test/compare_wavs_freq/Makefile	Wed Apr 28 08:19:09 2010 -0400
    56.3 @@ -0,0 +1,6 @@
    56.4 +default: all
    56.5 +
    56.6 +clean:
    56.7 +	rm -f *.o compare_wavs_freq
    56.8 +all:
    56.9 +	g++  /usr/lib/libsndfile.so DFT.cpp compare_wavs_freq.cpp -o compare_wavs_freq
   56.10 \ No newline at end of file
    57.1 Binary file tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq has changed
    58.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    58.2 +++ b/tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq.cpp	Wed Apr 28 08:19:09 2010 -0400
    58.3 @@ -0,0 +1,193 @@
    58.4 +#include <stdio.h>
    58.5 +#include <assert.h>
    58.6 +#include <string.h>
    58.7 +#include <sndfile.h>
    58.8 +#include <stdlib.h>
    58.9 +
   58.10 +// foreward declaration. This is defined in DFT.cpp
   58.11 +int DFT(int dir,int m,double *x1,double *y1);
   58.12 +const int Points = 32;
   58.13 +const int Window = 32;
   58.14 +
   58.15 +void BubbleSort(double* arr, int* idxs)
   58.16 +{
   58.17 +  int i, j, flag = 1;
   58.18 +  double temp;
   58.19 +  int tmp1;
   58.20 +  for(i = 1; (i <= Points) && flag; i++)
   58.21 +    {
   58.22 +      flag = 0;
   58.23 +      for (j=0; j < (Points -1); j++)
   58.24 +	{
   58.25 +	  if (arr[j+1] > arr[j])
   58.26 +	    { 
   58.27 +	      temp = arr[j];    
   58.28 +	      tmp1 = idxs[j];
   58.29 +	      arr[j] = arr[j+1];
   58.30 +	      idxs[j] = idxs[j+1];
   58.31 +	      arr[j+1] = temp;
   58.32 +	      idxs[j+1] = tmp1;
   58.33 +	      flag = 1;
   58.34 +	    }
   58.35 +	}
   58.36 +    }
   58.37 +}
   58.38 +
   58.39 +int
   58.40 +do_check (int drop, int argc, char * argv [])
   58.41 +{
   58.42 +  int margin_of_error;
   58.43 +  SNDFILE* goldenWavFile;
   58.44 +  SNDFILE* outputWavFile;
   58.45 +  SF_INFO goldenInfo ;
   58.46 +  SF_INFO outputInfo ;
   58.47 +  short int buffA[Points];
   58.48 +  short int buffB[Points];
   58.49 +  double drA[Window][Points];
   58.50 +  double drB[Window][Points];
   58.51 +  double diA[Points];
   58.52 +  double diB[Points];
   58.53 +
   58.54 +  memset (&goldenInfo, 0, sizeof (goldenInfo)) ;
   58.55 +  memset (&outputInfo, 0, sizeof (outputInfo)) ;
   58.56 +
   58.57 +  margin_of_error = atoi(argv[1]);
   58.58 +
   58.59 +  printf("Checking for Margin of Error %d\n", margin_of_error);
   58.60 +
   58.61 +  goldenWavFile = sf_open(argv[2], SFM_READ, &goldenInfo);
   58.62 +  if (goldenWavFile == NULL){      
   58.63 +    printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[2], sf_strerror (NULL)) ;
   58.64 +    exit (1) ;
   58.65 +  }
   58.66 +
   58.67 +  outputWavFile = sf_open(argv[3], SFM_READ, &outputInfo);
   58.68 +  if (outputWavFile == NULL){      
   58.69 +    printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[3], sf_strerror (NULL)) ;
   58.70 +    exit (1) ;
   58.71 +  }
   58.72 + 
   58.73 +  int max_diff = 0;
   58.74 +
   58.75 +  // it is possible that the modified pipeline might introduce a few
   58.76 +  // dummy tokens at the beginning of the stream, we'll just drop them
   58.77 +  for(int i = 0; i < drop; i++){
   58.78 +    sf_read_short(outputWavFile, buffB, 1);
   58.79 +  }
   58.80 +
   58.81 +  int count=0;
   58.82 +
   58.83 +  while(sf_read_short(goldenWavFile, buffA, Points)==Points){
   58.84 +
   58.85 +    if(sf_read_short(outputWavFile, buffB, Points) != Points){
   58.86 +      // the streams are of different length
   58.87 +      printf("failed (length)\n");
   58.88 +      exit(0);
   58.89 +    }
   58.90 +
   58.91 +    int wptr = count%Window;
   58.92 +    
   58.93 +    for(int i = 0; i < Points; i++){
   58.94 +      diA[i] = 0.0;
   58.95 +      diB[i] = 0.0;
   58.96 +      drA[wptr][i] = (double)buffA[i];
   58.97 +      drB[wptr][i] = (double)buffB[i];
   58.98 +    }
   58.99 +
  58.100 +    DFT(1,Points,drA[wptr],diA);
  58.101 +    DFT(1,Points,drB[wptr],diB);
  58.102 +
  58.103 +    //for(int i = 0; i < Points; i++)
  58.104 +    //  printf("%10d  %10d\n", (int)drA[wptr][i], (int)drB[wptr][i]);
  58.105 +    //printf("\n");
  58.106 +
  58.107 +    if (count >= Window){
  58.108 +      double avgA[Points];
  58.109 +      double avgB[Points];
  58.110 +      
  58.111 +      // reset averages to zero
  58.112 +      for(int i = 0; i < Points; i++){
  58.113 +	avgA[i] = 0.0;
  58.114 +	avgB[i] = 0.0;
  58.115 +      }
  58.116 +
  58.117 +      // compute the averages in each bin
  58.118 +      for(int i = 0; i <  Window; i++){
  58.119 +	for(int j = 0; j < Points; j++){
  58.120 +	  avgA[j] += drA[i][j];
  58.121 +	  avgB[j] += drB[i][j];
  58.122 +	}
  58.123 +      }	
  58.124 +
  58.125 +      for(int i = 0; i < Points; i++){
  58.126 +	avgA[i] /= Window;
  58.127 +	avgB[i] /= Window;
  58.128 +      }
  58.129 +
  58.130 +
  58.131 +      // this sucks, as we really should be averaging, but i'm lazy
  58.132 +
  58.133 +      //int idxsA[Points];
  58.134 +      //int idxsB[Points];
  58.135 +
  58.136 +      //for(int i = 0; i < Points; i++){
  58.137 +      //idxsA[i] = i;
  58.138 +      //idxsB[i] = i;
  58.139 +      //}
  58.140 +
  58.141 +      //BubbleSort(avgA, idxsA);
  58.142 +      //BubbleSort(avgB, idxsB);
  58.143 +
  58.144 +      //for(int i = 0; i < 2; i++){
  58.145 +      //int td =  (idxsA[i] > idxsB[i]) ? (idxsA[i] - idxsB[i]) : (idxsB[i] - idxsA[i]);
  58.146 +      //max_diff = (td > max_diff) ? td : max_diff;
  58.147 +      //}
  58.148 +      
  58.149 +
  58.150 +      int scoreA = 0;
  58.151 +      int scoreB = 0;
  58.152 +      int threshold = 100;
  58.153 +
  58.154 +      // this is brittle, but it works **for now**
  58.155 +      for(int i = 0; i < Points; i++){
  58.156 +	if(abs((int)avgA[i]) > threshold)
  58.157 +	  scoreA++;
  58.158 +	if(abs((int)avgB[i]) > threshold)
  58.159 +	  scoreB++;
  58.160 +      }
  58.161 +
  58.162 +      printf("scoreA %d   scoreB %d\n", scoreA, scoreB);
  58.163 +
  58.164 +      int td = (scoreA > scoreB) ? (scoreA - scoreB) : (scoreB - scoreA);
  58.165 +      max_diff = (td > max_diff) ? td : max_diff;      
  58.166 +
  58.167 +      if(max_diff > margin_of_error){
  58.168 +	printf("max_diff %x on drop %d (count %d)\n", max_diff, drop,count);
  58.169 +	return 1;
  58.170 +      }
  58.171 +
  58.172 +    }
  58.173 +
  58.174 +    count++;
  58.175 +  }
  58.176 +
  58.177 +  printf("max_diff %d on drop %d\n", max_diff, drop);
  58.178 +
  58.179 +  if(((int)max_diff) > margin_of_error)
  58.180 +    return 1;
  58.181 +  else
  58.182 +    return 0;
  58.183 +}
  58.184 +
  58.185 +int
  58.186 +main(int argc, char* argv[])
  58.187 +{
  58.188 +  for(int drop = 0; drop < 10; drop++){
  58.189 +    if(do_check(drop, argc, argv)==0){
  58.190 +      printf("passed on drop %d\n", drop);
  58.191 +      exit(0);
  58.192 +    }
  58.193 +  }
  58.194 +  printf("failed\n");
  58.195 +  exit(1);
  58.196 +}
    59.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    59.2 +++ b/tools/audio_processor_test/cosine_window/checker/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    59.3 @@ -0,0 +1,1 @@
    59.4 +../../../../modules/bluespec/mit-6.375/common/DFT.cpp
    59.5 \ No newline at end of file
    60.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    60.2 +++ b/tools/audio_processor_test/cosine_window/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    60.3 @@ -0,0 +1,8 @@
    60.4 +default: all
    60.5 +
    60.6 +clean:
    60.7 +	rm -f *.o checker
    60.8 +
    60.9 +all:
   60.10 +	g++  /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker
   60.11 +	cd ./compare_wavs/ && make clean && make
    61.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    61.2 +++ b/tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    61.3 @@ -0,0 +1,1 @@
    61.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    61.5 \ No newline at end of file
    62.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    62.2 +++ b/tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    62.3 @@ -0,0 +1,1 @@
    62.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    62.5 \ No newline at end of file
    63.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    63.2 +++ b/tools/audio_processor_test/cosine_window/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    63.3 @@ -0,0 +1,248 @@
    63.4 +#include <stdio.h>
    63.5 +#include <stdlib.h>
    63.6 +#include <math.h>
    63.7 +#include <assert.h>
    63.8 +#include <string.h>
    63.9 +#include <math.h>
   63.10 +#include "SndfileWavUtil.h"
   63.11 +
   63.12 +const  int Taps = 9;
   63.13 +const  int Points = 8;
   63.14 +const  int log_Points = 3;
   63.15 +static int newest;
   63.16 +static short int x[Taps] = {0,0,0,0,0,0,0,0,0};
   63.17 +static short int fir(short int);
   63.18 +
   63.19 +// foreward declaration. This is defined in DFT.cpp
   63.20 +int DFT(int dir,int m,double *x1,double *y1);
   63.21 +
   63.22 +
   63.23 +static int x_to_y(int x, int y)
   63.24 +{
   63.25 +  assert(y>0);
   63.26 +  int rv = x;
   63.27 +  while(y-->1)
   63.28 +    x *= x;
   63.29 +  return rv;
   63.30 +}
   63.31 +
   63.32 +// function implemented in LinearWindowingFunction.bsv
   63.33 +static double windowing_fn(int index)
   63.34 +{
   63.35 +  double pi = 3.14159265;
   63.36 +  double i = (double)index;
   63.37 +  return sin(0.5*pi* (sin((i + 0.5)/Points * pi) * sin((i + 0.5)/Points * pi)));
   63.38 +}
   63.39 +
   63.40 +// lifted from the bluespec code
   63.41 +static double h[Taps] =  {-0.0124,
   63.42 +			  0.0,
   63.43 +			  -0.0133,
   63.44 +			  0.0,
   63.45 +			  0.8181,
   63.46 +			  0.0,
   63.47 +			  -0.0133,
   63.48 +			  0.0,
   63.49 +			  -0.0124};
   63.50 +
   63.51 +
   63.52 +short int
   63.53 +fir(short int sample)
   63.54 +{
   63.55 +  x[newest] = sample; 
   63.56 +  double y = 0;
   63.57 +  for (int k = 0; k < Taps; k++) { 
   63.58 +    short int bits = x[(newest+k)%Taps];
   63.59 +    double x = (double)bits;
   63.60 +    y += h[k] * x; 
   63.61 +  }
   63.62 +  newest = (newest == 0) ? (Taps-1) : (newest-1);
   63.63 +  short int rv = ((short int)y)&0x0000FFFF;
   63.64 +  return rv;
   63.65 +}
   63.66 +
   63.67 +
   63.68 +int
   63.69 +main (int argc, char * argv [])
   63.70 +{
   63.71 +  const char* inputWavFileName;
   63.72 +  const char* outputWavFileName;
   63.73 +
   63.74 +  FILE *inputPcmFile;
   63.75 +  FILE *firPcmFile;
   63.76 +  FILE *ifftPcmFile;
   63.77 +  FILE *outputPcmFile;
   63.78 +
   63.79 +  short int sample;
   63.80 +  short int samples[Points];
   63.81 +  const unsigned int short_sz = sizeof(short int);
   63.82 +
   63.83 +  inputWavFileName = argv[1];
   63.84 +  outputWavFileName = argv[2];
   63.85 +
   63.86 +  // Convert input wav to pcm
   63.87 +  generate_pcm(inputWavFileName, "input.pcm");
   63.88 +
   63.89 +  inputPcmFile  = fopen("input.pcm", "r");
   63.90 +  firPcmFile    = fopen("fir.pcm", "w");
   63.91 +
   63.92 +  assert(inputPcmFile);
   63.93 +  assert(firPcmFile);
   63.94 +
   63.95 +  newest = 0;
   63.96 +  memset(x, 0, sizeof(x));
   63.97 +
   63.98 +  while(fread(&sample, short_sz, 1, inputPcmFile)) {
   63.99 +    sample = fir(sample);
  63.100 +    assert(fwrite(&sample,short_sz, 1, firPcmFile));
  63.101 +  }
  63.102 +
  63.103 +  fclose(inputPcmFile);
  63.104 +  fclose(firPcmFile);
  63.105 +
  63.106 +  firPcmFile  = fopen("fir.pcm", "r");
  63.107 +  ifftPcmFile = fopen("ifft.pcm", "w");
  63.108 +
  63.109 +  assert(firPcmFile);
  63.110 +  assert(ifftPcmFile);
  63.111 +
  63.112 +  int read = 0;
  63.113 +
  63.114 +  // read in half a frame
  63.115 +  for(int i = 0; i < Points/2; i++)
  63.116 +    read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  63.117 +
  63.118 +  if(read > 0)
  63.119 +    assert(read==Points/2);
  63.120 +
  63.121 +  // we will do an 'Points' point fft, and then undo it
  63.122 +  while(true) {
  63.123 +
  63.124 +    read = 0;
  63.125 +
  63.126 +    // shift last half frame to head
  63.127 +    for(int i = 0; i < Points/2; i++)
  63.128 +      samples[i] = samples[(Points/2)+i];
  63.129 +
  63.130 +    // read in another half frame
  63.131 +    for(int i = 0; i < Points/2; i++)
  63.132 +      read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  63.133 +
  63.134 +    if(read == 0)
  63.135 +      break;
  63.136 +
  63.137 +    // pad out the 
  63.138 +    if(read < Points/2){
  63.139 +      for(int i = read; i < Points/2; i++)
  63.140 +	samples[Points/2+i] = 0;
  63.141 +    }
  63.142 +
  63.143 +    double dsamples[Points];
  63.144 +    double dimag[Points];
  63.145 +
  63.146 +    // this shift is performed in the Bluespec
  63.147 +    for(int i = 0; i < Points; i++){
  63.148 +      dsamples[i] = (double)(samples[i]>>log_Points);
  63.149 +      dimag[i] = 0.0;
  63.150 +    }
  63.151 +
  63.152 +
  63.153 +    //for(int i = 0; i < Points; i++)
  63.154 +    //  printf("%d ", (int)dsamples[i]);
  63.155 +    //printf("\n");
  63.156 +
  63.157 +    DFT(1,Points,dsamples,dimag);
  63.158 +
  63.159 +    // shift up by 'shift' (in)
  63.160 +    int shift = 2;
  63.161 +
  63.162 +    for(int i = 0; i < Points/2; i++){
  63.163 +
  63.164 +      dsamples[Points/2-1-i] = dsamples[Points/2-1-i-shift];
  63.165 +      dimag[Points/2-1-i] = dimag[Points/2-1-i-shift];
  63.166 +
  63.167 +
  63.168 +      dsamples[Points/2+i] = dsamples[Points/2+i+shift];
  63.169 +      dimag[Points/2+i] = dimag[Points/2+i+shift];
  63.170 +
  63.171 +    }
  63.172 +
  63.173 +    // fill in the lower points
  63.174 +    for(int i = 0; i < shift; i++){
  63.175 +
  63.176 +      dsamples[i] = 0.0;
  63.177 +      dimag[i] = 0.0;
  63.178 +
  63.179 +      dsamples[Points-1-i] = 0.0;
  63.180 +      dimag[Points-1-i] = 0.0;
  63.181 +    }
  63.182 +
  63.183 +    DFT(-1,Points,dsamples,dimag);
  63.184 +
  63.185 +    short int ifftResult[Points];
  63.186 +    for(int i = 0; i < Points; i++)
  63.187 +      ifftResult[i] = (int)dsamples[i];
  63.188 +
  63.189 +    // strip off the padding
  63.190 +    int write = (read < Points/2) ? read+(Points/2) : Points;
  63.191 +    for(int i = 0; i < write; i++)
  63.192 +      assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile));
  63.193 +
  63.194 +    // break out if we're at the end
  63.195 +    if(read < Points/2){
  63.196 +       break;
  63.197 +    }
  63.198 +  }
  63.199 +
  63.200 +  fclose(firPcmFile);
  63.201 +  fclose(ifftPcmFile);
  63.202 +
  63.203 +  // do the windowing
  63.204 +
  63.205 +  ifftPcmFile   = fopen("ifft.pcm", "r");
  63.206 +  outputPcmFile = fopen("output.pcm", "w");
  63.207 +
  63.208 +  assert(ifftPcmFile);
  63.209 +  assert(outputPcmFile);
  63.210 +
  63.211 +  short int samplesA[Points];
  63.212 +  short int samplesB[Points];
  63.213 +
  63.214 +  bool valid_stream = true;
  63.215 +  // write out the first half frame
  63.216 +  for(int i = 0; i < Points/2; i++){
  63.217 +    valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile);
  63.218 +    valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile);
  63.219 +  }
  63.220 +
  63.221 +  while(valid_stream){
  63.222 +
  63.223 +    for(int i = 0; i < Points/2; i++)
  63.224 +      valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile);
  63.225 +
  63.226 +    for(int i = 0; i < Points; i++)
  63.227 +      valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile);
  63.228 +
  63.229 +    for(int i = 0; i < Points/2; i++)
  63.230 +      valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); 
  63.231 +
  63.232 +
  63.233 +    // this isn't quite right
  63.234 +    if(!valid_stream)
  63.235 +      break;
  63.236 +
  63.237 +    for(int i = 0; i < Points; i++){
  63.238 +      double window = windowing_fn(i);
  63.239 +      short int rv = (short int)(((double)samplesA[i])*(1.0-window) + window*((double)samplesB[i]));
  63.240 +      assert(fwrite(&rv,short_sz,1,outputPcmFile));    
  63.241 +    }
  63.242 +
  63.243 +  }
  63.244 +
  63.245 +  fclose(ifftPcmFile);
  63.246 +  fclose(outputPcmFile);
  63.247 +
  63.248 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
  63.249 +
  63.250 +}
  63.251 +
    64.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    64.2 +++ b/tools/audio_processor_test/cosine_window/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    64.3 @@ -0,0 +1,1 @@
    64.4 +../../compare_wavs_freq/
    64.5 \ No newline at end of file
    65.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    65.2 +++ b/tools/audio_processor_test/fft/checker/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    65.3 @@ -0,0 +1,1 @@
    65.4 +../../../../modules/bluespec/mit-6.375/common/DFT.cpp
    65.5 \ No newline at end of file
    66.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    66.2 +++ b/tools/audio_processor_test/fft/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    66.3 @@ -0,0 +1,8 @@
    66.4 +default: all
    66.5 +
    66.6 +clean:
    66.7 +	rm -f *.o checker
    66.8 +
    66.9 +all:
   66.10 +	g++  /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker
   66.11 +	cd ./compare_wavs/ && make clean && make
    67.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    67.2 +++ b/tools/audio_processor_test/fft/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    67.3 @@ -0,0 +1,1 @@
    67.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    67.5 \ No newline at end of file
    68.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    68.2 +++ b/tools/audio_processor_test/fft/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    68.3 @@ -0,0 +1,1 @@
    68.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    68.5 \ No newline at end of file
    69.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    69.2 +++ b/tools/audio_processor_test/fft/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    69.3 @@ -0,0 +1,136 @@
    69.4 +#include <stdio.h>
    69.5 +#include <stdlib.h>
    69.6 +#include <math.h>
    69.7 +#include <assert.h>
    69.8 +#include <string.h>
    69.9 +#include "SndfileWavUtil.h"
   69.10 +
   69.11 +const  int Taps = 9;
   69.12 +const  int Points = 8;
   69.13 +const  int log_Points = 3;
   69.14 +static int newest;
   69.15 +static short int x[Taps] = {0,0,0,0,0,0,0,0,0};
   69.16 +static short int fir(short int);
   69.17 +
   69.18 +// foreward declaration. This is defined in DFT.cpp
   69.19 +int DFT(int dir,int m,double *x1,double *y1);
   69.20 +
   69.21 +// lifted from the bluespec code
   69.22 +static double h[Taps] =  {-0.0124,
   69.23 +			  0.0,
   69.24 +			  -0.0133,
   69.25 +			  0.0,
   69.26 +			  0.8181,
   69.27 +			  0.0,
   69.28 +			  -0.0133,
   69.29 +			  0.0,
   69.30 +			  -0.0124};
   69.31 +
   69.32 +int
   69.33 +main (int argc, char * argv [])
   69.34 +{
   69.35 +  const char* inputWavFileName;
   69.36 +  const char* outputWavFileName;
   69.37 +
   69.38 +  FILE *inputPcmFile;
   69.39 +  FILE *firPcmFile;
   69.40 +  FILE *outputPcmFile;
   69.41 +
   69.42 +  short int sample;
   69.43 +  short int samples[Points];
   69.44 +
   69.45 +  inputWavFileName = argv[1];
   69.46 +  outputWavFileName = argv[2];
   69.47 +
   69.48 +  // Convert input wav to pcm
   69.49 +  generate_pcm(inputWavFileName, "input.pcm");
   69.50 +
   69.51 +  inputPcmFile  = fopen("input.pcm", "r");
   69.52 +  firPcmFile    = fopen("fir.pcm", "w");
   69.53 +
   69.54 +  assert(inputPcmFile);
   69.55 +  assert(firPcmFile);
   69.56 +
   69.57 +  newest = 0;
   69.58 +  memset(x, 0, sizeof(x));
   69.59 +
   69.60 +  while(fread(&sample, 2, 1, inputPcmFile)) {
   69.61 +    sample = fir(sample);
   69.62 +    assert(fwrite(&sample,2,1,firPcmFile));
   69.63 +  }
   69.64 +
   69.65 +  fclose(inputPcmFile);
   69.66 +  fclose(firPcmFile);
   69.67 +
   69.68 +  firPcmFile    = fopen("fir.pcm", "r");
   69.69 +  outputPcmFile = fopen("output.pcm", "w");
   69.70 +
   69.71 +  assert(firPcmFile);
   69.72 +  assert(outputPcmFile);
   69.73 +
   69.74 +  // we will do an Points point fft, and then undo it
   69.75 +  while(true) {
   69.76 +
   69.77 +    int read = fread(samples, 2,Points,firPcmFile);
   69.78 +
   69.79 +    if(read == 0)
   69.80 +      break;
   69.81 +
   69.82 +    // pad out the 
   69.83 +    if(read<Points){
   69.84 +      for(int i = read; i < Points; i++)
   69.85 +	samples[i] = 0;
   69.86 +    }
   69.87 +
   69.88 +    double dsamples[Points];
   69.89 +    double dimag[Points];
   69.90 +
   69.91 +    // This shift is performed in the HW
   69.92 +    for(int i = 0; i < Points; i++){
   69.93 +      dsamples[i] = (double)(samples[i]>>log_Points);
   69.94 +      dimag[i] = 0.0;
   69.95 +    }
   69.96 +
   69.97 +    DFT(1,Points,dsamples,dimag);
   69.98 +    DFT(-1,Points,dsamples,dimag);
   69.99 +
  69.100 +    for(int i = 0; i < Points; i++){
  69.101 +      samples[i] = (int)dsamples[i];
  69.102 +    }
  69.103 +
  69.104 +    if(read < Points){
  69.105 +      assert(fwrite(samples,2,read,outputPcmFile)==read);
  69.106 +      break;
  69.107 +    } else {
  69.108 +      assert(fwrite(samples,2,Points,outputPcmFile)==Points);
  69.109 +    }
  69.110 +  }
  69.111 +
  69.112 +  fclose(firPcmFile);
  69.113 +  fclose(outputPcmFile);
  69.114 +
  69.115 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
  69.116 +
  69.117 +}
  69.118 +
  69.119 +short int
  69.120 +fir(short int sample)
  69.121 +{
  69.122 +
  69.123 +  x[newest] = sample; 
  69.124 +  double y = 0;
  69.125 +
  69.126 +  for (int k = 0; k < Taps; k++) { 
  69.127 +
  69.128 +    short int bits = x[(newest+k)%Taps];
  69.129 +    double x = (double)bits;
  69.130 +    y += h[k] * x; 
  69.131 +
  69.132 +  }
  69.133 +
  69.134 +  newest = (newest == 0) ? (Taps-1) : (newest-1);
  69.135 +
  69.136 +  short int rv = ((short int)y)&0x0000FFFF;
  69.137 +  return rv;
  69.138 +}
  69.139 +
    70.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    70.2 +++ b/tools/audio_processor_test/fft/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    70.3 @@ -0,0 +1,1 @@
    70.4 +../../compare_wavs/
    70.5 \ No newline at end of file
    71.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    71.2 +++ b/tools/audio_processor_test/fir/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    71.3 @@ -0,0 +1,8 @@
    71.4 +default: all
    71.5 +
    71.6 +clean:
    71.7 +	rm -f *.o checker
    71.8 +
    71.9 +all:
   71.10 +	g++  /usr/lib/libsndfile.so SndfileWavUtil.cpp checker.cpp -o checker
   71.11 +	cd ./compare_wavs/ && make clean && make
    72.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    72.2 +++ b/tools/audio_processor_test/fir/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    72.3 @@ -0,0 +1,1 @@
    72.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    72.5 \ No newline at end of file
    73.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    73.2 +++ b/tools/audio_processor_test/fir/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    73.3 @@ -0,0 +1,1 @@
    73.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    73.5 \ No newline at end of file
    74.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    74.2 +++ b/tools/audio_processor_test/fir/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    74.3 @@ -0,0 +1,81 @@
    74.4 +#include <stdio.h>
    74.5 +#include <assert.h>
    74.6 +#include <string.h>
    74.7 +#include "SndfileWavUtil.h"
    74.8 +
    74.9 +const  int Taps = 9;
   74.10 +static int newest;
   74.11 +static short int x[Taps] = {0,0,0,0,0,0,0,0,0};
   74.12 +static short int fir(short int);
   74.13 +const  int short_sz = sizeof(short);
   74.14 +
   74.15 +// lifted from the bluespec code
   74.16 +static double h[Taps] =  {-0.0124,
   74.17 +			  0.0,
   74.18 +			  -0.0133,
   74.19 +			  0.0,
   74.20 +			  0.8181,
   74.21 +			  0.0,
   74.22 +			  -0.0133,
   74.23 +			  0.0,
   74.24 +			  -0.0124};
   74.25 +
   74.26 +
   74.27 +int
   74.28 +main (int argc, char * argv [])
   74.29 +{
   74.30 +  const char* inputWavFileName;
   74.31 +  const char* outputWavFileName;
   74.32 +
   74.33 +  FILE *inputPcmFile;
   74.34 +  FILE *outputPcmFile;
   74.35 +
   74.36 +  short int sample;
   74.37 +
   74.38 +  inputWavFileName = argv[1];
   74.39 +  outputWavFileName = argv[2];
   74.40 +
   74.41 +  // Convert input wav to pcm
   74.42 +  generate_pcm(inputWavFileName, "input.pcm");
   74.43 +
   74.44 +  inputPcmFile = fopen("input.pcm", "r");
   74.45 +  outputPcmFile = fopen("output.pcm", "w");
   74.46 +
   74.47 +  assert(inputPcmFile);
   74.48 +  assert(outputPcmFile);
   74.49 +
   74.50 +  newest = 0;
   74.51 +  memset(x, 0, sizeof(x));
   74.52 +
   74.53 +  while(fread(&sample, short_sz, 1, inputPcmFile)) {
   74.54 +    sample = fir(sample);
   74.55 +    assert(fwrite(&sample,short_sz,1,outputPcmFile));
   74.56 +  } 
   74.57 +
   74.58 +  fclose(inputPcmFile);
   74.59 +  fclose(outputPcmFile);
   74.60 +
   74.61 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
   74.62 +}
   74.63 +
   74.64 +short int
   74.65 +fir(short int sample)
   74.66 +{
   74.67 +
   74.68 +  x[newest] = sample; 
   74.69 +  double y = 0;
   74.70 +
   74.71 +  for (int k = 0; k < Taps; k++) { 
   74.72 +
   74.73 +    short int bits = x[(newest+k)%Taps];
   74.74 +    double x = (double)bits;
   74.75 +    y += h[k] * x; 
   74.76 +
   74.77 +  }
   74.78 +
   74.79 +  newest = (newest == 0) ? (Taps-1) : (newest-1);
   74.80 +
   74.81 +  short int rv = ((short int)y)&0x0000FFFF;
   74.82 +  return rv;
   74.83 +}
   74.84 +
    75.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    75.2 +++ b/tools/audio_processor_test/fir/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    75.3 @@ -0,0 +1,1 @@
    75.4 +../../compare_wavs/
    75.5 \ No newline at end of file
    76.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    76.2 +++ b/tools/audio_processor_test/gen_tone/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    76.3 @@ -0,0 +1,1 @@
    76.4 +../../../modules/bluespec/mit-6.375/common/DFT.cpp
    76.5 \ No newline at end of file
    77.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    77.2 +++ b/tools/audio_processor_test/gen_tone/Makefile	Wed Apr 28 08:19:09 2010 -0400
    77.3 @@ -0,0 +1,6 @@
    77.4 +default: all
    77.5 +
    77.6 +clean:
    77.7 +	rm -f *.o gen_tone *.pcm
    77.8 +all:
    77.9 +	g++  /usr/lib/libsndfile.so SndfileWavUtil.cpp DFT.cpp gen_tone.cpp -o gen_tone
   77.10 \ No newline at end of file
    78.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    78.2 +++ b/tools/audio_processor_test/gen_tone/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    78.3 @@ -0,0 +1,1 @@
    78.4 +../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    78.5 \ No newline at end of file
    79.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    79.2 +++ b/tools/audio_processor_test/gen_tone/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    79.3 @@ -0,0 +1,1 @@
    79.4 +../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    79.5 \ No newline at end of file
    80.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    80.2 +++ b/tools/audio_processor_test/gen_tone/gen_shift	Wed Apr 28 08:19:09 2010 -0400
    80.3 @@ -0,0 +1,2 @@
    80.4 +./gen_tone 300 7 7 ../../../benchmarks/audio_processor_test/null.wav shift.wav
    80.5 +mv shift.wav ../../../benchmarks/audio_processor_test/shift.wav
    80.6 \ No newline at end of file
    81.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    81.2 +++ b/tools/audio_processor_test/gen_tone/gen_tone.cpp	Wed Apr 28 08:19:09 2010 -0400
    81.3 @@ -0,0 +1,63 @@
    81.4 +#include <stdio.h>
    81.5 +#include <assert.h>
    81.6 +#include <string.h>
    81.7 +#include <sndfile.h>
    81.8 +#include <stdlib.h>
    81.9 +#include "SndfileWavUtil.h"
   81.10 +
   81.11 +// foreward declaration. This is defined in DFT.cpp
   81.12 +int DFT(int dir,int m,double *x1,double *y1);
   81.13 +
   81.14 +const int Points = 8;
   81.15 +
   81.16 +int
   81.17 +do_gen (int argc, char * argv [])
   81.18 +{
   81.19 +  int frames;
   81.20 +  int targ_freqA;
   81.21 +  int targ_freqB;
   81.22 +  char* refWavFile;
   81.23 +  char* outWavFile;
   81.24 +  FILE* outPCM;
   81.25 +  const int short_sz = sizeof(short int);
   81.26 +
   81.27 +  frames = atoi(argv[1]);
   81.28 +  targ_freqA = atoi(argv[2]);
   81.29 +  targ_freqB = atoi(argv[3]);
   81.30 +  refWavFile = argv[4];
   81.31 +  outWavFile = argv[5];
   81.32 +
   81.33 +  outPCM = fopen("output.pcm", "w");
   81.34 +
   81.35 +  printf("targ_freqA %d\ntarg_freqB %d\nframes %d\n", targ_freqA, targ_freqB, frames);
   81.36 +
   81.37 +  while(frames-- > 0){
   81.38 +
   81.39 +    double dreal[Points];
   81.40 +    double dimag[Points];
   81.41 +
   81.42 +    for(int i = 0; i < Points; i++)
   81.43 +      dreal[i] = (i == targ_freqA) ? 1000 : (i == targ_freqB) ? 1000 : 0;
   81.44 +    for(int i = 0; i < Points; i++)
   81.45 +      dimag[i] = 0.0;
   81.46 +    
   81.47 +    DFT(-1,Points,dreal,dimag);
   81.48 +
   81.49 +    for(int i = 0; i < Points; i++){
   81.50 +      short int rv = (int)dreal[i];
   81.51 +      assert(fwrite(&rv,short_sz,1,outPCM));
   81.52 +    }
   81.53 +
   81.54 +  }
   81.55 +
   81.56 +  fclose(outPCM);
   81.57 +
   81.58 +  generate_wav("output.pcm", refWavFile, outWavFile);
   81.59 +}
   81.60 +
   81.61 +int
   81.62 +main(int argc, char* argv[])
   81.63 +{
   81.64 +  do_gen(argc, argv);
   81.65 +  exit(1);
   81.66 +}
    82.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    82.2 +++ b/tools/audio_processor_test/null/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    82.3 @@ -0,0 +1,8 @@
    82.4 +default: all
    82.5 +
    82.6 +clean:
    82.7 +	rm -f *.o checker
    82.8 +
    82.9 +all:
   82.10 +	g++  /usr/lib/libsndfile.so SndfileWavUtil.cpp checker.cpp -o checker
   82.11 +	cd ./compare_wavs/ && make clean && make
    83.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    83.2 +++ b/tools/audio_processor_test/null/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    83.3 @@ -0,0 +1,125 @@
    83.4 +#include <stdlib.h>
    83.5 +#include <string.h>
    83.6 +#include <errno.h>
    83.7 +#include <math.h>
    83.8 +#include <sndfile.h>
    83.9 +#include "SndfileWavUtil.h"
   83.10 +
   83.11 +void
   83.12 +generate_wav(const char * pcmfilename, const char * samplewavfilename, const char * outputwavfilename)
   83.13 +{
   83.14 +  char outfilename[2048];
   83.15 +  SNDFILE * outfile ;
   83.16 +  SNDFILE * wavfile ;
   83.17 +  SNDFILE * pcmfile ;
   83.18 +  SF_INFO wavinfo ;
   83.19 +  SF_INFO pcminfo ;
   83.20 +  int buff;
   83.21 +  SF_INSTRUMENT inst ;
   83.22 +  
   83.23 +  memset (&wavinfo, 0, sizeof (wavinfo)) ;
   83.24 +
   83.25 +  
   83.26 +  wavfile = sf_open(samplewavfilename, SFM_READ, &wavinfo);
   83.27 +
   83.28 +  if (wavfile == NULL){      
   83.29 +    printf ("\nERROR : Not able to open wav file named '%s' : %s/\n", samplewavfilename, sf_strerror (NULL)) ;
   83.30 +    exit (1) ;
   83.31 +  } ;
   83.32 +
   83.33 +  printf("WAV format: %x\n", wavinfo.format);
   83.34 +
   83.35 +  if (!((wavinfo.format & SF_FORMAT_PCM_16) && (wavinfo.channels == 1) && 
   83.36 +        (wavinfo.format & SF_FORMAT_WAV))){
   83.37 +    printf("\nERROR : .wav file must be SF_FORMAT_PCM_16 in mono\n");
   83.38 +  }
   83.39 +
   83.40 +  pcminfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
   83.41 +  pcminfo.samplerate = wavinfo.samplerate;
   83.42 +  pcminfo.channels = wavinfo.channels;
   83.43 +
   83.44 +  pcmfile = sf_open(pcmfilename, SFM_READ, &pcminfo);
   83.45 +
   83.46 +  if (pcmfile == NULL){      
   83.47 +    printf ("\nERROR : Not able to open pcm file named '%s' : %s/\n", pcmfilename, sf_strerror (NULL)) ;
   83.48 +    exit (1) ;
   83.49 +  } ;
   83.50 +
   83.51 +
   83.52 +
   83.53 +  outfile = sf_open(outputwavfilename, SFM_WRITE, &wavinfo);
   83.54 +
   83.55 +  memset (&inst, 0, sizeof (inst)) ;
   83.56 +
   83.57 +  for(int i = SF_STR_FIRST; i <= SF_STR_LAST; i = i + 1) { 
   83.58 +    const char * str =  sf_get_string(wavfile,i);
   83.59 +    if(str != NULL) {
   83.60 +      sf_set_string(outfile,i,str);
   83.61 +    }
   83.62 +  }
   83.63 +  
   83.64 +  if (outfile == NULL){      
   83.65 +    printf ("\nERROR : Not able to create wav file named '%s' : %s/\n", outfilename, sf_strerror (NULL)) ;
   83.66 +    exit (1) ;
   83.67 +  } ;
   83.68 +
   83.69 +  while(sf_read_int(pcmfile, &buff, 1) == 1){
   83.70 +    if(sf_write_int(outfile, &buff, 1) != 1){
   83.71 +      printf("\nERROR : unable to write to '%s' : %s/\n", outfilename, sf_strerror(NULL));
   83.72 +    }
   83.73 +  }
   83.74 +  
   83.75 +  sf_close (wavfile) ;
   83.76 +  sf_close (outfile) ;
   83.77 +  sf_close (pcmfile) ;
   83.78 +  
   83.79 +}
   83.80 +
   83.81 +
   83.82 +void
   83.83 +generate_pcm (const char * wavfilename, const char * pcmfilename)
   83.84 +{
   83.85 +	SNDFILE * wavfile ;
   83.86 +	SNDFILE * pcmfile ;
   83.87 +	SF_INFO wavinfo ;
   83.88 +	SF_INFO pcminfo ;
   83.89 +	int buff;
   83.90 +
   83.91 +	memset (&wavinfo, 0, sizeof (wavinfo)) ;
   83.92 +	memset (&pcminfo, 0, sizeof (pcminfo)) ;
   83.93 +
   83.94 +	wavfile = sf_open (wavfilename, SFM_READ, &wavinfo) ;
   83.95 +
   83.96 +	if (wavfile == NULL){      
   83.97 +	  printf ("\nERROR : Not able to open wav file named '%s' : %s/\n", wavfilename, sf_strerror (NULL)) ;
   83.98 +	  exit (1) ;
   83.99 +	} ;
  83.100 +
  83.101 +	pcminfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16;
  83.102 +	pcminfo.samplerate = wavinfo.samplerate;
  83.103 +	pcminfo.channels = wavinfo.channels;
  83.104 +
  83.105 +	if ((!wavinfo.format & SF_FORMAT_PCM_16) || (!wavinfo.channels == 1)){
  83.106 +	  printf("\nERROR : .wav file must be SF_FORMAT_PCM_16 and mono\n");
  83.107 +	}
  83.108 +
  83.109 +	pcmfile = sf_open (pcmfilename, SFM_WRITE, &pcminfo) ;
  83.110 +
  83.111 +	if (pcmfile == NULL){      
  83.112 +	  printf ("\nERROR : Not able to create pcm file named '%s' : %s/\n", pcmfilename, sf_strerror (NULL)) ;
  83.113 +	  exit (1) ;
  83.114 +	} ;
  83.115 +	
  83.116 +	while(sf_read_int(wavfile, &buff, 1) == 1){
  83.117 +	  if(sf_write_int(pcmfile, &buff, 1) != 1){
  83.118 +	    printf("\nERROR : unable to write to '%s' : %s/\n", pcmfilename, sf_strerror(NULL));
  83.119 +	  }
  83.120 +	}
  83.121 +
  83.122 +	sf_close (wavfile) ;
  83.123 +	sf_close (pcmfile) ;
  83.124 +} 
  83.125 +
  83.126 +
  83.127 +
  83.128 +
    84.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    84.2 +++ b/tools/audio_processor_test/null/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    84.3 @@ -0,0 +1,9 @@
    84.4 +#ifndef _SNDFILE_WAV_UTIL_
    84.5 +#define _SNDFILE_WAV_UTIL_
    84.6 +
    84.7 +int guess_direction (const char * filename1, const char * filename2) ;
    84.8 +int guess_major_format (const char * filename) ;
    84.9 +void generate_pcm(const char * wavfilename, const char * pcmfilename);
   84.10 +void generate_wav(const char * pcmfilename, const char * samplewavfilename, const char * outputwavfilename);
   84.11 +
   84.12 +#endif
    85.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    85.2 +++ b/tools/audio_processor_test/null/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    85.3 @@ -0,0 +1,41 @@
    85.4 +#include <stdio.h>
    85.5 +#include <assert.h>
    85.6 +#include <string.h>
    85.7 +#include "SndfileWavUtil.h"
    85.8 +
    85.9 +typedef unsigned short UINT16;
   85.10 +
   85.11 +int
   85.12 +main (int argc, char * argv [])
   85.13 +{
   85.14 +  const char* inputWavFileName;
   85.15 +  const char* outputWavFileName;
   85.16 +
   85.17 +  FILE *inputPcmFile;
   85.18 +  FILE *outputPcmFile;
   85.19 +
   85.20 +  UINT16 sample;
   85.21 +
   85.22 +  inputWavFileName = argv[1];
   85.23 +  outputWavFileName = argv[2];
   85.24 +
   85.25 +  // Convert input wav to pcm
   85.26 +  generate_pcm(inputWavFileName, "input.pcm");
   85.27 +
   85.28 +  inputPcmFile = fopen("input.pcm", "r");
   85.29 +  outputPcmFile = fopen("output.pcm", "w");
   85.30 +
   85.31 +  assert(inputPcmFile);
   85.32 +  assert(outputPcmFile);
   85.33 +
   85.34 +  while(fread(&sample, 2, 1, inputPcmFile)) {
   85.35 +    assert(fwrite(&sample,2,1,outputPcmFile));
   85.36 +  } 
   85.37 +
   85.38 +  fclose(inputPcmFile);
   85.39 +  fclose(outputPcmFile);
   85.40 +
   85.41 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
   85.42 +
   85.43 +}
   85.44 +
    86.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.2 +++ b/tools/audio_processor_test/null/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    86.3 @@ -0,0 +1,1 @@
    86.4 +../../compare_wavs/
    86.5 \ No newline at end of file
    87.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    87.2 +++ b/tools/audio_processor_test/shift_up/checker/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    87.3 @@ -0,0 +1,1 @@
    87.4 +../../../../modules/bluespec/mit-6.375/common/DFT.cpp
    87.5 \ No newline at end of file
    88.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    88.2 +++ b/tools/audio_processor_test/shift_up/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    88.3 @@ -0,0 +1,8 @@
    88.4 +default: all
    88.5 +
    88.6 +clean:
    88.7 +	rm -f *.o checker
    88.8 +
    88.9 +all:
   88.10 +	g++  /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker
   88.11 +	cd ./compare_wavs/ && make clean && make
    89.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    89.2 +++ b/tools/audio_processor_test/shift_up/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    89.3 @@ -0,0 +1,1 @@
    89.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    89.5 \ No newline at end of file
    90.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    90.2 +++ b/tools/audio_processor_test/shift_up/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    90.3 @@ -0,0 +1,1 @@
    90.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    90.5 \ No newline at end of file
    91.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    91.2 +++ b/tools/audio_processor_test/shift_up/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    91.3 @@ -0,0 +1,248 @@
    91.4 +#include <stdio.h>
    91.5 +#include <stdlib.h>
    91.6 +#include <math.h>
    91.7 +#include <assert.h>
    91.8 +#include <string.h>
    91.9 +#include "SndfileWavUtil.h"
   91.10 +
   91.11 +const  int Taps = 9;
   91.12 +const  int Points = 8;
   91.13 +const  int log_Points = 3;
   91.14 +static int newest;
   91.15 +static short int x[Taps] = {0,0,0,0,0,0,0,0,0};
   91.16 +static short int fir(short int);
   91.17 +
   91.18 +// foreward declaration. This is defined in DFT.cpp
   91.19 +int DFT(int dir,int m,double *x1,double *y1);
   91.20 +
   91.21 +
   91.22 +static int x_to_y(int x, int y)
   91.23 +{
   91.24 +  assert(y>0);
   91.25 +  int rv = x;
   91.26 +  while(y-->1)
   91.27 +    x *= x;
   91.28 +  return rv;
   91.29 +}
   91.30 +
   91.31 +// function implemented in LinearWindowingFunction.bsv
   91.32 +static double windowing_fn(int index)
   91.33 +{
   91.34 +  double i = (double)index;
   91.35 +  double divisor = Points/2; //(double) (x_to_y(2,log_Points-1));
   91.36 +  double rv = (index < Points/2) ? (i / divisor) : ((((double)Points)-i) / divisor);
   91.37 +  return rv;
   91.38 +}
   91.39 +
   91.40 +// lifted from the bluespec code
   91.41 +static double h[Taps] =  {-0.0124,
   91.42 +			  0.0,
   91.43 +			  -0.0133,
   91.44 +			  0.0,
   91.45 +			  0.8181,
   91.46 +			  0.0,
   91.47 +			  -0.0133,
   91.48 +			  0.0,
   91.49 +			  -0.0124};
   91.50 +
   91.51 +
   91.52 +short int
   91.53 +fir(short int sample)
   91.54 +{
   91.55 +  x[newest] = sample; 
   91.56 +  double y = 0;
   91.57 +  for (int k = 0; k < Taps; k++) { 
   91.58 +    short int bits = x[(newest+k)%Taps];
   91.59 +    double x = (double)bits;
   91.60 +    y += h[k] * x; 
   91.61 +  }
   91.62 +  newest = (newest == 0) ? (Taps-1) : (newest-1);
   91.63 +  short int rv = ((short int)y)&0x0000FFFF;
   91.64 +  return rv;
   91.65 +}
   91.66 +
   91.67 +
   91.68 +int
   91.69 +main (int argc, char * argv [])
   91.70 +{
   91.71 +  const char* inputWavFileName;
   91.72 +  const char* outputWavFileName;
   91.73 +
   91.74 +  FILE *inputPcmFile;
   91.75 +  FILE *firPcmFile;
   91.76 +  FILE *ifftPcmFile;
   91.77 +  FILE *outputPcmFile;
   91.78 +
   91.79 +  short int sample;
   91.80 +  short int samples[Points];
   91.81 +  const unsigned int short_sz = sizeof(short int);
   91.82 +
   91.83 +  inputWavFileName = argv[1];
   91.84 +  outputWavFileName = argv[2];
   91.85 +
   91.86 +  // Convert input wav to pcm
   91.87 +  generate_pcm(inputWavFileName, "input.pcm");
   91.88 +
   91.89 +  inputPcmFile  = fopen("input.pcm", "r");
   91.90 +  firPcmFile    = fopen("fir.pcm", "w");
   91.91 +
   91.92 +  assert(inputPcmFile);
   91.93 +  assert(firPcmFile);
   91.94 +
   91.95 +  newest = 0;
   91.96 +  memset(x, 0, sizeof(x));
   91.97 +
   91.98 +  while(fread(&sample, short_sz, 1, inputPcmFile)) {
   91.99 +    sample = fir(sample);
  91.100 +    assert(fwrite(&sample,short_sz, 1, firPcmFile));
  91.101 +  }
  91.102 +
  91.103 +  fclose(inputPcmFile);
  91.104 +  fclose(firPcmFile);
  91.105 +
  91.106 +  firPcmFile  = fopen("fir.pcm", "r");
  91.107 +  ifftPcmFile = fopen("ifft.pcm", "w");
  91.108 +
  91.109 +  assert(firPcmFile);
  91.110 +  assert(ifftPcmFile);
  91.111 +
  91.112 +  int read = 0;
  91.113 +
  91.114 +  // read in half a frame
  91.115 +  for(int i = 0; i < Points/2; i++)
  91.116 +    read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  91.117 +
  91.118 +  if(read > 0)
  91.119 +    assert(read==Points/2);
  91.120 +
  91.121 +  // we will do an 'Points' point fft, and then undo it
  91.122 +  while(true) {
  91.123 +
  91.124 +    read = 0;
  91.125 +
  91.126 +    // shift last half frame to head
  91.127 +    for(int i = 0; i < Points/2; i++)
  91.128 +      samples[i] = samples[(Points/2)+i];
  91.129 +
  91.130 +    // read in another half frame
  91.131 +    for(int i = 0; i < Points/2; i++)
  91.132 +      read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  91.133 +
  91.134 +    if(read == 0)
  91.135 +      break;
  91.136 +
  91.137 +    // pad out the 
  91.138 +    if(read < Points/2){
  91.139 +      for(int i = read; i < Points/2; i++)
  91.140 +	samples[Points/2+i] = 0;
  91.141 +    }
  91.142 +
  91.143 +    double dsamples[Points];
  91.144 +    double dimag[Points];
  91.145 +
  91.146 +    // this shift is performed in the Bluespec
  91.147 +    for(int i = 0; i < Points; i++){
  91.148 +      dsamples[i] = (double)(samples[i]>>log_Points);
  91.149 +      dimag[i] = 0.0;
  91.150 +    }
  91.151 +
  91.152 +
  91.153 +    //for(int i = 0; i < Points; i++)
  91.154 +    //  printf("%d ", (int)dsamples[i]);
  91.155 +    //printf("\n");
  91.156 +
  91.157 +    DFT(1,Points,dsamples,dimag);
  91.158 +
  91.159 +    // shift up by 'shift' (in)
  91.160 +    int shift = 2;
  91.161 +
  91.162 +    for(int i = 0; i < Points/2; i++){
  91.163 +
  91.164 +      dsamples[Points/2-1-i] = dsamples[Points/2-1-i-shift];
  91.165 +      dimag[Points/2-1-i] = dimag[Points/2-1-i-shift];
  91.166 +
  91.167 +
  91.168 +      dsamples[Points/2+i] = dsamples[Points/2+i+shift];
  91.169 +      dimag[Points/2+i] = dimag[Points/2+i+shift];
  91.170 +
  91.171 +    }
  91.172 +
  91.173 +    // fill in the lower points
  91.174 +    for(int i = 0; i < shift; i++){
  91.175 +
  91.176 +      dsamples[i] = 0.0;
  91.177 +      dimag[i] = 0.0;
  91.178 +
  91.179 +      dsamples[Points-1-i] = 0.0;
  91.180 +      dimag[Points-1-i] = 0.0;
  91.181 +    }
  91.182 +
  91.183 +    DFT(-1,Points,dsamples,dimag);
  91.184 +
  91.185 +    short int ifftResult[Points];
  91.186 +    for(int i = 0; i < Points; i++)
  91.187 +      ifftResult[i] = (int)dsamples[i];
  91.188 +
  91.189 +    // strip off the padding
  91.190 +    int write = (read < Points/2) ? read+(Points/2) : Points;
  91.191 +    for(int i = 0; i < write; i++)
  91.192 +      assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile));
  91.193 +
  91.194 +    // break out if we're at the end
  91.195 +    if(read < Points/2){
  91.196 +       break;
  91.197 +    }
  91.198 +  }
  91.199 +
  91.200 +  fclose(firPcmFile);
  91.201 +  fclose(ifftPcmFile);
  91.202 +
  91.203 +  // do the windowing
  91.204 +
  91.205 +  ifftPcmFile   = fopen("ifft.pcm", "r");
  91.206 +  outputPcmFile = fopen("output.pcm", "w");
  91.207 +
  91.208 +  assert(ifftPcmFile);
  91.209 +  assert(outputPcmFile);
  91.210 +
  91.211 +  short int samplesA[Points];
  91.212 +  short int samplesB[Points];
  91.213 +
  91.214 +  bool valid_stream = true;
  91.215 +  // write out the first half frame
  91.216 +  for(int i = 0; i < Points/2; i++){
  91.217 +    valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile);
  91.218 +    valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile);
  91.219 +  }
  91.220 +
  91.221 +  while(valid_stream){
  91.222 +
  91.223 +    for(int i = 0; i < Points/2; i++)
  91.224 +      valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile);
  91.225 +
  91.226 +    for(int i = 0; i < Points; i++)
  91.227 +      valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile);
  91.228 +
  91.229 +    for(int i = 0; i < Points/2; i++)
  91.230 +      valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); 
  91.231 +
  91.232 +
  91.233 +    // this isn't quite right
  91.234 +    if(!valid_stream)
  91.235 +      break;
  91.236 +
  91.237 +    for(int i = 0; i < Points; i++){
  91.238 +      double window = windowing_fn(i);
  91.239 +      short int rv = (short int)(((double)samplesA[i])*(1.0-window) + window*((double)samplesB[i]));
  91.240 +      assert(fwrite(&rv,short_sz,1,outputPcmFile));    
  91.241 +    }
  91.242 +
  91.243 +  }
  91.244 +
  91.245 +  fclose(ifftPcmFile);
  91.246 +  fclose(outputPcmFile);
  91.247 +
  91.248 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
  91.249 +
  91.250 +}
  91.251 +
    92.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    92.2 +++ b/tools/audio_processor_test/shift_up/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    92.3 @@ -0,0 +1,1 @@
    92.4 +../../compare_wavs_freq/
    92.5 \ No newline at end of file
    93.1 Binary file tools/audio_processor_test/sndfile-tools-special.tar.gz has changed
    94.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    94.2 +++ b/tools/audio_processor_test/transform/checker/DFT.cpp	Wed Apr 28 08:19:09 2010 -0400
    94.3 @@ -0,0 +1,1 @@
    94.4 +../../../../modules/bluespec/mit-6.375/common/DFT.cpp
    94.5 \ No newline at end of file
    95.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    95.2 +++ b/tools/audio_processor_test/transform/checker/Makefile	Wed Apr 28 08:19:09 2010 -0400
    95.3 @@ -0,0 +1,8 @@
    95.4 +default: all
    95.5 +
    95.6 +clean:
    95.7 +	rm -f *.o checker
    95.8 +
    95.9 +all:
   95.10 +	g++  /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker
   95.11 +	cd ./compare_wavs/ && make clean && make
    96.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    96.2 +++ b/tools/audio_processor_test/transform/checker/SndfileWavUtil.cpp	Wed Apr 28 08:19:09 2010 -0400
    96.3 @@ -0,0 +1,1 @@
    96.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp
    96.5 \ No newline at end of file
    97.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    97.2 +++ b/tools/audio_processor_test/transform/checker/SndfileWavUtil.h	Wed Apr 28 08:19:09 2010 -0400
    97.3 @@ -0,0 +1,1 @@
    97.4 +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h
    97.5 \ No newline at end of file
    98.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    98.2 +++ b/tools/audio_processor_test/transform/checker/checker.cpp	Wed Apr 28 08:19:09 2010 -0400
    98.3 @@ -0,0 +1,219 @@
    98.4 +#include <stdio.h>
    98.5 +#include <stdlib.h>
    98.6 +#include <math.h>
    98.7 +#include <assert.h>
    98.8 +#include <string.h>
    98.9 +#include "SndfileWavUtil.h"
   98.10 +
   98.11 +const  int Taps = 9;
   98.12 +const  int Points = 8;
   98.13 +const  int log_Points = 3;
   98.14 +static int newest;
   98.15 +static short int x[Taps] = {0,0,0,0,0,0,0,0,0};
   98.16 +static short int fir(short int);
   98.17 +
   98.18 +// foreward declaration. This is defined in DFT.cpp
   98.19 +int DFT(int dir,int m,double *x1,double *y1);
   98.20 +
   98.21 +
   98.22 +static int x_to_y(int x, int y)
   98.23 +{
   98.24 +  assert(y>0);
   98.25 +  int rv = x;
   98.26 +  while(y-->1)
   98.27 +    x *= x;
   98.28 +  return rv;
   98.29 +}
   98.30 +
   98.31 +// function implemented in LinearWindowingFunction.bsv
   98.32 +static double windowing_fn(int index)
   98.33 +{
   98.34 +  double i = (double)index;
   98.35 +  double divisor = Points/2; //(double) (x_to_y(2,log_Points-1));
   98.36 +  double rv = (index < Points/2) ? (i / divisor) : ((((double)Points)-i) / divisor);
   98.37 +  return rv;
   98.38 +}
   98.39 +
   98.40 +// lifted from the bluespec code
   98.41 +static double h[Taps] =  {-0.0124,
   98.42 +			  0.0,
   98.43 +			  -0.0133,
   98.44 +			  0.0,
   98.45 +			  0.8181,
   98.46 +			  0.0,
   98.47 +			  -0.0133,
   98.48 +			  0.0,
   98.49 +			  -0.0124};
   98.50 +
   98.51 +
   98.52 +short int
   98.53 +fir(short int sample)
   98.54 +{
   98.55 +  x[newest] = sample; 
   98.56 +  double y = 0;
   98.57 +  for (int k = 0; k < Taps; k++) { 
   98.58 +    short int bits = x[(newest+k)%Taps];
   98.59 +    double x = (double)bits;
   98.60 +    y += h[k] * x; 
   98.61 +  }
   98.62 +  newest = (newest == 0) ? (Taps-1) : (newest-1);
   98.63 +  short int rv = ((short int)y)&0x0000FFFF;
   98.64 +  return rv;
   98.65 +}
   98.66 +
   98.67 +
   98.68 +int
   98.69 +main (int argc, char * argv [])
   98.70 +{
   98.71 +  const char* inputWavFileName;
   98.72 +  const char* outputWavFileName;
   98.73 +
   98.74 +  FILE *inputPcmFile;
   98.75 +  FILE *firPcmFile;
   98.76 +  FILE *ifftPcmFile;
   98.77 +  FILE *outputPcmFile;
   98.78 +
   98.79 +  short int sample;
   98.80 +  short int samples[Points];
   98.81 +  const unsigned int short_sz = sizeof(short int);
   98.82 +
   98.83 +  inputWavFileName = argv[1];
   98.84 +  outputWavFileName = argv[2];
   98.85 +
   98.86 +  // Convert input wav to pcm
   98.87 +  generate_pcm(inputWavFileName, "input.pcm");
   98.88 +
   98.89 +  inputPcmFile  = fopen("input.pcm", "r");
   98.90 +  firPcmFile    = fopen("fir.pcm", "w");
   98.91 +
   98.92 +  assert(inputPcmFile);
   98.93 +  assert(firPcmFile);
   98.94 +
   98.95 +  newest = 0;
   98.96 +  memset(x, 0, sizeof(x));
   98.97 +
   98.98 +  while(fread(&sample, short_sz, 1, inputPcmFile)) {
   98.99 +    sample = fir(sample);
  98.100 +    assert(fwrite(&sample,short_sz, 1, firPcmFile));
  98.101 +  }
  98.102 +
  98.103 +  fclose(inputPcmFile);
  98.104 +  fclose(firPcmFile);
  98.105 +
  98.106 +  firPcmFile  = fopen("fir.pcm", "r");
  98.107 +  ifftPcmFile = fopen("ifft.pcm", "w");
  98.108 +
  98.109 +  assert(firPcmFile);
  98.110 +  assert(ifftPcmFile);
  98.111 +
  98.112 +  int read = 0;
  98.113 +
  98.114 +  // read in half a frame
  98.115 +  for(int i = 0; i < Points/2; i++)
  98.116 +    read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  98.117 +
  98.118 +  if(read > 0)
  98.119 +    assert(read==Points/2);
  98.120 +
  98.121 +  // we will do an 'Points' point fft, and then undo it
  98.122 +  while(true) {
  98.123 +
  98.124 +    read = 0;
  98.125 +
  98.126 +    // shift last half frame to head
  98.127 +    for(int i = 0; i < Points/2; i++)
  98.128 +      samples[i] = samples[(Points/2)+i];
  98.129 +
  98.130 +    // read in another half frame
  98.131 +    for(int i = 0; i < Points/2; i++)
  98.132 +      read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile);
  98.133 +
  98.134 +    if(read == 0)
  98.135 +      break;
  98.136 +
  98.137 +    // pad out the 
  98.138 +    if(read < Points/2){
  98.139 +      for(int i = read; i < Points/2; i++)
  98.140 +	samples[Points/2+i] = 0;
  98.141 +    }
  98.142 +
  98.143 +    double dsamples[Points];
  98.144 +    double dimag[Points];
  98.145 +
  98.146 +    // this shift is performed in the Bluespec
  98.147 +    for(int i = 0; i < Points; i++){
  98.148 +      dsamples[i] = (double)(samples[i]>>log_Points);
  98.149 +      dimag[i] = 0.0;
  98.150 +    }
  98.151 +
  98.152 +
  98.153 +    DFT(1,Points,dsamples,dimag);
  98.154 +    DFT(-1,Points,dsamples,dimag);
  98.155 +
  98.156 +    short int ifftResult[Points];
  98.157 +    for(int i = 0; i < Points; i++)
  98.158 +      ifftResult[i] = (int)dsamples[i]; //)>>log_Points;
  98.159 +
  98.160 +    // strip off the padding
  98.161 +    int write = (read < Points/2) ? read+(Points/2) : Points;
  98.162 +    for(int i = 0; i < write; i++)
  98.163 +      assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile));
  98.164 +
  98.165 +    // break out if we're at the end
  98.166 +    if(read < Points/2){
  98.167 +       break;
  98.168 +    }
  98.169 +  }
  98.170 +
  98.171 +  fclose(firPcmFile);
  98.172 +  fclose(ifftPcmFile);
  98.173 +
  98.174 +  // do the windowing
  98.175 +
  98.176 +  ifftPcmFile   = fopen("ifft.pcm", "r");
  98.177 +  outputPcmFile = fopen("output.pcm", "w");
  98.178 +
  98.179 +  assert(ifftPcmFile);
  98.180 +  assert(outputPcmFile);
  98.181 +
  98.182 +  short int samplesA[Points];
  98.183 +  short int samplesB[Points];
  98.184 +
  98.185 +  bool valid_stream = true;
  98.186 +  // write out the first half frame
  98.187 +  for(int i = 0; i < Points/2; i++){
  98.188 +    valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile);
  98.189 +    valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile);
  98.190 +  }
  98.191 +
  98.192 +  while(valid_stream){
  98.193 +
  98.194 +    for(int i = 0; i < Points/2; i++)
  98.195 +      valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile);
  98.196 +
  98.197 +    for(int i = 0; i < Points; i++)
  98.198 +      valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile);
  98.199 +
  98.200 +    for(int i = 0; i < Points/2; i++)
  98.201 +      valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); 
  98.202 +
  98.203 +
  98.204 +    // this isn't quite right
  98.205 +    if(!valid_stream)
  98.206 +      break;
  98.207 +
  98.208 +    for(int i = 0; i < Points; i++){
  98.209 +      double window = windowing_fn(i);
  98.210 +      short int rv = samplesA[i]*(1-window) + window*samplesB[i];
  98.211 +      assert(fwrite(&rv,short_sz,1,outputPcmFile));    
  98.212 +    }
  98.213 +
  98.214 +  }
  98.215 +
  98.216 +  fclose(ifftPcmFile);
  98.217 +  fclose(outputPcmFile);
  98.218 +
  98.219 +  generate_wav("output.pcm", inputWavFileName, outputWavFileName);
  98.220 +
  98.221 +}
  98.222 +
    99.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    99.2 +++ b/tools/audio_processor_test/transform/checker/compare_wavs	Wed Apr 28 08:19:09 2010 -0400
    99.3 @@ -0,0 +1,1 @@
    99.4 +../../compare_wavs/
    99.5 \ No newline at end of file