1 #ifndef DESGIN_H_INCLUDED_
2 #define DESGIN_H_INCLUDED_
12 #include "boost/graph/adjacency_list.hpp"
13 #include "boost/graph/graphviz.hpp"
14 #include "boost/algorithm/string.hpp"
17 #define PSG_MODE risc::get_design()->psg_mode
24 class HierarchicalChannel;
25 class HierarchicalChannelInstance;
30 class PathInstanceMapper;
31 class PrimitiveChannel;
32 class PrimitiveChannelInstance;
69 explicit Design(
int argc,
char* argv[],
70 std::vector<std::string> psg_file_names = std::vector<std::string>(0),
71 bool is_psg_mode =
false,
72 bool PrintFrontendArgs =
false);
249 typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS,
256 template <
class VertexOrEdge>
257 void operator()(std::ostream& out,
const VertexOrEdge& v)
const {
258 out <<
"[label=\"" <<
g[v].label <<
"\"]";
PathInstanceMapper * path_instance_mapper_
Definition: design.h:141
PrimitiveChannelVector primitive_channel_
Definition: design.h:105
bool perform_static_analysis()
The functions return if a static analysis will be performed.
Definition: design.cpp:817
Definition: hierarchical_channel.h:13
void add_hierarchical_channel_to_defintion_list(SgClassDefinition *class_def)
Only for internal use! This function triggers the analysis of a module. The new analyzed module will ...
Definition: design.cpp:829
std::vector< PrimitiveChannel * > PrimitiveChannelVector
Definition: design.h:44
std::vector< Module * > ModuleVector
Definition: design.h:42
InstanceVector top_modules_
Definition: design.h:104
Definition: instance_tree.h:15
void draw_port_mapping()
Definition: design.cpp:1156
bool is_analyzable()
Definition: design.cpp:874
SgProject * get_project()
Definition: design.cpp:760
bool psg_mode
Definition: design.h:222
char ** old_argv_
Definition: design.h:137
InterfaceVector interfaces_
Definition: design.h:107
Interface * find_interface(SgClassDefinition *cd)
Definition: design.cpp:444
std::vector< std::string > psg_file_names_
Definition: design.h:140
std::string dynamic_analysis_filename_
This variable contains the filename of the input file for the dynamic analysis.
Definition: design.h:156
void initialize_interfaces()
Definition: design.cpp:971
boost::adjacency_list< boost::vecS, boost::vecS, boost::directedS, SegNode, SegEdge > graph_t
Definition: design.h:250
ModuleInstance * find_module_instance(SgVariableDefinition *)
This function finds the socket according to its underlying symbol.
Definition: design.cpp:391
bool no_immediate_notify
Definition: design.h:224
std::vector< Function * > FunctionVector
Definition: class.h:37
std::vector< std::string > input_files_
Definition: design.h:139
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
std::vector< ModuleInstance * > ModuleInstanceVector
Definition: class.h:42
HierarchicalChannel * find_channel_definition(SgClassDefinition *cd)
Definition: design.cpp:413
std::vector< Variable * > VariableVector
Definition: class.h:46
VariableVector global_variables_
Definition: design.h:112
label_writer(graph_t graph)
Definition: design.h:255
void initialize_global_functions()
Definition: design.cpp:621
void reset_instance_counter()
This function resets the instance counter of the module and hierarchical channel instances to zero...
Definition: design.cpp:799
Definition: primitive_channel.h:15
std::string label
Definition: design.h:242
ModuleInstanceVector loaded_module_instances
Definition: design.h:236
void operator()(std::ostream &out, const VertexOrEdge &v) const
Definition: design.h:257
std::vector< Instance * > InstanceVector
Definition: design.h:40
void initialize_top_modules()
Definition: design.cpp:458
std::vector< PrimitiveChannelInstance * > PrimitiveChannelInstanceVector
Definition: class.h:45
std::vector< HierarchicalChannel * > HierarchicalChannelVector
Definition: design.h:38
FunctionVector global_functions_
Definition: design.h:113
void print_all_class_definitions()
Definition: design.cpp:733
This class represents instances.
Definition: module.h:49
void initialize_path_instance_mapper()
Definition: design.cpp:1022
void initialize_port_mapping()
Definition: design.cpp:1005
int old_argc_
Definition: design.h:136
InstanceTree get_root()
Definition: design.cpp:782
std::string get_design_file_name()
This function returns the input file name of the design.
Definition: design.cpp:836
std::vector< HierarchicalChannelInstance * > HierarchicalChannelInstanceVector
Definition: class.h:39
boost::adjacency_list::vertex_descriptor VertexDescriptor
Definition: design.h:252
graph_t port_mapping_graph
Definition: design.h:251
void load_port_mapping(std::string)
This function loads the port mapping information from .psg file.
Definition: design.cpp:1168
SgProject * project_
Definition: design.h:131
Socket * find_socket(SgVariableDefinition *)
This function finds the socket according to its underlying symbol.
Definition: design.cpp:354
Design * get_design()
Definition: design.cpp:755
void print_all_global_functions()
Definition: design.cpp:742
This class represents a instance of a module.
Definition: module_instance.h:27
Definition: mapping_info.h:31
Design(int argc, char *argv[], std::vector< std::string > psg_file_names=std::vector< std::string >(0), bool is_psg_mode=false, bool PrintFrontendArgs=false)
default constructor
Definition: design.cpp:52
void add_module_to_definition_list(SgClassDefinition *class_def)
Only for internal use! This function triggers the analysis of a module. The new analyzed module will ...
Definition: design.cpp:822
Definition: interface.h:10
int psg_count
Definition: design.h:226
Variable * find_global_variable(SgVariableDefinition *var_def)
Find a port by it's ast variable definition.
Definition: design.cpp:766
std::string instrumentor_output_filename_
This variable contains the name which will be used for the dir file during the presimulation.
Definition: design.h:162
std::vector< Thread * > loaded_threads
functions that are implemented in the psg but are not simulation processes
Definition: design.h:234
MappingInfo mapping_info_
Definition: design.h:143
static Design * design_static
Definition: design.h:276
PrimitiveChannel * find_prim_channel_definition(SgClassDefinition *cd)
Definition: design.cpp:429
std::vector< Thread * > simulation_threads
Definition: design.h:235
~Design()
Definition: design.cpp:215
void initialize_global_variables()
Definition: design.cpp:542
graph_t g
Definition: design.h:261
std::vector< Event * > EventVector
Definition: class.h:32
ModuleVector module_definitions_
Definition: design.h:103
std::vector< int > psg_seg_count
Definition: design.h:227
Module * find_module_definition(SgClassDefinition *cd)
Definition: design.cpp:341
HierarchicalChannelVector hierarchical_channel_
Definition: design.h:106
std::vector< Interface * > InterfaceVector
Definition: design.h:41
void initialize_definitions()
Definition: design.cpp:249
This class represents a variable in a module.
Definition: variable.h:22
void print_design()
Definition: design.cpp:676
void store_port_mapping(std::string)
This function stores the port mapping information to .psg file.
Definition: design.cpp:1039