All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions | Variables
dynamic_internal_representation.cpp File Reference
#include "dynamic_internal_representation.h"
#include "module.h"
#include "design.h"
#include "internal_representation_helper.h"
#include "targetsocket.h"
#include "initiatorsocket.h"
#include "../tools/misc.h"
#include "class.h"
Include dependency graph for dynamic_internal_representation.cpp:

Macros

#define PRINT_OBJECT(TYPE, VARIABLE)
 
#define PRINT_OBJECT(TYPE, VARIABLE)
 
#define COMPARE_NAME(TYPE, VARIABLE)
 
#define SEARACH_FOR_VARIABLE(TYPE, VARIABLE)
 
#define COMPARE_NAME(TYPE, VARIABLE)
 
#define SERACH_FOR_ADDRESS(TYPE, VARIABLE)
 

Functions

DynamicObjectget_dynamic_object_of_variable (DynamicModule *root, std::string host_module_type_name, int host_module_instance_id, std::string reference_name, int &instance_counter)
 This function searches for the mapped variable address of a reference in a given module with a specific instance id. More...
 
bool get_instance_id_of_hosting_module (DynamicModule *root, int *address_of_variable, std::string module_name, int &instance_counter)
 This function determines to which (instance of a given) module (host module type name) a variable belongs to. The instance counter will provide the instance id. The starting value should be 0. More...
 
std::pair< DynamicModule
*, std::string > 
get_host_module_and_name_of_variable (DynamicModule *root, int *variable)
 This function searchs the the variable address 'variable' in the tree. After finding the variable address the name of the variable and the hosting module will be returned. More...
 
void get_all_components_of_type (DynamicModule *root, std::string type_name, std::list< DynamicModule * > &modules)
 
DynamicModuleget_host_module_of_member (DynamicModule *root, int *address_of_variable, int var_type, std::string member_name)
 
DynamicObjectfind_channel (DynamicModule *root, int *address_of_channel)
 Finds a channel instance in the dynamic tree via the address. More...
 
DynamicModuleget_module_instance (DynamicModule *root, const std::string &name, int instance_id, int &counter)
 
int get_mapped_channel_id_of_port (DynamicPort *port)
 
void get_id (DynamicModule *root, std::string name, int *address, int &counter, bool &found)
 
DynamicTargetSocketget_target_socket (DynamicModule *root, int *address_of_socket)
 
DynamicInitSocketget_initiator_socket (DynamicModule *root, int *address_of_socket)
 
std::set< risc::Socket * > get_mapped_target_sockets (std::string init_socket_name, std::string host_module_name)
 
std::set< risc::Socket * > get_mapped_initiator_sockets (std::string target_socket_name, std::string host_module_name)
 

Variables

DynamicModuleast_root
 

Macro Definition Documentation

#define COMPARE_NAME (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = root-> VARIABLE .begin(); \
iter_variable != root-> VARIABLE .end(); \
iter_variable++) { \
if((*iter_variable)->name_ == reference_name) { \
return *iter_variable; \
} \
}
#define COMPARE_NAME (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = root-> VARIABLE .begin(); \
iter_variable != root-> VARIABLE .end(); \
iter_variable++) { \
if((*iter_variable)->address_ == variable) { \
return std::pair<DynamicModule*, std::string>( \
root, (*iter_variable)->name_); \
} \
}
#define PRINT_OBJECT (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = VARIABLE .begin(); \
iter_variable != VARIABLE .end(); \
iter_variable++) { \
(*iter_variable)->print(indent+1); \
}
#define PRINT_OBJECT (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = VARIABLE .begin(); \
iter_variable != VARIABLE .end(); \
iter_variable++) { \
(*iter_variable)->print(indent+1); \
}
#define SEARACH_FOR_VARIABLE (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = root-> VARIABLE .begin(); \
iter_variable != root-> VARIABLE .end(); \
iter_variable++) { \
if((*iter_variable)->address_ == address_of_variable) { \
return true; \
} \
}
#define SERACH_FOR_ADDRESS (   TYPE,
  VARIABLE 
)
Value:
for(std::list< TYPE *>::iterator \
iter_variable = root-> VARIABLE .begin(); \
iter_variable != root-> VARIABLE .end(); \
iter_variable++) { \
if(((*iter_variable)->address_ == address_of_variable) \
&& (member_name == "" || (*iter_variable)->name_ == member_name ) \
) { \
return root; \
} \
}

Function Documentation

find_channel ( DynamicModule root,
int *  address_of_channel 
)

Finds a channel instance in the dynamic tree via the address.

void get_all_components_of_type ( DynamicModule root,
std::string  type_name,
std::list< DynamicModule * > &  modules 
)
get_dynamic_object_of_variable ( DynamicModule root,
std::string  host_module_type_name,
int  host_module_instance_id,
std::string  reference_name,
int &  instance_counter 
)

This function searches for the mapped variable address of a reference in a given module with a specific instance id.

get_host_module_and_name_of_variable ( DynamicModule root,
int *  variable 
)

This function searchs the the variable address 'variable' in the tree. After finding the variable address the name of the variable and the hosting module will be returned.

DynamicModule* get_host_module_of_member ( DynamicModule root,
int *  address_of_variable,
int  var_type,
std::string  member_name 
)
void get_id ( DynamicModule root,
std::string  name,
int *  address,
int &  counter,
bool &  found 
)
DynamicInitSocket* get_initiator_socket ( DynamicModule root,
int *  address_of_socket 
)
get_instance_id_of_hosting_module ( DynamicModule root,
int *  address_of_variable,
std::string  module_name,
int &  instance_counter 
)

This function determines to which (instance of a given) module (host module type name) a variable belongs to. The instance counter will provide the instance id. The starting value should be 0.

int get_mapped_channel_id_of_port ( DynamicPort port)
std::set<risc::Socket*> get_mapped_initiator_sockets ( std::string  target_socket_name,
std::string  host_module_name 
)
std::set<risc::Socket*> get_mapped_target_sockets ( std::string  init_socket_name,
std::string  host_module_name 
)
DynamicModule* get_module_instance ( DynamicModule root,
const std::string &  name,
int  instance_id,
int &  counter 
)
DynamicTargetSocket* get_target_socket ( DynamicModule root,
int *  address_of_socket 
)

Variable Documentation

DynamicModule* ast_root