#include <dynamic_path_instance_mapper.h>
Public Types | |
typedef std::pair < InstanceTree, int > | PathWithID |
Public Member Functions | |
DynamicPathInstanceMapper (std::string filename) | |
This is the default constructor and need a design and a segment graph. The lookup table will be automatically created. More... | |
void | traverse_tree (InstanceTree root, DynamicModule *module) |
void | determine_lookup_table () |
This function traverses the design and pushes all modules and hierarchical channel instances into the path_to_id_mapping_ lookup table. The traversing is dependent on the declaration order of the member variables. Also, it follows depth first search. CAUTION: The function Design::reset_instance_counter() must be used first! Otherwise wrong intance id's a generated! More... | |
void | parse_dynamic_instance_tree () |
This functions parses the dynamic analysis file into a tree representation. More... | |
virtual DynamicModule * | get_dynamic_tree_root () |
This function returns the root node of the dynamic analysis CAUTION: This function is only for the DynamicPathInstanceMapper. More... | |
virtual bool | perform_dynamic_analysis () |
This functions returns true if the path instance mapper should perform a dynamic analysis. More... | |
virtual int * | get_global_variable_address (std::string variable_name) |
This functions returns the address of a global variable. More... | |
virtual std::string | get_global_variable_name (int *variable_address) |
This functions returns the name of a global variable. More... | |
std::string | translate_type_name (std::string gnu_type_name) |
This function is only for internal use. Rose cannot generate type names for template classes. The output is very cryptic. So this function translates a clean gnu class name into a rose type name. More... | |
void | print_mapping () |
The function prints the lookup table in the terminal. More... | |
virtual InstanceTree | get_instance_tree (int id, std::list< InstanceTree > potential_instances) |
This function returns for a given id and potential mapping candidates the corresponding instance tree. CAUTION: This function is only for the StaticPathInstanceMapper. More... | |
virtual int | get_id (InstanceTree tree) |
This function returns for a given tree the corresponding instance id. CAUTION: This function is only for the StaticPathInstanceMapper. More... | |
Public Attributes | |
std::string | filename_ |
This is the input file for the dynamic analysis. More... | |
DynamicModule * | dynamic_root_ |
This variables stores the root node of the dynamic analysis. More... | |
std::list< std::pair < std::string, int * > > | global_variable_addresses_ |
This list stores the global variables of the dynamic analysis. More... | |
std::vector< PathWithID > | path_to_id_mapping_ |
This is the lookup table from path to instance id. More... | |
int | max_instances_ |
This variable counts what is the max of instances. More... | |
|
inherited |
risc::DynamicPathInstanceMapper::DynamicPathInstanceMapper | ( | std::string | filename | ) |
This is the default constructor and need a design and a segment graph. The lookup table will be automatically created.
risc::DynamicPathInstanceMapper::determine_lookup_table | ( | ) |
This function traverses the design and pushes all modules and hierarchical channel instances into the path_to_id_mapping_ lookup table. The traversing is dependent on the declaration order of the member variables. Also, it follows depth first search. CAUTION: The function Design::reset_instance_counter() must be used first! Otherwise wrong intance id's a generated!
|
virtual |
This function returns the root node of the dynamic analysis CAUTION: This function is only for the DynamicPathInstanceMapper.
Reimplemented from risc::PathInstanceMapper.
|
virtual |
This functions returns the address of a global variable.
Reimplemented from risc::PathInstanceMapper.
|
virtual |
This functions returns the name of a global variable.
Reimplemented from risc::PathInstanceMapper.
|
virtualinherited |
This function returns for a given tree the corresponding instance id. CAUTION: This function is only for the StaticPathInstanceMapper.
Reimplemented in risc::StaticPathInstanceMapper.
|
virtualinherited |
This function returns for a given id and potential mapping candidates the corresponding instance tree. CAUTION: This function is only for the StaticPathInstanceMapper.
Reimplemented in risc::StaticPathInstanceMapper.
void risc::DynamicPathInstanceMapper::parse_dynamic_instance_tree | ( | ) |
This functions parses the dynamic analysis file into a tree representation.
|
virtual |
This functions returns true if the path instance mapper should perform a dynamic analysis.
Implements risc::PathInstanceMapper.
|
inherited |
The function prints the lookup table in the terminal.
risc::DynamicPathInstanceMapper::translate_type_name | ( | std::string | gnu_type_name | ) |
This function is only for internal use. Rose cannot generate type names for template classes. The output is very cryptic. So this function translates a clean gnu class name into a rose type name.
void risc::DynamicPathInstanceMapper::traverse_tree | ( | InstanceTree | root, |
DynamicModule * | module | ||
) |
DynamicModule* risc::DynamicPathInstanceMapper::dynamic_root_ |
This variables stores the root node of the dynamic analysis.
std::string risc::DynamicPathInstanceMapper::filename_ |
This is the input file for the dynamic analysis.
std::list<std::pair<std::string, int*> > risc::DynamicPathInstanceMapper::global_variable_addresses_ |
This list stores the global variables of the dynamic analysis.
|
inherited |
This variable counts what is the max of instances.
|
inherited |
This is the lookup table from path to instance id.