itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
Public Member Functions | List of all members
SIM::vco Class Reference

floating point point NCO - numerically controlled oscillator
Core function: SIM::vco.process()
More...

Inheritance diagram for SIM::vco:
Inheritance graph
[legend]

Public Member Functions

 vco ()
 
 ~vco ()
 
void set_acc (double a)
 
void set_output (const vec &yout)
 
double get_acc ()
 
vec get_output (void)
 
mat process (const bvec &ce, const vec &x)
 

Detailed Description

floating point point NCO - numerically controlled oscillator
Core function: SIM::vco.process()

Accumulated phase ph is in double fractional format (-1.0..+1.0)
input vector x [vec] is frequency control word - saturated at (-1..+1)
vco output is a matrix mat=[cy|ph] where:
cy is overflow flag: +1 for positive -1 for negative
ph = acc - is accumulated phase in double fractional format

Constructor & Destructor Documentation

SIM::vco::vco ( )
inline
SIM::vco::~vco ( )
inline

Member Function Documentation

double SIM::vco::get_acc ( void  )

get state of phase accumulator

vec SIM::vco::get_output ( void  )

get initial output value y0

mat SIM::vco::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::vco::set_acc ( double  a)

set state of phase accumulator

Parameters
[in]a- state of phase accumulator in double fractional format
void SIM::vco::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: