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.  More... | |
| virtual void | determine_conflict_table () | 
| This function determines conflicts among the segments.  More... | |
| void | color_members_of_class (const MappedVariable &variable, DataConflictAstAttributes::Status color) | 
| This function checks if the type of the given variable symbol is is a class or struct. If so, all the member variables which are not static will be set to the given color.  More... | |
| bool | check_members_of_class (const MappedVariable &mapped_variable, DataConflictAstAttributes::Status color, std::set< Conflict > &conflicts) | 
| This function checks if the type of the given variable symbol is is a class or struct. If so, it will check if at least on member variable which is not static has the given color.  More... | |
| 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) | 
| This function checks if there is a read write conflict between two segments. The boolean flag defines if we perform a static or dynamic analysis.  More... | |
| bool | is_conflict_free_variable (SgVariableSymbol *symbol) | 
| This function returns true if the variable declaration of of the symbol 'symbol' has a pragma statement with "RISC variable is conflict free" before.  More... | |
| void | color_symbol (const MappedVariable &variable, DataConflictAstAttributes::Status color) | 
| Colors the symbol with color and instance id. Also considers member variables.  More... | |
| void | print_conflict_table (std::string filename) | 
| Generates a html file of the conflict table.  More... | |
| void | print_lookup_table (std::string filename) | 
| Generates a html file of the lookup table.  More... | |
| int | segment_and_instance_id_to_index (int segment_id, int instance_id) | 
| This function translates a given segment id and instance id to a index of the conflict table.  More... | |
| std::pair< int, int > | index_to_segment_and_instance_id (int index) | 
| This function translates a given index from the conflict table into the corresponding segment id and instance id. The first value is the segment id and the second value is the instance id.  More... | |
| bool | has_conflict (int segment_id_1, int instance_id_1, int segment_id_2, int instance_id_2) | 
| This function looks up if there is a conflict between segment 1 with instance id 1 and segment 2 with instance id 2.  More... | |
| void | print_instance_id_to_index_lookup_table () | 
| This function prints the table instance_id_to_index_lookup_table in the terminal.  More... | |
| void | set_conflict (int segment_id_1, int instance_id_1, int segment_id_2, int instance_id_2) | 
| This function sets a conflict in the conflict table.  More... | |
| VertexDescriptor | segment_id_to_vertex_descriptor (int id) | 
| This function translates the given segment id to the corresponding vertex descriptor.  More... | |
| MappedVariableList | get_mapped_variable (SgVariableSymbol *variable, int instance_id, bool dynamic_analysis) | 
| Determines the mapped variable.  More... | |
| MappedVariableList | get_mapped_variable_statically (SgVariableSymbol *variable, int instance_id) | 
| This function determines for a given variable the mapped variable. If variable is a reference, the mapped variable will be looked up. Otherwise, the original symbol and instance id is returned.  More... | |
| MappedVariableList | get_mapped_variable_dynamically (SgVariableSymbol *variable, int instance_id) | 
| This function determines the mapped address of a reference during the pre simulation.  More... | |
| int | get_max_instances (int segment_id) | 
| This functions returns how many instances of a given segment exist.  More... | |
| int | get_channel_id (const SymbolWithPath &swp, int instance, bool dynamic_analysis) | 
| Determines the channel instance id for a given variable declared in a channel.  More... | |
| int | get_channel_id_statically (const SymbolWithPath &swp, int instance) | 
| Determines the channel instance id for a given variable declared in a channel.  More... | |
| int | get_channel_id_dynamically (const SymbolWithPath &swp, int instance) | 
| Determines the channel instance id for a given variable declared in a channel.  More... | |
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].  More... | |
| int | size_of_conflict_table_ | 
| This variable defines the size of the conflict table. The size is quadratic.  More... | |
| int | max_instances_with_thread_ | 
| Maximum number of module/channel instances Only instances with at least one simulation thread are considered.  More... | |
| 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.  More... | |
| 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.  More... | |
| int ** | instance_id_to_index_lookup_ | 
| This table should be used a lookup table: (segment id, instance id) -> index of conflict table.  More... | |
| bool ** | conflict_table_ | 
| The conflict table.  More... | |
| 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.
| risc::sg::DataConflictTable::check_members_of_class | ( | const MappedVariable & | mapped_variable, | 
| DataConflictAstAttributes::Status | color, | ||
| std::set< Conflict > & | conflicts | ||
| ) | 
This function checks if the type of the given variable symbol is is a class or struct. If so, it will check if at least on member variable which is not static has the given color.
| risc::sg::DataConflictTable::color_members_of_class | ( | const MappedVariable & | variable, | 
| DataConflictAstAttributes::Status | color | ||
| ) | 
This function checks if the type of the given variable symbol is is a class or struct. If so, all the member variables which are not static will be set to the given color.
| risc::sg::DataConflictTable::color_symbol | ( | const MappedVariable & | variable, | 
| DataConflictAstAttributes::Status | color | ||
| ) | 
Colors the symbol with color and instance id. Also considers member variables.
| 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 | ||
| ) | 
This function checks if there is a read write conflict between two segments. The boolean flag defines if we perform a static or dynamic analysis.
      
  | 
  virtual | 
