fixed point NCO - numerically controlled oscillator
Core function: SIM::nco.process()
More...
fixed point NCO - numerically controlled oscillator
Core function: SIM::nco.process()
Accumulated phase is in Q1.N format, operational type is Q(64-N).N
input vector x [vec] is frequency control word
fcw is saturated at (-1..+1) and converted from fractional double to Q1.N fixed point
nco output is a matrix mat=[cy|ph] where:
cy is overflow flag: +1 for positive -1 for negative
ph is accumulated phase converted to double fractional format
| double SIM::nco::get_acc |
( |
void |
| ) |
|
get state of phase accumulator converted to double fractional format
| int SIM::nco::get_N |
( |
void |
| ) |
|
get N - number of bits for fractional representation in Q1.N
| vec SIM::nco::get_output |
( |
void |
| ) |
|
get initial output value y0
| mat SIM::nco::process |
( |
const bvec & |
ce, |
|
|
const vec & |
x |
|
) |
| |
process input samples - x[i] for active clock ticks ce[i]
- Parameters
-
| ce | - bvec - clock enable vector |
| x | - vec - input vector - fcw saturated at (-1..+1) in double fractional format |
- Returns
- y - mat - output matrix [cy|ph] cy =(1,0,-1), ph - accumulated phase in double fractional format
| void SIM::nco::set_acc |
( |
double |
a | ) |
|
set state of phase accumulator
- Parameters
-
| [in] | a | - state of phase accumulator in double fractional format |
| void SIM::nco::set_N |
( |
int |
n | ) |
|
set N - number of bits for fractional representation in Q1.N
- Parameters
-
| void SIM::nco::set_output |
( |
const vec & |
yout | ) |
|
set initial output value y0
- Parameters
-
| [in] | yout | - [vec] = [cy|ph] |
The documentation for this class was generated from the following files:
- C:/jobs/vcc/itpp_sci/include/sim/sim_nco.hpp
- C:/jobs/vcc/itpp_sci/sim_lib/code/sim_nco.cpp