Forum Discussion
Altera_Forum
Honored Contributor
17 years agoImplimenting a NCO Core.
Hi i am learning to use Quartus II, At the moment i am trying to just generate a sin wave for a stratix II board. I have set up the NCO block and got the symbol on the block diagram but i ...
Altera_Forum
Honored Contributor
17 years agoHello
You used the megawizard to create the block? So you already set up all the parameters necessary right? If so, all you need is to connect the appropriate signals on the inputs and outputs of the module. The phi_inc input controls the frequency of your sine wave. If you want a fixed frequency just connect this input to a constant. On the megawizard there is a field where you choose the desired output frequency and it gives you the value of the phi_inc (phase increment value parameter). The output frequency is given by the following equation (page 4-4 of the NCO user guide) fo = ( (phi_inc) * fclk ) / 2^M, where M is the accumulator precision and fclk is the clock frequency. clk is the clock input. Connect this to your clock input source. reset_n is the reset ('0' -> reset; '1' -> normal operation). Connect this to your reset control clken is the active high clock enable. fsin_o and fcos_o are the sine and cosine outputs respectively. out_valid is high whenever there is a valid sine or cosine data output. I hope this can help you Regards Thiago