risc::PathInstanceMapper Class Reference

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>

List of all members.

Public Types

typedef std::pair
< InstanceTree, int > 
PathWithID

Public Member Functions

 PathInstanceMapper ()
 This is the default constructor and need a design and a segment graph. The lookup table will be automatically created.
void determine_lookup_table (InstanceTree root)
 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 oder 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!
void print_mapping ()
 The function prints the lookup table in the terminal.
int get_id (InstanceTree tree)
 This function returns for a given tree the corresponding instance id.
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.

Public Attributes

std::vector< PathWithIDpath_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.

Detailed Description

This class can be used as a lookup table between an instance id of a module or hierarchical channel and the instance tree.


Member Typedef Documentation


Constructor & Destructor Documentation

risc::PathInstanceMapper::PathInstanceMapper (  ) 

This is the default constructor and need a design and a segment graph. The lookup table will be automatically created.

PathInstanceMapper


Member Function Documentation

void risc::PathInstanceMapper::determine_lookup_table ( InstanceTree  root  ) 

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 oder 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!

determine_lookup_table

int risc::PathInstanceMapper::get_id ( InstanceTree  tree  ) 

This function returns for a given tree the corresponding instance id.

get_id

risc::InstanceTree risc::PathInstanceMapper::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.

get_instance_Tree

void risc::PathInstanceMapper::print_mapping (  ) 

The function prints the lookup table in the terminal.

print_mapping


Member Data Documentation

This variable counts what is the max of instances.

This is the lookup table from path to instance id.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 30 Sep 2015 by  doxygen 1.6.1