All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
path_instance_mapper.h
Go to the documentation of this file.
1 #ifndef PATH_INSTANCE_MAPPER_H_INCLUDED_
2 #define PATH_INSTANCE_MAPPER_H_INCLUDED_
3 
4 #include "instance_tree.h"
5 
6 #include <string>
7 #include <vector>
8 
9 class DynamicModule;
10 
11 namespace risc {
12 
14 
15 public:
16 
18 
23  void print_mapping();
24 
25  typedef std::pair<InstanceTree, int> PathWithID;
26 
30  std::vector<PathWithID> path_to_id_mapping_;
31 
36 
42  virtual bool perform_dynamic_analysis() = 0;
43 
50  virtual InstanceTree
51  get_instance_tree(int id, std::list<InstanceTree> potential_instances);
52 
59  virtual int get_id(InstanceTree tree);
60 
67 
74  virtual int* get_global_variable_address(std::string variable_name);
75 
82  virtual std::string get_global_variable_name(int *variable_address);
83 };
84 
85 }; // end of namespace risc
86 
87 #endif /* PATH_INSTANCE_MAPPER_H_INCLUDED_ */
88 
89 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
Definition: instance_tree.h:15
Definition: dynamic_internal_representation.h:129
virtual int get_id(InstanceTree tree)
This function returns for a given tree the corresponding instance id. CAUTION: This function is only ...
Definition: path_instance_mapper.cpp:24
void print_mapping()
The function prints the lookup table in the terminal.
Definition: path_instance_mapper.cpp:12
PathInstanceMapper()
Definition: path_instance_mapper.cpp:7
virtual DynamicModule * get_dynamic_tree_root()
This function returns the root node of the dynamic analysis CAUTION: This function is only for the Dy...
Definition: path_instance_mapper.cpp:41
This class can be used as a lookup table between an instance id of a module or hierarchical channel a...
Definition: path_instance_mapper.h:13
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...
Definition: path_instance_mapper.cpp:31
std::vector< PathWithID > path_to_id_mapping_
This is the lookup table from path to instance id.
Definition: path_instance_mapper.h:30
std::pair< InstanceTree, int > PathWithID
Definition: path_instance_mapper.h:25
virtual int * get_global_variable_address(std::string variable_name)
This functions returns the address of the global variable with the name &#39;variable_name&#39; CAUTION: This...
Definition: path_instance_mapper.cpp:48
virtual std::string get_global_variable_name(int *variable_address)
This functions translates the address of a global variable into the associated variable name CAUTION:...
Definition: path_instance_mapper.cpp:54
int max_instances_
This variable counts what is the max of instances.
Definition: path_instance_mapper.h:35
virtual bool perform_dynamic_analysis()=0
This functions returns true if the path instance mapper should perform a dynamic analysis.