surabhig.com

No shortcuts. Work for it.

Tag: NCO

Phase Increment Calculator for NCO

This Phase Increment Calculator is built specifically for hardware implementation of a Numerically Controlled Oscillator (NCO).

Specify the desired frequency of the output signal of the NCO, the system (or input) clock frequency and the accumulator bit width, to obtain the accumulator value you should use for the NCO.

Equation:

f_out = [phase_inc/(2N)] * input_clk

Review code: 2-bit Signal Generator (NCO) in Verilog

2-bit Signal Generator (NCO) in Verilog

Recently started using version control BitBucket and I must say sharing code is definitely easier.

So here is the link to the code that generates sin and cos signals according to the required frequency.

https://bitbucket.org/snippets/surabhisgp/Rnyaq

It is 2 bit only because the range of values is between [-1,1].

If you are looking for something in the range of [0,1], that would make it a 1 bit NCO which is even easier (you just have to ignore the LSB). Focus only on sin[1] or cos[1].

This module is great if you have to quickly test something like demodulators etc.

If you figure there are issues or even found a simpler way please feel free to share them.

Alright, I’m onto figuring out the next task, atan in verilog!

P.S. I’m also going to make sharing the code easier on the blog… will try to embed it here.

© 2018 surabhig.com

Theme by Anders NorenUp ↑