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

binary to integer converter
Core function SIM::bin2int.process()
More...

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

Public Member Functions

 bin2int ()
 
 ~bin2int ()
 
void set_symbol_size (int W)
 
void set_msb_flag (bool msb)
 
void set_output (int yout)
 
int get_symbol_size ()
 
bool get_msb_flag ()
 
int get_output ()
 
ivec process (const bvec &ce, const bmat &x)
 

Detailed Description

binary to integer converter
Core function SIM::bin2int.process()

Constructor & Destructor Documentation

SIM::bin2int::bin2int ( )
inline
SIM::bin2int::~bin2int ( )
inline

Member Function Documentation

bool SIM::bin2int::get_msb_flag ( )

get msb flag - x[0]=MSB

Returns
- [bool] msb flag - x[0]=MSB
int SIM::bin2int::get_output ( void  )

get initial/idle output symbol

Returns
- [int] y0
int SIM::bin2int::get_symbol_size ( void  )

get size of a symbol - number of columns for binary symbol

Returns
[int] size of a symbol W
ivec SIM::bin2int::process ( const bvec &  ce,
const bmat &  x 
)

for active clock ticks ce[i] convert one binary input symbol x[i,:] into unsigned integer

Parameters
ce- [bvec] - clock enable vector - sizeof(ce)=N
x- [bmat] - input symbols matrix - sizeof(x)=[N,W]
Returns
y - [ivec] - output symbols vector - sizeof(y)=N
void SIM::bin2int::set_msb_flag ( bool  msb)

set msb flag - x[0]=MSB

Parameters
[in]msb- [bool] flag
void SIM::bin2int::set_output ( int  yout)

sets initial/idle output symbol

Parameters
[in]yout- [int] y0 = yout
void SIM::bin2int::set_symbol_size ( int  W)

set size of a symbol - number of columns for binary symbol

Parameters
[in]W- [int] size of a symbol

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