#define FIXED_POINT 15\r
#define WORD_SIZE 16\r
\r
-#define WORDS_PER_LINE 4\r
+#define WORDS_PER_LINE 8\r
#define WORDS_PER_GROUP 1\r
\r
mem input_a_re, input_a_im, input_b_re, input_b_im, output_a_re, output_a_im, output_b_re, output_b_im, twiddle_re, twiddle_im; \r
\r
for (i=0;i<PARAM_N_t;i++)\r
{\r
- int value = to_fixed(sin((float)i*2*M_PI/PARAM_N_t));\r
+ /* We take the sine from 0 to 2*2*Pi, ie two periods. We divide \r
+ * the value by PARAM_N_t to prevent overflow. */\r
+ int value = to_fixed(sin((float)i*2*2*M_PI/PARAM_N_t)/PARAM_N_t);\r
\r
if (i<PARAM_N_t/2)\r
{\r
output_b_re = alloc_mem(P2M1);\r
output_b_im = alloc_mem(P3M1);\r
}\r
- printf("re(out_a)\n");\r
+ printf("re(out)\n");\r
print_mem(output_a_re, 0, PARAM_N_t/2, true);\r
print_mem(output_b_re, 0, PARAM_N_t/2, true);\r
- printf("im(out_a)\n");\r
+ printf("im(out)\n");\r
print_mem(output_a_im, 0, PARAM_N_t/2, true);\r
print_mem(output_b_im, 0, PARAM_N_t/2, true);\r
\r