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

binary circular buffer
Core functions SIM::binbuff.process(), SIM::binbuff.generate()
More...

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

Public Member Functions

 binbuff ()
 
 ~binbuff ()
 
void set_size (int m)
 
void set_symbol_size (int w)
 
void set_output (bvec yout)
 
int get_size ()
 
int get_symbol_size ()
 
bvec get_output ()
 
bmat generate (const bvec &ce)
 
bmat process (const bmat &ceio, const bmat &x)
 

Detailed Description

binary circular buffer
Core functions SIM::binbuff.process(), SIM::binbuff.generate()

itpp::Circular_Buffer<bin> derived class with clocked interface

Constructor & Destructor Documentation

SIM::binbuff::binbuff ( )
inline
SIM::binbuff::~binbuff ( )
inline

Member Function Documentation

bmat SIM::binbuff::generate ( const bvec &  ce)

for active clock ticks [ce] fetch symbol and and put back into the buffer to make it circular
if (ce) {yout = get(); put(yout);

Parameters
ce- [bvec] clock_enable vector
Returns
y - [vec] binary symbols
bvec SIM::binbuff::get_output ( void  )

get output value

Returns
- [bvec] y0
int SIM::binbuff::get_size ( void  )

get buffer size

Returns
- [int] buffer size in bits
int SIM::binbuff::get_symbol_size ( void  )

get symbol size

Returns
- [int] symbol size in bits
bmat SIM::binbuff::process ( const bmat &  ceio,
const bmat &  x 
)

for active input clock ticks ceio[i,0] put input symbol x[i,:]
if (ceio[i,0]) { put(x[i]) }
for active output clock ticks ceio[i,1] update yout by fetching one symbol
if (ceo[i]) { yout = get() }

Parameters
ceio- bmat - [cei | ceo] clock_enable vector
x- bmat - cei = > put bvec = bmat(i);
Returns
y - bmat ceo = > get bvec = buff(symbol_width);
void SIM::binbuff::set_output ( bvec  yout)

set output value y0

Parameters
[in]yout- [bvec] y0
void SIM::binbuff::set_size ( int  m)

set buffer size

Parameters
[in]m- buffer size - in bits
void SIM::binbuff::set_symbol_size ( int  w)

set symbol size

Parameters
[in]w- symbol size - in bits

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