Classes | |
class | AstAttributeColor |
class | CDefinitions |
This class stores C and C++ definition pointer This class does not need any initialization. More... | |
class | ParseStatus |
This class stores the command-line options. More... | |
struct | UserSpaceFilter |
class | RoseNodes |
class | SystemCDefinitions |
This class stores all SystemC definition pointers This class does not need any initialization. More... | |
Functions | |
bool | is_derived_from (SgClassDefinition *derived_class, SgClassDefinition *base_class) |
This function checks if the derived class is derived from the base class Caching techniques are applied for speedup. More... | |
bool | is_derived_from_internal (SgClassDefinition *derived_class, SgClassDefinition *base_class) |
This function is for internal usage only because no caching is applied. More... | |
bool | is_derived_from_sc_interface (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_interface. More... | |
bool | is_derived_from_sc_channel (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_channel. More... | |
bool | is_derived_from_sc_prim_channel (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_prim_channel. More... | |
bool | is_derived_from_sc_module (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_module. More... | |
bool | is_derived_from_sc_port (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_port. More... | |
bool | is_derived_from_sc_port_base (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_port_base. More... | |
bool | is_derived_from_tlm_base_initiator_socket_b (SgClassDefinition *derived_class) |
This function checks if the class is derived from tlm_base_initiator_socket_b. More... | |
bool | is_derived_from_tlm_base_target_socket_b (SgClassDefinition *derived_class) |
This function checks if the class is derived from tlm_base_target_socket_b. More... | |
bool | is_derived_from_sc_port_base (SgVarRefExp *var_ref) |
This function checks if the class is derived from sc_port_base. More... | |
bool | is_derived_from_sc_port_base (SgType *type) |
This function checks if the class is derived from sc_port_base. More... | |
bool | is_sc_event (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_event or if it is sc_event itself. More... | |
bool | is_sc_event_and_list (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_event_and_list or if it is sc_event_and_list itself. More... | |
bool | is_sc_event_or_list (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_event_or_list or if it is sc_event_or_list itself. More... | |
bool | is_sc_time (SgVarRefExp *var_ref) |
This function checks if the variable access is of the type sc_time (or a reference to a sc_time) More... | |
bool | is_sc_event (SgVarRefExp *var_ref) |
This function checks if the variable access is of the type sc_event (or a reference to a sc_event) More... | |
bool | is_sc_event_and_list (SgVarRefExp *var_ref) |
This function checks if the variable access is of the type sc_event_and_list (or a reference to a sc_event_and_list) More... | |
bool | is_sc_event_or_list (SgVarRefExp *var_ref) |
This function checks if the variable access is of the type sc_event_or_list (or a reference to a sc_event_and_list) More... | |
bool | is_sc_port (SgClassDefinition *derived_class) |
This function checks if the class is derived from sc_port_base and not from tlm_base_initiator_socket_b. More... | |
bool | is_sc_in_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_in_port. More... | |
bool | is_sc_out_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_out_port. More... | |
bool | is_sc_inout_port (SgTemplateInstantiationDefn *template_class) |
This function checks if the template class bases on the class template sc_inout_port. More... | |
bool | is_sc_in_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_in_clk. More... | |
bool | is_sc_out_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_out_clk. More... | |
bool | is_sc_inout_clk (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_inout_clk. More... | |
bool | is_sc_in_bool (SgClassDefinition *definition) |
This function checks if the given defintion is qual to the definition of a sc_in<bool> More... | |
bool | is_sc_fifo_in (SgVarRefExp *var_ref) |
This function checks if the variable is of the type sc_fifo_in. More... | |
bool | is_sc_fifo_out (SgVarRefExp *var_ref) |
This function checks if the variable is of the type sc_fifo_out. More... | |
std::vector< std::string > | preparsing_commandline_arguments (int &argc, char **&argv, std::vector< std::string > &input_files) |
This function takes the parameter of the command line and creates a source file which includes all the source files. Afterwards all source files are replaced with new file in the command parameters. Example. More... | |
std::string | instrumentor_output_filename (int &argc, char **&argv) |
This function searches for the command line arguments for the dynamic analysis, namely, -inst:dir_output_filename <filename>. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS. More... | |
std::string | dynamic_analysis_input_filename (int &argc, char **&argv) |
This function searches for the command line arguments for the dynamic analysis, namely, -risc:elab <filename>. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS. More... | |
void | ParseCommandlineOptions (int &argc, char **&argv, ParseStatus *status) |
Parse command-line options that are related to RISC library. More... | |
void | AddCommandlineOption (int &argc, char **&argv, std::string option) |
Add a new command-line option to argc & argv. More... | |
void | AddCommandlineOption (risc::Design &design, std::string option) |
Add a new command-line option to the command-line argument list in SgProject. More... | |
void | RemoveCommandlineOption (risc::Design &design, std::string option) |
Remove a command-line option from the command-line argument list in SgProject. More... | |
Rose::StringUtility::FileNameLibrary | get_library (int file_id) |
Rose::StringUtility::FileNameLibrary | get_library (Sg_File_Info *X) |
SgFunctionDeclaration * | get_function_declaration_of_channel_call_statically (SgFunctionCallExp *func_call) |
This function determines which virtual function will be called in a case of channel access. For instance, my_port->send(some_data); Through the port declaration and the function signature we can determine which function will be called. This concept cannot be generalized. More... | |
SgFunctionDeclaration * | get_function_declaration_of_channel_call_dynamically (SgFunctionCallExp *func_call) |
This function determines which function will be called in a case of channel access. The results from dynamic analysis will be taken into account. More... | |
bool | function_call_belongs_to_a_port (SgFunctionCallExp *func_call_exp) |
This functions checks if the function call belongs to a port. This function should be only called after a function call is decomposed through the segment graph. More... | |
bool | function_call_is_in_user_domain (SgFunctionCallExp *func_call_exp) |
This function checks if a function call is in the user domain. More... | |
std::vector < SgFunctionDeclaration * > | get_all_other_function_declarations (SgFunctionDeclaration *func_decl) |
This function gets all other functions declarations which are associated with the same function declaration like func_decl. More... | |
std::list< SgClassDefinition * > | get_channel_interfaces (SgClassDefinition *channel_def) |
This function returns all used interfaces of the channel channel_def. More... | |
std::list< SgClassDefinition * > | get_all_used_interfaces (bool only_in_user_domain=true) |
This function traverses over all channel definitions in the design. For each individual channel, the function collects all used interfaces. This function will not return an interface which is not used in any channel. More... | |
std::list< SgFunctionCallExp * > | get_all_port_calls_to_annotated_functions (risc::sg::SegmentGraph &graph) |
This function returns all port calls. More... | |
std::list < SgFunctionDeclaration * > | get_interface_functions (SgClassDefinition *channel_def, bool only_annotated=false) |
This function returns all function declarations of the channel channel_def which belong to an interface. More... | |
std::list < SgFunctionDeclaration * > | get_all_implemented_interface_functions (bool only_in_user_domain=true, bool only_annotated=false) |
This functions traverses over all channels and collects the function declarations of the implemented interfaces. More... | |
bool | is_annotated_function (SgFunctionDeclaration *func_decl) |
This function returns true if the annotated. More... | |
bool | has_reference_parameter (SgFunctionDeclaration *func_decl) |
This function returns true if the function has at least one parameter which is taken via reference. More... | |
SgFunctionDeclaration * | get_first_non_defining_function_declaration (SgFunctionCallExp *func_call_exp) |
This function returns for a function call the first non defining function declaration. It will be considered if it is a port call. If so, statically or dynamically the port mapping will be solved. More... | |
bool | is_overloaded_operator (SgFunctionDeclaration *func_decl) |
This function returns true if the function overloads an operator CAUTION: This is a pre release. The functionality is incomplete. E.g. global declared operators are not considered. More... | |
SgVariableDefinition * | get_port_variable (SgFunctionCallExp *func_call_exp) |
This function returns the port variable of a function call. More... | |
SgVariableDefinition * | get_socket_variable (SgExpression *expr, int &type) |
This function returns the socket variable of a function call. More... | |
std::set< SgFunctionDeclaration * > | get_registered_b_transport_funcs (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's b_transport. More... | |
std::set< SgFunctionDeclaration * > | get_registered_b_transport_funcs_statically (SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's b_transport. More... | |
std::set< SgFunctionDeclaration * > | get_registered_b_transport_funcs_dynamically (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's b_transport. More... | |
std::set< SgFunctionDeclaration * > | get_registered_get_dmi_funcs (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr. More... | |
std::set< SgFunctionDeclaration * > | get_registered_get_dmi_funcs_statically (SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr. More... | |
std::set< SgFunctionDeclaration * > | get_registered_get_dmi_funcs_dynamically (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_fw_funcs (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_fw. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_fw_funcs_statically (SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_fw. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_fw_funcs_dynamically (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_fw. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_bw_funcs (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_bw. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_bw_funcs_statically (SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_bw. More... | |
std::set< SgFunctionDeclaration * > | get_registered_nb_transport_bw_funcs_dynamically (SgFunctionCallExp *func_call, SgVariableDefinition *socket_var) |
This function returns a set of functions that could potentially be socket's nb_transport_bw. More... | |
SgSymbol * | get_sym_from_def (SgVariableDefinition *def) |
This function returns the SgSymbol* from a given SgVariableDefinition*. More... | |
bool | is_data_structure (SgType *type) |
This function checks if the passed type represents a data structure. More... | |
bool | is_builtin_type (SgType *type) |
This function checks if the passed type represents a C++ builtin type. More... | |
bool | class_types_are_identical (SgClassDefinition *cd1, SgClassDefinition *cd2) |
Compares two classes. More... | |
bool | is_func_name (const SgFunctionDeclaration *function, const std::string &name) |
Compares the function name with the given string. More... | |
void | print_indented (std::string s, unsigned indent) |
Prints a string with indention. More... | |
SgClassDefinition * | class_definition_of_variable (SgVariableDeclaration *var_decl) |
Determines the class defintion of varialbe It is expected that the type is SgClassType. More... | |
bool | is_builtin_function (SgFunctionDeclaration *func_decl) |
Checks if a given function is a C++ builtin function This function is taken/inspired from the Rose builtinFilter structure. More... | |
bool | all_cfg_branches_end_in_break (SgNode *node, int &break_counter) |
This function determines if all cfg branches in the statement 'node' will end in a break statement. The statement in end will be excluded. Some examples: More... | |
bool | all_cfg_branches_end_in_continue (SgNode *node, int &continue_counter) |
This function determines if all cfg branches in the statement 'node' will end in a continue statement. The statement in end will be excluded. Some examples: More... | |
SgStatement * | get_previous_stmt_in_basic_block (SgNode *node) |
This function determines the previous statement of the statement 'node' in the next surrounding basic block. If 'node' is the first statement, the return value will be NULL. More... | |
bool | is_conditional_break (SgScopeStatement const *const loop_stmt, SgBreakStmt const *const break_stmt) |
This function checks if a given break statement is unconditioned. More... | |
SgScopeStatement * | find_break_surrounding_scope (SgBreakStmt *break_stmt) |
This function finds the surrounding scope statement of a break. The break can be surrounded by a while, do while, for loop or by a switch statement. More... | |
bool | break_belongs_to_loop (SgScopeStatement *loop_stmt, SgBreakStmt const *const break_stmt) |
This function checks if a given break statement belongs to a given loop statements. More... | |
bool | is_located_in_rose_header (SgNode *node) |
SgMemberFunctionDeclaration * | get_constructor (SgClassDefinition *class_def) |
This function returns the constructor of class. For a module, primitive channel, and a hierarchical channel we expect exactly one constructor. So, we return the first SgFunctionDefinition which es a constructor. More... | |
void | find_and_replace_all (std::string &input, const std::string &from, const std::string &to) |
This function searches for the given string from and replaces all occurrences with the string to in the input string input. More... | |
std::string | get_mangled_name (SgClassDefinition *class_def) |
This function returns the mangled name of a class definition. The mangled name is in the style of A::B::C. More... | |
SgVariableSymbol * | find_global_variable (std::string name, SgProject *project) |
This function search in the global namespace for the variable with the name 'name' and return the associated symbol. More... | |
bool | is_known_function (SgFunctionDeclaration *statement) |
This function checks if the statement is ::memset ::free ::rand ::putchar ::printf. More... | |
bool | is_in_std_namespace (SgDeclarationStatement *statement) |
This function checks if the statement is declared in the std namespace. More... | |
bool | is_in_systemc_namespace (SgDeclarationStatement *statement) |
This function checks if the statement is declared in the systemc namespace (sc_core/sc_dt) More... | |
bool | is_in_gnu_cxx_namespace (SgDeclarationStatement *statement) |
This function checks if the statement is declared in the systemc namespace (sc_core/sc_dt) More... | |
SgVariableSymbol * | get_most_outer_var (SgExpression *expr) |
The function returns the most outer variable in an expression. Example: a -> a array[i] -> array array[i][43*k] -> array. More... | |
bool | has_no_variable_expressions (SgExpression *expr) |
This function returns true, if the expression contains only literals. More... | |
SgClassDefinition * | find_class_definition (std::string class_name, std::string qualified_namespace) |
This function searchs for a class by name (string) in namespace (string) More... | |
SgTypedefDeclaration * | find_typedef_declaration (std::string typedef_name, std::string qualified_namespace) |
This function searchs for a typedef's by name (string) in namespace (string) More... | |
bool | is_type_sc_module (SgType *type) |
bool | is_type_sc_port (SgType *type) |
Check if the type is a sc_port. More... | |
bool | is_type_sc_port_base (SgType *type) |
Check if the type is a sc_port_base. More... | |
bool | is_type_sc_in (SgType *type) |
Check if the type is a sc_in. More... | |
bool | is_type_sc_out (SgType *type) |
Check if the type is a sc_out. More... | |
bool | is_type_sc_inout (SgType *type) |
Check if the type is a sc_inout. More... | |
bool | is_type_sc_event (SgType *type) |
Check if the type is a sc_event. More... | |
bool | is_type_sc_event_and_list (SgType *type) |
Check if the type is a sc_event_and_list. More... | |
bool | is_type_sc_event_or_list (SgType *type) |
Check if the type is a sc_event_or_list. More... | |
bool | is_type_sc_prim_channel (SgType *type) |
Check if the type is a sc_prim_channel. More... | |
bool | is_type_sc_interface (SgType *type) |
Check if the type is a sc_interface. More... | |
bool | is_type_sc_fifo (SgType *type) |
Check if the type is a sc_fifo. More... | |
bool | is_type_sc_fifo_in (SgType *type) |
Check if the type is a sc_fifo_in. More... | |
bool | is_type_sc_fifo_out (SgType *type) |
Check if the type is a sc_fifo_out. More... | |
bool | is_type_sc_simcontext (SgType *type) |
Check if the type is a sc_simcontext. More... | |
bool | is_type_sc_segid (SgType *type) |
Check if the type is a sc_segid. More... | |
bool | is_type_sc_time (SgType *type) |
Check if the type is a sc_time. More... | |
bool | is_type_sc_process_b (SgType *type) |
Check if the type is a sc_process_b. More... | |
bool | is_type_sc_channel (SgType *type) |
Check if the type is a sc_port. More... | |
bool | is_type_sc_in_clk (SgType *type) |
Check if the type is a sc_in_clk. More... | |
bool | is_type_sc_out_clk (SgType *type) |
Check if the type is a sc_out_clk. More... | |
bool | is_type_sc_inout_clk (SgType *type) |
Check if the type is a sc_inout_clk. More... | |
bool | is_reference_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a reference. More... | |
bool | is_pointer_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a pointer. More... | |
bool | is_global_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a global variable. More... | |
bool | is_local_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a local variable. More... | |
bool | is_member_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a member variable. More... | |
bool | is_static_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a static variable. More... | |
bool | is_namespace_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a namespace variable. More... | |
bool | is_function_parameter_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a function variable. More... | |
bool | is_member_of (SgVariableSymbol *is, SgSymbol *of) |
This function returns true if a given variable symbol is defined 'in' another variable symbol. For instance 'class Foo { int i;}' 'i' is defined in 'Foo'. More... | |
bool | is_loop_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a loop variable. More... | |
bool | is_stack_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a variable which will be stored on the stack. More... | |
bool | is_data_segment_variable (SgVariableSymbol *var_symbol) |
This function return true if the given variable symbol is a variable which will be stored on the stack. More... | |
void | analyze_conflict_free (SgVariableSymbol *symbol) |
This function checks if a variable is annoated with a pragma as conflict free. More... | |
bool | is_channel_variable (SgVariableSymbol *symbol) |
Returns true when the variable is declared in a channel. More... | |
bool | is_sc_signal (SgVariableSymbol *symbol) |
Returns true if the variable is of type sc_signal. More... | |
bool | is_socket_variable (risc::sg::SymbolWithPath swp) |
Returns true when the symbolwithpath has a pcp_.port_ attribute. More... | |
Variables | |
std::unordered_map < SgClassDefinition *, std::unordered_map < SgClassDefinition *, bool > > | lookup |
lookup for derived classes (base class, derived class, is derived) More... | |
static SgClassDefinition * | sc_module_ |
static SgClassDefinition * | sc_port_ |
static SgClassDefinition * | sc_port_base_ |
static SgClassDefinition * | sc_in_ |
static SgClassDefinition * | sc_out_ |
static SgClassDefinition * | sc_inout_ |
static SgClassDefinition * | sc_event_ |
static SgClassDefinition * | sc_event_and_list_ |
static SgClassDefinition * | sc_event_or_list_ |
static SgClassDefinition * | sc_prim_channel_ |
static SgClassDefinition * | sc_interface_ |
static SgClassDefinition * | sc_fifo_ |
static SgClassDefinition * | sc_fifo_in_ |
static SgClassDefinition * | sc_fifo_out_ |
static SgClassDefinition * | sc_simcontext_ |
static SgClassDefinition * | sc_segid_ |
static SgClassDefinition * | sc_time_ |
static SgClassDefinition * | sc_process_b_ |
static SgClassDefinition * | sc_channel_ |
static SgClassDefinition * | sc_in_clk_ |
static SgClassDefinition * | sc_out_clk_ |
static SgClassDefinition * | sc_inout_clk_ |
static SgClassDefinition * | tlm_base_initiator_socket_b_ |
static SgClassDefinition * | tlm_base_target_socket_b_ |
static SgFunctionDefinition * | sc_main_ |
static SgFunctionDeclaration * | sc_get_curr_simcontext_ |
static SgFunctionDeclaration * | sc_stop_ |
static SgMemberFunctionDeclaration * | sc_get_curr_proc_ |
static SgMemberFunctionDeclaration * | sc_segid_ctor_ |
static SgMemberFunctionDeclaration * | get_upcoming_segment_ids_ |
static SgMemberFunctionDeclaration * | set_upcoming_segment_ids_ |
static SgMemberFunctionDeclaration * | get_upcoming_socket_id_ |
static SgMemberFunctionDeclaration * | set_upcoming_socket_id_ |
static SgMemberFunctionDeclaration * | increase_offset_ |
static SgMemberFunctionDeclaration * | decrease_offset_ |
static SgMemberFunctionDeclaration * | get_offset_ |
static SgMemberFunctionDeclaration * | get_interface_ |
static SgMemberFunctionDeclaration * | get_base_interface_ |
static SgMemberFunctionDeclaration * | get_base_port_ |
static std::vector < SgNamespaceDefinitionStatement * > | sc_core_ |
static std::vector < SgNamespaceDefinitionStatement * > | sc_dt_ |
static std::set < SgFunctionDefinition * > | sc_wait_funcs_ |
static std::set < SgFunctionDefinition * > | sc_next_trigger_funcs_ |
static bool | is_initialized_ |
risc::tools::AddCommandlineOption | ( | int & | argc, |
char **& | argv, | ||
std::string | option | ||
) |
Add a new command-line option to argc & argv.
risc::tools::AddCommandlineOption | ( | risc::Design & | design, |
std::string | option | ||
) |
Add a new command-line option to the command-line argument list in SgProject.
risc::tools::all_cfg_branches_end_in_break | ( | SgNode * | node, |
int & | break_counter | ||
) |
This function determines if all cfg branches in the statement 'node' will end in a break statement. The statement in end will be excluded. Some examples:
input with result: true break; <– node int a;
input with result: false if(test) <– node break; int a;
input with result: true if(test) <– node break; else break; int a;
risc::tools::all_cfg_branches_end_in_continue | ( | SgNode * | node, |
int & | continue_counter | ||
) |
This function determines if all cfg branches in the statement 'node' will end in a continue statement. The statement in end will be excluded. Some examples:
input with result: true continue; <– node int a;
input with result: false if(test); <– node continue; int a;
input with result: true if(test); <– node continue; else continue; int a;
risc::tools::analyze_conflict_free | ( | SgVariableSymbol * | symbol | ) |
This function checks if a variable is annoated with a pragma as conflict free.
risc::tools::break_belongs_to_loop | ( | SgScopeStatement * | loop_stmt, |
SgBreakStmt const *const | break_stmt | ||
) |
This function checks if a given break statement belongs to a given loop statements.
loop_stmt | Pointer to the loop statement |
break_stmt | Pointer to the break statement |
SgClassDefinition * risc::tools::class_definition_of_variable | ( | SgVariableDeclaration * | var_decl | ) |
Determines the class defintion of varialbe It is expected that the type is SgClassType.
var_decl | The given variable declaration |
bool risc::tools::class_types_are_identical | ( | SgClassDefinition * | cd1, |
SgClassDefinition * | cd2 | ||
) |
std::string risc::tools::dynamic_analysis_input_filename | ( | int & | argc, |
char **& | argv | ||
) |
This function searches for the command line arguments for the dynamic analysis, namely, -risc:elab <filename>. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS.
risc::tools::find_and_replace_all | ( | std::string & | input, |
const std::string & | from, | ||
const std::string & | to | ||
) |
This function searches for the given string from and replaces all occurrences with the string to in the input string input.
risc::tools::find_break_surrounding_scope | ( | SgBreakStmt * | break_stmt | ) |
This function finds the surrounding scope statement of a break. The break can be surrounded by a while, do while, for loop or by a switch statement.
SgClassDefinition * risc::tools::find_class_definition | ( | std::string | class_name, |
std::string | qualified_namespace | ||
) |
This function searchs for a class by name (string) in namespace (string)
class_name | Name of the class |
qualified_namespace | The absolute qualified namespace |
risc::tools::find_global_variable | ( | std::string | name, |
SgProject * | project | ||
) |
This function search in the global namespace for the variable with the name 'name' and return the associated symbol.
SgTypedefDeclaration * risc::tools::find_typedef_declaration | ( | std::string | typedef_name, |
std::string | qualified_namespace | ||
) |
This function searchs for a typedef's by name (string) in namespace (string)
typedef_name | Name of the class |
qualified_namespace | The absolute qualified namespace |
risc::tools::function_call_belongs_to_a_port | ( | SgFunctionCallExp * | func_call_exp | ) |
This functions checks if the function call belongs to a port. This function should be only called after a function call is decomposed through the segment graph.
risc::tools::function_call_is_in_user_domain | ( | SgFunctionCallExp * | func_call_exp | ) |
This function checks if a function call is in the user domain.
risc::tools::get_all_implemented_interface_functions | ( | bool | only_in_user_domain = true , |
bool | only_annotated = false |
||
) |
This functions traverses over all channels and collects the function declarations of the implemented interfaces.
risc::tools::get_all_other_function_declarations | ( | SgFunctionDeclaration * | func_decl | ) |
This function gets all other functions declarations which are associated with the same function declaration like func_decl.
TODO CHANGE THE NAME
risc::tools::get_all_port_calls_to_annotated_functions | ( | risc::sg::SegmentGraph & | graph | ) |
This function returns all port calls.
risc::tools::get_all_used_interfaces | ( | bool | only_in_user_domain = true | ) |
This function traverses over all channel definitions in the design. For each individual channel, the function collects all used interfaces. This function will not return an interface which is not used in any channel.
only_in_user_domain | considers only interfaces and channels which are defined in the user file |
risc::tools::get_channel_interfaces | ( | SgClassDefinition * | channel_def | ) |
This function returns all used interfaces of the channel channel_def.
risc::tools::get_constructor | ( | SgClassDefinition * | class_def | ) |
This function returns the constructor of class. For a module, primitive channel, and a hierarchical channel we expect exactly one constructor. So, we return the first SgFunctionDefinition which es a constructor.
risc::tools::get_first_non_defining_function_declaration | ( | SgFunctionCallExp * | func_call_exp | ) |
This function returns for a function call the first non defining function declaration. It will be considered if it is a port call. If so, statically or dynamically the port mapping will be solved.
risc::tools::get_function_declaration_of_channel_call_dynamically | ( | SgFunctionCallExp * | func_call | ) |
This function determines which function will be called in a case of channel access. The results from dynamic analysis will be taken into account.
risc::tools::get_function_declaration_of_channel_call_statically | ( | SgFunctionCallExp * | func_call | ) |
This function determines which virtual function will be called in a case of channel access. For instance, my_port->send(some_data); Through the port declaration and the function signature we can determine which function will be called. This concept cannot be generalized.
risc::tools::get_interface_functions | ( | SgClassDefinition * | channel_def, |
bool | only_annotated = false |
||
) |
This function returns all function declarations of the channel channel_def which belong to an interface.
Rose::StringUtility::FileNameLibrary risc::tools::get_library | ( | int | file_id | ) |
Rose::StringUtility::FileNameLibrary risc::tools::get_library | ( | Sg_File_Info * | X | ) |
risc::tools::get_mangled_name | ( | SgClassDefinition * | class_def | ) |
This function returns the mangled name of a class definition. The mangled name is in the style of A::B::C.
risc::tools::get_most_outer_var | ( | SgExpression * | expr | ) |
The function returns the most outer variable in an expression. Example: a -> a array[i] -> array array[i][43*k] -> array.
risc::tools::get_port_variable | ( | SgFunctionCallExp * | func_call_exp | ) |
This function returns the port variable of a function call.
risc::tools::get_previous_stmt_in_basic_block | ( | SgNode * | node | ) |
This function determines the previous statement of the statement 'node' in the next surrounding basic block. If 'node' is the first statement, the return value will be NULL.
risc::tools::get_registered_b_transport_funcs | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's b_transport.
risc::tools::get_registered_b_transport_funcs_dynamically | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's b_transport.
risc::tools::get_registered_b_transport_funcs_statically | ( | SgVariableDefinition * | socket_var | ) |
This function returns a set of functions that could potentially be socket's b_transport.
risc::tools::get_registered_get_dmi_funcs | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr.
risc::tools::get_registered_get_dmi_funcs_dynamically | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr.
risc::tools::get_registered_get_dmi_funcs_statically | ( | SgVariableDefinition * | socket_var | ) |
This function returns a set of functions that could potentially be socket's get_dmi_ptr.
risc::tools::get_registered_nb_transport_bw_funcs | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's nb_transport_bw.
risc::tools::get_registered_nb_transport_bw_funcs_dynamically | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's nb_transport_bw.
risc::tools::get_registered_nb_transport_bw_funcs_statically | ( | SgVariableDefinition * | socket_var | ) |
This function returns a set of functions that could potentially be socket's nb_transport_bw.
risc::tools::get_registered_nb_transport_fw_funcs | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's nb_transport_fw.
risc::tools::get_registered_nb_transport_fw_funcs_dynamically | ( | SgFunctionCallExp * | func_call, |
SgVariableDefinition * | socket_var | ||
) |
This function returns a set of functions that could potentially be socket's nb_transport_fw.
risc::tools::get_registered_nb_transport_fw_funcs_statically | ( | SgVariableDefinition * | socket_var | ) |
This function returns a set of functions that could potentially be socket's nb_transport_fw.
risc::tools::get_socket_variable | ( | SgExpression * | expr, |
int & | type | ||
) |
This function returns the socket variable of a function call.
risc::tools::get_sym_from_def | ( | SgVariableDefinition * | def | ) |
This function returns the SgSymbol* from a given SgVariableDefinition*.
risc::tools::has_no_variable_expressions | ( | SgExpression * | expr | ) |
This function returns true, if the expression contains only literals.
risc::tools::has_reference_parameter | ( | SgFunctionDeclaration * | func_decl | ) |
This function returns true if the function has at least one parameter which is taken via reference.
std::string risc::tools::instrumentor_output_filename | ( | int & | argc, |
char **& | argv | ||
) |
This function searches for the command line arguments for the dynamic analysis, namely, -inst:dir_output_filename <filename>. ONLY FOR INTERNAL USE! MODIFIES THE COMMAND LINE PARAMETERS.
risc::tools::is_annotated_function | ( | SgFunctionDeclaration * | func_decl | ) |
This function returns true if the annotated.
bool risc::tools::is_builtin_function | ( | SgFunctionDeclaration * | func_decl | ) |
Checks if a given function is a C++ builtin function This function is taken/inspired from the Rose builtinFilter structure.
func_decl | Function declaration |
bool risc::tools::is_builtin_type | ( | SgType * | type | ) |
This function checks if the passed type represents a C++ builtin type.
type | Type that will be checked |
risc::tools::is_channel_variable | ( | SgVariableSymbol * | symbol | ) |
Returns true when the variable is declared in a channel.
risc::tools::is_conditional_break | ( | SgScopeStatement const *const | loop_stmt, |
SgBreakStmt const *const | break_stmt | ||
) |
This function checks if a given break statement is unconditioned.
loop_stmt | Pointer to the loop statement |
break_stmt | Pointer to the break statement |
risc::tools::is_data_segment_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a variable which will be stored on the stack.
bool risc::tools::is_data_structure | ( | SgType * | type | ) |
This function checks if the passed type represents a data structure.
type | Type that will be checked |
risc::tools::is_derived_from | ( | SgClassDefinition * | derived_class, |
SgClassDefinition * | base_class | ||
) |
This function checks if the derived class is derived from the base class Caching techniques are applied for speedup.
derived_class | the derived class definition |
base_class | the base class definition |
risc::tools::is_derived_from_internal | ( | SgClassDefinition * | derived_class, |
SgClassDefinition * | base_class | ||
) |
This function is for internal usage only because no caching is applied.
derived_class | the derived class definition |
base_class | the base class definition |
bool risc::tools::is_derived_from_sc_channel | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_channel.
derived_class | the derived class definition |
derived_class | the derived class definition |
risc::tools::is_derived_from_sc_interface | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_interface.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_module | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_module.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_port.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port_base | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_port_base.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_sc_port_base | ( | SgVarRefExp * | var_ref | ) |
This function checks if the class is derived from sc_port_base.
var_ref | the derived class definition |
bool risc::tools::is_derived_from_sc_port_base | ( | SgType * | type | ) |
This function checks if the class is derived from sc_port_base.
type | the derived class type |
bool risc::tools::is_derived_from_sc_prim_channel | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_prim_channel.
derived_class | the derived class definition |
derived_class | the derived class definition |
bool risc::tools::is_derived_from_tlm_base_initiator_socket_b | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from tlm_base_initiator_socket_b.
derived_class | the derived class definition |
bool risc::tools::is_derived_from_tlm_base_target_socket_b | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from tlm_base_target_socket_b.
derived_class | the derived class definition |
bool risc::tools::is_func_name | ( | const SgFunctionDeclaration * | function, |
const std::string & | name | ||
) |
Compares the function name with the given string.
function | The function declaration |
name | String which will be compared |
risc::tools::is_function_parameter_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a function variable.
risc::tools::is_global_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a global variable.
risc::tools::is_in_gnu_cxx_namespace | ( | SgDeclarationStatement * | statement | ) |
This function checks if the statement is declared in the systemc namespace (sc_core/sc_dt)
risc::tools::is_in_std_namespace | ( | SgDeclarationStatement * | statement | ) |
This function checks if the statement is declared in the std namespace.
risc::tools::is_in_systemc_namespace | ( | SgDeclarationStatement * | statement | ) |
This function checks if the statement is declared in the systemc namespace (sc_core/sc_dt)
risc::tools::is_known_function | ( | SgFunctionDeclaration * | statement | ) |
This function checks if the statement is ::memset ::free ::rand ::putchar ::printf.
risc::tools::is_local_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a local variable.
bool risc::tools::is_located_in_rose_header | ( | SgNode * | node | ) |
risc::tools::is_loop_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a loop variable.
risc::tools::is_member_of | ( | SgVariableSymbol * | is, |
SgSymbol * | of | ||
) |
This function returns true if a given variable symbol is defined 'in' another variable symbol. For instance 'class Foo { int i;}' 'i' is defined in 'Foo'.
risc::tools::is_member_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a member variable.
risc::tools::is_namespace_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a namespace variable.
risc::tools::is_overloaded_operator | ( | SgFunctionDeclaration * | func_decl | ) |
This function returns true if the function overloads an operator CAUTION: This is a pre release. The functionality is incomplete. E.g. global declared operators are not considered.
risc::tools::is_pointer_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a pointer.
risc::tools::is_reference_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a reference.
bool risc::tools::is_sc_event | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_event or if it is sc_event itself.
derived_class | the derived class definition |
bool risc::tools::is_sc_event | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable access is of the type sc_event (or a reference to a sc_event)
var_ref | the variable access to check |
bool risc::tools::is_sc_event_and_list | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_event_and_list or if it is sc_event_and_list itself.
derived_class | the derived class definition |
bool risc::tools::is_sc_event_and_list | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable access is of the type sc_event_and_list (or a reference to a sc_event_and_list)
var_ref | the variable access to check |
bool risc::tools::is_sc_event_or_list | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_event_or_list or if it is sc_event_or_list itself.
derived_class | the derived class definition |
bool risc::tools::is_sc_event_or_list | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable access is of the type sc_event_or_list (or a reference to a sc_event_and_list)
var_ref | the variable access to check |
bool risc::tools::is_sc_fifo_in | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable is of the type sc_fifo_in.
var_ref | the variable to check |
bool risc::tools::is_sc_fifo_out | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable is of the type sc_fifo_out.
var_ref | the variable to check |
bool risc::tools::is_sc_in_bool | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_in<bool>
definition | the class definition |
bool risc::tools::is_sc_in_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_in_clk.
definition | the class definition |
bool risc::tools::is_sc_in_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_in_port.
template_class | the class definition |
bool risc::tools::is_sc_inout_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_inout_clk.
definition | the class definition |
bool risc::tools::is_sc_inout_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_inout_port.
template_class | the class definition |
bool risc::tools::is_sc_out_clk | ( | SgClassDefinition * | definition | ) |
This function checks if the given defintion is qual to the definition of a sc_out_clk.
definition | the class definition |
bool risc::tools::is_sc_out_port | ( | SgTemplateInstantiationDefn * | template_class | ) |
This function checks if the template class bases on the class template sc_out_port.
template_class | the class definition |
bool risc::tools::is_sc_port | ( | SgClassDefinition * | derived_class | ) |
This function checks if the class is derived from sc_port_base and not from tlm_base_initiator_socket_b.
derived_class | the derived class definition |
risc::tools::is_sc_signal | ( | SgVariableSymbol * | symbol | ) |
Returns true if the variable is of type sc_signal.
bool risc::tools::is_sc_time | ( | SgVarRefExp * | var_ref | ) |
This function checks if the variable access is of the type sc_time (or a reference to a sc_time)
var_ref | the variable access to check |
risc::tools::is_socket_variable | ( | risc::sg::SymbolWithPath | swp | ) |
Returns true when the symbolwithpath has a pcp_.port_ attribute.
risc::tools::is_stack_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a variable which will be stored on the stack.
risc::tools::is_static_variable | ( | SgVariableSymbol * | var_symbol | ) |
This function return true if the given variable symbol is a static variable.
|
inline |
Check if the type is a sc_port.
|
inline |
Check if the type is a sc_event.
|
inline |
Check if the type is a sc_event_and_list.
|
inline |
Check if the type is a sc_event_or_list.
|
inline |
Check if the type is a sc_fifo.
|
inline |
Check if the type is a sc_fifo_in.
|
inline |
Check if the type is a sc_fifo_out.
|
inline |
Check if the type is a sc_in.
|
inline |
Check if the type is a sc_in_clk.
|
inline |
Check if the type is a sc_inout.
|
inline |
Check if the type is a sc_inout_clk.
|
inline |
Check if the type is a sc_interface.
|
inline |
|
inline |
Check if the type is a sc_out.
|
inline |
Check if the type is a sc_out_clk.
|
inline |
Check if the type is a sc_port.
|
inline |
Check if the type is a sc_port_base.
|
inline |
Check if the type is a sc_prim_channel.
|
inline |
Check if the type is a sc_process_b.
|
inline |
Check if the type is a sc_segid.
|
inline |
Check if the type is a sc_simcontext.
|
inline |
Check if the type is a sc_time.
risc::tools::ParseCommandlineOptions | ( | int & | argc, |
char **& | argv, | ||
ParseStatus * | status | ||
) |
Parse command-line options that are related to RISC library.
std::vector< std::string > risc::tools::preparsing_commandline_arguments | ( | int & | argc, |
char **& | argv, | ||
std::vector< std::string > & | input_files | ||
) |
This function takes the parameter of the command line and creates a source file which includes all the source files. Afterwards all source files are replaced with new file in the command parameters. Example.
Input: ./myprogram file_a.cpp file_b.cpp file_c.cpp Output: ./myprogram __main__.cpp New file __main__.cpp \#include "file_a.cpp" \#include "file_b.cpp" \#include "file_c.cpp"
void risc::tools::print_indented | ( | std::string | s, |
unsigned | indent | ||
) |
Prints a string with indention.
s | Sting to print |
indent | Indention level |
risc::tools::RemoveCommandlineOption | ( | risc::Design & | design, |
std::string | option | ||
) |
Remove a command-line option from the command-line argument list in SgProject.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
std::unordered_map< SgClassDefinition *, std::unordered_map< SgClassDefinition *, bool > > risc::tools::lookup |
lookup for derived classes (base class, derived class, is derived)
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |