All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
risc::sg::DataConflictTable Class Reference

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>

Inheritance diagram for risc::sg::DataConflictTable:
Inheritance graph
Collaboration diagram for risc::sg::DataConflictTable:
Collaboration graph

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

VertexDescriptorvertex_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...
 
PathInstanceMapperpath_instance_mapper_
 
SegmentGraphsegment_graph_
 
ConflictInformation ** conflict_info_
 
bool debugging_
 

Detailed Description

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.

Constructor & Destructor Documentation

risc::sg::DataConflictTable::DataConflictTable ( SegmentGraph graph,
PathInstanceMapper path_instance_mapper,
bool  debugging 
)

Default constructor for the DataConflictTable.

Member Function Documentation

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.

risc::sg::DataConflictTable::determine_conflict_table ( )
virtual

This function determines conflicts among the segments.

Reimplemented from risc::sg::ConflictTable.

risc::sg::ConflictTable::get_channel_id ( const SymbolWithPath swp,
int  instance,
bool  dynamic_analysis 
)
inherited

Determines the channel instance id for a given variable declared in a channel.

Parameters
swpSymbol with the associated port call path
instanceinstance id of the hosting module
dynamic_analysisif the analysis is dynamic_analysis
risc::sg::ConflictTable::get_channel_id_dynamically ( const SymbolWithPath swp,
int  instance 
)
inherited

Determines the channel instance id for a given variable declared in a channel.

Parameters
swpSymbol with the associated port call path
instanceinstance id of the hosting module
risc::sg::ConflictTable::get_channel_id_statically ( const SymbolWithPath swp,
int  instance 
)
inherited

Determines the channel instance id for a given variable declared in a channel.

Parameters
swpSymbol with the associated port call path
instanceinstance id of the hosting module
risc::sg::ConflictTable::get_mapped_variable ( SgVariableSymbol *  variable,
int  instance_id,
bool  dynamic_analysis 
)
inherited

Determines the mapped variable.

risc::sg::ConflictTable::get_mapped_variable_dynamically ( SgVariableSymbol *  variable,
int  instance_id 
)
inherited

This function determines the mapped address of a reference during the pre simulation.

risc::sg::ConflictTable::get_mapped_variable_statically ( SgVariableSymbol *  variable,
int  instance_id 
)
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.

risc::sg::ConflictTable::get_max_instances ( int  segment_id)
inherited

This functions returns how many instances of a given segment exist.

risc::sg::ConflictTable::has_conflict ( int  segment_id_1,
int  instance_id_1,
int  segment_id_2,
int  instance_id_2 
)
inherited

This function looks up if there is a conflict between segment 1 with instance id 1 and segment 2 with instance id 2.

risc::sg::ConflictTable::index_to_segment_and_instance_id ( int  index)
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.

risc::sg::ConflictTable::print_conflict_table ( std::string  filename)
inherited

Generates a html file of the conflict table.

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.

risc::sg::ConflictTable::print_lookup_table ( std::string  filename)
inherited

Generates a html file of the lookup table.

risc::sg::ConflictTable::segment_and_instance_id_to_index ( int  segment_id,
int  instance_id 
)
inherited

This function translates a given segment id and instance id to a index of the conflict table.

risc::sg::ConflictTable::segment_id_to_vertex_descriptor ( int  id)
inherited

This function translates the given segment id to the corresponding vertex descriptor.

risc::sg::ConflictTable::set_conflict ( int  segment_id_1,
int  instance_id_1,
int  segment_id_2,
int  instance_id_2 
)
inherited

This function sets a conflict in the conflict table.

Member Data Documentation

ConflictInformation** risc::sg::ConflictTable::conflict_info_
inherited
bool** risc::sg::ConflictTable::conflict_table_
inherited

The conflict table.

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.

PathInstanceMapper* risc::sg::ConflictTable::path_instance_mapper_
inherited
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].


The documentation for this class was generated from the following files: