guetguet
Electrical
- Jul 19, 2012
- 2
Hello everyone,
I am trying to implement a system which purpose is to generate a sin wave with a frequency specified by the user. I am thus designing a phase accumulator. below are my steps :
- As I have a 1-Gsps DAC, first I store 2^17 samples of one cycle of a 1-Ghz sin wave on a RAM.
- Then I calculate the phase offset : requestedFrequency(khz) * 2^32 / 1000000
- Finally, at each 1-Ghz clock ticks, I increment the value of my accumulator register (initialize with 0) with the phase offet. And I retrieves the 17-MSBs bits of the accumulator register output and I use this BUS to address my RAM and send the correct sample to my DAC.
I am going to be more precise concerning my real problem :
(sorry I am bad in drawing)
The brown signal above is a 1-Ghz signal. I consider I have stored 2^17 samples of one cycle of a 1-Ghz signal in a RAM.
Because the accumulator register wraps, we can imagine a serie of one cycle of a 1-Ghz signal as represented above by the brown signal.
If I want to generate a 250-Mhz signal, the accumulator register will increment by the phase step at each clock ticks to pointed to the crossing between the red vertical lines and the 1-Ghz signal. I will thus generate a 250-Mhz signal wich spectrum contains several additional frequencies (as shawn the purple signal above).
I hope being more clear. Have someone an idea ?
Thanks to pay attention to my problem
I am trying to implement a system which purpose is to generate a sin wave with a frequency specified by the user. I am thus designing a phase accumulator. below are my steps :
- As I have a 1-Gsps DAC, first I store 2^17 samples of one cycle of a 1-Ghz sin wave on a RAM.
- Then I calculate the phase offset : requestedFrequency(khz) * 2^32 / 1000000
- Finally, at each 1-Ghz clock ticks, I increment the value of my accumulator register (initialize with 0) with the phase offet. And I retrieves the 17-MSBs bits of the accumulator register output and I use this BUS to address my RAM and send the correct sample to my DAC.
I am going to be more precise concerning my real problem :
(sorry I am bad in drawing)
The brown signal above is a 1-Ghz signal. I consider I have stored 2^17 samples of one cycle of a 1-Ghz signal in a RAM.
Because the accumulator register wraps, we can imagine a serie of one cycle of a 1-Ghz signal as represented above by the brown signal.
If I want to generate a 250-Mhz signal, the accumulator register will increment by the phase step at each clock ticks to pointed to the crossing between the red vertical lines and the 1-Ghz signal. I will thus generate a 250-Mhz signal wich spectrum contains several additional frequencies (as shawn the purple signal above).
I hope being more clear. Have someone an idea ?
Thanks to pay attention to my problem