newbie_1
Member level 3
help on fft!
hi,
i created an ideal 20bit adc and 20bit dac using veriloga and tested them with a 15khz sinwave as input, the clk freq is 12.5Mhz. The output of the dac was dumped from cadence as out222.dat using ocnPrint with a time step of 80ns.
i wote a simple matlab program(snr_out2a.m) and plot the spectrum of the output signal but the spectrum is totally wrong coz the snr is really poor and actually it should be at least 120db.
please tell me what's wrong with the program, and i have some questions:
1. what should be the sampling freq in matlab program? should it be the same as that used in ad and da?
2.the data dumped from cadence didn't cover some integer num of periods, then should i use some window function? how about hann? and if i use hanning, is my using as line19 correct? and so long as the data has not enough samples, then how can i do much larger num points of fft?
thanks very much
newbie
hi,
i created an ideal 20bit adc and 20bit dac using veriloga and tested them with a 15khz sinwave as input, the clk freq is 12.5Mhz. The output of the dac was dumped from cadence as out222.dat using ocnPrint with a time step of 80ns.
i wote a simple matlab program(snr_out2a.m) and plot the spectrum of the output signal but the spectrum is totally wrong coz the snr is really poor and actually it should be at least 120db.
please tell me what's wrong with the program, and i have some questions:
1. what should be the sampling freq in matlab program? should it be the same as that used in ad and da?
2.the data dumped from cadence didn't cover some integer num of periods, then should i use some window function? how about hann? and if i use hanning, is my using as line19 correct? and so long as the data has not enough samples, then how can i do much larger num points of fft?
thanks very much
newbie