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

NCO - numerically controlled oscillator (fixed point) - wrapper for a SIM::nco
Core function: SCI::sci_nco.proc() More...

Inheritance diagram for SCI::sci_nco:
Inheritance graph
[legend]

Public Member Functions

 sci_nco ()
 
 ~sci_nco ()
 
sci_ncocreate (int sci_type)
 
void destroy ()
 destroy SCI object More...
 
void set (int param, sci_var *p_v)
 
sci_varget (int param)
 
void exec (int command)
 
sci_varproc (sci_var *p_v_ce, sci_var *p_v_x)
 
- Public Member Functions inherited from SCI::sci_base
 sci_base ()
 constructor More...
 
virtual ~sci_base ()
 virtual destructor More...
 
sci_basecreate (int sci_type)
 creates SCI object and returns pointer to it More...
 
virtual sci_vargen (sci_var *p_v_ce)
 generate data using a SCI object More...
 
- Public Member Functions inherited from SIM::nco
 nco ()
 
 ~nco ()
 
void set_N (int n)
 
void set_acc (double a)
 
void set_output (const vec &yout)
 
int get_N ()
 
double get_acc ()
 
vec get_output ()
 
mat process (const bvec &ce, const vec &x)
 

Detailed Description

NCO - numerically controlled oscillator (fixed point) - wrapper for a SIM::nco
Core function: SCI::sci_nco.proc()

Constructor & Destructor Documentation

SCI::sci_nco::sci_nco ( )
SCI::sci_nco::~sci_nco ( )

Member Function Documentation

sci_nco* SCI::sci_nco::create ( int  sci_type)
inline
void SCI::sci_nco::destroy ( )
inlinevirtual

destroy SCI object

Reimplemented from SCI::sci_base.

void SCI::sci_nco::exec ( int  command)
virtual

execute command for an instance of NCO
Supported commands:
none

Parameters
[in]command- to be executed

Reimplemented from SCI::sci_base.

sci_var * SCI::sci_nco::get ( int  param)
virtual

create new sci_var object and assign a its value to fixed point NCO parameter

Supported parameters:
SCI_TYPE,    sci_var [int] 
SCI_PARAM_N, sci_var [int] number of bits in fixed point fractional format Q1.N
SCI_ACC, sci_var [double] phase accumulator state in double fractional format
SCI_OUTPUT, sci_var [vec] initial output value y0 = [cy|ph]
Parameters
[in]param- parameter to get
Returns
- pointer to created sci_var, actual object type depends on input parameter

Reimplemented from SCI::sci_base.

sci_var * SCI::sci_nco::proc ( sci_var p_v_ce,
sci_var p_v_x 
)
virtual

return NCO output [y]=[cy|ph] in newly created sci_var [mat]
for active [ce] ticks, fractional phase accumulator sums fractional frequency control words in [x]

Parameters
[in]p_v_ce- pointer to ce - sci_var [bvec]
[in]p_v_x- pointer to x - sci_var [vec]
Returns
- pointer to y - created sci_var [mat]=[cy|ph]

Reimplemented from SCI::sci_base.

void SCI::sci_nco::set ( int  param,
sci_var p_v 
)
virtual

set parameters of a fixed point NCO - numerically controlled oscillator

Supported parameters:
SCI_PARAM_N, sci_var [int]  number of bits in fixed point fractional format Q1.N
SCI_ACC, sci_var [double] phase accumulator state in double fractional format
SCI_OUTPUT, sci_var [vec] initial output value y0 = [cy|ph]
Parameters
[in]param- parameter to set
[in]p_v- pointer to sci_var object with value of the parameter

Reimplemented from SCI::sci_base.


The documentation for this class was generated from the following files: