This class can be used as a lookup table between an instance id of a module or hierarchical channel and the instance tree. More...
#include <path_instance_mapper.h>
Public Types | |
typedef std::pair < InstanceTree, int > | PathWithID |
Public Member Functions | |
PathInstanceMapper () | |
void | print_mapping () |
The function prints the lookup table in the terminal. | |
virtual bool | perform_dynamic_analysis ()=0 |
This functions returns true if the path instance mapper should perform a dynamic analysis. | |
virtual InstanceTree | get_instance_tree (int id, std::list< InstanceTree > potential_instances) |
virtual int | get_id (InstanceTree tree) |
virtual DynamicModule * | get_dynamic_tree_root () |
This function returns the root node of the dynamic analysis CAUTION: This function is only for the DynamicPathInstanceMapper. | |
virtual int * | get_global_variable_address (std::string variable_name) |
virtual std::string | get_global_variable_name (int *variable_address) |
Public Attributes | |
std::vector< PathWithID > | path_to_id_mapping_ |
This is the lookup table from path to instance id. | |
int | max_instances_ |
This variable counts what is the max of instances. |
This class can be used as a lookup table between an instance id of a module or hierarchical channel and the instance tree.
There is a significant difference between the PathInstanceMapper and the DynamicPathInstanceMapper. The DynamicPathInstanceMapper will be generated from the pre simulation of evaluation.
typedef std::pair<InstanceTree, int> risc::PathInstanceMapper::PathWithID |
risc::PathInstanceMapper::PathInstanceMapper | ( | ) |
risc::PathInstanceMapper::get_dynamic_tree_root | ( | ) | [virtual] |
This function returns the root node of the dynamic analysis CAUTION: This function is only for the DynamicPathInstanceMapper.
Reimplemented in risc::DynamicPathInstanceMapper.
int * risc::PathInstanceMapper::get_global_variable_address | ( | std::string | variable_name | ) | [virtual] |
Reimplemented in risc::DynamicPathInstanceMapper.
std::string risc::PathInstanceMapper::get_global_variable_name | ( | int * | variable_address | ) | [virtual] |
Reimplemented in risc::DynamicPathInstanceMapper.
int risc::PathInstanceMapper::get_id | ( | InstanceTree | tree | ) | [virtual] |
Reimplemented in risc::StaticPathInstanceMapper.
risc::InstanceTree risc::PathInstanceMapper::get_instance_tree | ( | int | id, | |
std::list< InstanceTree > | potential_instances | |||
) | [virtual] |
Reimplemented in risc::StaticPathInstanceMapper.
risc::PathInstanceMapper::perform_dynamic_analysis | ( | ) | [pure virtual] |
This functions returns true if the path instance mapper should perform a dynamic analysis.
Implemented in risc::DynamicPathInstanceMapper, and risc::StaticPathInstanceMapper.
risc::PathInstanceMapper::print_mapping | ( | ) |
The function prints the lookup table in the terminal.
This variable counts what is the max of instances.
std::vector<PathWithID> risc::PathInstanceMapper::path_to_id_mapping_ |
This is the lookup table from path to instance id.