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

The conflicts are stored in the base class variable conflict_table_. The columns represent wait statements of the segments. The rows are representing the notifications of events. So, a true in conflict_table_[i][j] means that the associated segment/instance i notifies the event for which the associated segment/instance j is waiting. More...

#include <event_conflict_table.h>

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

Public Member Functions

 EventConflictTable (SegmentGraph &graph, PathInstanceMapper *path_instance_mapper, bool debugging)
 Default constructor for the DataConflictTable. More...
 
std::list
< risc::sg::MappedVariable
get_all_list_events_statically (SgSymbol *sc_event_list, int instance_id, PortCallPath pcp)
 This function determines all the registered events in the event list statically. More...
 
std::list
< risc::sg::MappedVariable
get_all_list_events_dynamically (SgVariableSymbol *sc_event_list, int instance_id)
 This function determines all the registered events in the event list dynamically. More...
 
virtual void determine_conflict_table ()
 This function determines conflicts among the segments. More...
 
std::list
< risc::sg::MappedVariable
determine_mapped_events (std::set< SymbolWithPath > &event_list, int instance_id, bool dynamic_analysis)
 This function determines the mapping of events (RD, 07/13/18) 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

std::unordered_map< int,
std::unordered_map< int, Time > > 
notify_delay_
 added to support immediate notification and notify with time More...
 
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

The conflicts are stored in the base class variable conflict_table_. The columns represent wait statements of the segments. The rows are representing the notifications of events. So, a true in conflict_table_[i][j] means that the associated segment/instance i notifies the event for which the associated segment/instance j is waiting.

TODO Handling for pointers

Constructor & Destructor Documentation

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

Default constructor for the DataConflictTable.

Member Function Documentation

risc::sg::EventConflictTable::determine_conflict_table ( )
virtual

This function determines conflicts among the segments.

Reimplemented from risc::sg::ConflictTable.

risc::sg::EventConflictTable::determine_mapped_events ( std::set< SymbolWithPath > &  event_list,
int  instance_id,
bool  dynamic_analysis 
)

This function determines the mapping of events (RD, 07/13/18)

risc::sg::EventConflictTable::get_all_list_events_dynamically ( SgVariableSymbol *  sc_event_list,
int  instance_id 
)

This function determines all the registered events in the event list dynamically.

risc::sg::EventConflictTable::get_all_list_events_statically ( SgSymbol *  sc_event_list,
int  instance_id,
PortCallPath  pcp 
)

This function determines all the registered events in the event list statically.

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

std::unordered_map<int, std::unordered_map<int, Time> > risc::sg::EventConflictTable::notify_delay_

added to support immediate notification and notify with time

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: