ForSyDe::UT::scan< IT, ST > Class Template Reference

Process constructor for a scan process. More...

#include <ut_process_constructors.hpp>

Inheritance diagram for ForSyDe::UT::scan< IT, ST >:
Collaboration diagram for ForSyDe::UT::scan< IT, ST >:

Public Types

typedef std::function< void(unsigned int &, const ST &)> gamma_functype
 Type of the partitioning function to be passed to the process constructor.
 
typedef std::function< void(ST &, const ST &, const std::vector< IT > &)> ns_functype
 Type of the next-state function to be passed to the process constructor.
 

Public Member Functions

 scan (const sc_module_name &_name, const gamma_functype &_gamma_func, const ns_functype &_ns_func, const ST &init_st)
 The constructor requires the module name. More...
 
std::string forsyde_kind () const
 Specifying from which process constructor is the module built.
 
- Public Member Functions inherited from ForSyDe::process
 process (sc_module_name _name)
 The constructor requires the module name. More...
 

Public Attributes

UT_in< IT > iport1
 port for the input channel
 
UT_out< ST > oport1
 port for the output channel
 

Additional Inherited Members

- Protected Member Functions inherited from ForSyDe::process
void end_of_simulation ()
 This hook is used to run the clean stage.
 

Detailed Description

template<class IT, class ST>
class ForSyDe::UT::scan< IT, ST >

Process constructor for a scan process.

This class is used to build a state machine which has its internal state directly visible at the output. Given an initial state, a next-state function, is applied iteratively to compute the next state.

Constructor & Destructor Documentation

template<class IT, class ST>
ForSyDe::UT::scan< IT, ST >::scan ( const sc_module_name &  _name,
const gamma_functype _gamma_func,
const ns_functype _ns_func,
const ST &  init_st 
)
inline

The constructor requires the module name.

It creates an SC_THREAD which reads data from its input port, applies the user-imlpemented functions to the input and current state and writes the results using the output port

Parameters
_nameThe module name
_gamma_funcThe partitioning function
_ns_funcThe next_state function
init_stInitial state

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