risc::sg::Segment Class Reference

#include <segment.h>

Collaboration diagram for risc::sg::Segment:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ERead { NonRead = 0, Read = 1 }
enum  EWrite { NonWrite = 0, Write = 1 }
enum  Status { Untouched = 0, Touched = 1 }
typedef std::list< NodeWithPathExpressions

Public Member Functions

 Segment (SgNode *boundary_node, bool inlined_segment, int psg_id=0, bool is_fake_segment_=false, bool is_simulation_process=false)
 Segment (const Segment &other)
void analyze_segment ()
void analyze_expression (SgNode *expression, ERead read, EWrite write, PortCallPath pcp)
void add_expression (NodeWithPath nwp)
bool operator== (const Segment &other)
void merge (const Segment &other)
Time get_min_waiting_time ()
 This function determines the minimal waiting time for this segment.

Public Attributes

bool is_fake_segment
bool is_simulation_process_
 PSG_NODE attribute marks if a node is for a simulation process currently, it applies only to the first psg node, because ZC thinks it is sufficient.
int segment_node_id_
 PSG_NODE attribute each segment node in a psg has a unique contiuous id it is used for instrumentation, and also calculating the wait_offset_ <psg_id_, segment_node_id_> pair matches a segment id in the complete segment graph.
std::string function_name_entrance_
 PSG_NODE attribute the qualified name of function that this node is entrance to.
std::string function_name_exit_
 PSG_NODE attribute the qualified name of function that this node is exit of.
std::string module_name_
 PSG_NODE attribute the qualified name of module that this node belongs to it is not empty only if the function of the node is a simulation process. currently, it applies only to the first psg node, because ZC thinks it is sufficient.
std::string non_defining_function_call_name_
 PSG_NODE attribute if the node is partial function call node, this attribute stores the qualified name of the non-defining function call.
std::string pcp_port_name_
 PSG_NODE attribute if the node is partial function call node, and the non-defining function call in the node is a port call, this attributes stores the qualified name of the port. when psg is loaded, we can get the definition of the port, and reconstruct the pcp for the variables that are used to replace the node.
SgNode * pcp_port_
 PSG_NODE attribute reconstructed when a partial function call node is loaded back, using the stored pcp_port_name_. when used, should be converted to sgVariableDefinition.
bool is_entrance_to_channel_method_
 PSG_NODE attribute If a function is a channel method (implemented in sc_channel) Then is_entrance_to_channel_method_ is set to true for the first segment node of the function's psg.
SgFunctionCallExp * port_call_func_exp_
 PSG_NODE attribute if this node is a partial function call node, and the non defining function call is a port call, port_call_func_exp is the func call expression. during instrumentation, we put set_upcoming_seg_id in front.
std::string unique_port_call_name_
 PSG_NODE attribute the variable name of the channel segment array. After instrumentation, it looks like this: set_upcoming_seg_id(risc_tmp_"unique_port_call_name_"+wait_offset_) extern int risc_tmp_"unique_port_call_name_"[] stored in psg file, loaded back and reconstructed in partial func call nodes this makes the instrumented names in both port call file and top file same.
std::string channel_seg_ids_array_name_
 PSG_NODE attribute After integration, we use this attribute to identify in which channel segment id array will the nodes's id be instrumented.
int psg_id_
 PSG_NODE attribute id of the psg that this node belongs to.
int node_id_
 PSG_NODE attribute id of node, continuous.
bool is_redacted_
 PSG_NODE attribute if a node is removed in the psg file by the provider, when loaded back, we generate an empty node to represent the redacted node. when is_redacted_ is true, the node will not be removed from graph_ in remove_dangling_segments(). initially false.
boost::default_color_type color
Status color_for_communication_graph_
Status helper_for_graph_algorithms_
Expressions expressions_
bool debugging_
bool inlined_segment_
bool is_channel_segment_
int wait_offset_
std::set< Conflictconflicts_
PortCallPath pcp_
 To identify segments which belong to segments.
int id_
 This is the unique id of the segment.
SgNode * boundary_node_
 This is the associated boundary of the segment.
Threadoriginating_thread_
 If known, this is the originating thread of the segment. If not known, this is NULL. If multiple threads reach here, this is -1. TODO: extend for all SystemC processes (RD, 07/11/18).
boost::default_color_type color_
 This color is used for some boost algorithms.
std::list< SymbolWithPathread_variables_
 Set of all SgVariableSymbol which are read in this segment.
std::list< SymbolWithPathwrite_variables_
 Set of all SgVariableSymbol which are written in this segment.
std::list< SymbolWithPathwait_events_
 List of all gathered events this segment is waiting for TODO: this should be computed separately, not as side-effect of risc::sg::EventConflictTable::determine_conflict_table() (RD, 07/12/18).
std::list< SymbolWithPathnotify_events_
 List of all gathered events this segment is notifying TODO: this should be computed separately, not as side-effect of risc::sg::EventConflictTable::determine_conflict_table() (RD, 07/12/18).
