risc::tools Namespace Reference

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)
bool is_derived_from_internal (SgClassDefinition *derived_class, SgClassDefinition *base_class)
bool is_derived_from_sc_interface (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_interface.
bool is_derived_from_sc_channel (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_channel.
bool is_derived_from_sc_prim_channel (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_prim_channel.
bool is_derived_from_sc_module (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_module.
bool is_derived_from_sc_port (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_port.
bool is_derived_from_sc_port_base (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_port_base.
bool is_derived_from_sc_port_base (SgVarRefExp *var_ref)
 This function checks if the class is derived from sc_port_base.
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.
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.
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.
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).
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).
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).
bool is_sc_in_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_in_port.
bool is_sc_out_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_out_port.
bool is_sc_inout_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_inout_port.
bool is_sc_in_clk (SgClassDefinition *definition)
 This function checks if the given defintion is qual to the definition of a sc_in_clk.
bool is_sc_out_clk (SgClassDefinition *definition)
 This function checks if the given defintion is qual to the definition of a sc_out_clk.
bool is_sc_inout_clk (SgClassDefinition *definition)
 This function checks if the given defintion is qual to the definition of a sc_inout_clk.
bool is_sc_in_bool (SgClassDefinition *definition)
 This function checks if the given defintion is qual to the definition of a sc_in<bool>.
bool is_sc_fifo_in (SgVarRefExp *var_ref)
 This function checks if the variable is of the type sc_fifo_in.
bool is_sc_fifo_out (SgVarRefExp *var_ref)
 This function checks if the variable is of the type sc_fifo_out.
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.
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.
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.
void ParseCommandlineOptions (int &argc, char **&argv, ParseStatus *status)
void AddCommandlineOption (int &argc, char **&argv, std::string option)
void AddCommandlineOption (risc::Design &design, std::string option)
void RemoveCommandlineOption (risc::Design &design, std::string option)
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)
SgFunctionDeclaration * get_function_declaration_of_channel_call_dynamically (SgFunctionCallExp *func_call)
bool function_call_belongs_to_a_port (SgFunctionCallExp *func_call_exp)
bool function_call_is_in_user_domain (SgFunctionCallExp *func_call_exp)
std::vector
< SgFunctionDeclaration * > 
get_all_other_function_declarations (SgFunctionDeclaration *func_decl)
std::list< SgClassDefinition * > get_channel_interfaces (SgClassDefinition *channel_def)
std::list< SgClassDefinition * > get_all_used_interfaces (bool only_in_user_domain=true)
std::list< SgFunctionCallExp * > get_all_port_calls_to_annotated_functions (risc::sg::SegmentGraph &graph)
std::list
< SgFunctionDeclaration * > 
get_interface_functions (SgClassDefinition *channel_def, bool only_annotated=false)
std::list
< SgFunctionDeclaration * > 
get_all_implemented_interface_functions (bool only_in_user_domain=true, bool only_annotated=false)
bool is_annotated_function (SgFunctionDeclaration *func_decl)
bool has_reference_parameter (SgFunctionDeclaration *func_decl)
SgFunctionDeclaration * get_first_non_defining_function_declaration (SgFunctionCallExp *func_call_exp)
bool is_overloaded_operator (SgFunctionDeclaration *func_decl)
SgVariableDefinition * get_port_variable (SgFunctionCallExp *func_call_exp)
bool is_data_structure (SgType *type)
 This function checks if the passed type represents a data structure.
bool is_builtin_type (SgType *type)
 This function checks if the passed type represents a C++ builtin type.
bool class_types_are_identical (SgClassDefinition *cd1, SgClassDefinition *cd2)
 Compares two classes.
bool is_func_name (const SgFunctionDeclaration *function, const std::string &name)
 Compares the function name with the given string.
void print_indented (std::string s, unsigned indent)
 Prints a string with indention.
SgClassDefinition * class_definition_of_variable (SgVariableDeclaration *var_decl)
 Determines the class defintion of varialbe It is expected that the type is SgClassType.
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.
bool all_cfg_branches_end_in_break (SgNode *node, int &break_counter)
bool all_cfg_branches_end_in_continue (SgNode *node, int &continue_counter)
SgStatement * get_previous_stmt_in_basic_block (SgNode *node)
bool is_conditional_break (SgScopeStatement const *const loop_stmt, SgBreakStmt const *const break_stmt)
SgScopeStatement * find_break_surrounding_scope (SgBreakStmt *break_stmt)
bool break_belongs_to_loop (SgScopeStatement *loop_stmt, SgBreakStmt const *const break_stmt)
bool is_located_in_rose_header (SgNode *node)
SgMemberFunctionDeclaration * get_constructor (SgClassDefinition *class_def)
void find_and_replace_all (std::string &input, const std::string &from, const std::string &to)
std::string get_mangled_name (SgClassDefinition *class_def)
SgVariableSymbol * find_global_variable (std::string name, SgProject *project)
bool is_known_function (SgFunctionDeclaration *statement)
bool is_in_std_namespace (SgDeclarationStatement *statement)
bool is_in_systemc_namespace (SgDeclarationStatement *statement)
bool is_in_gnu_cxx_namespace (SgDeclarationStatement *statement)
SgVariableSymbol * get_most_outer_var (SgExpression *expr)
bool has_no_variable_expressions (SgExpression *expr)
SgClassDefinition * find_class_definition (std::string class_name, std::string qualified_namespace)
 This function searchs for a class by name (string) in namespace (string).
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).
bool is_type_sc_module (SgType *type)
bool is_type_sc_port (SgType *type)
bool is_type_sc_port_base (SgType *type)
bool is_type_sc_in (SgType *type)
bool is_type_sc_out (SgType *type)
bool is_type_sc_inout (SgType *type)
bool is_type_sc_event (SgType *type)
bool is_type_sc_event_and_list (SgType *type)
bool is_type_sc_event_or_list (SgType *type)
bool is_type_sc_prim_channel (SgType *type)
bool is_type_sc_interface (SgType *type)
bool is_type_sc_fifo (SgType *type)
bool is_type_sc_fifo_in (SgType *type)
bool is_type_sc_fifo_out (SgType *type)
bool is_type_sc_simcontext (SgType *type)
bool is_type_sc_segid (SgType *type)
bool is_type_sc_process_b (SgType *type)
bool is_type_sc_channel (SgType *type)
bool is_type_sc_in_clk (SgType *type)
bool is_type_sc_out_clk (SgType *type)
bool is_type_sc_inout_clk (SgType *type)
bool is_reference_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a reference.
bool is_pointer_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a pointer.
bool is_global_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a global variable.
bool is_local_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a local variable.
bool is_member_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a member variable.
bool is_static_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a static variable.
bool is_namespace_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a namespace variable.
bool is_function_parameter_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a function variable.
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'.
bool is_loop_variable (SgVariableSymbol *var_symbol)
 This function return true if the given variable symbol is a loop variable.
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.
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.
void analyze_conflict_free (SgVariableSymbol *symbol)
 This function checks if a variable is annoated with a pragma as conflict free.
bool is_channel_variable (SgVariableSymbol *symbol)
 Returns true when the variable is declared in a channel.
bool is_sc_signal (SgVariableSymbol *symbol)
 Returns true if the variable is of type sc_signal.

Variables

std::unordered_map
< SgClassDefinition
*, std::unordered_map
< SgClassDefinition *, bool > > 
lookup
 lookup for derived classes (base class, derived class, is derived)
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_process_b_
static SgClassDefinition * sc_channel_
static SgClassDefinition * sc_in_clk_
static SgClassDefinition * sc_out_clk_
static SgClassDefinition * sc_inout_clk_
static SgFunctionDefinition * sc_main_
static SgFunctionDeclaration * sc_get_curr_simcontext_
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_interface_
static std::vector
< SgNamespaceDefinitionStatement * > 
sc_core_
static std::vector
< SgNamespaceDefinitionStatement * > 
sc_dt_
static std::set
< SgFunctionDefinition * > 
sc_wait_funcs_
static bool is_initialized_

Function Documentation

void risc::tools::AddCommandlineOption ( risc::Design design,
std::string  option 
)
void risc::tools::AddCommandlineOption ( int &  argc,
char **&  argv,
std::string  option 
)
bool risc::tools::all_cfg_branches_end_in_break ( SgNode *  node,
int &  break_counter 
)
bool risc::tools::all_cfg_branches_end_in_continue ( SgNode *  node,
int &  continue_counter 
)
void risc::tools::analyze_conflict_free ( SgVariableSymbol *  symbol  ) 

This function checks if a variable is annoated with a pragma as conflict free.

analyze_conflict_free

bool risc::tools::break_belongs_to_loop ( SgScopeStatement *  loop_stmt,
SgBreakStmt const *const   break_stmt 
)
SgClassDefinition * risc::tools::class_definition_of_variable ( SgVariableDeclaration *  var_decl  ) 

Determines the class defintion of varialbe It is expected that the type is SgClassType.

Parameters:
var_decl The given variable declaration
Returns:
Associated SgClassDefintion of the var_decl
bool risc::tools::class_types_are_identical ( SgClassDefinition *  cd1,
SgClassDefinition *  cd2 
)

Compares two classes.

Parameters:
cd1 Class definition 1
cd2 Class definition 2
Returns:
True, if the types are equal
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.

Returns:
The return string will be empty if the dyn flag is not set. Otherwise, the string contains the filename
void risc::tools::find_and_replace_all ( std::string &  input,
const std::string &  from,
const std::string &  to 
)
SgScopeStatement * risc::tools::find_break_surrounding_scope ( SgBreakStmt *  break_stmt  ) 
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).

