All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
time_advance_table.h
Go to the documentation of this file.
1 #ifndef TIME_ADVANCED_TABLE_H_INCLUDED_
2 #define TIME_ADVANCED_TABLE_H_INCLUDED_
3 
4 #include "segment_graph.h"
5 #include "time.h"
6 #include "../internal_representation/design.h"
7 
8 namespace risc {
9 
10 namespace sg {
11 
19 
20 private:
21 
22  typedef boost::graph_traits<risc::sg::Graph>::vertex_iterator VertexIterator;
23 
24 public:
29 
34 
40 
46  void print_current_time_advance_table(std::string filename);
47 
52  void print_next_time_advance_table(std::string filename);
53 
59  void print_time_table(Time *table, std::string filename);
60 
67 
72 
76  int size_;
77 
82  std::vector<VertexIterator> table_index_segment_lookup_;
83 
89  int get_segment_id(int index);
90 
96  long long convert_si_magnitude(std::string magnitude);
97 
103 };
104 
105 }; // end of namesapce sg
106 
107 }; // end of namespace risc
108 
109 #endif /* TIME_ADVANCED_TABLE_H_INCLUDED_ */
110 
111 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
void determine_conflict_table()
This function determines conflicts among the segments.
Definition: time_advance_table.cpp:40
This class represents a segment graph for a process.
Definition: segment_graph.h:79
Time * current_time_advance_
Pointer for the current and next time advance table.
Definition: time_advance_table.h:101
void print_time_table(Time *table, std::string filename)
This function is only for internal use. It is used as the base function for the other print functions...
Definition: time_advance_table.cpp:155
Time get_waiting_time_for_segment(VertexIterator Segment)
This function determines how much time is spend while entering a segment.
Definition: time_advance_table.cpp:203
std::vector< VertexIterator > table_index_segment_lookup_
This vector is a lookup between the conflict table index and the associated segment index...
Definition: time_advance_table.h:82
SegmentGraph & segment_graph_
Reference to the associated segment graph of the conflict table.
Definition: time_advance_table.h:71
~TimeAdvanceTable()
Default destructor for the timeAdvanceTable.
Definition: time_advance_table.cpp:33
This class represents timing in discrete event simulation.
Definition: time.h:14
void print_next_time_advance_table(std::string filename)
This function prints the next time advance table in a html file.
Definition: time_advance_table.cpp:148
Time * next_time_advance_
Definition: time_advance_table.h:102
long long convert_si_magnitude(std::string magnitude)
This function converts a given string like &quot;SC_SEC&quot; into the corresponding amount of femto seconds...
Definition: time_advance_table.cpp:216
boost::graph_traits< risc::sg::Graph >::vertex_iterator VertexIterator
Definition: time_advance_table.h:22
int size_
Size of the conflict table.
Definition: time_advance_table.h:76
TimeAdvanceTable(SegmentGraph &graph)
Default constructor for the timeAdvanceTable.
Definition: time_advance_table.cpp:15
void print_current_time_advance_table(std::string filename)
This function prints the current time advance table in a html file.
Definition: time_advance_table.cpp:141
int get_segment_id(int index)
This function looks up which segment id belongs to a given table index.
Definition: time_advance_table.cpp:210
Definition: time_advance_table.h:18
Definition: segment.h:21