@@ -54,7 +54,7 @@ bool verify_sp_fft3d_fftw(float2 *fpgaout, float2 *verify, int N, int inverse){
5454 mag_sum += magnitude ;
5555 noise_sum += noise ;
5656#ifndef NDEBUG
57- printf ("%d : fpga - (%e %e) cpu - (%e %e)\n" , where , fpgaout [i ].x , fpgaout [i ].y , fftw_data [i ][0 ], fftw_data [i ][1 ]);
57+ printf ("%zu : fpga - (%e %e) cpu - (%e %e)\n" , i , fpgaout [i ].x , fpgaout [i ].y , fftw_data [i ][0 ], fftw_data [i ][1 ]);
5858#endif
5959 }
6060
@@ -68,12 +68,11 @@ bool verify_sp_fft3d_fftw(float2 *fpgaout, float2 *verify, int N, int inverse){
6868 fftwf_destroy_plan (plan );
6969
7070 // if SNR greater than 120, verification passes
71- printf ("\tSignal to noise ratio on output sample: %f --> %s\n\n" , db , db > 120 ? "PASSED" : "FAILED" );
72-
7371 if (db > 120 ){
7472 return true;
7573 }
7674 else {
75+ printf ("\tSignal to noise ratio on output sample: %f --> %s\n\n" , db , "FAILED" );
7776 return false;
7877 }
7978
@@ -127,7 +126,7 @@ bool verify_sp_fft2d_fftw(float2 *fpgaout, float2 *verify, int N, int inverse){
127126 mag_sum += magnitude ;
128127 noise_sum += noise ;
129128#ifndef NDEBUG
130- printf ("%d : fpga - (%e %e) cpu - (%e %e)\n" , where , fpgaout [i ].x , fpgaout [i ].y , fftw_data [i ][0 ], fftw_data [i ][1 ]);
129+ printf ("%zu : fpga - (%e %e) cpu - (%e %e)\n" , i , fpgaout [i ].x , fpgaout [i ].y , fftw_data [i ][0 ], fftw_data [i ][1 ]);
131130#endif
132131 }
133132
@@ -141,12 +140,11 @@ bool verify_sp_fft2d_fftw(float2 *fpgaout, float2 *verify, int N, int inverse){
141140 fftwf_destroy_plan (plan );
142141
143142 // if SNR greater than 120, verification passes
144- printf ("\tSignal to noise ratio on output sample: %f --> %s\n\n" , db , db > 120 ? "PASSED" : "FAILED" );
145-
146143 if (db > 120 ){
147144 return true;
148145 }
149146 else {
147+ printf ("\tSignal to noise ratio on output sample: %f --> %s\n\n" , db , "FAILED" );
150148 return false;
151149 }
152150
0 commit comments