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_t > | pattern_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_map & | initializers () const |
Returns the initializers. More... | |
const std::vector< std::string > & | inputs () const |
Returns the list of input signals. More... | |
const pattern_vec & | patterns () const |
Returns the list of pattern sequences. More... | |
Pattern file for sequential simulation.
This class is used together with read_pattern and create_simulation_pattern to create simulation pattern for sequential_simulation.
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.
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.
typedef std::vector<pattern_t> pattern_vec |
Vector of pattern.
pattern | ( | ) |
Standard constructor.
~pattern | ( | ) |
Deconstructor.
void add_initializer | ( | const std::string & | name, |
unsigned | value | ||
) |
Adds an initializer.
name | Name of the state signal |
value | Initial value |
void add_input | ( | const std::string & | name | ) |
Adds an input signal.
name | Name of the input signal |
void add_pattern | ( | const std::vector< unsigned > & | pattern | ) |
Adds a pattern sequence.
The pattern sequence must have the size of all specified inputs.
pattern | Vector of pattern sequence |
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.
const std::vector<std::string>& inputs | ( | ) | const |
Returns the list of input signals.
const pattern_vec& patterns | ( | ) | const |
Returns the list of pattern sequences.