Parameters:
class_name Name of the class
qualified_namespace The absolute qualified namespace
Returns:
Pointer to the class definition. The pointer is zero, if the class does not exist in the given namespace
SgVariableSymbol * risc::tools::find_global_variable ( std::string  name,
SgProject *  project 
)
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).

Parameters:
class_name Name of the class
qualified_namespace The absolute qualified namespace
Returns:
Pointer to the class definition. The pointer is zero, if the class does not exist in the given namespace
bool risc::tools::function_call_belongs_to_a_port ( SgFunctionCallExp *  func_call_exp  ) 
bool risc::tools::function_call_is_in_user_domain ( SgFunctionCallExp *  func_call_exp  ) 
std::list< SgFunctionDeclaration * > risc::tools::get_all_implemented_interface_functions ( bool  only_in_user_domain = true,
bool  only_annotated = false 
)
std::vector< SgFunctionDeclaration * > risc::tools::get_all_other_function_declarations ( SgFunctionDeclaration *  func_decl  ) 
std::list< SgFunctionCallExp * > risc::tools::get_all_port_calls_to_annotated_functions ( risc::sg::SegmentGraph graph  ) 
std::list< SgClassDefinition * > risc::tools::get_all_used_interfaces ( bool  only_in_user_domain = true  ) 
std::list< SgClassDefinition * > risc::tools::get_channel_interfaces ( SgClassDefinition *  channel_def  ) 
SgMemberFunctionDeclaration * risc::tools::get_constructor ( SgClassDefinition *  class_def  ) 
SgFunctionDeclaration * risc::tools::get_first_non_defining_function_declaration ( SgFunctionCallExp *  func_call_exp  ) 
SgFunctionDeclaration * risc::tools::get_function_declaration_of_channel_call_dynamically ( SgFunctionCallExp *  func_call  ) 
SgFunctionDeclaration * risc::tools::get_function_declaration_of_channel_call_statically ( SgFunctionCallExp *  func_call  ) 
std::list< SgFunctionDeclaration * > risc::tools::get_interface_functions ( SgClassDefinition *  channel_def,
bool  only_annotated = false 
)
Rose::StringUtility::FileNameLibrary risc::tools::get_library ( Sg_File_Info *  X  ) 
Rose::StringUtility::FileNameLibrary risc::tools::get_library ( int  file_id  ) 
std::string risc::tools::get_mangled_name ( SgClassDefinition *  class_def  ) 
SgVariableSymbol * risc::tools::get_most_outer_var ( SgExpression *  expr  ) 
SgVariableDefinition * risc::tools::get_port_variable ( SgFunctionCallExp *  func_call_exp  ) 
SgStatement * risc::tools::get_previous_stmt_in_basic_block ( SgNode *  node  ) 
bool risc::tools::has_no_variable_expressions ( SgExpression *  expr  ) 
bool risc::tools::has_reference_parameter ( SgFunctionDeclaration *  func_decl  ) 
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.

