08-10-2009 09:12 AM - edited 08-13-2009 11:49 PM
Hello, dear colleague.
Till this time I cannot find right solution for my (I have so though) simple project: FFT pcore generated with CoreGenerator implementation in MicroBlaze with FSL bus. Discussion this about was moved to EDK and Platform Studio section (lick here).
int i, val=34, res[20];
for(i=0; i<16;i++){putfslx(val, 0, FSL_NONBLOCKING);
}
for(i=0; i<16;i++){
getfslx(res[i],1,FSL_NONBLOCKING);
printf("Result is: %d\n\r", res[i]);
}
I write 16 input words and then read 16 words. Hyper Terminal prints 16 times Result is 0.
Maybe wrapper is wrong, maybe FSL_CONTROL signal should be send, maybe reset is not given? Please advice me
09-12-2009 11:11 AM
Hello.
This problem looks like was solved by changing initial values of XN_RE, fwd_inv, fwd_inv_we inputs. They was changed to zero. FFT pcore gives results in first time of calculation during simulation and in EDK project.
08-19-2009 09:48 AM
Hello, again.
Some changes I have done on this project. Now I will post simulations results of FFT core. Don't understand - it's bug of FFT or its my personal bug, but simulation results are very strange. In diagram bellow is simulation done with ModelSim. Very strange is point 3, where result written from FFT to FSL_M_Data is allways the same: 0xF777777.
After second time of full operations result is more real.
Similar discussion could be find here:
http://forums.xilinx.com/xlnx/board/message?board.id=EDK&message.id=10503&jump=true#M10503
Thank you for help!
08-21-2009 03:39 AM
Hello.
Please advice whether this is related to the pcore bug?
Because I have no more idea, don't know how to test it to get correct results, nots just 0xF777777...
Thanks
08-22-2009 03:44 AM
The waveform doesn't seem to match your code as the input to fft (xn_re) on the waveform is 32-bit but it's 16-bit in the code.
Cheers,
Jim
08-23-2009 11:06 PM
Hello.
yes you are right, code attached in first post doesn't match waveform in picture. I will send my last code - FFT with Floating point. By selecting floating point CoreGen automatically selects 32-bit as inputs and outputs
08-24-2009 08:52 AM
08-24-2009 11:23 AM
I can attache full ISE project to see this issue.
Really first output is very strange.
Also, if I use EDK (by giving float point values) I get result incorrect too.
08-24-2009 11:33 AM
It will be really helpful if you can attach your full ISE project.
Cheers,
Jim
08-24-2009 01:35 PM - edited 08-24-2009 01:35 PM
09-12-2009 11:11 AM
Hello.
This problem looks like was solved by changing initial values of XN_RE, fwd_inv, fwd_inv_we inputs. They was changed to zero. FFT pcore gives results in first time of calculation during simulation and in EDK project.
10-01-2009 12:15 AM
Hello.
Does anybody has correct Finite State Mashine for FFT pcore? I use one wrapper, but cannot find problem in code: this code reads two times the same input from FSL.
Please find attached file. I have taken this project and did some modifications, because really it doesn't works at all:
http://www.eecg.toronto.edu/~pc/courses/432/2005/projects/midi.pdf
Problematic are states ragarding to reading of inputs. 3 clock delay should be between every reading, but actually this codes handles by fallowing:
input_values = {1.0, 2.0, 3.0... } (16 numbers at all)
fft gets [1.0, 2.0, 2.0, 3.0, 3.0....]
First number was read one time, next values - two times. 3 months I try to solve this issue and without results :(
Please help me
Best Regards,
Vytautas
10-06-2009 01:08 AM
Hello.
I did several changes in FFT wrapper file. Now FFT pcore reads such inputs:
[IN(0),IN(1),IN(2),IN(3),IN(4),......,..IN(13),IN(13),IN(13),]
It's very hard to understand something from ModelSim if I dont know how exaclty handles FSL bus, how does it sets FSL_S_EXISTS signal...
Please take a loot at attached wrapper. I dont know any idea, how to fix it.
There are problems regarding maybe to CE signal,required delays or read_data state...
Best Regards,
Vytautas
10-07-2009 04:49 AM
10-08-2009 11:31 AM
Why do use set ce to 0 in Read_Inputs state?
when Read_Inputs =>
ce <= '0';
if (FSL_S_EXISTS = '1') then -- If data exists
Cheers,
Jim
10-09-2009 12:42 AM
Hello Jim.
You are pretty right, by setting CE in the state Read_Inputs makes logic strange, but please look how it handles at all.
Best regards,
Vytautas
10-09-2009 01:41 AM
10-09-2009 06:08 AM
Hello again.
I have one more question about FFT project. My FFT project works very well if nfft is 16 points. C application puts and gets correct 16 float numbers.
If I set nfft to 256 points, C application puts all 256 values, FFT calculates them correct, but reading back first value fsl_isinvalid(invalid) function sets invalid to 1, reading next values all is ok!. Then function microblaze_nbread_data_fsl(out[i], 1) sets variable out[i] to first zero, then to 1th, 2th...values and two times 255th values of FFT output...
Best Regards,
Vytautas
10-14-2009 03:21 AM
Hello.
I have done several tests with FFT pcore. And only one version works well - if NFFT is 16!
If NFFT is higher than 16, reading first value of output fsl_isinvalid gives error!
Does it is related to buffer overflow?
DoI need additional delay (counter)?
Does it's related C application?
Please help to isolate this bug...
Thank you!!!
11-10-2009 12:19 AM
Hello.
Finally my FFT core works per FSL. Several magic code lines have solved it. FFT calculates 256 number of float inputs. Result is well.
But if I repeat calculation second time (without resetting FPGA), FFT takes 3 first values as zero and doesn't read last 3 values...
My VHDL code resets all components after calculation and goes to initial state.
Does it is possible that FSL FIFO contains some zeros?? How could I reset FSL fifos?
Thank you