This function determines conflicts among the segments.
Reimplemented from risc::sg::ConflictTable.
      
  | 
  inherited | 
Determines the channel instance id for a given variable declared in a channel.
| swp | Symbol with the associated port call path | 
| instance | instance id of the hosting module | 
| dynamic_analysis | if the analysis is dynamic_analysis | 
      
  | 
  inherited | 
Determines the channel instance id for a given variable declared in a channel.
| swp | Symbol with the associated port call path | 
| instance | instance id of the hosting module | 
      
  | 
  inherited | 
Determines the channel instance id for a given variable declared in a channel.
| swp | Symbol with the associated port call path | 
| instance | instance id of the hosting module | 
      
  | 
  inherited | 
Determines the mapped variable.
      
  | 
  inherited | 
This function determines the mapped address of a reference during the pre simulation.
      
  | 
  inherited | 
This function determines for a given variable the mapped variable. If variable is a reference, the mapped variable will be looked up. Otherwise, the original symbol and instance id is returned.
      
  | 
  inherited | 
This functions returns how many instances of a given segment exist.
      
  | 
  inherited | 
This function looks up if there is a conflict between segment 1 with instance id 1 and segment 2 with instance id 2.
      
  | 
  inherited | 
This function translates a given index from the conflict table into the corresponding segment id and instance id. The first value is the segment id and the second value is the instance id.
| risc::sg::DataConflictTable::is_conflict_free_variable | ( | SgVariableSymbol * | symbol | ) | 
This function returns true if the variable declaration of of the symbol 'symbol' has a pragma statement with "RISC variable is conflict free" before.
      
  | 
  inherited | 
Generates a html file of the conflict table.
      
  | 
  inherited | 
This function prints the table instance_id_to_index_lookup_table in the terminal.
      
  | 
  inherited | 
Generates a html file of the lookup table.
      
  | 
  inherited | 
This function translates a given segment id and instance id to a index of the conflict table.
      
  | 
  inherited | 
This function translates the given segment id to the corresponding vertex descriptor.
      
  | 
  inherited | 
This function sets a conflict in the conflict table.
      
  | 
  inherited | 
      
  | 
  inherited | 
The conflict table.
      
  | 
  inherited | 
      
  | 
  inherited | 
This table should be used a lookup table: (segment id, instance id) -> index of conflict table.
      
  | 
  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.
      
  | 
  inherited | 
Maximum number of module/channel instances Only instances with at least one simulation thread are considered.
      
  | 
  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.
      
  | 
  inherited | 
      
  | 
  inherited | 
      
  | 
  inherited | 
This variable defines the size of the conflict table. The size is quadratic.
      
  | 
  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].
 1.8.5