Returns:
The return string will be empty if the dyn flag is not set. Otherwise, the string contains the filename
bool risc::tools::is_annotated_function ( SgFunctionDeclaration *  func_decl  ) 
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.

Parameters:
func_decl Function declaration
Returns:
true, if builtin function
bool risc::tools::is_builtin_type ( SgType *  type  ) 

This function checks if the passed type represents a C++ builtin type.

Parameters:
type Type that will be checked
Returns:
True, if the type represents a C++ builtin type
bool risc::tools::is_channel_variable ( SgVariableSymbol *  symbol  ) 

Returns true when the variable is declared in a channel.

is_channel_variable

bool risc::tools::is_conditional_break ( SgScopeStatement const *const   loop_stmt,
SgBreakStmt const *const   break_stmt 
)
bool 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.

is_data_segment_variable

bool risc::tools::is_data_structure ( SgType *  type  ) 

This function checks if the passed type represents a data structure.

Parameters:
type Type that will be checked
Returns:
True, if the type represents a data structure
bool risc::tools::is_derived_from ( SgClassDefinition *  derived_class,
SgClassDefinition *  base_class 
)
bool risc::tools::is_derived_from_internal ( SgClassDefinition *  derived_class,
SgClassDefinition *  base_class 
)
bool risc::tools::is_derived_from_sc_channel ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_channel.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_module
Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_channel
bool risc::tools::is_derived_from_sc_interface ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_interface.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_interface
bool risc::tools::is_derived_from_sc_module ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_module.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_module
bool risc::tools::is_derived_from_sc_port ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_port.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_port
bool risc::tools::is_derived_from_sc_port_base ( SgVarRefExp *  var_ref  ) 

