All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
combined_data_conflict_table.h
Go to the documentation of this file.
1 #ifndef COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_
2 #define COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_
3 
4 #include<string>
5 #include<utility>
6 #include<vector>
7 
8 #include "data_conflict_table.h"
9 
10 #include "segment_graph.h" // needed for VertexDescriptor
11 #include "mapped_variable.h" // needed for MappedVariable
12 
20 namespace risc {
21 
22 namespace sg {
23 
25 
26 public:
27 
37  PathInstanceMapper *path_instance_mapper);
38 
40 
45  int get_max_instances(int segment_id);
46 
53  std::pair<int, int> index_to_segment_and_instance_id(int index);
54 
60  int segment_and_instance_id_to_index(int segment_id, int instance_id);
61 
66  void print_conflict_table();
67 
72  void print_conflict_table(bool *table);
73 
79  void print_conflict_table(std::string filename);
80 
86  void print_lookup_table();
87 
93  void print_lookup_table(std::string filename);
94 
100 
105 
112 
119 
126 
132 
138 
143 
148 
149 private:
150 
156  void compute_combined_table();
157 
162 };
163 
164 } // end of namespace sg
165 
166 } // end of namespace risc
167 
168 #endif /* COMBINED_DATA_CONFLICT_TABLE_H_INCLUDED_ */
169 
170 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
void print_lookup_table()
This function prints the table instance_id_to_index_lookup_table in the terminal. ...
Definition: combined_data_conflict_table.cpp:540
risc::sg::DataConflictTable & dct_
The data conflict table.
Definition: combined_data_conflict_table.h:161
boost::graph_traits< Graph >::vertex_descriptor VertexDescriptor
Definition: segment_graph.h:34
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 ...
Definition: combined_data_conflict_table.cpp:497
void print_conflict_table()
This function prints the combined conflict table in the terminal.
Definition: combined_data_conflict_table.cpp:312
This class can be used as a lookup table between an instance id of a module or hierarchical channel a...
Definition: path_instance_mapper.h:13
void compute_combined_table()
This function computes the combined table for &#39;prediction_steps_&#39; prediction steps.
Definition: combined_data_conflict_table.cpp:580
int number_of_segments_
This variable defines how many segments exist in the segment graph. Also, this is the number of colum...
Definition: combined_data_conflict_table.h:125
CombinedDataConflictTable(risc::sg::DataConflictTable &dct, PathInstanceMapper *path_instance_mapper)
Creates the combined data conflict table. The maximum number of steps will be calculated automaticall...
Definition: combined_data_conflict_table.cpp:23
PathInstanceMapper * path_instance_mapper_
The global path instance mapper.
Definition: combined_data_conflict_table.h:104
int get_max_instances(int segment_id)
This functions returns how many instances of a given segment exist.
Definition: combined_data_conflict_table.cpp:518
~CombinedDataConflictTable()
Definition: combined_data_conflict_table.cpp:307
int ** instance_id_to_index_lookup_
This table should be used a lookup table: (segment id, instance id) -&gt; index of conflict table...
Definition: combined_data_conflict_table.h:137
Definition: combined_data_conflict_table.h:24
int * combined_table_
The conflict table.
Definition: combined_data_conflict_table.h:142
int size_of_conflict_table_
This variable defines the size of the conflict table. The size is quadratic.
Definition: combined_data_conflict_table.h:131
This class represents the data conflict table among the individual segments. Two segments have a conf...
Definition: data_conflict_table.h:25
int prediction_steps_
number of prediction steps until no more changes happen
Definition: combined_data_conflict_table.h:147
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...
Definition: combined_data_conflict_table.cpp:476
VertexDescriptor * vertex_lookup_
This lookup table translates segment ids into vertex descriptors. At position i is the segment with t...
Definition: combined_data_conflict_table.h:111
int max_instances_
This variable represents the max number of module instances in the design. Also, this is the number o...
Definition: combined_data_conflict_table.h:118
int max_prediction_steps()
the number of prediction steps until no more changes will happen
Definition: combined_data_conflict_table.cpp:561