List of all members | Public Types | Public Member Functions
pattern Class Reference

Pattern file for sequential simulation. More...

Public Types

typedef std::map< std::string,
unsigned > 
initializer_map
 Map for initializers. More...
 
typedef std::vector< unsigned > pattern_t
 Pattern Type. More...
 
typedef std::vector< pattern_tpattern_vec
 Vector of pattern. More...
 

Public Member Functions

 pattern ()
 Standard constructor. More...
 
 ~pattern ()
 Deconstructor. More...
 
void add_initializer (const std::string &name, unsigned value)
 Adds an initializer. More...
 
void add_input (const std::string &name)
 Adds an input signal. More...
 
void add_pattern (const std::vector< unsigned > &pattern)
 Adds a pattern sequence. More...
 
const initializer_mapinitializers () const
 Returns the initializers. More...
 
const std::vector< std::string > & inputs () const
 Returns the list of input signals. More...
 
const pattern_vecpatterns () const
 Returns the list of pattern sequences. More...
 

Detailed Description

Pattern file for sequential simulation.

This class is used together with read_pattern and create_simulation_pattern to create simulation pattern for sequential_simulation.

circuit circ;
// create circuit somehow
read_pattern( p, "pattern.sim" );
std::vector<boost::dynamic_bitset<> > sim;
std::map<std::string, boost::dynamic_bitset<> > init;
create_simulation_pattern( p, circ, sim, init );
properties::ptr settings( new properties() );
settings->set( "initial_state", init );
std::vector<boost::dynamic_bitset<> > outputs;
sequential_simulation( outputs, circ, sim, settings );
Author
RevKit
Since
1.2

Member Typedef Documentation

typedef std::map<std::string, unsigned> initializer_map

Map for initializers.

The key is the name of the state signal and the value is the assigned initial value.

Author
RevKit
Since
1.2
typedef std::vector<unsigned> pattern_t

Pattern Type.

A pattern is a sequence of values which are assigned to the input signals at every step of simulation.

Author
RevKit
Since
1.2
typedef std::vector<pattern_t> pattern_vec

Vector of pattern.

Author
RevKit
Since
1.2

Constructor & Destructor Documentation

pattern ( )

Standard constructor.

Author
RevKit
Since
1.2
~pattern ( )

Deconstructor.

Author
RevKit
Since
1.2

Member Function Documentation

void add_initializer ( const std::string &  name,
unsigned  value 
)

Adds an initializer.

Parameters
nameName of the state signal
valueInitial value
Author
RevKit
Since
1.2
void add_input ( const std::string &  name)

Adds an input signal.

Parameters
nameName of the input signal
Author
RevKit
Since
1.2
void add_pattern ( const std::vector< unsigned > &  pattern)

Adds a pattern sequence.

The pattern sequence must have the size of all specified inputs.

Parameters
patternVector of pattern sequence
Author
RevKit
Since
1.2
const initializer_map& initializers ( ) const

Returns the initializers.

A map is returned with a the name of the state signal as key and the initial value as key.

Returns
Map of initializers
const std::vector<std::string>& inputs ( ) const

Returns the list of input signals.

Returns
List of input signals
const pattern_vec& patterns ( ) const

Returns the list of pattern sequences.

Returns
List of pattern sequences

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

Generated on Tue Apr 16 2013 08:12:02 for RevKit by doxygen 1.8.3.1