This function checks if the class is derived from sc_port_base.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_port_base
bool risc::tools::is_derived_from_sc_port_base ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_port_base.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_port_base
bool risc::tools::is_derived_from_sc_prim_channel ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_prim_channel.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_module
Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_prim_channel
bool risc::tools::is_func_name ( const SgFunctionDeclaration *  function,
const std::string &  name 
)

Compares the function name with the given string.

Parameters:
function The function declaration
name String which will be compared
Returns:
True, if the string and the function name are equal
bool risc::tools::is_function_parameter_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a function variable.

is_member_variable

bool risc::tools::is_global_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a global variable.

is_global_variable

bool risc::tools::is_in_gnu_cxx_namespace ( SgDeclarationStatement *  statement  ) 
bool risc::tools::is_in_std_namespace ( SgDeclarationStatement *  statement  ) 
bool risc::tools::is_in_systemc_namespace ( SgDeclarationStatement *  statement  ) 
bool risc::tools::is_known_function ( SgFunctionDeclaration *  statement  ) 
bool risc::tools::is_local_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a local variable.

is_local_variable

bool risc::tools::is_located_in_rose_header ( SgNode *  node  ) 
bool risc::tools::is_loop_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a loop variable.

is_loop_variable

bool 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'.

is_member_of

bool risc::tools::is_member_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a member variable.

is_member_variable

bool risc::tools::is_namespace_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a namespace variable.

is_namespace_variable

bool risc::tools::is_overloaded_operator ( SgFunctionDeclaration *  func_decl  ) 
bool risc::tools::is_pointer_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a pointer.

is_pointer_variable

bool risc::tools::is_reference_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a reference.

is_reference_variable

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).

Parameters:
var_ref the variable access to check
Returns:
True, if it is the type sc_event
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.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_event
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).

Parameters:
var_ref the variable access to check
Returns:
True, if it is the type sc_event_and_list
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.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_event
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).

Parameters:
var_ref the variable access to check
Returns:
True, if it is the type sc_event_or_list
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.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_event
bool risc::tools::is_sc_fifo_in ( SgVarRefExp *  var_ref  ) 

This function checks if the variable is of the type sc_fifo_in.

Parameters:
var_ref the variable to check
Returns:
True, if it is the type sc_fifo_in
bool risc::tools::is_sc_fifo_out ( SgVarRefExp *  var_ref  ) 

This function checks if the variable is of the type sc_fifo_out.

