# HG changeset patch # User rlm # Date 1272457149 14400 # Node ID 90197e3375e2cfca5f1e5e67fd0008255ced53be # Parent 0cfbb1e2de22c51515ed3adbd013a80febd3fbbf [svn r24] added testing, but something is wrong with our c++ file. diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/audio_processor_test/README Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +.wav files must be mono for use by the lab \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/null.wav Binary file benchmarks/audio_processor_test/null.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/reuben_james_1sec.wav Binary file benchmarks/audio_processor_test/reuben_james_1sec.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/reuben_james_longer.wav Binary file benchmarks/audio_processor_test/reuben_james_longer.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/reuben_james_quarter_sec.wav Binary file benchmarks/audio_processor_test/reuben_james_quarter_sec.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/reuben_james_short.wav Binary file benchmarks/audio_processor_test/reuben_james_short.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/audio_processor_test/shift.wav Binary file benchmarks/audio_processor_test/shift.wav has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/1024 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/1024 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +1024 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/1048576 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/1048576 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +1048576 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/128 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/128 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +128 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/131072 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/131072 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +131072 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/16 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/16 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +16 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/16384 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/16384 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +16384 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/2 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/2 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +2 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/2048 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/2048 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +2048 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/256 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/256 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +256 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/262144 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/262144 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +262144 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/32 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/32 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +32 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/32768 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/32768 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +32768 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/4 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +4 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/4096 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/4096 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +4096 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/512 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/512 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +512 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/524288 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/524288 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +524288 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/64 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/64 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +64 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/65536 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/65536 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +65536 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/8 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +8 diff -r 0cfbb1e2de22 -r 90197e3375e2 benchmarks/sort_array/8192 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/benchmarks/sort_array/8192 Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +8192 diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/cosine_window_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/cosine_window_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,26 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + + +my @bmark_tests = ("null.wav", "shift.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/fft_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/fft_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,26 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + + +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/fir_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/fir_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,25 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/null_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/null_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,25 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/shift_up_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/shift_up_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,26 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + + +my @bmark_tests = ("null.wav", "shift.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/audio_processor_test/transform_benchmark.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/audio_processor_test/transform_benchmark.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,26 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + + +my @bmark_tests = ("null.wav", "reuben_james_1sec.wav", "reuben_james_quarter_sec.wav"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + 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", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/null/null-connected-app.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/null/null-connected-app.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,28 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## --linkto=../tools/audio_processor_test/fft/checker + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + + +my @bmark_tests = ("null"); + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + setup => "scripts/setup-null-bmark --silent=1 --compare=1 --data=../benchmarks/sort_array/$bmark $bmark", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/processor_test/mips.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/processor_test/mips.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,78 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +use Asim; +use strict; + +## +## Generate cfg files for 6.375 tests and benchmarks. +## + +my $gcfg = Asim::GenCFG->new(); + +my @tests = ("smipsv1_simple", + "smipsv1_addiu", + "smipsv1_bne", + "smipsv1_lw", + "smipsv1_sw", + "smipsv2_addiu", + "smipsv2_addu", + "smipsv2_andi", + "smipsv2_and", + "smipsv2_beq", + "smipsv2_bgez", + "smipsv2_bgtz", + "smipsv2_blez", + "smipsv2_bltz", + "smipsv2_bne", + "smipsv2_jalr", + "smipsv2_jal", + "smipsv2_jr", + "smipsv2_j", + "smipsv2_lui", + "smipsv2_lw", + "smipsv2_nor", + "smipsv2_ori", + "smipsv2_or", + "smipsv2_simple", + "smipsv2_sll", + "smipsv2_sllv", + "smipsv2_slti", + "smipsv2_sltiu", + "smipsv2_slt", + "smipsv2_sltu", + "smipsv2_sra", + "smipsv2_srav", + "smipsv2_srl", + "smipsv2_srlv", + "smipsv2_subu", + "smipsv2_sw", + "smipsv2_xori", + "smipsv2_xor"); + +my @bmarks = ("median", + "multiply", + "towers", + "qsort", + "vvadd"); + +foreach my $test (@tests) { + $gcfg->add(name => $test, + tree => [ "tests" ], + setup => "scripts/setup-mit-6.375-bmark-processor --group instruction-tests --isa smips $test", + feeder => "vcs", + feedflags => "program.0/${test}.smips.vmh", + ); +} + +foreach my $bmark (@bmarks) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + setup => "scripts/setup-mit-6.375-bmark-processor --isa smips $bmark", + feeder => "vcs", + feedflags => "program.0/${bmark}.smips.vmh", + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/processor_test/mips_nonblocking.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/processor_test/mips_nonblocking.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,30 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +use Asim; +use strict; + +## +## Generate cfg files for 6.375 tests and benchmarks. +## + +my $gcfg = Asim::GenCFG->new(); + + +my @bmarks = ("median_noprealloc", + "multiply_noprealloc", + "towers_noprealloc", + "qsort_noprealloc", + "vvadd_noprealloc"); + +foreach my $bmark (@bmarks) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + setup => "scripts/setup-mit-6.375-bmark-processor --isa smips $bmark", + feeder => "vcs", + feedflags => "program.0/${bmark}.smips.vmh", + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/Pygar/sort_test/sort-test.cfx --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/Pygar/sort_test/sort-test.cfx Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,45 @@ +: # -*-Perl-*- +eval 'exec perl -w "$0" ${1+"$@"}' + if 0; + +## +## Directory of hasim benchmarks +## Remember to set this file as executable + +use Asim; +use strict; + +my $gcfg = Asim::GenCFG->new(); + +my @bmark_tests = ( "2" + ,"4" + ,"8" + ,"16" + ,"32" + ,"64" + ,"128" + ,"256" + ,"512" + ,"1024" + ,"2048" + ,"4096" + ,"8192" + ,"16384" + ,"32768" + ,"65536" + ,"131072" + ,"262144" + ,"524288" + ,"1048576"); + + +foreach my $bmark (@bmark_tests) { + $gcfg->add(name => $bmark, + tree => [ "benchmarks" ], + setup => "scripts/setup-null-bmark --silent=1 --compare=1 --data=../benchmarks/sort_array/$bmark $bmark", + feeder => "none", + ccount => 800000, #Hmmm.... may need to edit + ); +} + +$gcfg->action(@ARGV); diff -r 0cfbb1e2de22 -r 90197e3375e2 config/bm/README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config/bm/README Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +User defined benchmark configurations go here diff -r 0cfbb1e2de22 -r 90197e3375e2 modules/bluespec/Pygar/core/AudioCoreRRR.cpp --- a/modules/bluespec/Pygar/core/AudioCoreRRR.cpp Wed Apr 28 00:40:15 2010 -0400 +++ b/modules/bluespec/Pygar/core/AudioCoreRRR.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -19,7 +19,8 @@ serverStub(new AUDIOCORERRR_SERVER_STUB_CLASS(this)) { // instantiate stub - printf("AUDIOCORERRR init called\n"); + + printf("rlm: init called\n\n"); outputFile = NULL; memory = NULL; fflush(stdout); @@ -28,6 +29,7 @@ // destructor AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS() { + printf("rlm: AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS()\n"); Cleanup(); } @@ -35,21 +37,24 @@ void AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p) { - parent = p; + printf("rlm: AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)\n"); + parent = p; } // uninit void AUDIOCORERRR_SERVER_CLASS::Uninit() { - Cleanup(); + printf("rlm: AUDIOCORERRR_SERVER_CLASS::Uninit()\n"); + Cleanup(); } // cleanup void AUDIOCORERRR_SERVER_CLASS::Cleanup() { - delete serverStub; + printf("rlm: AUDIOCORERRR_SERVER_CLASS::Cleanup() \n\n"); + delete serverStub; } @@ -61,7 +66,7 @@ AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address) { UINT32 returnVal; - + printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestLoad (UINT32 address)\n"); if(memory == NULL) { memory = new FUNCP_SIMULATED_MEMORY_CLASS(); } @@ -74,6 +79,7 @@ void AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data) { + printf("rlm: AUDIOCORERRR_SERVER_CLASS::MemoryRequestStore (UINT32 address, UINT32 data)\n"); if(memory == NULL) { memory = new FUNCP_SIMULATED_MEMORY_CLASS(); } @@ -86,14 +92,17 @@ AUDIOCORERRR_SERVER_CLASS::SendProcessedStream(UINT16 control, UINT16 data) { + printf("rlm: SendProcessedStream called,\n"); AudioProcessorControl audioProcessorControl = (AudioProcessorControl) control; switch(control) { case EndOfFile: if(outputFile != NULL) { + printf("rlm: FILE is NULL\n"); fflush(outputFile); fclose(outputFile); outputFile = NULL; } else { + printf("rlm: Opening file for output.\n"); outputFile = fopen("out_hw.pcm","w"); assert(outputFile); fflush(outputFile); @@ -110,7 +119,8 @@ assert(outputFile); } - CONNECTED_APPLICATION_CLASS::UpdateSemaphore(); + CONNECTED_APPLICATION_CLASS::UpdateSemaphore(); + printf("rlm: writing data to out_hw.pcm\n"); fwrite(&data, 2,1 , outputFile); break; } diff -r 0cfbb1e2de22 -r 90197e3375e2 modules/bluespec/Pygar/core/AudioCoreSystem.cpp --- a/modules/bluespec/Pygar/core/AudioCoreSystem.cpp Wed Apr 28 00:40:15 2010 -0400 +++ b/modules/bluespec/Pygar/core/AudioCoreSystem.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -16,7 +16,8 @@ // constructor CONNECTED_APPLICATION_CLASS::CONNECTED_APPLICATION_CLASS(VIRTUAL_PLATFORM vp) : - clientStub(new AUDIOCORERRR_CLIENT_STUB_CLASS(this)) + + clientStub(new AUDIOCORERRR_CLIENT_STUB_CLASS(this)) { } @@ -74,13 +75,14 @@ int count = 0; - printf("main: about to enter loop %d\n", count); + printf("main:PROCESSOR about to enter loop %d\n", count); while(fread(&sample, 2, 1, inputFile)) { if(count%1000 == 0) printf("main: %d\n", count); count++; sem_wait(&throttle); + printf("rlm:sending data to processor (%d)\n", count); clientStub->SendUnprocessedStream(Data,(UINT32)sample); } @@ -95,7 +97,7 @@ pthread_cond_wait(&cond, &lock); pthread_mutex_unlock(&lock); - printf("main: lastt data out\n"); + printf("main: last data out\n"); // Convert input wav to pcm generate_wav("out_hw.pcm","input.wav","out_hw.wav"); diff -r 0cfbb1e2de22 -r 90197e3375e2 modules/bluespec/Pygar/core/Processor.bsv --- a/modules/bluespec/Pygar/core/Processor.bsv Wed Apr 28 00:40:15 2010 -0400 +++ b/modules/bluespec/Pygar/core/Processor.bsv Wed Apr 28 08:19:09 2010 -0400 @@ -573,9 +573,9 @@ // for now, we don't do anything. rule connectAudioReqResp; - $display("FIR copies a data"); - outAudioFifo.enq(inAudioFifo.first); - outAudioFifo.deq; + $display("rlm: PROCESSOR copies a datum\n"); + outAudioFifo.enq(inAudioFifo.first()); + inAudioFifo.deq; endrule // Server items & rules: @@ -583,7 +583,7 @@ rule feedInput; let command <- server_stub.acceptRequest_SendUnprocessedStream(); AudioProcessorControl ctrl = unpack(truncate(command.ctrl)); - + $display("rlm: PROCESSOR: recieved data\n"); if(ctrl == EndOfFile) begin inAudioFifo.enq(tagged EndOfFile); diff -r 0cfbb1e2de22 -r 90197e3375e2 modules/bluespec/Pygar/core/daskjdlaj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/modules/bluespec/Pygar/core/daskjdlaj Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,2647 @@ +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 +asimstarter WARNING: perl version 5.10.1 not supported, please use version 5.10.1 (*) ! +Running model. . . +AUDIOCORERRR init called +a + +RLMRLMRLM: init called + + + + => Cycle = 0 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => mkProc:pc 00001000 + => mkProc:pcgen P + => Cycle = 0 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => mkProc:pc 00001000 + => mkProc:pcgen P + => Cycle = 1 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 2 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 3 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 4 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 5 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 6 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 7 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 8 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 9 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 10 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 11 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 12 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 13 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 14 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 15 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 16 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 17 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 18 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 19 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 20 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 21 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 22 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 23 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 24 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 25 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 26 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 27 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 28 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 29 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 30 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 31 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 32 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 33 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 34 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 35 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 36 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 37 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 38 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 39 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 40 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 41 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 42 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 43 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 44 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 45 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 46 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 47 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 48 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 49 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 50 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 51 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 52 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 53 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 54 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 55 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 56 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 57 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 58 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 59 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 60 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 61 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 62 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 63 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 64 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 65 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 66 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 67 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 68 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 69 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 70 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 71 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 72 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 73 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 74 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 75 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 76 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 77 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 78 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 79 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 80 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 81 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 82 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 83 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 84 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 85 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 86 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 87 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 88 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 89 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 90 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 91 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 92 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 93 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 94 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 95 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 96 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 97 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 98 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 99 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 100 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 101 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 102 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 103 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 104 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 105 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 106 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 107 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 108 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 109 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 110 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 111 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 112 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 113 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 114 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 115 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 116 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 117 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 118 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 119 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 120 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 121 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 122 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 123 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 124 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 125 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 126 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 127 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 128 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 129 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 130 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 131 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 132 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 133 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 134 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 135 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 136 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 137 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 138 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 139 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 140 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 141 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 142 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 143 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 144 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 145 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 146 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 147 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 148 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 149 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 150 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 151 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 152 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 153 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 154 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 155 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 156 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 157 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 158 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 159 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 160 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 161 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 162 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 163 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 164 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 165 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 166 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 167 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 168 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 169 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 170 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 171 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 172 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 173 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 174 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 175 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 176 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 177 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 178 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 179 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 180 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 181 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 182 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 183 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 184 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 185 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 186 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 187 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 188 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 189 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 190 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 191 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 192 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 193 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 194 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 195 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 196 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 197 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 198 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 199 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 200 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 201 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 202 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 203 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 204 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 205 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 206 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 207 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 208 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 209 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 210 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 211 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 212 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 213 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 214 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 215 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 216 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 217 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 218 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 219 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 220 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 221 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 222 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 223 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 224 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 225 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 226 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 227 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 228 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 229 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 230 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 231 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 232 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 233 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 234 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 235 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 236 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 237 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 238 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 239 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 240 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 241 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 242 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 243 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 244 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 245 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 246 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 247 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 248 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 249 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 250 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 251 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 252 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 253 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 254 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 255 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 256 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 257 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 258 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 259 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 260 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 261 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 262 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 263 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 264 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 265 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 266 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 267 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 268 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 269 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 270 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 271 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 272 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 273 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 274 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 275 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 276 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 277 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 278 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 279 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 280 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 281 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 282 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 283 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 284 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 285 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 286 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 287 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 288 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 289 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 290 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 291 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 292 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 293 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 294 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 295 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 296 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 297 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 298 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 299 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 300 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 301 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 302 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 303 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 304 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 305 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 306 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 307 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 308 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 309 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 310 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 311 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 312 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 313 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 314 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 315 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 316 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 317 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 318 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 319 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 320 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 321 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 322 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 323 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 324 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 325 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 326 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 327 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 328 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 329 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 330 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 331 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 332 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 333 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 334 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 335 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 336 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 337 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 338 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 339 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 340 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 341 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 342 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 343 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 344 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 345 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 346 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 347 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 348 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 349 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 350 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 351 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 352 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 353 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 354 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 355 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 356 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 357 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 358 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 359 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 360 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 361 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 362 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 363 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 364 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 365 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 366 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 367 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 368 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 369 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 370 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 371 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 372 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 373 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 374 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 375 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 376 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 377 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 378 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 379 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 380 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 381 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 382 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 383 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 384 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 385 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 386 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 387 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 388 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 389 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 390 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 391 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 392 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 393 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 394 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 395 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 396 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 397 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 398 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 399 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 400 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 401 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 402 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 403 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 404 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 405 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 406 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 407 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 408 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 409 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 410 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 411 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 412 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 413 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 414 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 415 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 416 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 417 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 418 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 419 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 420 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 421 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 422 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 423 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 424 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 425 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 426 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 427 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 428 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 429 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 430 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 431 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 432 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 433 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 434 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 435 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 436 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 437 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 438 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 439 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 440 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 441 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 442 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 443 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 444 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 445 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 446 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 447 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 448 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 449 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 450 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 451 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 452 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 453 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 454 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 455 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 456 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 457 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 458 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 459 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 460 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 461 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 462 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 463 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 464 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 465 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 466 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 467 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 468 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 469 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 470 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 471 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 472 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 473 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 474 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 475 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 476 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 477 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 478 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 479 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 480 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 481 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 482 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 483 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 484 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 485 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 486 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 487 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 488 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 489 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 490 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 491 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 492 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 493 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 494 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 495 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 496 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 497 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 498 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 499 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 500 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 501 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 502 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 503 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 504 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 505 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 506 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 507 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 508 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 509 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 510 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 511 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 512 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 513 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 514 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 515 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 516 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 517 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 518 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 519 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 520 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 521 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 522 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 523 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 524 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 525 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 526 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 527 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 528 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 529 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 530 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 531 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 532 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 533 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 534 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 535 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 536 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 537 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 538 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 539 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 540 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 541 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 542 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 543 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 544 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 545 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 546 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 547 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 548 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 549 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 550 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 551 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 552 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 553 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 554 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 555 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 556 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 557 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 558 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 559 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 560 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 561 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 562 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 563 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 564 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 565 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 566 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 567 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 568 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 569 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 570 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 571 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 572 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 573 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 574 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = RLMRLMRLM: AUDIOCORERRR_SERVER_CLASS::Init(PLATFORMS_MODULE p)main:PROCESSOR about to enter loop 0 + 575 +main: out of loop +main: wait for end of file + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 576 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 577 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 578 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 579 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 580 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 581 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 582 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 583 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 584 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 585 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 586 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 587 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 588 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 589 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 590 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 591 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 592 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 593 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 594 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 595 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 596 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 597 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 598 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 599 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 600 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 601 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 602 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 603 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 604 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 605 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 606 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 607 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 608 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 609 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 610 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 611 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 612 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 613 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 614 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 615 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 616 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 617 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 618 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 619 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 620 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 621 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 622 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 623 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 624 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 625 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 626 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 627 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 628 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 629 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 630 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 631 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 632 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 633 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 634 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 635 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 636 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 637 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 638 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 639 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 640 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 641 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 642 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 643 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 644 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 645 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 646 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 647 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 648 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 649 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 650 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 651 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 652 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 653 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 654 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 655 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 656 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 657 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 658 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 659 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 660 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 661 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 662 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 663 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 664 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 665 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 666 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 667 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 668 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + + + + + + + +PROCESSOR FIR copies a data + + + + + + + => Cycle = 669 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 670 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 671 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 672 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 673 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 674 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = + +RLMRLMRLM + +: SendProcessedStream called, + + +RLMRLMRLM: Opening file for output. + + + 675 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 676 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 677 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 678 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 679 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 680 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 681 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 682 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 683 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 684 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 685 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 686 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 687 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 688 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 689 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 690 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 691 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 692 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 693 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 694 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 695 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 696 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 697 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 698 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 699 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 700 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 701 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 702 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 703 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 704 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 705 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 706 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 707 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 708 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 709 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 710 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 711 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = EndSimulation Called + 712 + => mkDamain: lastt data out +taCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 713 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i +WAV format: 10002 + => Cycle = 714 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = EndSimulation done + 715 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 716 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 717 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 718 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 719 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 720 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 721 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 722 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 723 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 724 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 725 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 726 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 727 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 728 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 729 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 730 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 731 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 732 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 733 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 734 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 735 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 736 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 737 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 738 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 739 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 740 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 741 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 742 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 743 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 744 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 745 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 746 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 747 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 748 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 749 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 750 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 751 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 752 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 753 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 754 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 755 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 756 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 757 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 758 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 759 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 760 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 761 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 762 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 763 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 764 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 765 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 766 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 767 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 768 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 769 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 770 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 771 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 772 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 773 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 774 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 775 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 776 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 777 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 778 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 779 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 780 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 781 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 782 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 783 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 784 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 785 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 786 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 787 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 788 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 789 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 790 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 791 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 792 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 793 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 794 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 795 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 796 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 797 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 798 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 799 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 800 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 801 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 802 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i +g++: DFT.cpp: No such file or directory +g++: SndfileWavUtil.cpp: No such file or directory +checker.cpp:7:28: error: SndfileWavUtil.h: No such file or directory +checker.cpp: In function ‘int main(int, char**)’: +checker.cpp:84: error: ‘generate_pcm’ was not declared in this scope +checker.cpp:245: error: ‘generate_wav’ was not declared in this scope +make: *** [all] Error 1 +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, line 21. + => Cycle = 803 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 804 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 805 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 806 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 807 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 808 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 809 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 810 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 811 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 812 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 813 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 814 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 815 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 816 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 817 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 818 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 819 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 820 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 821 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 822 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 823 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 824 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 825 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 826 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 827 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 828 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 829 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 830 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 831 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 832 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 833 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 834 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 835 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 836 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 837 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 838 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 839 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 840 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 841 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 842 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 843 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 844 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 845 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 846 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 847 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 848 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 849 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 850 + => mkDataCacheBlocking:stage i + => mkInstgenerate wav done +CacheBlocking:stage i + + +RLMRLMRLM: AUDIOCORERRR_SERVER_CLASS::~AUDIOCORERRR_SERVER_CLASS() + => Cycle = 851 + => mkDataCacheBlocki +ng:stage i + => mkIn + +RLMRLMRLM: AUDIOCORERRR_SERVER_CLASS::Cleanup() + +stCacheBlocking:stage i + => Cycle = 852 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 853 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 854 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 855 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 856 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 857 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i + => Cycle = 858 + => mkDataCacheBlocking:stage i + => mkInstCacheBlocking:stage i +about to call compare_wavs_freq +*** Output comparison failed *** +hasim-configure exiting with errors + +*******DONE****** \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 modules/bluespec/Pygar/lab1/FIRFilter.bsv --- a/modules/bluespec/Pygar/lab1/FIRFilter.bsv Wed Apr 28 00:40:15 2010 -0400 +++ b/modules/bluespec/Pygar/lab1/FIRFilter.bsv Wed Apr 28 08:19:09 2010 -0400 @@ -10,7 +10,7 @@ // for now, we don't do anything. rule connectReqResp; - $display("FIR copies a data"); + $display("\n\n\n\n\nFIRFILTER-FIR copies a data\n\n\n\n"); outfifo.enq(infifo.first); outfifo.deq; endrule diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/bsv-trace.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/bsv-trace.pl Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,129 @@ +#!/usr/bin/perl -w +#========================================================================== +# bsc-trace.pl +# +# Author : Christopher Batten (cbatten@mit.edu) +# Date : April 12, 2005 +# +(our $usageMsg = <<'ENDMSG') =~ s/^\#//gm; +# +# Simple script which converts bsv "one-per-line" trace output into +# a more compact and readable column format. +# +ENDMSG + +use strict "vars"; +use warnings; +no warnings("once"); +use Getopt::Long; +use File::Basename; + +#-------------------------------------------------------------------------- +# Command line processing +#-------------------------------------------------------------------------- + +our %opts; + +sub usage() +{ + + print "\n"; + print " Usage: bsc-trace.pl [trace-file]\n"; + print "\n"; + print " Options:\n"; + print " --help print this message\n"; + print " format string\n"; + print " [trace-file] output trace from BSV simulation (default is STDIN)\n"; + print "$usageMsg"; + + exit(); +} + +sub processCommandLine() +{ + + $opts{"help"} = 0; + + Getopt::Long::GetOptions( \%opts, 'help|?' ) or usage(); + + ($opts{"format"} = shift(@ARGV)) or usage(); + ($opts{"trace-file"} = shift(@ARGV)) or ($opts{"trace-file"} = "-"); + $opts{"help"} and usage(); + +} + +#-------------------------------------------------------------------------- +# Main +#-------------------------------------------------------------------------- + +sub main() +{ + + processCommandLine(); + require $opts{"format"}; + + my $cycle = 0; + my %traceHash; + + my $traceFile = $opts{"trace-file"}; + open( FIN, "<$traceFile" ) or die("Could not open BSV trace file ($traceFile)!"); + + print " processor-state [ icache ] [ dcache ] [ mem-arb ] executed-instruction\n"; + + my $labelLine = $settings::labelString; + foreach my $tag ( keys %settings::headers){ + my $theLabel = $settings::headers{$tag}; + $labelLine =~ s/{$tag}/$theLabel/; + } + print " $labelLine\n"; + + while ( my $line = ) { + + if ( $line =~ /^ => Cycle =\s+(\d+)$/ ) { + + my $tempTraceLine = $settings::traceString; + foreach my $tag ( keys %settings::fields ) { + + my $theTraceString = $traceHash{$tag}; + my $theEmptyString = $settings::fields{$tag}; + + # Substitute the trace field in ... + if ( defined($theTraceString) ) { + + # If the trace string is shorter than the empty string then + # add some spaces at the end so things line up ... + my $theTraceStringLen = length($theTraceString); + my $theEmptyStringLen = length($theEmptyString); + if ( $theTraceStringLen < $theEmptyStringLen ) { + $theTraceString .= (" "x ($theEmptyStringLen-$theTraceStringLen)); + } + + $tempTraceLine =~ s/{$tag}/$theTraceString/; + + } + + # Substitute the empty field in ... + else { + $tempTraceLine =~ s/{$tag}/$theEmptyString/; + } + + } + + print " CYC: ".sprintf("%4d",$cycle)." $tempTraceLine\n"; + + $cycle = $1; + %traceHash = (); + } + elsif ( $line =~ /^ => (\S+) (.*)$/ ) { + $traceHash{$1} = $2; + } + else { + print $line; + } + + } + close( FIN ); + +} + +main(); diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/proc-trace.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/proc-trace.cfg Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,99 @@ +#========================================================================= +# Trace-bsv.pl Config File +# + +package settings; + +#-------------------------------------------------------------------- +# Trace Tags +#-------------------------------------------------------------------- + +$base = "mkCoreTH_wrapper.coreTH"; + +# This should be a hash of tags to what should be displayed if the +# tag is not present on a given cycle. The tags correspond to the +# trace tags used in the BSV source code. + +%fields = +( + + "mkProc:pc" => " ", + "mkProc:pcgen" => " ", + "mkProc:exec" => " ", + "mkProc:writeback" => " ", + "mkProc:exInstFull" => " ", + + "mkInstCacheBlocking:reqTiny" => " ", + "mkInstCacheBlocking:respTiny" => " ", + "mkInstCacheBlocking:stage" => " ", + "mkInstCacheBlocking:hitMiss" => " ", + + "mkDataCacheBlocking:reqTiny" => " ", + "mkDataCacheBlocking:respTiny" => " ", + "mkDataCacheBlocking:stage" => " ", + "mkDataCacheBlocking:hitMiss" => " ", + + "mkMemArb:req0" => " ", + "mkMemArb:req1" => " ", + "mkMemArb:resp" => " ", + +); + +%headers = +( + + "mkProc:pc" => "pc ", + "mkProc:pcgen" => "stage", + "mkProc:exec" => "", + "mkProc:writeback" => "", + "mkProc:exInstFull" => "exInst ", + + "mkInstCacheBlocking:reqTiny" => "req", + "mkInstCacheBlocking:respTiny" => "resp", + "mkInstCacheBlocking:stage" => "stage", + "mkInstCacheBlocking:hitMiss" => "hit/miss", + + "mkDataCacheBlocking:reqTiny" => "req", + "mkDataCacheBlocking:respTiny" => "resp", + "mkDataCacheBlocking:stage" => "stage", + "mkDataCacheBlocking:hitMiss" => "hit/miss", + + "mkMemArb:req0" => "req0", + "mkMemArb:req1" => "req1", + "mkMemArb:resp" => "req2", + +); + + +#-------------------------------------------------------------------- +# Trace String +#-------------------------------------------------------------------- + +# For the processor we display the PC and what stage we are in. + +$proc = "pc={mkProc:pc} [{mkProc:pcgen}|{mkProc:exec}|{mkProc:writeback}]"; +$procl = "{mkProc:pc} [{mkProc:pcgen}{mkProc:exec}{mkProc:writeback}]"; + +# For the caches we display the current request and response, +# the current cache stage, whether or not the access is a hit or a miss. + +$icache = "[{mkInstCacheBlocking:reqTiny}|{mkInstCacheBlocking:respTiny}|". + "{mkInstCacheBlocking:stage}|{mkInstCacheBlocking:hitMiss}]"; + +$dcache = "[{mkDataCacheBlocking:reqTiny}|{mkDataCacheBlocking:respTiny}|". + "{mkDataCacheBlocking:stage}|{mkDataCacheBlocking:hitMiss}]"; + +# For the memory arbiter we display the two requests from the +# instruction and data caches and the response (which might be +# going to either cache) + +$marb = "[{mkMemArb:req0}|{mkMemArb:req1}|{mkMemArb:resp}]"; + +# The trace string is used by bsv-trace.pl to for one line trace +# output. Basically the current value for a given tag is substituted +# into the trace string every cycle. If the tag is not present then +# the empty field is used form the %fields hash. + +$traceString = "$proc $icache $dcache $marb {mkProc:exInstFull} "; +$labelString = "$procl $icache $dcache $marb {mkProc:exInstFull} "; + diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/run-freq.bmark --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/run-freq.bmark Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,528 @@ +#!/usr/bin/env perl +# -*- perl -*- + +use strict; +use warnings; +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through); +use IO::Pty; + +# +# Turn on warnings +# +$^W = 1; + +## +## Benchmark run script +## + +sub ExecModel($); +sub Exec($$); +sub CompareOutput(); +sub ReadConfig($$); + + +############################################################################# +############################################################################# +## +## Start by figuring out the model location and type. +## +############################################################################# +############################################################################# + +my %config; + +ReadConfig("config/env.sh", 1); +ReadConfig("$config{modelDir}/config/env.sh", 1); +ReadConfig("$config{modelDir}/config/signature.sh", 0); + +## +## Pseudo-enumeration of possible model types +## +my $MODEL_NONE = 0; +my $MODEL_FPGA = 1; # Model runs on FPGA hardware +my $MODEL_BLUESIM = 2; # Bluesim +my $MODEL_VSIM = 3; # Verilog simulator + +my $mType = $MODEL_NONE; + + +############################################################################# +############################################################################# +## +## Process command line arguments +## +############################################################################# +############################################################################# + +my $help = 0; +my $onlyCompare = 0; +my $noCompare = 0; +my $forceLoad = 0; +my $gdb = 0; +my $noProgram = 0; +my $noReserve = 0; +my $funcpPrefix = ""; +my $funcpSuffix = ""; +my $noshowfp = 0; +my $printCycle = undef; +my $showfp = undef; +my $bluesimCmd = undef; +my $vcdStart = undef; +my $vcdCycles = 20000; +my $m5run = 0; + +my $status = GetOptions("help!" => \$help, + "gdb!" => \$gdb, + "noprogram!" => \$noProgram, + "noreserve!" => \$noReserve, + "force-load!" => \$forceLoad, + "funcp-prefix=s" => \$funcpPrefix, + "funcp-suffix=s" => \$funcpSuffix, + "noshowfp!" => \$noshowfp, + "onlycompare!" => \$onlyCompare, + "nocompare!" => \$noCompare, + "pc=s" => \$printCycle, + "showfp:s" => \$showfp, + "bluesim=s" => \$bluesimCmd, + "vcdstart=i" => \$vcdStart, + "vcdcycles=i" => \$vcdCycles, + "m5!" => \$m5run, + ); + +# Put quotation marks back on arguments that have spaces since they will be +# passed through a shell once more. +foreach my $i ( 0 .. $#ARGV ) { + if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) { + $ARGV[$i] = '"' . $ARGV[$i] . '"'; + } +} + +if ($onlyCompare != 0) { + exit(CompareOutput()); +} + +if ($m5run != 0) { + $mType = $MODEL_NONE; +} +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") { + $mType = $MODEL_FPGA; +} +elsif (-f "$config{modelDir}/$config{model}_hw.exe") { + $mType = $MODEL_BLUESIM; +} +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") { + $mType = $MODEL_VSIM; +} +else { + die("Can't determine model type"); +} + +if ($help || ! $status) { + print STDERR "\nArguments:\n"; + print STDERR " [--gdb] Invokes the software side in gdb\n"; + print STDERR " [--noprogram] Skips the FPGA load and reservation steps\n"; + print STDERR " [--noreserve] Skips the FPGA reservation steps\n"; + print STDERR " [--funcp-prefix=\"\"]\n"; + print STDERR " Prepend prefix to HAsim's --funcp argument\n"; + print STDERR " [--funcp-suffix=\"\"]\n"; + print STDERR " Append suffix to HAsim's --funcp argument\n"; + print STDERR " [--onlycompare] Only compare output files (without running)\n"; + print STDERR " [--nocompare] Skip comparison of output files\n"; + print STDERR " [--m5] Run workload in m5 without HAsim\n"; + + if ($mType == $MODEL_FPGA) { + print STDERR " [--force-load] Load a bitfile to the FPGA even if it has errors\n"; + } + + if ($mType == $MODEL_BLUESIM) { + print STDERR " [--vcdstart=] Generate VCD dump for wave viewer (e.g. gtkwave)\n"; + print STDERR " [--vcdcycles=] VCD dump length (default = 20000)\n"; + } + + if ($config{isHybridModel}) { + my $cmd = "$config{modelDir}/$config{model} --help-run-append"; + system($cmd); + } + + exit(1); +} + +############################################################################# +############################################################################# +## +## Adjust model arguments +## +############################################################################# +############################################################################# + +# Show front panel? +if ($noshowfp) { + $showfp = 'none'; +} +elsif (defined($showfp)) { + # Specified on the run command line + $showfp = 'gui' if ($showfp eq ''); +} +elsif ($config{feeder} eq 'none') { + # For null feeder default to showing LEDs on stdout + $showfp = 'stdout'; +} +else { + # Other models have heartbeats + $showfp = 'none'; +} + +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}"; + +if ($config{feeder} eq 'm5') { + # Tell m5 to be quiet and not to enable the remote gdb port. Under netbatch + # it appears there are sometimes attempts to connect to the port, which + # stops simulation. + $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}"; +} + +my $cmd; + +if ($m5run == 0) { + # Normal run + $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --showfp=${showfp} --funcp=\"${feedFlags}\" $config{genFlags}"; + foreach my $c (@ARGV) { + $cmd .= " $c"; + } + + if (defined($printCycle)) { + $cmd .= " --pc=${printCycle}"; + } +} +else { + if ($config{feeder} ne 'm5') { + die("This workload does not use m5"); + } + + # Running inside m5 without HAsim + my $m5cmd; + if (exists($ENV{M5BIN})) { + $m5cmd = $ENV{M5BIN}; + } + else { + my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt"); + $m5cmd = `awb-resolver ${m5bin}`; + chomp($m5cmd); + die("Failed to find $m5bin") if ($m5cmd eq ''); + } + + $cmd = "${m5cmd} ${feedFlags}"; + + # Drop --hasim-sim + $cmd =~ s/--hasim-sim //; + # Drop escaping of quotes + $cmd =~ s/\\"/"/g; + + $noProgram = 1; +} + +# +# Bluesim arguments +# + +# Generate dump.vcd for wave viewer (e.g. gtkwave)? +if (defined($vcdStart)) { + my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop"; + if ($vcdStart > 0) { + $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}"; + } + + if (defined($bluesimCmd)) { + $bluesimCmd .= " "; + } + else { + $bluesimCmd = ""; + } + $bluesimCmd .= "-c \"$vcdCmd\""; +} + +if (defined($bluesimCmd)) { + $cmd .= " --bluesim=\'$bluesimCmd\'"; +} + +# Adjust the arguments for Bluesim if it is being invoked directly +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) { + $cmd =~ s/\s--/ +--/g; + + # Bluesim may expect to load a program from a well known file + unlink('program.vmh'); + link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh'); +} + + +############################################################################# +############################################################################# +## +## Load the FPGA and run the model +## +############################################################################# +############################################################################# + +# +# Move old stats file so we are sure statistics come from this run +# +if (-f "$config{workload}.stats") { + rename("$config{workload}.stats", "$config{workload}.stats.old"); +} + +if ($mType == $MODEL_FPGA) { + if (! defined($printCycle)) { + # User didn't specify a cycle printing interval. Pick one more reasonable + # for HW. + #$cmd .= " --pc=10000000"; + } + + # Load FPGA + $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit"; + + if (! $noProgram) { + if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") { + print STDERR "FPGA bit file has errors:\n\n"; + system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr"); + print STDERR "\nUse --force-load to ignore the error.\n"; + exit(1); + } + + if (! $noReserve) { + Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA"); + } + + # Does a download script exist to program the FPGA? + my $needProgram = (-f "$config{modelDir}/config/$config{model}.download"); + + $needProgram = 1; + + # Is the FPGA already programmed with the correct bit file? + if (exists($config{signature})) { + my $curSignature = `hasim-fpga-ctrl --getsignature`; + chomp($curSignature); + if ($curSignature eq $config{signature}) { + print "FPGA is already programmed (signature match)...\n"; + #$needProgram = 0; + } + } + + if ($needProgram) { + Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode"); + + my $dir = `pwd`; + chomp($dir); + Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA"); + + if (exists($config{signature})) { + Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature"); + } + } + + Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver"); + } +} + +# Run the software side or a hardware simulator +my $run_status = 0; +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) { + $run_status = ExecModel($cmd); +} + +# Create a stats file for null workloads to make regression.launcher happy (HACK) +if ( $config{workload} eq "null" ) { + system("touch null.stats"); +} + +if (-f "hasim_events.out") { + system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out"); +} +if (-f "$config{workload}.stats") { + system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats"); +} + +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation"); +} + +if ($run_status != 0) { + exit($run_status); +} +else { + exit(CompareOutput()); +} + + +sub ErrorExit($) { + my $msg = shift; + + print STDERR "${msg}\n"; + + if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + system("hasim-fpga-ctrl --drop-reservation"); + } + + exit(1); +} + + +## +## ExecModel -- +## This is the routine that actually invokes the model. stdout and stderr +## are logged in a file. The return value is the exit status of the model. +## +sub ExecModel($) { + my $cmd = shift; + + if ($gdb) { + ## gdb needs stdin. Just use system() and don't do logging. + system("gdb -args " . $cmd); + return 0; + } + + ## + ## Invoke the model, but log its output both to stdout and to a file. + ## Use a pty so the invoked program will use line buffering instead + ## of fully buffered writes. (Libc sets up stdout line buffered when + ## it thinks it is writing to a terminal. It uses fully buffered + ## writing to a pipe.) + ## + + my $pty = new IO::Pty; + my $slave = $pty->slave(); + + my $pid = fork(); + die "Couldn't fork: $!" unless defined $pid; + + if (! $pid) { + # Child process is the monitoring process + $pty->make_slave_controlling_terminal(); + + my $output = "$config{workload}.$config{ISA}.out"; + if(exists($config{silent})) { + $output = "/dev/null"; + } + + if (! open(LOG, ">$output")) { + print STDERR "Error opening log file $output\n"; + } + + # Unbuffered I/O loop + while (1) { + my $buf; + my $n = sysread($slave, $buf, 4096); + + last if ($n == 0); + + syswrite(STDOUT, $buf); + syswrite(LOG, $buf); + } + + close(LOG); + exit(0); + } + + # Bind new PTY to STDOUT (but save old STDOUT) + $pty->close_slave(); + open(my $oldOut, ">&", STDOUT) or die $!; + open(STDOUT, ">&", $pty) or die $!; + + # Run model + my $result = system("${cmd} 2>&1"); + + # Send ^d to end child logging thread + print "\cD"; + + # Return to normal STDOUT + close(STDOUT); + open(STDOUT, ">&", $oldOut) or die $!; + close($oldOut); + + # Compute exit status of model + my $status = 0; + if ($result == -1) { + print STDERR "Model execution failed\n"; + $status = 1; + } + elsif ($result & 127) { + print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n"; + $status = 1; + } + elsif (($result >> 8) != 0) { + $status = $result >> 8; + print "Model exited with status $status\n"; + } + + return $status; +} + + +sub Exec($$) { + my $cmd = shift; + my $errmsg = shift; + + system($cmd); + if ($? == -1) { + ErrorExit("Failed to execute $cmd: $!"); + } + elsif ($? & 127) { + ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump"); + } + elsif (($? >> 8) != 0) { + ErrorExit("${errmsg}"); + } +} + + +sub CompareOutput() { + return 0 if ($noCompare != 0); + return 0 if (! exists($config{compare}) || ($config{compare} eq '')); + + # run the checker + `cd ./checker/ && make clean && make`; + `./checker/checker input.wav out_gold.wav`; + print "about to call compare_wavs_freq\n"; + my $out=`./checker/compare_wavs/compare_wavs_freq 1 out_gold.wav out_hw.wav`; + + if ($out !~ /fail/) { + print "*** Output comparison passed ***\n"; + system("touch $config{workload}.stats"); + return 0; + } + else { + print "*** Output comparison failed ***\n"; + return 1; + } +} + + +# +# Read the configuration file +# +sub ReadConfig($$) { + my $conf = shift; + my $required = shift; + + my $status = open(CONFIG, "< $conf"); + if (! $status) { + return if (! $required); + die("Failed to open $conf"); + } + + while () { + chomp; + my $t = $_; + $t =~ s/#.*//; + if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) { + my $c = $1; + my $v = $2; + $v =~ s/^["'](.*)["']$/$1/; # Drop quotation marks + $config{$c} = $v; + } + elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) { + my $c = $1; + my $v = $2; + $config{$c} = $v; + } + } +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/run-null.bmark --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/run-null.bmark Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,492 @@ +#!/usr/bin/env perl +# -*- perl -*- + +use strict; +use warnings; +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through); +use IO::Pty; + +# +# Turn on warnings +# +$^W = 1; + +## +## Benchmark run script +## + +sub ExecModel($); +sub Exec($$); +sub CompareOutput(); +sub ReadConfig($$); + + +############################################################################# +############################################################################# +## +## Start by figuring out the model location and type. +## +############################################################################# +############################################################################# + +my %config; + +ReadConfig("config/env.sh", 1); +ReadConfig("$config{modelDir}/config/env.sh", 1); +ReadConfig("$config{modelDir}/config/signature.sh", 0); + +## +## Pseudo-enumeration of possible model types +## +my $MODEL_NONE = 0; +my $MODEL_FPGA = 1; # Model runs on FPGA hardware +my $MODEL_BLUESIM = 2; # Bluesim +my $MODEL_VSIM = 3; # Verilog simulator + +my $mType = $MODEL_NONE; + + +############################################################################# +############################################################################# +## +## Process command line arguments +## +############################################################################# +############################################################################# + +my $help = 0; +my $onlyCompare = 0; +my $noCompare = 0; +my $forceLoad = 0; +my $gdb = 0; +my $noProgram = 0; +my $noReserve = 0; +my $funcpPrefix = ""; +my $funcpSuffix = ""; +my $printCycle = undef; +my $bluesimCmd = undef; +my $vcdStart = undef; +my $vcdCycles = 20000; +my $m5run = 0; + +my $status = GetOptions("help!" => \$help, + "gdb!" => \$gdb, + "noprogram!" => \$noProgram, + "noreserve!" => \$noReserve, + "force-load!" => \$forceLoad, + "funcp-prefix=s" => \$funcpPrefix, + "funcp-suffix=s" => \$funcpSuffix, + "onlycompare!" => \$onlyCompare, + "nocompare!" => \$noCompare, + "pc=s" => \$printCycle, + "bluesim=s" => \$bluesimCmd, + "vcdstart=i" => \$vcdStart, + "vcdcycles=i" => \$vcdCycles, + "m5!" => \$m5run, + ); + +# Put quotation marks back on arguments that have spaces since they will be +# passed through a shell once more. +foreach my $i ( 0 .. $#ARGV ) { + if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) { + $ARGV[$i] = '"' . $ARGV[$i] . '"'; + } +} + +if ($onlyCompare != 0) { + exit(CompareOutput()); +} + +if ($m5run != 0) { + $mType = $MODEL_NONE; +} +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") { + $mType = $MODEL_FPGA; +} +elsif (-f "$config{modelDir}/$config{model}_hw.exe") { + $mType = $MODEL_BLUESIM; +} +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") { + $mType = $MODEL_VSIM; +} +else { + die("Can't determine model type"); +} + +if ($help || ! $status) { + print STDERR "\nArguments:\n"; + print STDERR " [--gdb] Invokes the software side in gdb\n"; + print STDERR " [--noprogram] Skips the FPGA load and reservation steps\n"; + print STDERR " [--noreserve] Skips the FPGA reservation steps\n"; + print STDERR " [--funcp-prefix=\"\"]\n"; + print STDERR " Prepend prefix to HAsim's --funcp argument\n"; + print STDERR " [--funcp-suffix=\"\"]\n"; + print STDERR " Append suffix to HAsim's --funcp argument\n"; + print STDERR " [--onlycompare] Only compare output files (without running)\n"; + print STDERR " [--nocompare] Skip comparison of output files\n"; + print STDERR " [--m5] Run workload in m5 without HAsim\n"; + + if ($mType == $MODEL_FPGA) { + print STDERR " [--force-load] Load a bitfile to the FPGA even if it has errors\n"; + } + + if ($mType == $MODEL_BLUESIM) { + print STDERR " [--vcdstart=] Generate VCD dump for wave viewer (e.g. gtkwave)\n"; + print STDERR " [--vcdcycles=] VCD dump length (default = 20000)\n"; + } + + if ($config{isHybridModel}) { + my $cmd = "$config{modelDir}/$config{model} --help-run-append"; + system($cmd); + } + + exit(1); +} + +############################################################################# +############################################################################# +## +## Adjust model arguments +## +############################################################################# +############################################################################# + +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}"; + +if ($config{feeder} eq 'm5') { + # Tell m5 to be quiet and not to enable the remote gdb port. Under netbatch + # it appears there are sometimes attempts to connect to the port, which + # stops simulation. + $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}"; +} + +my $cmd; + +if ($m5run == 0) { + # Normal run + $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --funcp=\"${feedFlags}\" $config{genFlags}"; + foreach my $c (@ARGV) { + $cmd .= " $c"; + } + + if (defined($printCycle)) { + $cmd .= " --pc=${printCycle}"; + } +} +else { + if ($config{feeder} ne 'm5') { + die("This workload does not use m5"); + } + + # Running inside m5 without HAsim + my $m5cmd; + if (exists($ENV{M5BIN})) { + $m5cmd = $ENV{M5BIN}; + } + else { + my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt"); + $m5cmd = `awb-resolver ${m5bin}`; + chomp($m5cmd); + die("Failed to find $m5bin") if ($m5cmd eq ''); + } + + $cmd = "${m5cmd} ${feedFlags}"; + + # Drop --hasim-sim + $cmd =~ s/--hasim-sim //; + # Drop escaping of quotes + $cmd =~ s/\\"/"/g; + + $noProgram = 1; +} + +# +# Bluesim arguments +# + +# Generate dump.vcd for wave viewer (e.g. gtkwave)? +if (defined($vcdStart)) { + my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop"; + if ($vcdStart > 0) { + $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}"; + } + + if (defined($bluesimCmd)) { + $bluesimCmd .= " "; + } + else { + $bluesimCmd = ""; + } + $bluesimCmd .= "-c \"$vcdCmd\""; +} + +if (defined($bluesimCmd)) { + $cmd .= " --bluesim=\'$bluesimCmd\'"; +} + +# Adjust the arguments for Bluesim if it is being invoked directly +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) { + $cmd =~ s/\s--/ +--/g; + + # Bluesim may expect to load a program from a well known file + unlink('program.vmh'); + link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh'); +} + + +############################################################################# +############################################################################# +## +## Load the FPGA and run the model +## +############################################################################# +############################################################################# + +# +# Move old stats file so we are sure statistics come from this run +# +if (-f "$config{workload}.stats") { + rename("$config{workload}.stats", "$config{workload}.stats.old"); +} + +if ($mType == $MODEL_FPGA) { + if (! defined($printCycle)) { + # User didn't specify a cycle printing interval. Pick one more reasonable + # for HW. + #$cmd .= " --pc=10000000"; + } + + # Load FPGA + $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit"; + + if (! $noProgram) { + if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") { + print STDERR "FPGA bit file has errors:\n\n"; + system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr"); + print STDERR "\nUse --force-load to ignore the error.\n"; + exit(1); + } + + if (! $noReserve) { + Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA"); + } + + # Does a download script exist to program the FPGA? + my $needProgram = (-f "$config{modelDir}/config/$config{model}.download"); + + $needProgram = 1; + + # Is the FPGA already programmed with the correct bit file? + if (exists($config{signature})) { + my $curSignature = `hasim-fpga-ctrl --getsignature`; + chomp($curSignature); + if ($curSignature eq $config{signature}) { + print "FPGA is already programmed (signature match)...\n"; + #$needProgram = 0; + } + } + + if ($needProgram) { + Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode"); + + my $dir = `pwd`; + chomp($dir); + Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA"); + + if (exists($config{signature})) { + Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature"); + } + } + + Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver"); + } +} + +# Run the software side or a hardware simulator +my $run_status = 0; +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) { + $run_status = ExecModel($cmd); +} + +# Create a stats file for null workloads to make regression.launcher happy (HACK) +if ( $config{workload} eq "null" ) { + system("touch null.stats"); +} + +if (-f "hasim_events.out") { + system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out"); +} +if (-f "$config{workload}.stats") { + system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats"); +} + +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation"); +} + +if ($run_status != 0) { + exit($run_status); +} +else { + exit(CompareOutput()); +} + + +sub ErrorExit($) { + my $msg = shift; + + print STDERR "${msg}\n"; + + if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + system("hasim-fpga-ctrl --drop-reservation"); + } + + exit(1); +} + + +## +## ExecModel -- +## This is the routine that actually invokes the model. stdout and stderr +## are logged in a file. The return value is the exit status of the model. +## +sub ExecModel($) { + my $cmd = shift; + + if ($gdb) { + ## gdb needs stdin. Just use system() and don't do logging. + system("gdb -args " . $cmd); + return 0; + } + + ## + ## Invoke the model, but log its output both to stdout and to a file. + ## Use a pty so the invoked program will use line buffering instead + ## of fully buffered writes. (Libc sets up stdout line buffered when + ## it thinks it is writing to a terminal. It uses fully buffered + ## writing to a pipe.) + ## + + my $pty = new IO::Pty; + my $slave = $pty->slave(); + + my $pid = fork(); + die "Couldn't fork: $!" unless defined $pid; + + if (! $pid) { + # Child process is the monitoring process + $pty->make_slave_controlling_terminal(); + + my $output = "$config{workload}.$config{ISA}.out"; + if(exists($config{silent})) { + $output = "/dev/null"; + } + + if (! open(LOG, ">$output")) { + print STDERR "Error opening log file $output\n"; + } + + # Unbuffered I/O loop + while (1) { + my $buf; + my $n = sysread($slave, $buf, 4096); + + last if ($n == 0); + + syswrite(STDOUT, $buf); + syswrite(LOG, $buf); + } + + close(LOG); + exit(0); + } + + # Bind new PTY to STDOUT (but save old STDOUT) + $pty->close_slave(); + open(my $oldOut, ">&", STDOUT) or die $!; + open(STDOUT, ">&", $pty) or die $!; + + # Run model + my $result = system("${cmd} 2>&1"); + + # Send ^d to end child logging thread + print "\cD"; + + # Return to normal STDOUT + close(STDOUT); + open(STDOUT, ">&", $oldOut) or die $!; + close($oldOut); + + # Compute exit status of model + my $status = 0; + if ($result == -1) { + print STDERR "Model execution failed\n"; + $status = 1; + } + elsif ($result & 127) { + print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n"; + $status = 1; + } + elsif (($result >> 8) != 0) { + $status = $result >> 8; + print "Model exited with status $status\n"; + } + + return $status; +} + + +sub Exec($$) { + my $cmd = shift; + my $errmsg = shift; + + system($cmd); + if ($? == -1) { + ErrorExit("Failed to execute $cmd: $!"); + } + elsif ($? & 127) { + ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump"); + } + elsif (($? >> 8) != 0) { + ErrorExit("${errmsg}"); + } +} + + +sub CompareOutput() { + return 0 if ($noCompare != 0); + return 0 if (! exists($config{compare}) || ($config{compare} eq '')); + +} + + +# +# Read the configuration file +# +sub ReadConfig($$) { + my $conf = shift; + my $required = shift; + + my $status = open(CONFIG, "< $conf"); + if (! $status) { + return if (! $required); + die("Failed to open $conf"); + } + + while () { + chomp; + my $t = $_; + $t =~ s/#.*//; + if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) { + my $c = $1; + my $v = $2; + $v =~ s/^["'](.*)["']$/$1/; # Drop quotation marks + $config{$c} = $v; + } + elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) { + my $c = $1; + my $v = $2; + $config{$c} = $v; + } + } +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/run.bmark --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/run.bmark Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,528 @@ +#!/usr/bin/env perl +# -*- perl -*- + +use strict; +use warnings; +use Getopt::Long qw(:config no_auto_abbrev no_ignore_case pass_through); +use IO::Pty; + +# +# Turn on warnings +# +$^W = 1; + +## +## Benchmark run script +## + +sub ExecModel($); +sub Exec($$); +sub CompareOutput(); +sub ReadConfig($$); + + +############################################################################# +############################################################################# +## +## Start by figuring out the model location and type. +## +############################################################################# +############################################################################# + +my %config; + +ReadConfig("config/env.sh", 1); +ReadConfig("$config{modelDir}/config/env.sh", 1); +ReadConfig("$config{modelDir}/config/signature.sh", 0); + +## +## Pseudo-enumeration of possible model types +## +my $MODEL_NONE = 0; +my $MODEL_FPGA = 1; # Model runs on FPGA hardware +my $MODEL_BLUESIM = 2; # Bluesim +my $MODEL_VSIM = 3; # Verilog simulator + +my $mType = $MODEL_NONE; + + +############################################################################# +############################################################################# +## +## Process command line arguments +## +############################################################################# +############################################################################# + +my $help = 0; +my $onlyCompare = 0; +my $noCompare = 0; +my $forceLoad = 0; +my $gdb = 0; +my $noProgram = 0; +my $noReserve = 0; +my $funcpPrefix = ""; +my $funcpSuffix = ""; +my $noshowfp = 0; +my $printCycle = undef; +my $showfp = undef; +my $bluesimCmd = undef; +my $vcdStart = undef; +my $vcdCycles = 20000; +my $m5run = 0; + +my $status = GetOptions("help!" => \$help, + "gdb!" => \$gdb, + "noprogram!" => \$noProgram, + "noreserve!" => \$noReserve, + "force-load!" => \$forceLoad, + "funcp-prefix=s" => \$funcpPrefix, + "funcp-suffix=s" => \$funcpSuffix, + "noshowfp!" => \$noshowfp, + "onlycompare!" => \$onlyCompare, + "nocompare!" => \$noCompare, + "pc=s" => \$printCycle, + "showfp:s" => \$showfp, + "bluesim=s" => \$bluesimCmd, + "vcdstart=i" => \$vcdStart, + "vcdcycles=i" => \$vcdCycles, + "m5!" => \$m5run, + ); + +# Put quotation marks back on arguments that have spaces since they will be +# passed through a shell once more. +foreach my $i ( 0 .. $#ARGV ) { + if (($ARGV[$i] =~ /\s/) && ! ($ARGV[$i] =~ /['"]$/)) { + $ARGV[$i] = '"' . $ARGV[$i] . '"'; + } +} + +if ($onlyCompare != 0) { + exit(CompareOutput()); +} + +if ($m5run != 0) { + $mType = $MODEL_NONE; +} +elsif (-f "$config{modelDir}/$config{model}_hw.errinfo") { + $mType = $MODEL_FPGA; +} +elsif (-f "$config{modelDir}/$config{model}_hw.exe") { + $mType = $MODEL_BLUESIM; +} +elsif (-f "$config{modelDir}/$config{model}_hw.vexe") { + $mType = $MODEL_VSIM; +} +else { + die("Can't determine model type"); +} + +if ($help || ! $status) { + print STDERR "\nArguments:\n"; + print STDERR " [--gdb] Invokes the software side in gdb\n"; + print STDERR " [--noprogram] Skips the FPGA load and reservation steps\n"; + print STDERR " [--noreserve] Skips the FPGA reservation steps\n"; + print STDERR " [--funcp-prefix=\"\"]\n"; + print STDERR " Prepend prefix to HAsim's --funcp argument\n"; + print STDERR " [--funcp-suffix=\"\"]\n"; + print STDERR " Append suffix to HAsim's --funcp argument\n"; + print STDERR " [--onlycompare] Only compare output files (without running)\n"; + print STDERR " [--nocompare] Skip comparison of output files\n"; + print STDERR " [--m5] Run workload in m5 without HAsim\n"; + + if ($mType == $MODEL_FPGA) { + print STDERR " [--force-load] Load a bitfile to the FPGA even if it has errors\n"; + } + + if ($mType == $MODEL_BLUESIM) { + print STDERR " [--vcdstart=] Generate VCD dump for wave viewer (e.g. gtkwave)\n"; + print STDERR " [--vcdcycles=] VCD dump length (default = 20000)\n"; + } + + if ($config{isHybridModel}) { + my $cmd = "$config{modelDir}/$config{model} --help-run-append"; + system($cmd); + } + + exit(1); +} + +############################################################################# +############################################################################# +## +## Adjust model arguments +## +############################################################################# +############################################################################# + +# Show front panel? +if ($noshowfp) { + $showfp = 'none'; +} +elsif (defined($showfp)) { + # Specified on the run command line + $showfp = 'gui' if ($showfp eq ''); +} +elsif ($config{feeder} eq 'none') { + # For null feeder default to showing LEDs on stdout + $showfp = 'stdout'; +} +else { + # Other models have heartbeats + $showfp = 'none'; +} + +my $feedFlags = "${funcpPrefix} $config{feedFlags} ${funcpSuffix}"; + +if ($config{feeder} eq 'm5') { + # Tell m5 to be quiet and not to enable the remote gdb port. Under netbatch + # it appears there are sometimes attempts to connect to the port, which + # stops simulation. + $feedFlags = "--quiet --remote-gdb-port=0 ${feedFlags}"; +} + +my $cmd; + +if ($m5run == 0) { + # Normal run + $cmd = "$config{modelDir}/$config{model} --modeldir=$config{modelDir} --workload=$config{workload} --showfp=${showfp} --funcp=\"${feedFlags}\" $config{genFlags}"; + foreach my $c (@ARGV) { + $cmd .= " $c"; + } + + if (defined($printCycle)) { + $cmd .= " --pc=${printCycle}"; + } +} +else { + if ($config{feeder} ne 'm5') { + die("This workload does not use m5"); + } + + # Running inside m5 without HAsim + my $m5cmd; + if (exists($ENV{M5BIN})) { + $m5cmd = $ENV{M5BIN}; + } + else { + my $m5bin = "platform/m5/build/ALPHA_SE/m5." . ($gdb ? "debug" : "opt"); + $m5cmd = `awb-resolver ${m5bin}`; + chomp($m5cmd); + die("Failed to find $m5bin") if ($m5cmd eq ''); + } + + $cmd = "${m5cmd} ${feedFlags}"; + + # Drop --hasim-sim + $cmd =~ s/--hasim-sim //; + # Drop escaping of quotes + $cmd =~ s/\\"/"/g; + + $noProgram = 1; +} + +# +# Bluesim arguments +# + +# Generate dump.vcd for wave viewer (e.g. gtkwave)? +if (defined($vcdStart)) { + my $vcdCmd = "sim vcd on; sim step $vcdCycles; sim stop"; + if ($vcdStart > 0) { + $vcdCmd = "sim step ${vcdStart}; ${vcdCmd}"; + } + + if (defined($bluesimCmd)) { + $bluesimCmd .= " "; + } + else { + $bluesimCmd = ""; + } + $bluesimCmd .= "-c \"$vcdCmd\""; +} + +if (defined($bluesimCmd)) { + $cmd .= " --bluesim=\'$bluesimCmd\'"; +} + +# Adjust the arguments for Bluesim if it is being invoked directly +if (! $config{isHybridModel} && ($mType == $MODEL_BLUESIM)) { + $cmd =~ s/\s--/ +--/g; + + # Bluesim may expect to load a program from a well known file + unlink('program.vmh'); + link("program/$config{workload}.$config{ISA}.vmh", 'program.vmh'); +} + + +############################################################################# +############################################################################# +## +## Load the FPGA and run the model +## +############################################################################# +############################################################################# + +# +# Move old stats file so we are sure statistics come from this run +# +if (-f "$config{workload}.stats") { + rename("$config{workload}.stats", "$config{workload}.stats.old"); +} + +if ($mType == $MODEL_FPGA) { + if (! defined($printCycle)) { + # User didn't specify a cycle printing interval. Pick one more reasonable + # for HW. + #$cmd .= " --pc=10000000"; + } + + # Load FPGA + $ENV{FPGA_BIT_FILE} = "$config{modelDir}/.xilinx/$config{model}_par.bit"; + + if (! $noProgram) { + if (! $forceLoad && -s "$config{modelDir}/$config{model}_hw.errinfo") { + print STDERR "FPGA bit file has errors:\n\n"; + system("cat $config{modelDir}/$config{model}_hw.errinfo > /dev/stderr"); + print STDERR "\nUse --force-load to ignore the error.\n"; + exit(1); + } + + if (! $noReserve) { + Exec("hasim-fpga-ctrl --reserve", "Failed to reserve FPGA"); + } + + # Does a download script exist to program the FPGA? + my $needProgram = (-f "$config{modelDir}/config/$config{model}.download"); + $needProgram = 1; + + # Is the FPGA already programmed with the correct bit file? + if (exists($config{signature})) { + my $curSignature = `hasim-fpga-ctrl --getsignature`; + chomp($curSignature); + if ($curSignature eq $config{signature}) { + print "FPGA is already programmed (signature match)...\n"; + #$needProgram = 0; + } + } + + if ($needProgram) { + Exec("hasim-fpga-ctrl --program", "Failed to enter FPGA programming mode"); + + my $dir = `pwd`; + chomp($dir); + Exec("(cd $config{modelDir}; ./config/$config{model}.download ${dir}/FPGA_programming.log)", "Failed to program FPGA"); + + if (exists($config{signature})) { + Exec("hasim-fpga-ctrl --setsignature=$config{signature}", "Failed to set FPGA bit image signature"); + } + } + + Exec("hasim-fpga-ctrl --activate", "Failed to activate FPGA or driver"); + } +} + +# Run the software side or a hardware simulator +my $run_status = 0; +if ($config{isHybridModel} || ($mType != $MODEL_FPGA)) { + $cmd = $cmd." 2> proc.trace\n"; + $run_status = ExecModel($cmd); +} + +# Create a stats file for null workloads to make regression.launcher happy (HACK) +if ( $config{workload} eq "null" ) { + system("touch null.stats"); +} + +if (-f "hasim_events.out") { + system("sort hasim_events.out -o hasim_events.out.$$; mv -f hasim_events.out.$$ hasim_events.out"); +} +if (-f "$config{workload}.stats") { + system("sort $config{workload}.stats -o $config{workload}.stats.$$; mv -f $config{workload}.stats.$$ $config{workload}.stats"); +} + +if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + Exec("hasim-fpga-ctrl --drop-reservation", "Failed to drop FPGA reservation"); +} + +if ($run_status != 0) { + exit($run_status); +} +else { + exit(CompareOutput()); +} + + +sub ErrorExit($) { + my $msg = shift; + + print STDERR "${msg}\n"; + + if (($mType == $MODEL_FPGA) && ! $noProgram && ! $noReserve) { + system("hasim-fpga-ctrl --drop-reservation"); + } + + exit(1); +} + + +## +## ExecModel -- +## This is the routine that actually invokes the model. stdout and stderr +## are logged in a file. The return value is the exit status of the model. +## +sub ExecModel($) { + my $cmd = shift; + + if ($gdb) { + ## gdb needs stdin. Just use system() and don't do logging. + system("gdb -args " . $cmd); + return 0; + } + + ## + ## Invoke the model, but log its output both to stdout and to a file. + ## Use a pty so the invoked program will use line buffering instead + ## of fully buffered writes. (Libc sets up stdout line buffered when + ## it thinks it is writing to a terminal. It uses fully buffered + ## writing to a pipe.) + ## + + my $pty = new IO::Pty; + my $slave = $pty->slave(); + + my $pid = fork(); + die "Couldn't fork: $!" unless defined $pid; + + if (! $pid) { + # Child process is the monitoring process + $pty->make_slave_controlling_terminal(); + + my $output = "$config{workload}.$config{ISA}.out"; + if(exists($config{silent})) { + $output = "/dev/null"; + } + + if (! open(LOG, ">$output")) { + print STDERR "Error opening log file $output\n"; + } + + # Unbuffered I/O loop + while (1) { + my $buf; + my $n = sysread($slave, $buf, 4096); + + last if ($n == 0); + + syswrite(STDOUT, $buf); + syswrite(LOG, $buf); + } + + close(LOG); + exit(0); + } + + # Bind new PTY to STDOUT (but save old STDOUT) + $pty->close_slave(); + open(my $oldOut, ">&", STDOUT) or die $!; + open(STDOUT, ">&", $pty) or die $!; + + # Run model + my $result = system("${cmd} 2>&1"); + + # Send ^d to end child logging thread + print "\cD"; + + # Return to normal STDOUT + close(STDOUT); + open(STDOUT, ">&", $oldOut) or die $!; + close($oldOut); + + # Compute exit status of model + my $status = 0; + if ($result == -1) { + print STDERR "Model execution failed\n"; + $status = 1; + } + elsif ($result & 127) { + print STDERR "Child died with signal " . ($result & 127) . ", " . (($result & 128) ? 'with' : 'without') . " coredump\n"; + $status = 1; + } + elsif (($result >> 8) != 0) { + $status = $result >> 8; + print "Model exited with status $status\n"; + } + + return $status; +} + + +sub Exec($$) { + my $cmd = shift; + my $errmsg = shift; + + system($cmd); + if ($? == -1) { + ErrorExit("Failed to execute $cmd: $!"); + } + elsif ($? & 127) { + ErrorExit("Child died with signal " . ($? & 127) . ", " . (($? & 128) ? 'with' : 'without') . " coredump"); + } + elsif (($? >> 8) != 0) { + ErrorExit("${errmsg}"); + } +} + + +sub CompareOutput() { + return 0 if ($noCompare != 0); + return 0 if (! exists($config{compare}) || ($config{compare} eq '')); + + # run the checker + `cd ./checker/ && make clean && make`; + `./checker/checker input.wav out_gold.wav`; + print "about to call compare_wavs\n"; + my $out=`./checker/compare_wavs/compare_wavs 10 out_gold.wav out_hw.wav`; + + if ($out !~ /fail/) { + print "*** Output comparison passed ***\n"; + system("touch $config{workload}.stats"); + return 0; + } + else { + print "*** Output comparison failed ***\n"; + return 1; + } +} + + +# +# Read the configuration file +# +sub ReadConfig($$) { + my $conf = shift; + my $required = shift; + + my $status = open(CONFIG, "< $conf"); + if (! $status) { + return if (! $required); + die("Failed to open $conf"); + } + + while () { + chomp; + my $t = $_; + $t =~ s/#.*//; + if ($t =~ /^\s*([^\s]+)\s*=\s*"(.*)"\s*$/) { + my $c = $1; + my $v = $2; + $v =~ s/^["'](.*)["']$/$1/; # Drop quotation marks + $config{$c} = $v; + } + elsif ($t =~ /^\s*([^\s]+)\s*=\s*([^\s]+)\s*$/) { + my $c = $1; + my $v = $2; + $config{$c} = $v; + } + } +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/setup-mit-6.375-bmark --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/setup-mit-6.375-bmark Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,182 @@ +#!/usr/bin/env perl +# -*- perl -*- + +############################################################## +# +# Benchmark setup for HAsim +# +# Usage: setup-bmark +# +# Setup benchmark to run in +# +############################################################## + +use strict; +use warnings; +use File::Basename; +use Getopt::Long; + +sub Usage(); +sub ErrorExit($); + +# +# Turn on warnings +# +$^W = 1; + +my $binary = undef; +my $compare = undef; +my $data = undef; +my $feeder = ''; +my $group = undef; +my $isa = "unknown_ISA"; +my $linkto = undef; +my $silent = undef; + +# +# Find the root of the benchmarks directory tree. +# +my $benchmark_root = `awb-resolver --config=benchmarkdir`; +chomp($benchmark_root); +ErrorExit("Can't find benchmark root") if ($benchmark_root eq ''); + +# +# Parse the command line switches +# +if (! GetOptions('binary=s' => \$binary, + 'compare=s' => \$compare, + 'data=s' => \$data, + 'feeder=s' => \$feeder, + 'group=s' => \$group, + 'isa=s' => \$isa, + 'linkto=s' => \$linkto, + 'silent=s' => \$silent, + )) { + Usage(); +} + +if ($#ARGV != 2) { + Usage(); +} + +my $bmark = $ARGV[0]; +my $srcdir = $ARGV[1]; +my $dstdir = $ARGV[2]; +my $basedir = `pwd`; +chomp($basedir); + +print "BMARK: $bmark\n"; +print "SRC: $srcdir\n"; +print "DST: $dstdir\n"; +print "BASE: $basedir\n"; + +if (! defined($group)) { + $group = $bmark; +} + + +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir"); + +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory"); + +# Set up benchmark for non-null feeders +if ($feeder ne "none") { + my $src_prog; + + mkdir('program') or ErrorExit("Failed to make 'program' directory"); + + if (defined($binary)) { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh"; + } + else { + print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n"; + exit(1); + } + + my $dst_prog = "program/" . basename($src_prog); + + unlink($dst_prog); + symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog"); +} + +# Copy input data files +if (defined($data)) { + # No trailing slash. Just link to a single object + print "data: $data\n"; + symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data"); +} + +# Link to files or directories +if (defined($linkto)) { + foreach my $tgt (split(':', $linkto)) { + if ($tgt =~ /\/$/) { + # Trailing slash means link to all the files individually within + # a directory. + if (-d $tgt) { + opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n"); + my @tgt_objs = readdir(DIR); + closedir(DIR); + foreach my $t (@tgt_objs) { + if (! (($t eq '.') || ($t eq '..'))) { + symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}"); + } + } + } + } + else { + # No trailing slash. Just link to a single object + symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt"); + } + } +} + +# Store compare rules to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +print ENV "ISA=\"${isa}\"\n"; +if (defined($compare)) { + print ENV "compare=\"${compare}\"\n"; +} +close(ENV); + +#store silent mode to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +if (defined($silent)) { + print ENV "silent=1\n"; +} +close(ENV); + +# Set up m5 environment +if ($feeder eq 'm5') { + system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -"); +} + +system("cp -f ${srcdir}/run.bmark run"); +chmod(0755, "run"); + +exit(0); + + + +sub Usage() { + print STDERR "Usage: setup-bmark [--binary ]\n"; + print STDERR " [--compare ]\n"; + print STDERR " [--data ]\n"; + print STDERR " [--group ]\n"; + print STDERR " [--isa ]\n"; + print STDERR " [--linkto :...:]\n"; + print STDERR " [--silent] \n"; + print STDERR " \n"; + exit(1); +} + + +sub ErrorExit($) { + print STDERR @_ . "\n"; + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/setup-mit-6.375-bmark-freq --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/setup-mit-6.375-bmark-freq Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,182 @@ +#!/usr/bin/env perl +# -*- perl -*- + +############################################################# +# +# Benchmark setup for HAsim +# +# Usage: setup-bmark +# +# Setup benchmark to run in +# +############################################################# + +use strict; +use warnings; +use File::Basename; +use Getopt::Long; + +sub Usage(); +sub ErrorExit($); + +# +# Turn on warnings +# +$^W = 1; + +my $binary = undef; +my $compare = undef; +my $data = undef; +my $feeder = ''; +my $group = undef; +my $isa = "unknown_ISA"; +my $linkto = undef; +my $silent = undef; + +# +# Find the root of the benchmarks directory tree. +# +my $benchmark_root = `awb-resolver --config=benchmarkdir`; +chomp($benchmark_root); +ErrorExit("Can't find benchmark root") if ($benchmark_root eq ''); + +# +# Parse the command line switches +# +if (! GetOptions('binary=s' => \$binary, + 'compare=s' => \$compare, + 'data=s' => \$data, + 'feeder=s' => \$feeder, + 'group=s' => \$group, + 'isa=s' => \$isa, + 'linkto=s' => \$linkto, + 'silent=s' => \$silent, + )) { + Usage(); +} + +if ($#ARGV != 2) { + Usage(); +} + +my $bmark = $ARGV[0]; +my $srcdir = $ARGV[1]; +my $dstdir = $ARGV[2]; +my $basedir = `pwd`; +chomp($basedir); + +print "BMARK: $bmark\n"; +print "SRC: $srcdir\n"; +print "DST: $dstdir\n"; +print "BASE: $basedir\n"; + +if (! defined($group)) { + $group = $bmark; +} + + +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir"); + +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory"); + +# Set up benchmark for non-null feeders +if ($feeder ne "none") { + my $src_prog; + + mkdir('program') or ErrorExit("Failed to make 'program' directory"); + + if (defined($binary)) { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh"; + } + else { + print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n"; + exit(1); + } + + my $dst_prog = "program/" . basename($src_prog); + + unlink($dst_prog); + symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog"); +} + +# Copy input data files +if (defined($data)) { + # No trailing slash. Just link to a single object + print "data: $data\n"; + symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data"); +} + +# Link to files or directories +if (defined($linkto)) { + foreach my $tgt (split(':', $linkto)) { + if ($tgt =~ /\/$/) { + # Trailing slash means link to all the files individually within + # a directory. + if (-d $tgt) { + opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n"); + my @tgt_objs = readdir(DIR); + closedir(DIR); + foreach my $t (@tgt_objs) { + if (! (($t eq '.') || ($t eq '..'))) { + symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}"); + } + } + } + } + else { + # No trailing slash. Just link to a single object + symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt"); + } + } +} + +# Store compare rules to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +print ENV "ISA=\"${isa}\"\n"; +if (defined($compare)) { + print ENV "compare=\"${compare}\"\n"; +} +close(ENV); + +#store silent mode to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +if (defined($silent)) { + print ENV "silent=1\n"; +} +close(ENV); + +# Set up m5 environment +if ($feeder eq 'm5') { + system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -"); +} + +system("cp -f ${srcdir}/run-freq.bmark run"); +chmod(0755, "run"); + +exit(0); + + + +sub Usage() { + print STDERR "Usage: setup-bmark [--binary ]\n"; + print STDERR " [--compare ]\n"; + print STDERR " [--data ]\n"; + print STDERR " [--group ]\n"; + print STDERR " [--isa ]\n"; + print STDERR " [--linkto :...:]\n"; + print STDERR " [--silent] \n"; + print STDERR " \n"; + exit(1); +} + + +sub ErrorExit($) { + print STDERR @_ . "\n"; + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/setup-mit-6.375-bmark-processor --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/setup-mit-6.375-bmark-processor Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,186 @@ +#!/usr/bin/env perl +# -*- perl -*- + +############################################################## +# +# Benchmark setup for HAsim +# +# Usage: setup-bmark +# +# Setup benchmark to run in +# +############################################################## + +use strict; +use warnings; +use File::Basename; +use Getopt::Long; + +sub Usage(); +sub ErrorExit($); + +# +# Turn on warnings +# +$^W = 1; + +my $binary = undef; +my $compare = undef; +my $data = undef; +my $feeder = ''; +my $group = undef; +my $isa = "unknown_ISA"; +my $linkto = undef; +my $numContexts = 1; + +# +# Find the root of the benchmarks directory tree. +# +my $benchmark_root = `awb-resolver --config=benchmarkdir`; +chomp($benchmark_root); +ErrorExit("Can't find benchmark root") if ($benchmark_root eq ''); + +# +# Parse the command line switches +# +if (! GetOptions('binary=s' => \$binary, + 'compare=s' => \$compare, + 'data=s' => \$data, + 'feeder=s' => \$feeder, + 'group=s' => \$group, + 'isa=s' => \$isa, + 'linkto=s' => \$linkto, + 'contexts=i' => \$numContexts, + )) { + Usage(); +} + +if ($#ARGV != 2) { + Usage(); +} + +my $bmark = $ARGV[0]; +my $srcdir = $ARGV[1]; +my $dstdir = $ARGV[2]; + +print "BMARK: $bmark\n"; +print "SRC: $srcdir\n"; +print "DST: $dstdir\n"; + +if (! defined($group)) { + $group = $bmark; +} + +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir"); + +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory"); + +# Set up benchmark for non-null feeders +my $context = 0; +while ($context < $numContexts) { + if ($feeder ne "none") { + my $src_prog; + + mkdir("program.${context}") or ErrorExit("Failed to make program directory"); + chdir("program.${context}") or ErrorExit("Failed to cd to program directory"); + + if (defined($binary)) { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh"; + } + else { + print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n"; + exit(1); + } + + my $dst_prog = basename($src_prog); + + unlink($dst_prog); + symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog"); + + # Copy input data files + if (defined($data)) { + if ($data =~ /\.tar\.gz$/) { + system("tar xzf ${data}"); + } + elsif ($data =~ /\.tar$/) { + system("tar xf ${data}"); + } + } + + # Link to files or directories + if (defined($linkto)) { + foreach my $tgt (split(':', $linkto)) { + if ($tgt =~ /\/$/) { + # Trailing slash means link to all the files individually within + # a directory. + if (-d $tgt) { + opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n"); + my @tgt_objs = readdir(DIR); + closedir(DIR); + foreach my $t (@tgt_objs) { + if (! (($t eq '.') || ($t eq '..'))) { + symlink("${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}"); + } + } + } + } + else { + # No trailing slash. Just link to a single object + symlink($tgt, basename($tgt)) or die("Failed to link to $tgt"); + } + } + } + + # Back to main workload directory + chdir(".."); + } + + $context += 1; +} + +# Store compare rules to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +print ENV "ISA=\"${isa}\"\n"; +if ($numContexts != 0) { + print ENV "workloadContexts=\"${numContexts}\"\n"; +} +if (defined($compare)) { + print ENV "compare=\"${compare}\"\n"; +} +close(ENV); + +# Set up m5 environment +if ($feeder eq 'm5') { + system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -"); +} + +system("cp -f ${srcdir}/run.bmark run"); +chmod(0755, "run"); + +exit(0); + + + +sub Usage() { + print STDERR "Usage: setup-bmark [--binary ]\n"; + print STDERR " [--compare ]\n"; + print STDERR " [--contexts ]\n"; + print STDERR " [--data ]\n"; + print STDERR " [--group ]\n"; + print STDERR " [--isa ]\n"; + print STDERR " [--linkto :...:]\n"; + print STDERR " \n"; + exit(1); +} + + +sub ErrorExit($) { + print STDERR @_ . "\n"; + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 scripts/setup-null-bmark --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/setup-null-bmark Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,182 @@ +#!/usr/bin/env perl +# -*- perl -*- + +############################################################## +# +# Benchmark setup for HAsim +# +# Usage: setup-bmark +# +# Setup benchmark to run in +# +############################################################## + +use strict; +use warnings; +use File::Basename; +use Getopt::Long; + +sub Usage(); +sub ErrorExit($); + +# +# Turn on warnings +# +$^W = 1; + +my $binary = undef; +my $compare = undef; +my $data = undef; +my $feeder = ''; +my $group = undef; +my $isa = "unknown_ISA"; +my $linkto = undef; +my $silent = undef; + +# +# Find the root of the benchmarks directory tree. +# +my $benchmark_root = `awb-resolver --config=benchmarkdir`; +chomp($benchmark_root); +ErrorExit("Can't find benchmark root") if ($benchmark_root eq ''); + +# +# Parse the command line switches +# +if (! GetOptions('binary=s' => \$binary, + 'compare=s' => \$compare, + 'data=s' => \$data, + 'feeder=s' => \$feeder, + 'group=s' => \$group, + 'isa=s' => \$isa, + 'linkto=s' => \$linkto, + 'silent=s' => \$silent, + )) { + Usage(); +} + +if ($#ARGV != 2) { + Usage(); +} + +my $bmark = $ARGV[0]; +my $srcdir = $ARGV[1]; +my $dstdir = $ARGV[2]; +my $basedir = `pwd`; +chomp($basedir); + +print "BMARK: $bmark\n"; +print "SRC: $srcdir\n"; +print "DST: $dstdir\n"; +print "BASE: $basedir\n"; + +if (! defined($group)) { + $group = $bmark; +} + + +chdir($dstdir) or ErrorExit("Failed to cd to $dstdir"); + +mkdir('hasim_debug') or ErrorExit("Failed to make 'hasim_debug' directory"); + +# Set up benchmark for non-null feeders +if ($feeder ne "none") { + my $src_prog; + + mkdir('program') or ErrorExit("Failed to make 'program' directory"); + + if (defined($binary)) { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${binary}"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.bin"; + } + elsif (-f "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh") { + $src_prog = "${benchmark_root}/hasim/${isa}/${group}/${bmark}.${isa}.vmh"; + } + else { + print STDERR "Can't find binary in ${benchmark_root}/hasim/${isa}/${group}\n"; + exit(1); + } + + my $dst_prog = "program/" . basename($src_prog); + + unlink($dst_prog); + symlink($src_prog, $dst_prog) or ErrorExit("Failed to symlink $dst_prog => $src_prog"); +} + +# Copy input data files +if (defined($data)) { + # No trailing slash. Just link to a single object + print "data: $data\n"; + symlink("${srcdir}/${data}", "input.wav") or die("Failed to link to $data"); +} + +# Link to files or directories +if (defined($linkto)) { + foreach my $tgt (split(':', $linkto)) { + if ($tgt =~ /\/$/) { + # Trailing slash means link to all the files individually within + # a directory. + if (-d $tgt) { + opendir(DIR, $tgt) || die("Cannot open directory for --linkto $tgt\n"); + my @tgt_objs = readdir(DIR); + closedir(DIR); + foreach my $t (@tgt_objs) { + if (! (($t eq '.') || ($t eq '..'))) { + symlink("${srcdir}/${tgt}${t}", basename($t)) or die("Failed to link to ${tgt}${t}"); + } + } + } + } + else { + # No trailing slash. Just link to a single object + symlink("${srcdir}/${tgt}", basename($tgt)) or die("Failed to link to $tgt"); + } + } +} + +# Store compare rules to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +print ENV "ISA=\"${isa}\"\n"; +if (defined($compare)) { + print ENV "compare=\"${compare}\"\n"; +} +close(ENV); + +#store silent mode to config +open(ENV, '>>config/env.sh') or die("Failed to open config/env.sh"); +if (defined($silent)) { + print ENV "silent=1\n"; +} +close(ENV); + +# Set up m5 environment +if ($feeder eq 'm5') { + system("(cd $srcdir; tar cf - ./m5_configs) | tar xf -"); +} + +system("cp -f ${srcdir}/run-null.bmark run"); +chmod(0755, "run"); + +exit(0); + + + +sub Usage() { + print STDERR "Usage: setup-bmark [--binary ]\n"; + print STDERR " [--compare ]\n"; + print STDERR " [--data ]\n"; + print STDERR " [--group ]\n"; + print STDERR " [--isa ]\n"; + print STDERR " [--linkto :...:]\n"; + print STDERR " [--silent] \n"; + print STDERR " \n"; + exit(1); +} + + +sub ErrorExit($) { + print STDERR @_ . "\n"; + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/compare_wavs/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,6 @@ +default: all + +clean: + rm -f *.o compare_wavs +all: + g++ /usr/lib/libsndfile.so compare_wavs.cpp -o compare_wavs \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs/compare_wavs.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/compare_wavs/compare_wavs.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,87 @@ +#include +#include +#include +#include +#include + + + +int +do_check (int drop, int argc, char * argv []) +{ + int margin_of_error; + SNDFILE* goldenWavFile; + SNDFILE* outputWavFile; + SF_INFO goldenInfo ; + SF_INFO outputInfo ; + short int buffA; + short int buffB; + + memset (&goldenInfo, 0, sizeof (goldenInfo)) ; + memset (&outputInfo, 0, sizeof (outputInfo)) ; + + margin_of_error = atoi(argv[1]); + + printf("Checking for Margin of Error %d\n", margin_of_error); + + goldenWavFile = sf_open(argv[2], SFM_READ, &goldenInfo); + if (goldenWavFile == NULL){ + printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[2], sf_strerror (NULL)) ; + exit (1) ; + } + + outputWavFile = sf_open(argv[3], SFM_READ, &outputInfo); + if (outputWavFile == NULL){ + printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[3], sf_strerror (NULL)) ; + exit (1) ; + } + + int max_diff = 0; + + // it is possible that the modified pipeline might introduce a few + // dummy tokens at the beginning of the stream, we'll just drop them + for(int i = 0; i < drop; i++){ + sf_read_short(outputWavFile, &buffB, 1); + } + + int count=0; + + while(sf_read_short(goldenWavFile, &buffA, 1)==1){ + + if(sf_read_short(outputWavFile, &buffB, 1) != 1){ + // the streams are of different length + printf("failed (length)\n"); + exit(0); + } + + int td = (buffA > buffB) ? (buffA - buffB) : (buffB - buffA); + max_diff = (td > max_diff) ? td : max_diff; + + if(max_diff > margin_of_error){ + printf("max_diff %x on drop %d (count %d)\n", max_diff, drop,count); + return 1; + } + + count++; + } + + printf("max_diff %x on drop %d\n", max_diff, drop); + + if(max_diff > margin_of_error) + return 1; + else + return 0; +} + +int +main(int argc, char* argv[]) +{ + for(int drop = 0; drop < 10; drop++){ + if(do_check(drop, argc, argv)==0){ + printf("passed on drop %d\n", drop); + exit(0); + } + } + printf("failed\n"); + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs_freq/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/compare_wavs_freq/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs_freq/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/compare_wavs_freq/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,6 @@ +default: all + +clean: + rm -f *.o compare_wavs_freq +all: + g++ /usr/lib/libsndfile.so DFT.cpp compare_wavs_freq.cpp -o compare_wavs_freq \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq Binary file tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/compare_wavs_freq/compare_wavs_freq.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,193 @@ +#include +#include +#include +#include +#include + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); +const int Points = 32; +const int Window = 32; + +void BubbleSort(double* arr, int* idxs) +{ + int i, j, flag = 1; + double temp; + int tmp1; + for(i = 1; (i <= Points) && flag; i++) + { + flag = 0; + for (j=0; j < (Points -1); j++) + { + if (arr[j+1] > arr[j]) + { + temp = arr[j]; + tmp1 = idxs[j]; + arr[j] = arr[j+1]; + idxs[j] = idxs[j+1]; + arr[j+1] = temp; + idxs[j+1] = tmp1; + flag = 1; + } + } + } +} + +int +do_check (int drop, int argc, char * argv []) +{ + int margin_of_error; + SNDFILE* goldenWavFile; + SNDFILE* outputWavFile; + SF_INFO goldenInfo ; + SF_INFO outputInfo ; + short int buffA[Points]; + short int buffB[Points]; + double drA[Window][Points]; + double drB[Window][Points]; + double diA[Points]; + double diB[Points]; + + memset (&goldenInfo, 0, sizeof (goldenInfo)) ; + memset (&outputInfo, 0, sizeof (outputInfo)) ; + + margin_of_error = atoi(argv[1]); + + printf("Checking for Margin of Error %d\n", margin_of_error); + + goldenWavFile = sf_open(argv[2], SFM_READ, &goldenInfo); + if (goldenWavFile == NULL){ + printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[2], sf_strerror (NULL)) ; + exit (1) ; + } + + outputWavFile = sf_open(argv[3], SFM_READ, &outputInfo); + if (outputWavFile == NULL){ + printf ("\nERROR : failed Not able to open wav file named '%s' : %s/\n", argv[3], sf_strerror (NULL)) ; + exit (1) ; + } + + int max_diff = 0; + + // it is possible that the modified pipeline might introduce a few + // dummy tokens at the beginning of the stream, we'll just drop them + for(int i = 0; i < drop; i++){ + sf_read_short(outputWavFile, buffB, 1); + } + + int count=0; + + while(sf_read_short(goldenWavFile, buffA, Points)==Points){ + + if(sf_read_short(outputWavFile, buffB, Points) != Points){ + // the streams are of different length + printf("failed (length)\n"); + exit(0); + } + + int wptr = count%Window; + + for(int i = 0; i < Points; i++){ + diA[i] = 0.0; + diB[i] = 0.0; + drA[wptr][i] = (double)buffA[i]; + drB[wptr][i] = (double)buffB[i]; + } + + DFT(1,Points,drA[wptr],diA); + DFT(1,Points,drB[wptr],diB); + + //for(int i = 0; i < Points; i++) + // printf("%10d %10d\n", (int)drA[wptr][i], (int)drB[wptr][i]); + //printf("\n"); + + if (count >= Window){ + double avgA[Points]; + double avgB[Points]; + + // reset averages to zero + for(int i = 0; i < Points; i++){ + avgA[i] = 0.0; + avgB[i] = 0.0; + } + + // compute the averages in each bin + for(int i = 0; i < Window; i++){ + for(int j = 0; j < Points; j++){ + avgA[j] += drA[i][j]; + avgB[j] += drB[i][j]; + } + } + + for(int i = 0; i < Points; i++){ + avgA[i] /= Window; + avgB[i] /= Window; + } + + + // this sucks, as we really should be averaging, but i'm lazy + + //int idxsA[Points]; + //int idxsB[Points]; + + //for(int i = 0; i < Points; i++){ + //idxsA[i] = i; + //idxsB[i] = i; + //} + + //BubbleSort(avgA, idxsA); + //BubbleSort(avgB, idxsB); + + //for(int i = 0; i < 2; i++){ + //int td = (idxsA[i] > idxsB[i]) ? (idxsA[i] - idxsB[i]) : (idxsB[i] - idxsA[i]); + //max_diff = (td > max_diff) ? td : max_diff; + //} + + + int scoreA = 0; + int scoreB = 0; + int threshold = 100; + + // this is brittle, but it works **for now** + for(int i = 0; i < Points; i++){ + if(abs((int)avgA[i]) > threshold) + scoreA++; + if(abs((int)avgB[i]) > threshold) + scoreB++; + } + + printf("scoreA %d scoreB %d\n", scoreA, scoreB); + + int td = (scoreA > scoreB) ? (scoreA - scoreB) : (scoreB - scoreA); + max_diff = (td > max_diff) ? td : max_diff; + + if(max_diff > margin_of_error){ + printf("max_diff %x on drop %d (count %d)\n", max_diff, drop,count); + return 1; + } + + } + + count++; + } + + printf("max_diff %d on drop %d\n", max_diff, drop); + + if(((int)max_diff) > margin_of_error) + return 1; + else + return 0; +} + +int +main(int argc, char* argv[]) +{ + for(int drop = 0; drop < 10; drop++){ + if(do_check(drop, argc, argv)==0){ + printf("passed on drop %d\n", drop); + exit(0); + } + } + printf("failed\n"); + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,248 @@ +#include +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +const int Taps = 9; +const int Points = 8; +const int log_Points = 3; +static int newest; +static short int x[Taps] = {0,0,0,0,0,0,0,0,0}; +static short int fir(short int); + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); + + +static int x_to_y(int x, int y) +{ + assert(y>0); + int rv = x; + while(y-->1) + x *= x; + return rv; +} + +// function implemented in LinearWindowingFunction.bsv +static double windowing_fn(int index) +{ + double pi = 3.14159265; + double i = (double)index; + return sin(0.5*pi* (sin((i + 0.5)/Points * pi) * sin((i + 0.5)/Points * pi))); +} + +// lifted from the bluespec code +static double h[Taps] = {-0.0124, + 0.0, + -0.0133, + 0.0, + 0.8181, + 0.0, + -0.0133, + 0.0, + -0.0124}; + + +short int +fir(short int sample) +{ + x[newest] = sample; + double y = 0; + for (int k = 0; k < Taps; k++) { + short int bits = x[(newest+k)%Taps]; + double x = (double)bits; + y += h[k] * x; + } + newest = (newest == 0) ? (Taps-1) : (newest-1); + short int rv = ((short int)y)&0x0000FFFF; + return rv; +} + + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *firPcmFile; + FILE *ifftPcmFile; + FILE *outputPcmFile; + + short int sample; + short int samples[Points]; + const unsigned int short_sz = sizeof(short int); + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + firPcmFile = fopen("fir.pcm", "w"); + + assert(inputPcmFile); + assert(firPcmFile); + + newest = 0; + memset(x, 0, sizeof(x)); + + while(fread(&sample, short_sz, 1, inputPcmFile)) { + sample = fir(sample); + assert(fwrite(&sample,short_sz, 1, firPcmFile)); + } + + fclose(inputPcmFile); + fclose(firPcmFile); + + firPcmFile = fopen("fir.pcm", "r"); + ifftPcmFile = fopen("ifft.pcm", "w"); + + assert(firPcmFile); + assert(ifftPcmFile); + + int read = 0; + + // read in half a frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read > 0) + assert(read==Points/2); + + // we will do an 'Points' point fft, and then undo it + while(true) { + + read = 0; + + // shift last half frame to head + for(int i = 0; i < Points/2; i++) + samples[i] = samples[(Points/2)+i]; + + // read in another half frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read == 0) + break; + + // pad out the + if(read < Points/2){ + for(int i = read; i < Points/2; i++) + samples[Points/2+i] = 0; + } + + double dsamples[Points]; + double dimag[Points]; + + // this shift is performed in the Bluespec + for(int i = 0; i < Points; i++){ + dsamples[i] = (double)(samples[i]>>log_Points); + dimag[i] = 0.0; + } + + + //for(int i = 0; i < Points; i++) + // printf("%d ", (int)dsamples[i]); + //printf("\n"); + + DFT(1,Points,dsamples,dimag); + + // shift up by 'shift' (in) + int shift = 2; + + for(int i = 0; i < Points/2; i++){ + + dsamples[Points/2-1-i] = dsamples[Points/2-1-i-shift]; + dimag[Points/2-1-i] = dimag[Points/2-1-i-shift]; + + + dsamples[Points/2+i] = dsamples[Points/2+i+shift]; + dimag[Points/2+i] = dimag[Points/2+i+shift]; + + } + + // fill in the lower points + for(int i = 0; i < shift; i++){ + + dsamples[i] = 0.0; + dimag[i] = 0.0; + + dsamples[Points-1-i] = 0.0; + dimag[Points-1-i] = 0.0; + } + + DFT(-1,Points,dsamples,dimag); + + short int ifftResult[Points]; + for(int i = 0; i < Points; i++) + ifftResult[i] = (int)dsamples[i]; + + // strip off the padding + int write = (read < Points/2) ? read+(Points/2) : Points; + for(int i = 0; i < write; i++) + assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile)); + + // break out if we're at the end + if(read < Points/2){ + break; + } + } + + fclose(firPcmFile); + fclose(ifftPcmFile); + + // do the windowing + + ifftPcmFile = fopen("ifft.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(ifftPcmFile); + assert(outputPcmFile); + + short int samplesA[Points]; + short int samplesB[Points]; + + bool valid_stream = true; + // write out the first half frame + for(int i = 0; i < Points/2; i++){ + valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile); + valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile); + } + + while(valid_stream){ + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points; i++) + valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); + + + // this isn't quite right + if(!valid_stream) + break; + + for(int i = 0; i < Points; i++){ + double window = windowing_fn(i); + short int rv = (short int)(((double)samplesA[i])*(1.0-window) + window*((double)samplesB[i])); + assert(fwrite(&rv,short_sz,1,outputPcmFile)); + } + + } + + fclose(ifftPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); + +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/cosine_window/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/cosine_window/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs_freq/ \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,136 @@ +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +const int Taps = 9; +const int Points = 8; +const int log_Points = 3; +static int newest; +static short int x[Taps] = {0,0,0,0,0,0,0,0,0}; +static short int fir(short int); + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); + +// lifted from the bluespec code +static double h[Taps] = {-0.0124, + 0.0, + -0.0133, + 0.0, + 0.8181, + 0.0, + -0.0133, + 0.0, + -0.0124}; + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *firPcmFile; + FILE *outputPcmFile; + + short int sample; + short int samples[Points]; + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + firPcmFile = fopen("fir.pcm", "w"); + + assert(inputPcmFile); + assert(firPcmFile); + + newest = 0; + memset(x, 0, sizeof(x)); + + while(fread(&sample, 2, 1, inputPcmFile)) { + sample = fir(sample); + assert(fwrite(&sample,2,1,firPcmFile)); + } + + fclose(inputPcmFile); + fclose(firPcmFile); + + firPcmFile = fopen("fir.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(firPcmFile); + assert(outputPcmFile); + + // we will do an Points point fft, and then undo it + while(true) { + + int read = fread(samples, 2,Points,firPcmFile); + + if(read == 0) + break; + + // pad out the + if(read>log_Points); + dimag[i] = 0.0; + } + + DFT(1,Points,dsamples,dimag); + DFT(-1,Points,dsamples,dimag); + + for(int i = 0; i < Points; i++){ + samples[i] = (int)dsamples[i]; + } + + if(read < Points){ + assert(fwrite(samples,2,read,outputPcmFile)==read); + break; + } else { + assert(fwrite(samples,2,Points,outputPcmFile)==Points); + } + } + + fclose(firPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); + +} + +short int +fir(short int sample) +{ + + x[newest] = sample; + double y = 0; + + for (int k = 0; k < Taps; k++) { + + short int bits = x[(newest+k)%Taps]; + double x = (double)bits; + y += h[k] * x; + + } + + newest = (newest == 0) ? (Taps-1) : (newest-1); + + short int rv = ((short int)y)&0x0000FFFF; + return rv; +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fft/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fft/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs/ \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fir/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fir/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fir/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fir/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fir/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fir/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fir/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fir/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,81 @@ +#include +#include +#include +#include "SndfileWavUtil.h" + +const int Taps = 9; +static int newest; +static short int x[Taps] = {0,0,0,0,0,0,0,0,0}; +static short int fir(short int); +const int short_sz = sizeof(short); + +// lifted from the bluespec code +static double h[Taps] = {-0.0124, + 0.0, + -0.0133, + 0.0, + 0.8181, + 0.0, + -0.0133, + 0.0, + -0.0124}; + + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *outputPcmFile; + + short int sample; + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(inputPcmFile); + assert(outputPcmFile); + + newest = 0; + memset(x, 0, sizeof(x)); + + while(fread(&sample, short_sz, 1, inputPcmFile)) { + sample = fir(sample); + assert(fwrite(&sample,short_sz,1,outputPcmFile)); + } + + fclose(inputPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); +} + +short int +fir(short int sample) +{ + + x[newest] = sample; + double y = 0; + + for (int k = 0; k < Taps; k++) { + + short int bits = x[(newest+k)%Taps]; + double x = (double)bits; + y += h[k] * x; + + } + + newest = (newest == 0) ? (Taps-1) : (newest-1); + + short int rv = ((short int)y)&0x0000FFFF; + return rv; +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/fir/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/fir/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs/ \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,6 @@ +default: all + +clean: + rm -f *.o gen_tone *.pcm +all: + g++ /usr/lib/libsndfile.so SndfileWavUtil.cpp DFT.cpp gen_tone.cpp -o gen_tone \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/gen_shift --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/gen_shift Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,2 @@ +./gen_tone 300 7 7 ../../../benchmarks/audio_processor_test/null.wav shift.wav +mv shift.wav ../../../benchmarks/audio_processor_test/shift.wav \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/gen_tone/gen_tone.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/gen_tone/gen_tone.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,63 @@ +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); + +const int Points = 8; + +int +do_gen (int argc, char * argv []) +{ + int frames; + int targ_freqA; + int targ_freqB; + char* refWavFile; + char* outWavFile; + FILE* outPCM; + const int short_sz = sizeof(short int); + + frames = atoi(argv[1]); + targ_freqA = atoi(argv[2]); + targ_freqB = atoi(argv[3]); + refWavFile = argv[4]; + outWavFile = argv[5]; + + outPCM = fopen("output.pcm", "w"); + + printf("targ_freqA %d\ntarg_freqB %d\nframes %d\n", targ_freqA, targ_freqB, frames); + + while(frames-- > 0){ + + double dreal[Points]; + double dimag[Points]; + + for(int i = 0; i < Points; i++) + dreal[i] = (i == targ_freqA) ? 1000 : (i == targ_freqB) ? 1000 : 0; + for(int i = 0; i < Points; i++) + dimag[i] = 0.0; + + DFT(-1,Points,dreal,dimag); + + for(int i = 0; i < Points; i++){ + short int rv = (int)dreal[i]; + assert(fwrite(&rv,short_sz,1,outPCM)); + } + + } + + fclose(outPCM); + + generate_wav("output.pcm", refWavFile, outWavFile); +} + +int +main(int argc, char* argv[]) +{ + do_gen(argc, argv); + exit(1); +} diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/null/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/null/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/null/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/null/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +void +generate_wav(const char * pcmfilename, const char * samplewavfilename, const char * outputwavfilename) +{ + char outfilename[2048]; + SNDFILE * outfile ; + SNDFILE * wavfile ; + SNDFILE * pcmfile ; + SF_INFO wavinfo ; + SF_INFO pcminfo ; + int buff; + SF_INSTRUMENT inst ; + + memset (&wavinfo, 0, sizeof (wavinfo)) ; + + + wavfile = sf_open(samplewavfilename, SFM_READ, &wavinfo); + + if (wavfile == NULL){ + printf ("\nERROR : Not able to open wav file named '%s' : %s/\n", samplewavfilename, sf_strerror (NULL)) ; + exit (1) ; + } ; + + printf("WAV format: %x\n", wavinfo.format); + + if (!((wavinfo.format & SF_FORMAT_PCM_16) && (wavinfo.channels == 1) && + (wavinfo.format & SF_FORMAT_WAV))){ + printf("\nERROR : .wav file must be SF_FORMAT_PCM_16 in mono\n"); + } + + pcminfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16; + pcminfo.samplerate = wavinfo.samplerate; + pcminfo.channels = wavinfo.channels; + + pcmfile = sf_open(pcmfilename, SFM_READ, &pcminfo); + + if (pcmfile == NULL){ + printf ("\nERROR : Not able to open pcm file named '%s' : %s/\n", pcmfilename, sf_strerror (NULL)) ; + exit (1) ; + } ; + + + + outfile = sf_open(outputwavfilename, SFM_WRITE, &wavinfo); + + memset (&inst, 0, sizeof (inst)) ; + + for(int i = SF_STR_FIRST; i <= SF_STR_LAST; i = i + 1) { + const char * str = sf_get_string(wavfile,i); + if(str != NULL) { + sf_set_string(outfile,i,str); + } + } + + if (outfile == NULL){ + printf ("\nERROR : Not able to create wav file named '%s' : %s/\n", outfilename, sf_strerror (NULL)) ; + exit (1) ; + } ; + + while(sf_read_int(pcmfile, &buff, 1) == 1){ + if(sf_write_int(outfile, &buff, 1) != 1){ + printf("\nERROR : unable to write to '%s' : %s/\n", outfilename, sf_strerror(NULL)); + } + } + + sf_close (wavfile) ; + sf_close (outfile) ; + sf_close (pcmfile) ; + +} + + +void +generate_pcm (const char * wavfilename, const char * pcmfilename) +{ + SNDFILE * wavfile ; + SNDFILE * pcmfile ; + SF_INFO wavinfo ; + SF_INFO pcminfo ; + int buff; + + memset (&wavinfo, 0, sizeof (wavinfo)) ; + memset (&pcminfo, 0, sizeof (pcminfo)) ; + + wavfile = sf_open (wavfilename, SFM_READ, &wavinfo) ; + + if (wavfile == NULL){ + printf ("\nERROR : Not able to open wav file named '%s' : %s/\n", wavfilename, sf_strerror (NULL)) ; + exit (1) ; + } ; + + pcminfo.format = SF_FORMAT_RAW | SF_FORMAT_PCM_16; + pcminfo.samplerate = wavinfo.samplerate; + pcminfo.channels = wavinfo.channels; + + if ((!wavinfo.format & SF_FORMAT_PCM_16) || (!wavinfo.channels == 1)){ + printf("\nERROR : .wav file must be SF_FORMAT_PCM_16 and mono\n"); + } + + pcmfile = sf_open (pcmfilename, SFM_WRITE, &pcminfo) ; + + if (pcmfile == NULL){ + printf ("\nERROR : Not able to create pcm file named '%s' : %s/\n", pcmfilename, sf_strerror (NULL)) ; + exit (1) ; + } ; + + while(sf_read_int(wavfile, &buff, 1) == 1){ + if(sf_write_int(pcmfile, &buff, 1) != 1){ + printf("\nERROR : unable to write to '%s' : %s/\n", pcmfilename, sf_strerror(NULL)); + } + } + + sf_close (wavfile) ; + sf_close (pcmfile) ; +} + + + + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/null/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/null/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,9 @@ +#ifndef _SNDFILE_WAV_UTIL_ +#define _SNDFILE_WAV_UTIL_ + +int guess_direction (const char * filename1, const char * filename2) ; +int guess_major_format (const char * filename) ; +void generate_pcm(const char * wavfilename, const char * pcmfilename); +void generate_wav(const char * pcmfilename, const char * samplewavfilename, const char * outputwavfilename); + +#endif diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/null/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/null/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,41 @@ +#include +#include +#include +#include "SndfileWavUtil.h" + +typedef unsigned short UINT16; + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *outputPcmFile; + + UINT16 sample; + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(inputPcmFile); + assert(outputPcmFile); + + while(fread(&sample, 2, 1, inputPcmFile)) { + assert(fwrite(&sample,2,1,outputPcmFile)); + } + + fclose(inputPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); + +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/null/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/null/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs/ \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,248 @@ +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +const int Taps = 9; +const int Points = 8; +const int log_Points = 3; +static int newest; +static short int x[Taps] = {0,0,0,0,0,0,0,0,0}; +static short int fir(short int); + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); + + +static int x_to_y(int x, int y) +{ + assert(y>0); + int rv = x; + while(y-->1) + x *= x; + return rv; +} + +// function implemented in LinearWindowingFunction.bsv +static double windowing_fn(int index) +{ + double i = (double)index; + double divisor = Points/2; //(double) (x_to_y(2,log_Points-1)); + double rv = (index < Points/2) ? (i / divisor) : ((((double)Points)-i) / divisor); + return rv; +} + +// lifted from the bluespec code +static double h[Taps] = {-0.0124, + 0.0, + -0.0133, + 0.0, + 0.8181, + 0.0, + -0.0133, + 0.0, + -0.0124}; + + +short int +fir(short int sample) +{ + x[newest] = sample; + double y = 0; + for (int k = 0; k < Taps; k++) { + short int bits = x[(newest+k)%Taps]; + double x = (double)bits; + y += h[k] * x; + } + newest = (newest == 0) ? (Taps-1) : (newest-1); + short int rv = ((short int)y)&0x0000FFFF; + return rv; +} + + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *firPcmFile; + FILE *ifftPcmFile; + FILE *outputPcmFile; + + short int sample; + short int samples[Points]; + const unsigned int short_sz = sizeof(short int); + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + firPcmFile = fopen("fir.pcm", "w"); + + assert(inputPcmFile); + assert(firPcmFile); + + newest = 0; + memset(x, 0, sizeof(x)); + + while(fread(&sample, short_sz, 1, inputPcmFile)) { + sample = fir(sample); + assert(fwrite(&sample,short_sz, 1, firPcmFile)); + } + + fclose(inputPcmFile); + fclose(firPcmFile); + + firPcmFile = fopen("fir.pcm", "r"); + ifftPcmFile = fopen("ifft.pcm", "w"); + + assert(firPcmFile); + assert(ifftPcmFile); + + int read = 0; + + // read in half a frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read > 0) + assert(read==Points/2); + + // we will do an 'Points' point fft, and then undo it + while(true) { + + read = 0; + + // shift last half frame to head + for(int i = 0; i < Points/2; i++) + samples[i] = samples[(Points/2)+i]; + + // read in another half frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read == 0) + break; + + // pad out the + if(read < Points/2){ + for(int i = read; i < Points/2; i++) + samples[Points/2+i] = 0; + } + + double dsamples[Points]; + double dimag[Points]; + + // this shift is performed in the Bluespec + for(int i = 0; i < Points; i++){ + dsamples[i] = (double)(samples[i]>>log_Points); + dimag[i] = 0.0; + } + + + //for(int i = 0; i < Points; i++) + // printf("%d ", (int)dsamples[i]); + //printf("\n"); + + DFT(1,Points,dsamples,dimag); + + // shift up by 'shift' (in) + int shift = 2; + + for(int i = 0; i < Points/2; i++){ + + dsamples[Points/2-1-i] = dsamples[Points/2-1-i-shift]; + dimag[Points/2-1-i] = dimag[Points/2-1-i-shift]; + + + dsamples[Points/2+i] = dsamples[Points/2+i+shift]; + dimag[Points/2+i] = dimag[Points/2+i+shift]; + + } + + // fill in the lower points + for(int i = 0; i < shift; i++){ + + dsamples[i] = 0.0; + dimag[i] = 0.0; + + dsamples[Points-1-i] = 0.0; + dimag[Points-1-i] = 0.0; + } + + DFT(-1,Points,dsamples,dimag); + + short int ifftResult[Points]; + for(int i = 0; i < Points; i++) + ifftResult[i] = (int)dsamples[i]; + + // strip off the padding + int write = (read < Points/2) ? read+(Points/2) : Points; + for(int i = 0; i < write; i++) + assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile)); + + // break out if we're at the end + if(read < Points/2){ + break; + } + } + + fclose(firPcmFile); + fclose(ifftPcmFile); + + // do the windowing + + ifftPcmFile = fopen("ifft.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(ifftPcmFile); + assert(outputPcmFile); + + short int samplesA[Points]; + short int samplesB[Points]; + + bool valid_stream = true; + // write out the first half frame + for(int i = 0; i < Points/2; i++){ + valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile); + valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile); + } + + while(valid_stream){ + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points; i++) + valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); + + + // this isn't quite right + if(!valid_stream) + break; + + for(int i = 0; i < Points; i++){ + double window = windowing_fn(i); + short int rv = (short int)(((double)samplesA[i])*(1.0-window) + window*((double)samplesB[i])); + assert(fwrite(&rv,short_sz,1,outputPcmFile)); + } + + } + + fclose(ifftPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); + +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/shift_up/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/shift_up/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs_freq/ \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/sndfile-tools-special.tar.gz Binary file tools/audio_processor_test/sndfile-tools-special.tar.gz has changed diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/DFT.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/DFT.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/DFT.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/Makefile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/Makefile Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,8 @@ +default: all + +clean: + rm -f *.o checker + +all: + g++ /usr/lib/libsndfile.so DFT.cpp SndfileWavUtil.cpp checker.cpp -o checker + cd ./compare_wavs/ && make clean && make diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/SndfileWavUtil.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/SndfileWavUtil.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.cpp \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/SndfileWavUtil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/SndfileWavUtil.h Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../../../modules/bluespec/mit-6.375/common/SndfileWavUtil.h \ No newline at end of file diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/checker.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/checker.cpp Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,219 @@ +#include +#include +#include +#include +#include +#include "SndfileWavUtil.h" + +const int Taps = 9; +const int Points = 8; +const int log_Points = 3; +static int newest; +static short int x[Taps] = {0,0,0,0,0,0,0,0,0}; +static short int fir(short int); + +// foreward declaration. This is defined in DFT.cpp +int DFT(int dir,int m,double *x1,double *y1); + + +static int x_to_y(int x, int y) +{ + assert(y>0); + int rv = x; + while(y-->1) + x *= x; + return rv; +} + +// function implemented in LinearWindowingFunction.bsv +static double windowing_fn(int index) +{ + double i = (double)index; + double divisor = Points/2; //(double) (x_to_y(2,log_Points-1)); + double rv = (index < Points/2) ? (i / divisor) : ((((double)Points)-i) / divisor); + return rv; +} + +// lifted from the bluespec code +static double h[Taps] = {-0.0124, + 0.0, + -0.0133, + 0.0, + 0.8181, + 0.0, + -0.0133, + 0.0, + -0.0124}; + + +short int +fir(short int sample) +{ + x[newest] = sample; + double y = 0; + for (int k = 0; k < Taps; k++) { + short int bits = x[(newest+k)%Taps]; + double x = (double)bits; + y += h[k] * x; + } + newest = (newest == 0) ? (Taps-1) : (newest-1); + short int rv = ((short int)y)&0x0000FFFF; + return rv; +} + + +int +main (int argc, char * argv []) +{ + const char* inputWavFileName; + const char* outputWavFileName; + + FILE *inputPcmFile; + FILE *firPcmFile; + FILE *ifftPcmFile; + FILE *outputPcmFile; + + short int sample; + short int samples[Points]; + const unsigned int short_sz = sizeof(short int); + + inputWavFileName = argv[1]; + outputWavFileName = argv[2]; + + // Convert input wav to pcm + generate_pcm(inputWavFileName, "input.pcm"); + + inputPcmFile = fopen("input.pcm", "r"); + firPcmFile = fopen("fir.pcm", "w"); + + assert(inputPcmFile); + assert(firPcmFile); + + newest = 0; + memset(x, 0, sizeof(x)); + + while(fread(&sample, short_sz, 1, inputPcmFile)) { + sample = fir(sample); + assert(fwrite(&sample,short_sz, 1, firPcmFile)); + } + + fclose(inputPcmFile); + fclose(firPcmFile); + + firPcmFile = fopen("fir.pcm", "r"); + ifftPcmFile = fopen("ifft.pcm", "w"); + + assert(firPcmFile); + assert(ifftPcmFile); + + int read = 0; + + // read in half a frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read > 0) + assert(read==Points/2); + + // we will do an 'Points' point fft, and then undo it + while(true) { + + read = 0; + + // shift last half frame to head + for(int i = 0; i < Points/2; i++) + samples[i] = samples[(Points/2)+i]; + + // read in another half frame + for(int i = 0; i < Points/2; i++) + read += fread(&samples[(Points/2)+i], short_sz, 1, firPcmFile); + + if(read == 0) + break; + + // pad out the + if(read < Points/2){ + for(int i = read; i < Points/2; i++) + samples[Points/2+i] = 0; + } + + double dsamples[Points]; + double dimag[Points]; + + // this shift is performed in the Bluespec + for(int i = 0; i < Points; i++){ + dsamples[i] = (double)(samples[i]>>log_Points); + dimag[i] = 0.0; + } + + + DFT(1,Points,dsamples,dimag); + DFT(-1,Points,dsamples,dimag); + + short int ifftResult[Points]; + for(int i = 0; i < Points; i++) + ifftResult[i] = (int)dsamples[i]; //)>>log_Points; + + // strip off the padding + int write = (read < Points/2) ? read+(Points/2) : Points; + for(int i = 0; i < write; i++) + assert(fwrite(&ifftResult[i],short_sz,1,ifftPcmFile)); + + // break out if we're at the end + if(read < Points/2){ + break; + } + } + + fclose(firPcmFile); + fclose(ifftPcmFile); + + // do the windowing + + ifftPcmFile = fopen("ifft.pcm", "r"); + outputPcmFile = fopen("output.pcm", "w"); + + assert(ifftPcmFile); + assert(outputPcmFile); + + short int samplesA[Points]; + short int samplesB[Points]; + + bool valid_stream = true; + // write out the first half frame + for(int i = 0; i < Points/2; i++){ + valid_stream &= fread(samplesA, short_sz, 1,ifftPcmFile); + valid_stream &= fwrite(samplesA, short_sz,1,outputPcmFile); + } + + while(valid_stream){ + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points; i++) + valid_stream &= fread(&samplesB[i], short_sz, 1,ifftPcmFile); + + for(int i = 0; i < Points/2; i++) + valid_stream &= fread(&samplesA[(Points/2)+i], short_sz, 1,ifftPcmFile); + + + // this isn't quite right + if(!valid_stream) + break; + + for(int i = 0; i < Points; i++){ + double window = windowing_fn(i); + short int rv = samplesA[i]*(1-window) + window*samplesB[i]; + assert(fwrite(&rv,short_sz,1,outputPcmFile)); + } + + } + + fclose(ifftPcmFile); + fclose(outputPcmFile); + + generate_wav("output.pcm", inputWavFileName, outputWavFileName); + +} + diff -r 0cfbb1e2de22 -r 90197e3375e2 tools/audio_processor_test/transform/checker/compare_wavs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tools/audio_processor_test/transform/checker/compare_wavs Wed Apr 28 08:19:09 2010 -0400 @@ -0,0 +1,1 @@ +../../compare_wavs/ \ No newline at end of file