|
Public Member Functions |
| nco (long bits=8) |
| Constructor.
|
void | reset () |
| Reset object.
|
void | set_frequency (unsigned long freq) |
| Set frequency control word.
|
void | reset_frequency (unsigned long freq) |
| Set frequency control word and register for frequency control word.
|
long | get_phase (void) |
| Return current phase.
|
void | load (long loop_filter_out) |
| Load new frequency control word.
|
long | clock (long loop_filter_out) |
| Clock NCO with new frequency control word input.
|
long | clock () |
| Clock NCO without changing frequency control word.
|
Public Attributes |
unsigned long | phase |
Protected Attributes |
unsigned long | acc |
unsigned long | fcw |
unsigned long | new_fcw |
unsigned long | mask_bits |
: Numerically controlled oscillator (with 32 bits accumulator) returns the top (mask_bits) MSBs from accumulator Useful for carrier recovery where top bits used for input to sine,cos lookup table. FCW : frequency control word ACC : accumulator Frequency must be set through interface routines set_frequency or reset_frequency. Load routine is to allow frequency to be updated (typically with a loop filter). When not changing frequency call "clock" routine.