bool calls_conflict_function_
 This segment calls a function with is marked as conflict.
bool deref_pointer_read_
bool deref_pointer_write_
bool waits_for_time_

Static Public Attributes

static int node_counter = 0
static int id_counter = 0
 This static counter will be used to generate id's for the individual segments.

Private Member Functions

bool waits_for_time ()
 This functions determines if a function waits for time The related flag waits_for_time_ will be set during construction.

Friends

std::ostream & operator<< (std::ostream &out, const Segment &segment)

Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
NonRead 
Read 
Enumerator:
NonWrite 
Write 
Enumerator:
Untouched 
Touched 

Constructor & Destructor Documentation

risc::sg::Segment::Segment ( SgNode *  boundary_node,
bool  inlined_segment,
int  psg_id = 0,
bool  is_fake_segment_ = false,
bool  is_simulation_process = false 
)
risc::sg::Segment::Segment ( const Segment other  ) 

Member Function Documentation

void risc::sg::Segment::add_expression ( NodeWithPath  nwp  ) 
void risc::sg::Segment::analyze_expression ( SgNode *  expression,
ERead  read,
EWrite  write,
PortCallPath  pcp 
)
void risc::sg::Segment::analyze_segment (  ) 
risc::sg::Segment::get_min_waiting_time (  ) 

This function determines the minimal waiting time for this segment.

void risc::sg::Segment::merge ( const Segment other  ) 
bool risc::sg::Segment::operator== ( const Segment other  ) 
risc::sg::Segment::waits_for_time (  )  [private]

This functions determines if a function waits for time The related flag waits_for_time_ will be set during construction.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const Segment segment 
) [friend]

Member Data Documentation

This is the associated boundary of the segment.

This segment calls a function with is marked as conflict.

PSG_NODE attribute After integration, we use this attribute to identify in which channel segment id array will the nodes's id be instrumented.

boost::default_color_type risc::sg::Segment::color
boost::default_color_type risc::sg::Segment::color_

This color is used for some boost algorithms.

PSG_NODE attribute the qualified name of function that this node is entrance to.

PSG_NODE attribute the qualified name of function that this node is exit of.

This is the unique id of the segment.

This static counter will be used to generate id's for the individual segments.

PSG_NODE attribute If a function is a channel method (implemented in sc_channel) Then is_entrance_to_channel_method_ is set to true for the first segment node of the function's psg.

PSG_NODE attribute if a node is removed in the psg file by the provider, when loaded back, we generate an empty node to represent the redacted node. when is_redacted_ is true, the node will not be removed from graph_ in remove_dangling_segments(). initially false.

PSG_NODE attribute marks if a node is for a simulation process currently, it applies only to the first psg node, because ZC thinks it is sufficient.

PSG_NODE attribute the qualified name of module that this node belongs to it is not empty only if the function of the node is a simulation process. currently, it applies only to the first psg node, because ZC thinks it is sufficient.

PSG_NODE attribute id of node, continuous.

PSG_NODE attribute if the node is partial function call node, this attribute stores the qualified name of the non-defining function call.

List of all gathered events this segment is notifying TODO: this should be computed separately, not as side-effect of risc::sg::EventConflictTable::determine_conflict_table() (RD, 07/12/18).

If known, this is the originating thread of the segment. If not known, this is NULL. If multiple threads reach here, this is -1. TODO: extend for all SystemC processes (RD, 07/11/18).

To identify segments which belong to segments.

PSG_NODE attribute reconstructed when a partial function call node is loaded back, using the stored pcp_port_name_. when used, should be converted to sgVariableDefinition.

PSG_NODE attribute if the node is partial function call node, and the non-defining function call in the node is a port call, this attributes stores the qualified name of the port. when psg is loaded, we can get the definition of the port, and reconstruct the pcp for the variables that are used to replace the node.

PSG_NODE attribute if this node is a partial function call node, and the non defining function call is a port call, port_call_func_exp is the func call expression. during instrumentation, we put set_upcoming_seg_id in front.

PSG_NODE attribute id of the psg that this node belongs to.

Set of all SgVariableSymbol which are read in this segment.

PSG_NODE attribute each segment node in a psg has a unique contiuous id it is used for instrumentation, and also calculating the wait_offset_ <psg_id_, segment_node_id_> pair matches a segment id in the complete segment graph.

PSG_NODE attribute the variable name of the channel segment array. After instrumentation, it looks like this: set_upcoming_seg_id(risc_tmp_"unique_port_call_name_"+wait_offset_) extern int risc_tmp_"unique_port_call_name_"[] stored in psg file, loaded back and reconstructed in partial func call nodes this makes the instrumented names in both port call file and top file same.

List of all gathered events this segment is waiting for TODO: this should be computed separately, not as side-effect of risc::sg::EventConflictTable::determine_conflict_table() (RD, 07/12/18).

Set of all SgVariableSymbol which are written in this segment.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 30 Sep 2018 by  doxygen 1.6.1