Parameters:
var_ref the variable to check
Returns:
True, if it is the type sc_fifo_out
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>.

Parameters:
class the class definition
Returns:
True, if equal
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.

Parameters:
class the class definition
Returns:
True, if equal
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.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_in_port
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.

Parameters:
class the class definition
Returns:
True, if equal
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.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_inout_port
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.

Parameters:
class the class definition
Returns:
True, if equal
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.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_out_port
bool risc::tools::is_sc_signal ( SgVariableSymbol *  symbol  ) 

Returns true if the variable is of type sc_signal.

is_sc_signal

bool 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.

is_stack_variable

bool risc::tools::is_static_variable ( SgVariableSymbol *  var_symbol  ) 

This function return true if the given variable symbol is a static variable.

is_static_variable

bool risc::tools::is_type_sc_channel ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_event ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_event_and_list ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_event_or_list ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_fifo ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_fifo_in ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_fifo_out ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_in ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_in_clk ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_inout ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_inout_clk ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_interface ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_module ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_out ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_out_clk ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_port ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_port_base ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_prim_channel ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_process_b ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_segid ( SgType *  type  )  [inline]
bool risc::tools::is_type_sc_simcontext ( SgType *  type  )  [inline]
void risc::tools::ParseCommandlineOptions ( int &  argc,
char **&  argv,
ParseStatus *  status 
)
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"

Returns:
vector of strings with the new parameters
void risc::tools::print_indented ( std::string  s,
unsigned  indent 
)

Prints a string with indention.

Parameters:
s Sting to print
indent Indention level
void risc::tools::RemoveCommandlineOption ( risc::Design design,
std::string  option 
)

Variable Documentation

SgMemberFunctionDeclaration* risc::tools::get_interface_ [static]
SgMemberFunctionDeclaration* risc::tools::get_upcoming_segment_ids_ [static]
std::unordered_map< SgClassDefinition *, std::unordered_map< SgClassDefinition *, bool > > risc::tools::lookup

lookup for derived classes (base class, derived class, is derived)

SgClassDefinition* risc::tools::sc_channel_ [static]
std::vector<SgNamespaceDefinitionStatement*> risc::tools::sc_core_ [static]
std::vector<SgNamespaceDefinitionStatement*> risc::tools::sc_dt_ [static]
SgClassDefinition* risc::tools::sc_event_ [static]
SgClassDefinition* risc::tools::sc_event_and_list_ [static]
SgClassDefinition* risc::tools::sc_event_or_list_ [static]
SgClassDefinition* risc::tools::sc_fifo_ [static]
SgClassDefinition* risc::tools::sc_fifo_in_ [static]
SgClassDefinition* risc::tools::sc_fifo_out_ [static]
SgMemberFunctionDeclaration* risc::tools::sc_get_curr_proc_ [static]
SgFunctionDeclaration* risc::tools::sc_get_curr_simcontext_ [static]
SgClassDefinition* risc::tools::sc_in_ [static]
SgClassDefinition* risc::tools::sc_in_clk_ [static]
SgClassDefinition* risc::tools::sc_inout_ [static]
SgClassDefinition* risc::tools::sc_inout_clk_ [static]
SgClassDefinition* risc::tools::sc_interface_ [static]
SgFunctionDefinition* risc::tools::sc_main_ [static]
SgClassDefinition* risc::tools::sc_module_ [static]
SgClassDefinition* risc::tools::sc_out_ [static]
SgClassDefinition* risc::tools::sc_out_clk_ [static]
SgClassDefinition* risc::tools::sc_port_ [static]
SgClassDefinition* risc::tools::sc_port_base_ [static]
SgClassDefinition* risc::tools::sc_prim_channel_ [static]
SgClassDefinition* risc::tools::sc_process_b_ [static]
SgClassDefinition* risc::tools::sc_segid_ [static]
SgMemberFunctionDeclaration* risc::tools::sc_segid_ctor_ [static]
SgClassDefinition* risc::tools::sc_simcontext_ [static]
std::set<SgFunctionDefinition*> risc::tools::sc_wait_funcs_ [static]
SgMemberFunctionDeclaration* risc::tools::set_upcoming_segment_ids_ [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 30 Sep 2018 by  doxygen 1.6.1