Forum Discussion
Hi Jim,
For your information, I have found out why after digit reversal, your expected data is appearing at index 16 instead of 32. With your FFT configuration, the Radix-4 digit reversal is implied but not Radix-2. You can refer to System Messages at the bottom of your FFT configuration screenshot for the Radix-4 implied.
In your case, the spike is originally at index 4 (Radix-4 = 0010), after digit reversal, it become 0100 which is equivalent to digit-reversed index of 16 which tally with your simulation. As for the other spike at index 252, the digit-reversed index = 63 which tally with your simulation as well. Hope this explain.
Please let me know if there is any concern. Thank you.
Best regards,
Chee Pin
- User15821927331502095 years ago
Occasional Contributor
Hi Chee pin,
thanks for your effort.
I am not quite understand it.
Can you suggest how can I turn the digit reversed result back into natural order output using my 8 bits index? because I plan to turn result into natural order result in FPGA and forward it to next stream for further usage.
my current logic is
assign digi_reverse_index[fft_result_address_width-1:0] ={result_index[0], result_index[1], result_index[2], result_index[3],
result_index[4], result_index[5], result_index[6], result_index[7]};integer i;
always @(posedge clk or negedge reset_n)
begin
if(!reset_n)
begin
for (i = 0; i < data_num-1; i = i + 1) begin
fft_digireverse_result_r[i] <= 32'd0;
fft_digireverse_result_i[i] <= 32'd0;
end
end
else if(source_valid) begin
fft_digireverse_result_r[digi_reverse_index] <=source_real ;
fft_digireverse_result_i[digi_reverse_index] <=source_imag ;
end
endthanks
Jim
- User15821927331502095 years ago
Occasional Contributor
I put form here to summary up, I am not sure with the same data source how can I use digit reverse output to figure out the target frequency .