Classes | |
class | InstrumentationTraversal |
The AST traversal class. More... | |
Functions | |
void | print_event_list (SgFunctionDefinition *func_def, SgVariableDeclaration *systemc_event_list, SgVariableDeclaration *PLACEHOLDER, bool is_and_event_list) |
This function adds the printing of event list and the individual elements to the function func_def. More... | |
void | print_variable (SgFunctionDefinition *func_def, SgVariableDeclaration *var_decl, std::string printf_format_string, std::string printf_pre_format_string) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use. More... | |
void | print_port (SgFunctionDefinition *func_def, SgVariableDeclaration *var_decl) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use. More... | |
void | print_init_socket (SgFunctionDefinition *func_def, SgVariableDeclaration *var_decl) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use. More... | |
void | print_target_socket (SgFunctionDefinition *func_def, SgVariableDeclaration *var_decl) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use. More... | |
void | print_channel (SgFunctionDefinition *func_def, risc::Instance *channel) |
This function adds the printing of the channel channel to the function func_def This function is only for internal use. More... | |
SgFunctionDefinition * | add_function_to_class (SgScopeStatement *class_def, std::string func_name) |
This function adds a new function with the name func_name to the class class_def. The return type will be void and the only parameter is FILE *file This function is only for internal use. More... | |
void | instrument_reference_printing (std::string filename) |
The function should be called for the instrumentation of the variable address printing of the design. More... | |
std::pair< SgForStatement *, SgVariableDeclaration * > | insert_loop_iteration_over_vector_elements (SgVariableDeclaration *event_list, SgBasicBlock *body) |
This function appends a for loop to the given basic block. The loop body will be empty. The function returns the for loop statement and the variable declaration of the iterator variable. More... | |
void | fix_static_cast_issue () |
This function fixes the missing static cast operator in the rose backend. More... | |
int | risc_link (SgProject *project, risc::tools::ParseStatus *parseStatus, const std::string tool_name) |
Tailored SgProject::link for customized linker. The original ROSE codes are at ~src/frontend/SageIII/sage_support/sage_support.cpp. More... | |
void | risc_buildCompilerCommandLineOptions (SgFile *file, std::vector< std::string > &argv, std::vector< std::string > &compilerCmdLine, risc::tools::ParseStatus *parseStatus, const std::string tool_name) |
Tailored SgFile::buildCompilerCommandLineOptions for customized compiler. The original ROSE codes are at ~src/frontend/SageIII/sage_support/cmdline.cpp. More... | |
int | risc_compileOutputFile (SgFile *file, risc::tools::ParseStatus *parseStatus, const std::string tool_name) |
Tailored SgFile::compileOutput for customized compiler. The original ROSE codes are at ~src/ROSETTA/Grammer/Support.code and ~src/frontend/SageIII/sage_support/sage_support.cpp. More... | |
int | risc_compileOutput (SgProject *project, risc::tools::ParseStatus *parseStatus, const std::string tool_name) |
Tailored SgProject::compileOutput for customized compiler. The original ROSE codes are at ~src/frontend/SageIII/sage_support/sage_support.cpp. More... | |
void | risc_unparse (risc::Design &design, risc::tools::ParseStatus *parseStatus, const std::string tool_name, UnparseFormatHelp *unparseFormatHelp, UnparseDelegate *unparseDelegate) |
This function unparses AST trees to source code file(s) More... | |
int | risc_compile (risc::Design &design, risc::tools::ParseStatus *parseStatus, const std::string tool_name) |
This function compiles and links the unparsed source code file(s) using the customized compiler. More... | |
int | risc_backend (risc::Design &design, risc::tools::ParseStatus *parseStatus, const std::string tool_name, UnparseFormatHelp *unparseFormatHelp, UnparseDelegate *unparseDelegate) |
Tailored backend for SystemC source files. The original ROSE codes are at ~src/roseSupport/utility_functions.C. More... | |
void | instrumentor (risc::Design &design, risc::sg::SegmentGraph &sg, risc::sg::DataConflictTable *data_conflict_table, risc::sg::EventConflictTable *event_conflict_table, risc::sg::TimeAdvanceTable *time_advance_table, risc::sg::CombinedDataConflictTable *combined_data_conflict_table, risc::sg::PredictionTimeAdvanceTable *prediction_time_advance_table, risc::sg::PredictionEventNotificationTable *prediction_event_notification_table, risc::sg::PredictionEventNotificationTable *prediction_event_notification_table_no_indirect, risc::tools::ParseStatus *parseStatus, std::string design_file_name, std::vector< std::vector< int > > &psg_seg_id_array, std::vector< std::string > &file_names, std::vector< std::vector< int > > &channel_seg_id_array, std::vector< std::string > &channel_seg_id_array_names) |
This function instruments the AST tree of SystemC designs, and compiles unparsed source file(s) using customized vendor compiler. More... | |
void | dump_table_to_file (risc::Design &design, risc::sg::SegmentGraph &sg, risc::sg::DataConflictTable *data_conflict_table, risc::sg::EventConflictTable *event_conflict_table, risc::sg::TimeAdvanceTable *time_advance_table, risc::sg::CombinedDataConflictTable *combined_data_conflict_table, risc::sg::PredictionTimeAdvanceTable *prediction_time_advance_table, risc::sg::PredictionEventNotificationTable *prediction_event_notification_table, risc::sg::PredictionEventNotificationTable *prediction_event_notification_table_no_indirect, risc::tools::ParseStatus *parseStatus) |
This function dumps all the lookup tables to a file. More... | |
void | instrument_port_calls (risc::sg::SegmentGraph &sg) |
instruments the upcoming segments ids to thread local data More... | |
void | instrument_wait_in_channels (risc::sg::SegmentGraph &sg) |
changes the segment id passing from constants to variables in channels which are passed by thread local data More... | |
void | instrument_offset_before_and_after_b_transports (risc::sg::SegmentGraph &sg) |
sets the segment offset value before and after b_transport More... | |
void | instrument_wait_in_b_transports (risc::sg::SegmentGraph &sg) |
changes the segment id passing from constants to variables in b_transports which are passed by thread local data More... | |
std::string | generate_unique_name (std::string var_name) |
generates a unique variable based on var_name More... | |
void | instrument_functions_without_definitions (risc::sg::SegmentGraph &sg) |
for test purpose now More... | |
Variables | |
int | counter = 0 |
counter to get a unique variable name with number More... | |
risc::inst::add_function_to_class | ( | SgScopeStatement * | class_def, |
std::string | func_name | ||
) |
This function adds a new function with the name func_name to the class class_def. The return type will be void and the only parameter is FILE *file This function is only for internal use.
void risc::inst::dump_table_to_file | ( | risc::Design & | design, |
risc::sg::SegmentGraph & | sg, | ||
risc::sg::DataConflictTable * | data_conflict_table, | ||
risc::sg::EventConflictTable * | event_conflict_table, | ||
risc::sg::TimeAdvanceTable * | time_advance_table, | ||
risc::sg::CombinedDataConflictTable * | combined_data_conflict_table, | ||
risc::sg::PredictionTimeAdvanceTable * | prediction_time_advance_table, | ||
risc::sg::PredictionEventNotificationTable * | prediction_event_notification_table, | ||
risc::sg::PredictionEventNotificationTable * | prediction_event_notification_table_no_indirect, | ||
risc::tools::ParseStatus * | parseStatus | ||
) |
This function dumps all the lookup tables to a file.
risc::inst::fix_static_cast_issue | ( | ) |
This function fixes the missing static cast operator in the rose backend.
std::string risc::inst::generate_unique_name | ( | std::string | var_name | ) |
generates a unique variable based on var_name
risc::inst::insert_loop_iteration_over_vector_elements | ( | SgVariableDeclaration * | event_list, |
SgBasicBlock * | body | ||
) |
This function appends a for loop to the given basic block. The loop body will be empty. The function returns the for loop statement and the variable declaration of the iterator variable.
risc::inst::instrument_functions_without_definitions | ( | risc::sg::SegmentGraph & | sg | ) |
for test purpose now
void risc::inst::instrument_offset_before_and_after_b_transports | ( | risc::sg::SegmentGraph & | sg | ) |
sets the segment offset value before and after b_transport
void risc::inst::instrument_port_calls | ( | risc::sg::SegmentGraph & | sg | ) |
instruments the upcoming segments ids to thread local data
risc::inst::instrument_reference_printing | ( | std::string | filename | ) |
The function should be called for the instrumentation of the variable address printing of the design.
The filename will be used for the dir file.
void risc::inst::instrument_wait_in_b_transports | ( | risc::sg::SegmentGraph & | sg | ) |
changes the segment id passing from constants to variables in b_transports which are passed by thread local data
void risc::inst::instrument_wait_in_channels | ( | risc::sg::SegmentGraph & | sg | ) |
changes the segment id passing from constants to variables in channels which are passed by thread local data
void risc::inst::instrumentor | ( | risc::Design & | design, |
risc::sg::SegmentGraph & | sg, | ||
risc::sg::DataConflictTable * | data_conflict_table, | ||
risc::sg::EventConflictTable * | event_conflict_table, | ||
risc::sg::TimeAdvanceTable * | time_advance_table, | ||
risc::sg::CombinedDataConflictTable * | combined_data_conflict_table, | ||
risc::sg::PredictionTimeAdvanceTable * | prediction_time_advance_table, | ||
risc::sg::PredictionEventNotificationTable * | prediction_event_notification_table, | ||
risc::sg::PredictionEventNotificationTable * | prediction_event_notification_table_no_indirect, | ||
risc::tools::ParseStatus * | parseStatus, | ||
std::string | design_file_name, | ||
std::vector< std::vector< int > > & | psg_seg_id_array, | ||
std::vector< std::string > & | file_names, | ||
std::vector< std::vector< int > > & | channel_seg_id_array, | ||
std::vector< std::string > & | channel_seg_id_array_names | ||
) |
This function instruments the AST tree of SystemC designs, and compiles unparsed source file(s) using customized vendor compiler.
risc::inst::print_channel | ( | SgFunctionDefinition * | func_def, |
risc::Instance * | channel | ||
) |
This function adds the printing of the channel channel to the function func_def This function is only for internal use.
risc::inst::print_event_list | ( | SgFunctionDefinition * | func_def, |
SgVariableDeclaration * | systemc_event_list, | ||
SgVariableDeclaration * | PLACEHOLDER, | ||
bool | is_and_event_list | ||
) |
This function adds the printing of event list and the individual elements to the function func_def.
func_def | The function definition |
systemc_event_list | |
PLACEHOLDER | |
is_and_event_list |
risc::inst::print_init_socket | ( | SgFunctionDefinition * | func_def, |
SgVariableDeclaration * | var_decl | ||
) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use.
risc::inst::print_port | ( | SgFunctionDefinition * | func_def, |
SgVariableDeclaration * | var_decl | ||
) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use.
risc::inst::print_target_socket | ( | SgFunctionDefinition * | func_def, |
SgVariableDeclaration * | var_decl | ||
) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use.
risc::inst::print_variable | ( | SgFunctionDefinition * | func_def, |
SgVariableDeclaration * | var_decl, | ||
std::string | printf_format_string, | ||
std::string | printf_pre_format_string = "" |
||
) |
This function adds the printing of the variable var_decl to the function func_def This function is only for internal use.
int risc::inst::risc_backend | ( | risc::Design & | design, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name, | ||
UnparseFormatHelp * | unparseFormatHelp, | ||
UnparseDelegate * | unparseDelegate | ||
) |
Tailored backend for SystemC source files. The original ROSE codes are at ~src/roseSupport/utility_functions.C.
void risc::inst::risc_buildCompilerCommandLineOptions | ( | SgFile * | file, |
std::vector< std::string > & | argv, | ||
std::vector< std::string > & | compilerCmdLine, | ||
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name | ||
) |
Tailored SgFile::buildCompilerCommandLineOptions for customized compiler. The original ROSE codes are at ~src/frontend/SageIII/sage_support/cmdline.cpp.
int risc::inst::risc_compile | ( | risc::Design & | design, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name | ||
) |
This function compiles and links the unparsed source code file(s) using the customized compiler.
int risc::inst::risc_compileOutput | ( | SgProject * | project, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name | ||
) |
Tailored SgProject::compileOutput for customized compiler. The original ROSE codes are at ~src/frontend/SageIII/sage_support/sage_support.cpp.
int risc::inst::risc_compileOutputFile | ( | SgFile * | file, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name | ||
) |
Tailored SgFile::compileOutput for customized compiler. The original ROSE codes are at ~src/ROSETTA/Grammer/Support.code and ~src/frontend/SageIII/sage_support/sage_support.cpp.
int risc::inst::risc_link | ( | SgProject * | project, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name | ||
) |
Tailored SgProject::link for customized linker. The original ROSE codes are at ~src/frontend/SageIII/sage_support/sage_support.cpp.
void risc::inst::risc_unparse | ( | risc::Design & | design, |
risc::tools::ParseStatus * | parseStatus, | ||
const std::string | tool_name, | ||
UnparseFormatHelp * | unparseFormatHelp, | ||
UnparseDelegate * | unparseDelegate | ||
) |
This function unparses AST trees to source code file(s)
int risc::inst::counter = 0 |
counter to get a unique variable name with number