This class represents the data conflict table among the individual segments. Two segments have a conflict if a least one variable is by the first segment and read by the second segment. A two dimensional array represents this array. More...
#include <data_conflict_table.h>
Public Member Functions | |
DataConflictTable (SegmentGraph &graph, PathInstanceMapper *path_instance_mapper, bool debugging) | |
Default constructor for the DataConflictTable. | |
virtual void | determine_conflict_table () |
This function determines conflicts among the segments. | |
void | color_members_of_class (const MappedVariable &variable, DataConflictAstAttributes::Status color) |
bool | check_members_of_class (const MappedVariable &mapped_variable, DataConflictAstAttributes::Status color, std::set< Conflict > &conflicts) |
bool | data_conflict_between (Segment &first_seg, Segment &second_seg, int row, int column, int inst_id_first, int inst_id_second, bool dynamic_analysis) |
bool | is_conflict_free_variable (SgVariableSymbol *symbol) |
void | color_symbol (const MappedVariable &variable, DataConflictAstAttributes::Status color) |
void | print_conflict_table (std::string filename) |
void | print_lookup_table (std::string filename) |
int | segment_and_instance_id_to_index (int segment_id, int instance_id) |
std::pair< int, int > | index_to_segment_and_instance_id (int index) |
bool | has_conflict (int segment_id_1, int instance_id_1, int segment_id_2, int instance_id_2) |
void | print_instance_id_to_index_lookup_table () |
This function prints the table instance_id_to_index_lookup_table in the terminal. | |
void | set_conflict (int segment_id_1, int instance_id_1, int segment_id_2, int instance_id_2) |
VertexDescriptor | segment_id_to_vertex_descriptor (int id) |
MappedVariableList | get_mapped_variable (SgVariableSymbol *variable, int instance_id, bool dynamic_analysis) |
MappedVariableList | get_mapped_variable_statically (SgVariableSymbol *variable, int instance_id) |
MappedVariableList | get_mapped_variable_dynamically (SgVariableSymbol *variable, int instance_id) |
int | get_max_instances (int segment_id) |
int | get_channel_id (const SymbolWithPath &swp, int instance, bool dynamic_analysis) |
int | get_channel_id_statically (const SymbolWithPath &swp, int instance) |
int | get_channel_id_dynamically (const SymbolWithPath &swp, int instance) |
void | print_conflicts_per_instance () |
prints the conflicts per instance | |
Public Attributes | |
VertexDescriptor * | vertex_lookup_ |
This lookup table translates segment ids into vertex descriptors. At position i is the segment with the id of instance_id_to_index_lookup_[0][i]. | |
int | size_of_conflict_table_ |
This variable defines the size of the conflict table. The size is quadratic. | |
int * | conflicts_per_instance_ |
Stores the conflicts per intance. | |
int | max_instances_with_thread_ |
Maximum number of module/channel instances Only instances with at least one simulation thread are considered. | |
int | max_instances_ |
This variable represents the max number of module instances in the design. Also, this is the number of rows in the instance_id_to_index_lookup_ table. | |
int | number_of_segments_ |
This variable defines how many segments exist in the segment graph. Also, this is the number of columns in the instance_id_to_index_lookup_ table. | |
int ** | instance_id_to_index_lookup_ |
This table should be used a lookup table: (segment id, instance id) -> index of conflict table. | |
bool ** | conflict_table_ |
The conflict table. | |
PathInstanceMapper * | path_instance_mapper_ |
SegmentGraph & | segment_graph_ |
ConflictInformation ** | conflict_info_ |
bool | debugging_ |
This class represents the data conflict table among the individual segments. Two segments have a conflict if a least one variable is by the first segment and read by the second segment. A two dimensional array represents this array.
risc::sg::DataConflictTable::DataConflictTable | ( | SegmentGraph & | graph, | |
PathInstanceMapper * | path_instance_mapper, | |||
bool | debugging | |||
) |
Default constructor for the DataConflictTable.
bool risc::sg::DataConflictTable::check_members_of_class | ( | const MappedVariable & | mapped_variable, | |
DataConflictAstAttributes::Status | color, | |||
std::set< Conflict > & | conflicts | |||
) |
void risc::sg::DataConflictTable::color_members_of_class | ( | const MappedVariable & | variable, | |
DataConflictAstAttributes::Status | color | |||
) |
void risc::sg::DataConflictTable::color_symbol | ( | const MappedVariable & | variable, | |
DataConflictAstAttributes::Status | color | |||
) |
bool risc::sg::DataConflictTable::data_conflict_between | ( | Segment & | first_seg, | |
Segment & | second_seg, | |||
int | row, | |||
int | column, | |||
int | inst_id_first, | |||
int | inst_id_second, | |||
bool | dynamic_analysis | |||
) |
risc::sg::DataConflictTable::determine_conflict_table | ( | ) | [virtual] |
This function determines conflicts among the segments.
Reimplemented from risc::sg::ConflictTable.
int risc::sg::ConflictTable::get_channel_id | ( | const SymbolWithPath & | swp, | |
int | instance, | |||
bool | dynamic_analysis | |||
) | [inherited] |
int risc::sg::ConflictTable::get_channel_id_dynamically | ( | const SymbolWithPath & | swp, | |
int | instance | |||
) | [inherited] |
int risc::sg::ConflictTable::get_channel_id_statically | ( | const SymbolWithPath & | swp, | |
int | instance | |||
) | [inherited] |
risc::sg::MappedVariableList risc::sg::ConflictTable::get_mapped_variable | ( | SgVariableSymbol * | variable, | |
int | instance_id, | |||
bool | dynamic_analysis | |||
) | [inherited] |
risc::sg::MappedVariableList risc::sg::ConflictTable::get_mapped_variable_dynamically | ( | SgVariableSymbol * | variable, | |
int | instance_id | |||
) | [inherited] |
risc::sg::MappedVariableList risc::sg::ConflictTable::get_mapped_variable_statically | ( | SgVariableSymbol * | variable, | |
int | instance_id | |||
) | [inherited] |
int risc::sg::ConflictTable::get_max_instances | ( | int | segment_id | ) | [inherited] |
bool risc::sg::ConflictTable::has_conflict | ( | int | segment_id_1, | |
int | instance_id_1, | |||
int | segment_id_2, | |||
int | instance_id_2 | |||
) | [inherited] |
std::pair< int, int > risc::sg::ConflictTable::index_to_segment_and_instance_id | ( | int | index | ) | [inherited] |
bool risc::sg::DataConflictTable::is_conflict_free_variable | ( | SgVariableSymbol * | symbol | ) |
void risc::sg::ConflictTable::print_conflict_table | ( | std::string | filename | ) | [inherited] |
risc::sg::ConflictTable::print_conflicts_per_instance | ( | ) | [inherited] |
prints the conflicts per instance
risc::sg::ConflictTable::print_instance_id_to_index_lookup_table | ( | ) | [inherited] |
This function prints the table instance_id_to_index_lookup_table in the terminal.
void risc::sg::ConflictTable::print_lookup_table | ( | std::string | filename | ) | [inherited] |
int risc::sg::ConflictTable::segment_and_instance_id_to_index | ( | int | segment_id, | |
int | instance_id | |||
) | [inherited] |
risc::sg::VertexDescriptor risc::sg::ConflictTable::segment_id_to_vertex_descriptor | ( | int | id | ) | [inherited] |
void risc::sg::ConflictTable::set_conflict | ( | int | segment_id_1, | |
int | instance_id_1, | |||
int | segment_id_2, | |||
int | instance_id_2 | |||
) | [inherited] |
ConflictInformation** risc::sg::ConflictTable::conflict_info_ [inherited] |
bool** risc::sg::ConflictTable::conflict_table_ [inherited] |
The conflict table.
int* risc::sg::ConflictTable::conflicts_per_instance_ [inherited] |
Stores the conflicts per intance.
bool risc::sg::ConflictTable::debugging_ [inherited] |
int** risc::sg::ConflictTable::instance_id_to_index_lookup_ [inherited] |
This table should be used a lookup table: (segment id, instance id) -> index of conflict table.
int risc::sg::ConflictTable::max_instances_ [inherited] |
This variable represents the max number of module instances in the design. Also, this is the number of rows in the instance_id_to_index_lookup_ table.
int risc::sg::ConflictTable::max_instances_with_thread_ [inherited] |
Maximum number of module/channel instances Only instances with at least one simulation thread are considered.
int risc::sg::ConflictTable::number_of_segments_ [inherited] |
This variable defines how many segments exist in the segment graph. Also, this is the number of columns in the instance_id_to_index_lookup_ table.
SegmentGraph& risc::sg::ConflictTable::segment_graph_ [inherited] |
int risc::sg::ConflictTable::size_of_conflict_table_ [inherited] |
This variable defines the size of the conflict table. The size is quadratic.
VertexDescriptor* risc::sg::ConflictTable::vertex_lookup_ [inherited] |
This lookup table translates segment ids into vertex descriptors. At position i is the segment with the id of instance_id_to_index_lookup_[0][i].