PandA-2024.02
|
This class manages the circuit structures. More...
#include <structural_manager.hpp>
Public Types | |
enum | circuit_graph_type { DATA_G, COMPLETE_G } |
Public Member Functions | |
structural_manager (const structural_manager &inst)=delete | |
structural_manager (const ParameterConstRef Param) | |
This is the constructor of the structural_manager which initializes the data field. More... | |
void | set_top_info (const std::string &id, const technology_managerRef &LM, const std::string &Library="") |
~structural_manager () | |
Destructor. More... | |
void | set_top_info (std::string id, structural_type_descriptorRef module_type, unsigned int treenode=0) |
Return the objectRef given the id of the object and the c_object of the owner. More... | |
structural_objectRef | create (std::string id, so_kind ctype, structural_objectRef owner, structural_type_descriptorRef obj_type, unsigned int treenode=0) |
Create a new object of the circuit. More... | |
structural_objectRef | add_module_from_technology_library (const std::string &id, const std::string &fu_name, const std::string &library_name, const structural_objectRef owner, const technology_managerConstRef TM) |
Create a new object starting from a library component. More... | |
void | remove_module (structural_objectRef obj) |
void | remove_connection (structural_objectRef src, structural_objectRef dest) |
void | change_connection (structural_objectRef old_obj, structural_objectRef new_obj, structural_objectRef owner) |
void | remove_empty_signal (structural_objectRef &signal) |
Remove an existing signal from the SM. More... | |
void | reconnect_signal_member (structural_objectRef &member, structural_objectRef &from_signal, structural_objectRef &to_signal) |
Disconnects a member from from_signal and reconnects it to to_signal. More... | |
structural_objectRef | add_constant (std::string id, structural_objectRef owner, structural_type_descriptorRef type, std::string value, unsigned int treenode=0) |
Create a new constant;. More... | |
void | SetParameter (const std::string &name, const std::string &value) |
Specify a parameter for the top module. More... | |
void | add_sensitivity (structural_objectRef obj, structural_objectRef pr) |
Add an object to the sensitivity list of process/service. More... | |
void | add_connection (structural_objectRef src, structural_objectRef dest) |
Create a connection between a source structural object and a destination structural object. More... | |
void | print (std::ostream &os) const |
Function that prints the circuit data structure. More... | |
void | WriteDot (const std::string &file_name, circuit_graph_type gt, graph *g=nullptr) const |
Function that writes the dot file of the graph by using the AT&T dot format. More... | |
const structural_objectRef | get_circ () const |
Get a reference to circ field. More... | |
const vertex & | get_PI (structural_objectRef level) const |
Return the PI vertex of the circuit, at a specific level. More... | |
void | INIT (bool permissive=false) |
int | get_debug_level () const |
Static Public Member Functions | |
static bool | check_object (std::string id, structural_objectRef owner, so_kind type) |
Verify if the component is already associated with owner. More... | |
static structural_objectRef | add_port (const std::string &id, port_o::port_direction pdir, structural_objectRef owner, structural_type_descriptorRef type_descr, unsigned int treenode=0) |
Create a new port. More... | |
static void | change_port_direction (structural_objectRef port_object, port_o::port_direction pdir, structural_objectRef owner) |
Change the direction of the port. More... | |
static structural_objectRef | add_port_vector (std::string id, port_o::port_direction pdir, unsigned int n_ports, structural_objectRef owner, structural_type_descriptorRef type_descr, unsigned int treenode=0) |
Create a new port_vector. More... | |
static structural_objectRef | add_sign (std::string id, structural_objectRef owner, structural_type_descriptorRef sign_type, unsigned int treenode=0) |
Create a new signal. More... | |
static structural_objectRef | add_sign_vector (std::string id, unsigned int n_signs, structural_objectRef owner, structural_type_descriptorRef sign_type, unsigned int treenode=0) |
static void | add_NP_functionality (structural_objectRef cir, NP_functionality::NP_functionaly_type dt, std::string functionality_description) |
Add a not-parsed functionality. More... | |
Private Member Functions | |
bool | check_type (structural_objectRef src_type, structural_objectRef dest_type) |
Check if two type structural object are consistent. More... | |
bool | check_bound (structural_objectRef src, structural_objectRef sign) |
Function that check if a signal (or port) is already bound on a port. More... | |
void | check_structure (structural_objectRef obj, bool permissive=false) |
perform some check on the circuit manager. More... | |
void | build_graph (const structural_objectRef &top, graphs_collection *bg) |
build a graph starting from a structural object. More... | |
Private Attributes | |
const ParameterConstRef | Param |
class containing all the parameters More... | |
int | debug_level |
debug level More... | |
graphs_collection * | og |
Bulk graph used to represent all graphs. More... | |
graph * | data_graph |
Graph only composed by the data flow in the circuit. More... | |
graph * | circuit_graph |
Graph containing all lines of the circuit. More... | |
structural_objectRef | circuit |
Structure that represent circuit. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const structural_manager &s) |
Friend definition of the << operator. More... | |
std::ostream & | operator<< (std::ostream &os, const structural_managerRef s) |
Friend definition of the << operator. More... | |
XML functions. | |
void | xwrite (xml_element *rootnode, const technology_nodeRef &tn=technology_nodeRef()) const |
Add a component to an xml tree. More... | |
static void | xload (const xml_element *node, structural_managerRef const &CM) |
Load a structural manager from an xml file. More... | |
This class manages the circuit structures.
Definition at line 79 of file structural_manager.hpp.
Enumerator | |
---|---|
DATA_G | |
COMPLETE_G |
Definition at line 85 of file structural_manager.hpp.
|
delete |
|
explicit |
This is the constructor of the structural_manager which initializes the data field.
Param | is the reference to the class containing all parameters |
Definition at line 83 of file structural_manager.cpp.
References ALL_LINES_SELECTOR, circuit_graph, data_graph, lenet_tvm::graph, og, and PURE_DATA_SELECTOR.
structural_manager::~structural_manager | ( | ) |
Destructor.
Definition at line 91 of file structural_manager.cpp.
References circuit_graph, data_graph, and og.
void structural_manager::add_connection | ( | structural_objectRef | src, |
structural_objectRef | dest | ||
) |
Create a connection between a source structural object and a destination structural object.
A source port can be connected to another port, a signal and to a channel. Two primary ports cannot be connected, in this case a signal is needed. A source signal can be connected to another port. The other combinations are not allowed.
src | is the source. |
dest | is the destination. |
the other check is not currently implemented.
the other check is not currently implemented.
Definition at line 570 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_type(), component_o_K, constant_o_K, data_o_K, event_o_K, structural_object::find_member(), structural_object::get_id(), structural_object::get_kind(), structural_object::get_kind_text(), structural_type_descriptor::get_name(), structural_object::get_owner(), structural_object::get_path(), structural_object::get_typeRef(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
Referenced by conn_binding::add_command_ports(), top_entity::add_command_signals(), top_entity_cs::add_context_switch_port(), top_entity_cs::add_context_switch_port_kernel(), conn_binding::add_datapath_connection(), top_entity_cs::add_input_register(), top_entity::add_input_register(), RTLCharacterization::add_input_register(), RTLCharacterization::add_output_register(), cs_interface::add_parameter_port(), top_entity::add_ports(), classic_datapath::add_ports(), module_interface::add_sign(), module_interface::add_sign_vector(), ParallelMemoryConnBinding::add_to_SM(), conn_binding::add_to_SM(), module_interface::AddConnection(), module_interface::AddConstant(), module_interface::AddSignal(), RTLCharacterization::AnalyzeCell(), WB4_interface::build_WB4_complete_logic(), minimal_interface::build_wrapper(), buildCircuit(), change_connection(), datapath_parallel_cs::connect_i_module_kernel(), top_entity_parallel_cs::connect_loop_iter(), datapath_parallel_cs::connect_module_kernel(), top_entity_parallel_cs::connect_port_parallel(), fu_binding_cs::connect_selector(), fu_binding_cs::connect_selector_kernel(), connect_with_signal_name(), WB4_interface::connect_with_signal_name(), connectClockAndReset(), conn_binding_cs::connectOutOr(), TestbenchGeneration::Exec(), TopEntityMemoryMapped::insertMemoryMappedRegister(), TopEntityMemoryMapped::insertStartDoneLogic(), TopEntityMemoryMapped::insertStatusRegister(), fu_binding_cs::instantiate_component_kernel(), datapath_parallel_cs::instantiate_component_parallel(), cs_interface::instantiate_component_parallel(), conn_binding_cs::instantiate_suspension_component(), pipeline_controller::InternalExec(), cs_interface::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), top_entity::InternalExec(), fu_binding::join_merge_split(), fu_binding::manage_extern_global_port(), datapath_parallel_cs::manage_extern_global_port_parallel(), cs_interface::manage_extern_global_port_top(), fu_binding::manage_killing_function_proxies(), fu_binding::manage_killing_memory_proxies(), fu_binding_cs::manage_memory_port_hierarchical(), fu_binding_cs::manage_memory_port_kernel(), fu_binding::manage_memory_ports_chained(), fu_binding::manage_memory_ports_parallel_chained(), conn_binding::mux_allocation(), and conn_binding::mux_connection().
structural_objectRef structural_manager::add_constant | ( | std::string | id, |
structural_objectRef | owner, | ||
structural_type_descriptorRef | type, | ||
std::string | value, | ||
unsigned int | treenode = 0 |
||
) |
Create a new constant;.
id | is the name of the constant; |
owner | is the reference to the owner of the constant; |
type | is the type of the constant; |
value | is the value of the constant in string form; |
treenode | is the treenode of the constant |
Definition at line 529 of file structural_manager.cpp.
References check_object(), constant_o_K, debug_level, structural_object::get_path(), and THROW_ASSERT.
Referenced by top_entity::add_ports(), conn_binding::add_to_SM(), RTLCharacterization::AnalyzeCell(), minimal_interface::build_wrapper(), and pipeline_controller::InternalExec().
structural_objectRef structural_manager::add_module_from_technology_library | ( | const std::string & | id, |
const std::string & | fu_name, | ||
const std::string & | library_name, | ||
const structural_objectRef | owner, | ||
const technology_managerConstRef | TM | ||
) |
Create a new object starting from a library component.
id | is the name of the object. |
fu_name | is the name of the type. |
library_name | is the name of the library. |
owner | is the owner of the object. |
TM | is the technology manager. |
Definition at line 1066 of file structural_manager.cpp.
References channel_o_K, circuit, component_o_K, structural_object::copy(), debug_level, structural_object::get_kind(), and THROW_ASSERT.
Referenced by conn_binding::add_command_ports(), conn_binding::add_datapath_connection(), top_entity_cs::add_input_register(), top_entity::add_input_register(), RTLCharacterization::add_input_register(), RTLCharacterization::add_output_register(), classic_datapath::add_ports(), conn_binding::add_sparse_logic_dp(), RTLCharacterization::AnalyzeCell(), WB4_interface::build_WB4_complete_logic(), minimal_interface::build_wrapper(), buildCircuit(), TestbenchGeneration::Exec(), TopEntityMemoryMapped::insertMemoryMappedRegister(), TopEntityMemoryMapped::insertStartDoneLogic(), TopEntityMemoryMapped::insertStatusRegister(), fu_binding_cs::instantiate_component_kernel(), datapath_parallel_cs::instantiate_component_parallel(), cs_interface::instantiate_component_parallel(), conn_binding_cs::instantiate_suspension_component(), pipeline_controller::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), top_entity::InternalExec(), fu_binding::join_merge_split(), conn_binding::mux_allocation(), and set_top_info().
|
static |
Add a not-parsed functionality.
owner | is the reference to the owner of the functionality. |
dt | is the type of the not-parsed functionality. |
descr | is the description of the functionality. |
Definition at line 546 of file structural_manager.cpp.
References NP_functionality::add_NP_functionality(), component_o_K, structural_object::get_kind(), and THROW_ASSERT.
Referenced by top_entity_cs::add_context_switch_port_kernel(), controller_cs::add_correct_transition_memory(), fsm_controller::add_correct_transition_memory(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), OmpAllocation::AddPandaPthreadMutex(), allocation::BuildProxyFunctionVerilog(), allocation::BuildProxyFunctionVHDL(), ModuleGeneratorManager::create_generic_module(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), LoadBuiltinTechnology::Exec(), TestbenchFifoModuleGenerator::InternalExec(), TestbenchValidModuleGenerator::InternalExec(), TestbenchOvalidModuleGenerator::InternalExec(), TestbenchArrayModuleGenerator::InternalExec(), TestbenchAxisModuleGenerator::InternalExec(), TestbenchHandshakeModuleGenerator::InternalExec(), TestbenchAcknowledgeModuleGenerator::InternalExec(), TestbenchNoneModuleGenerator::InternalExec(), TestbenchAXIMModuleGenerator::InternalExec(), ReadWrite_m_axiModuleGenerator::InternalExec(), ControlFlowChecker::InternalExec(), and ModuleGeneratorManager::specialize_fu().
|
static |
Create a new port.
id | is the name of the port. |
pdir | represent the direction of the port (in, out, in-out, gen). |
owner | is the reference to the owner of the port. |
port_type | is the type of the port. |
treenode | is the treenode of the port. |
Definition at line 189 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_object(), component_o_K, constant_o_K, data_o_K, structural_object::debug_level, NP_functionality::EQUATION, event_o_K, structural_object::get_kind(), NP_functionality::get_NP_functionality(), structural_object::get_path(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, SplitString(), starts_with(), THROW_ASSERT, THROW_ERROR, and test_panda::tokens.
Referenced by ControlFlowChecker::add_clock_reset(), ControllerCreatorBaseStep::add_clock_reset(), ControllerCreatorBaseStep::add_command_ports(), conn_binding::add_command_ports(), top_entity_cs::add_context_switch_port(), top_entity_cs::add_context_switch_port_kernel(), ControlFlowChecker::add_done_port(), ControllerCreatorBaseStep::add_done_port(), ControlFlowChecker::add_notifiers(), cs_interface::add_parameter_port(), top_entity::add_ports(), classic_datapath::add_ports(), datapath_parallel_cs::add_ports(), ControlFlowChecker::add_present_state(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), controller_cs::add_selector_register_file_port(), ControlFlowChecker::add_start_port(), ControllerCreatorBaseStep::add_start_port(), OmpAllocation::AddPandaPthreadMutex(), RTLCharacterization::AnalyzeCell(), build_bus_interface(), WB4_interface::build_WB4_bus_interface(), minimal_interface::build_wrapper(), allocation::BuildProxyFunctionVerilog(), allocation::BuildProxyFunctionVHDL(), datapath_parallel_cs::connect_module_kernel(), ModuleGeneratorManager::create_generic_module(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), LoadBuiltinTechnology::Exec(), TestbenchGeneration::Exec(), TestbenchValidModuleGenerator::InternalExec(), TestbenchArrayModuleGenerator::InternalExec(), TestbenchNoneModuleGenerator::InternalExec(), TestbenchAcknowledgeModuleGenerator::InternalExec(), TestbenchAXIMModuleGenerator::InternalExec(), TestbenchFifoModuleGenerator::InternalExec(), TestbenchDUTModuleGenerator::InternalExec(), TestbenchOvalidModuleGenerator::InternalExec(), TestbenchHandshakeModuleGenerator::InternalExec(), TestbenchAxisModuleGenerator::InternalExec(), cs_interface::InternalExec(), top_entity_parallel_cs::InternalExec(), top_entity::InternalExec(), fu_binding::manage_extern_global_port(), fu_binding_cs::manage_memory_port_kernel(), fu_binding::manage_memory_ports_chained(), fu_binding::manage_memory_ports_parallel_chained(), propagateInterface(), and ModuleGeneratorManager::specialize_fu().
|
static |
Create a new port_vector.
id | is the name of the port_vector. |
pdir | represent the direction of the port_vector (in, out, in-out, gen). |
n_ports | is the number of port associated with the port_vector object. When the number of ports is not defined n_ports is equal to PARAMETRIC_PORT. |
owner | is the reference to the owner of the port_vector. |
port_type | is the type of the port_vector. |
treenode | is the treenode of the port_vector. |
Definition at line 306 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_object(), component_o_K, constant_o_K, data_o_K, structural_object::debug_level, event_o_K, structural_object::get_kind(), structural_object::get_path(), port_o::PARAMETRIC_PORT, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
Referenced by top_entity::add_ports(), datapath_parallel_cs::add_ports(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), RTLCharacterization::AnalyzeCell(), minimal_interface::build_wrapper(), buildCircuit(), ModuleGeneratorManager::create_generic_module(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), LoadBuiltinTechnology::Exec(), fu_binding::manage_extern_global_port(), datapath_parallel_cs::manage_extern_global_port_parallel(), cs_interface::manage_extern_global_port_top(), fu_binding_cs::manage_memory_port_hierarchical(), fu_binding_cs::manage_memory_port_kernel(), fu_binding::manage_memory_ports_chained(), fu_binding::manage_memory_ports_parallel_chained(), and ModuleGeneratorManager::specialize_fu().
void structural_manager::add_sensitivity | ( | structural_objectRef | obj, |
structural_objectRef | pr | ||
) |
Add an object to the sensitivity list of process/service.
obj | is the object. |
pr | is the process. |
Definition at line 564 of file structural_manager.cpp.
|
static |
Create a new signal.
id | is the name of the signal. |
owner | is the reference to the owner of the signal. |
sign_type | is the type of the signal. |
treenode | is the treenode of the signal. |
Definition at line 413 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_object(), component_o_K, constant_o_K, data_o_K, structural_object::debug_level, event_o_K, structural_object::get_kind(), structural_object::get_path(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
Referenced by conn_binding::add_command_ports(), top_entity::add_command_signals(), top_entity_cs::add_context_switch_port_kernel(), conn_binding::add_datapath_connection(), top_entity_cs::add_input_register(), top_entity::add_input_register(), RTLCharacterization::add_input_register(), RTLCharacterization::add_output_register(), classic_datapath::add_ports(), module_interface::add_sign(), conn_binding::add_to_SM(), module_interface::AddSignal(), WB4_interface::build_WB4_complete_logic(), minimal_interface::build_wrapper(), buildCircuit(), top_entity_parallel_cs::connect_port_parallel(), fu_binding_cs::connect_selector_kernel(), connect_with_signal_name(), WB4_interface::connect_with_signal_name(), conn_binding_cs::connectOutOr(), TestbenchGeneration::Exec(), TopEntityMemoryMapped::insertMemoryMappedRegister(), TopEntityMemoryMapped::insertStatusRegister(), datapath_parallel_cs::instantiate_component_parallel(), cs_interface::instantiate_component_parallel(), conn_binding_cs::instantiate_suspension_component(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), top_entity::InternalExec(), fu_binding::join_merge_split(), datapath_parallel_cs::manage_extern_global_port_parallel(), fu_binding::manage_killing_function_proxies(), fu_binding::manage_killing_memory_proxies(), fu_binding_cs::manage_memory_port_kernel(), fu_binding::manage_memory_ports_chained(), conn_binding::mux_allocation(), and conn_binding::mux_connection().
|
static |
Definition at line 374 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_object(), component_o_K, constant_o_K, data_o_K, structural_object::debug_level, event_o_K, structural_object::get_kind(), structural_object::get_path(), signal_o::PARAMETRIC_SIGNAL, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
Referenced by module_interface::add_sign_vector(), ParallelMemoryConnBinding::add_to_SM(), minimal_interface::build_wrapper(), top_entity_parallel_cs::connect_port_parallel(), classic_datapath::InternalExec(), fu_binding::join_merge_split(), cs_interface::manage_extern_global_port_top(), fu_binding::manage_killing_function_proxies(), fu_binding::manage_killing_memory_proxies(), and fu_binding::manage_memory_ports_chained().
|
private |
build a graph starting from a structural object.
top | is the top component from which the graph is built. |
og | is the bulk graph where the graph is stored. |
add all nodes
no action for signals and bus
no action for signals and bus
Definition at line 1429 of file structural_manager.cpp.
References action_o_K, add_directed_edge(), graphs_collection::AddVertex(), bus_connection_o_K, channel_o_K, circuit_graph, component_o_K, constant_o_K, data_o_K, debug_level, DEBUG_LEVEL_VERY_PEDANTIC, ENTRY, event_o_K, EXIT, port_o::find_bounded_object(), port_o::get_critical(), module::get_in_port(), module::get_in_port_size(), module::get_internal_object(), module::get_internal_objects_size(), structural_object::get_kind(), structural_object::get_kind_text(), GET_NODE_INFO, module::get_out_port(), module::get_out_port_size(), structural_object::get_path(), GET_TYPE_NAME, structural_object::get_typeRef(), graph::GetGraphInfo(), structural_type_descriptor::id_type, INDENT_DBG_MEX, k, lenet_tvm::mod, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, lenet_tvm::target, THROW_ERROR, THROW_WARNING, top(), TYPE_ENTRY, and TYPE_EXIT.
Referenced by INIT().
void structural_manager::change_connection | ( | structural_objectRef | old_obj, |
structural_objectRef | new_obj, | ||
structural_objectRef | owner | ||
) |
Definition at line 1837 of file structural_manager.cpp.
References add_connection(), structural_object::get_kind_text(), structural_object::get_owner(), port_vector_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
|
static |
Change the direction of the port.
port_object | is the port that will change the pdir |
pdir | represent the new direction of the port (in, out, in-out, gen). |
owner | is the reference to the owner of the port. |
Definition at line 280 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, component_o_K, constant_o_K, data_o_K, event_o_K, structural_object::get_kind(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, and THROW_ERROR.
Referenced by fu_binding::manage_extern_global_port().
|
private |
Function that check if a signal (or port) is already bound on a port.
src | is the reference to the port. |
sign | is the reference of the signal (or the second port). |
Definition at line 110 of file structural_manager.cpp.
References sign.
|
static |
Verify if the component is already associated with owner.
id | is the name of the object. |
so_kind | is the type of the object. |
Definition at line 103 of file structural_manager.cpp.
References structural_object::find_member(), HIERARCHY_SEPARATOR, and THROW_ASSERT.
Referenced by add_constant(), add_port(), add_port_vector(), add_sign(), add_sign_vector(), and create().
|
private |
perform some check on the circuit manager.
Definition at line 849 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, component_o_K, constant_o_K, data_o_K, debug_level, DEBUG_LEVEL_VERBOSE, event_o_K, structural_object::get_id(), structural_object::get_owner(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, THROW_ERROR, and THROW_WARNING.
Referenced by INIT().
|
private |
Check if two type structural object are consistent.
src_type | is the first structural object. |
dest_type | is the second structural object. |
Definition at line 98 of file structural_manager.cpp.
References structural_type_descriptor::check_type(), and structural_object::get_typeRef().
Referenced by add_connection(), and reconnect_signal_member().
structural_objectRef structural_manager::create | ( | std::string | id, |
so_kind | ctype, | ||
structural_objectRef | owner, | ||
structural_type_descriptorRef | obj_type, | ||
unsigned int | treenode = 0 |
||
) |
Create a new object of the circuit.
id | is the name of the object. |
ctype | represent the type of the object (component or channel). |
owner | is the owner of the object. |
obj_type | is the type descriptor of the object. |
treenode | is the treenode of the object. |
Definition at line 140 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_object(), component_o_K, constant_o_K, data_o_K, debug_level, event_o_K, structural_object::get_path(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
|
inline |
Get a reference to circ field.
Definition at line 326 of file structural_manager.hpp.
References circuit, xload(), and xwrite().
Referenced by classic_datapath::add_clock_reset(), conn_binding::add_command_ports(), top_entity::add_command_signals(), top_entity_cs::add_context_switch_port(), top_entity_cs::add_context_switch_port_kernel(), controller_cs::add_correct_transition_memory(), fsm_controller::add_correct_transition_memory(), conn_binding::add_datapath_connection(), fu_binding::add_gate(), top_entity_cs::add_input_register(), memory::add_memory_parameter(), top_entity::add_ports(), classic_datapath::add_ports(), datapath_parallel_cs::add_ports(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), module_interface::add_sign(), module_interface::add_sign_vector(), conn_binding::add_sparse_logic_dp(), ParallelMemoryConnBinding::add_to_SM(), reg_binding::add_to_SM(), StateTransitionGraphManager::add_to_SM(), fu_binding::add_to_SM(), conn_binding::add_to_SM(), module_interface::AddConstant(), OmpAllocation::AddPandaPthreadMutex(), module_interface::AddSignal(), RTLCharacterization::AnalyzeCell(), build_bus_interface(), WB4_interface::build_WB4_bus_interface(), WB4_interface::build_WB4_complete_logic(), buildCircuit(), allocation::BuildProxyFunctionVerilog(), allocation::BuildProxyFunctionVHDL(), allocation::BuildProxyWrapper(), allocation::check_generated_bambu_flopoco(), datapath_parallel_cs::connect_i_module_kernel(), top_entity_parallel_cs::connect_loop_iter(), datapath_parallel_cs::connect_module_kernel(), top_entity_parallel_cs::connect_port_parallel(), fu_binding_cs::connect_selector(), fu_binding_cs::connect_selector_kernel(), connect_with_signal_name(), WB4_interface::connect_with_signal_name(), conn_binding_cs::connectOutOr(), ModuleGeneratorManager::create_generic_module(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), AllocationInformation::estimate_call_delay(), WB4Intercon_interface::exec(), LoadBuiltinTechnology::Exec(), TestbenchGeneration::Exec(), BackendFlow::GenerateSynthesisScripts(), allocation::get_compliant_pipelined_unit(), TopEntityMemoryMapped::insertMemoryMappedRegister(), TopEntityMemoryMapped::insertStartDoneLogic(), TopEntityMemoryMapped::insertStatusRegister(), fu_binding_cs::instantiate_component_kernel(), datapath_parallel_cs::instantiate_component_parallel(), cs_interface::instantiate_component_parallel(), conn_binding_cs::instantiate_suspension_component(), allocation::IntegrateTechnologyLibraries(), pipeline_controller::InternalExec(), cs_interface::InternalExec(), fsm_controller::InternalExec(), minimal_interface::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), TopEntityMemoryMapped::InternalExec(), ControlFlowChecker::InternalExec(), top_entity::InternalExec(), add_library::InternalExec(), WB4_interface::InternalExec(), datapath_parallel_cs::InternalExec(), fu_binding::manage_killing_function_proxies(), fu_binding::manage_killing_memory_proxies(), fu_binding::manage_module_ports(), conn_binding::mux_allocation(), conn_binding::mux_connection(), hls::PrintResources(), memory::propagate_memory_parameters(), propagateInterface(), remove_module(), fu_binding_cs::set_atomic_memory_parameter(), SetParameter(), ModuleGeneratorManager::specialize_fu(), hls::xwrite(), and xwrite().
|
inline |
Definition at line 379 of file structural_manager.hpp.
References debug_level.
Referenced by port_o::xload(), action_o::xload(), and signal_o::xload().
const vertex & structural_manager::get_PI | ( | structural_objectRef | level | ) | const |
Return the PI vertex of the circuit, at a specific level.
level | represent the reference to the required level. |
Definition at line 842 of file structural_manager.cpp.
References circuit_graph, graph::GetGraphInfo(), and THROW_ASSERT.
Definition at line 1045 of file structural_manager.cpp.
References ALL_LINES_SELECTOR, build_graph(), check_structure(), circuit, circuit_graph, data_graph, lenet_tvm::graph, og, Param, and PURE_DATA_SELECTOR.
Referenced by classic_datapath::InternalExec().
void structural_manager::print | ( | std::ostream & | os | ) | const |
Function that prints the circuit data structure.
os | is the output stream |
Definition at line 829 of file structural_manager.cpp.
References circuit, and structural_object::get_id().
void structural_manager::reconnect_signal_member | ( | structural_objectRef & | member, |
structural_objectRef & | from_signal, | ||
structural_objectRef & | to_signal | ||
) |
Disconnects a member from from_signal and reconnects it to to_signal.
Signals must be of compatible types and owned by the same object
Definition at line 484 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, check_type(), component_o_K, constant_o_K, data_o_K, debug_level, DEBUG_LEVEL_VERY_PEDANTIC, event_o_K, structural_object::get_kind(), structural_object::get_kind_text(), structural_object::get_path(), port_o_K, port_vector_o_K, PRINT_DBG_MEX, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
void structural_manager::remove_connection | ( | structural_objectRef | src, |
structural_objectRef | dest | ||
) |
Definition at line 1832 of file structural_manager.cpp.
References THROW_ERROR.
Referenced by remove_port_connection().
void structural_manager::remove_empty_signal | ( | structural_objectRef & | signal | ) |
Remove an existing signal from the SM.
The signal must not have any connected objects.
Definition at line 452 of file structural_manager.cpp.
References action_o_K, bus_connection_o_K, channel_o_K, component_o_K, constant_o_K, data_o_K, event_o_K, port_o_K, port_vector_o_K, sign, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.
void structural_manager::remove_module | ( | structural_objectRef | obj | ) |
Definition at line 1783 of file structural_manager.cpp.
References get_circ(), structural_object::get_kind(), k, port_o_K, port_vector_o_K, remove_port_connection(), and top().
void structural_manager::set_top_info | ( | const std::string & | id, |
const technology_managerRef & | LM, | ||
const std::string & | Library = "" |
||
) |
Definition at line 133 of file structural_manager.cpp.
References add_module_from_technology_library(), and circuit.
Referenced by allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), OmpAllocation::AddPandaPthreadMutex(), RTLCharacterization::AnalyzeCell(), ModuleGeneratorManager::create_generic_module(), InterfaceInfer::create_resource_array(), InterfaceInfer::create_resource_m_axi(), InterfaceInfer::create_resource_Read_simple(), InterfaceInfer::create_resource_Write_simple(), WB4Intercon_interface::exec(), LoadBuiltinTechnology::Exec(), TestbenchGeneration::Exec(), pipeline_controller::InternalExec(), cs_interface::InternalExec(), fsm_controller::InternalExec(), minimal_interface::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), TopEntityMemoryMapped::InternalExec(), ControlFlowChecker::InternalExec(), top_entity::InternalExec(), WB4_interface::InternalExec(), datapath_parallel_cs::InternalExec(), read_structural_File(), and ModuleGeneratorManager::specialize_fu().
void structural_manager::set_top_info | ( | std::string | id, |
structural_type_descriptorRef | module_type, | ||
unsigned int | treenode = 0 |
||
) |
Return the objectRef given the id of the object and the c_object of the owner.
o_tn | is the owner c_object. |
tn | is the treenode. |
id | is the name of the object. |
module_type | is the type of the top object. |
treenode | is the treenode of the object. |
Definition at line 123 of file structural_manager.cpp.
References circuit, and debug_level.
void structural_manager::SetParameter | ( | const std::string & | name, |
const std::string & | value | ||
) |
Specify a parameter for the top module.
name | is the parameter name |
value | is the parameter value |
Definition at line 557 of file structural_manager.cpp.
References component_o_K, get_circ(), and THROW_ASSERT.
void structural_manager::WriteDot | ( | const std::string & | file_name, |
circuit_graph_type | gt, | ||
graph * | g = nullptr |
||
) | const |
Function that writes the dot file of the graph by using the AT&T dot format.
Definition at line 807 of file structural_manager.cpp.
References circuit_graph, COMPLETE_G, DATA_G, data_graph, Param, and THROW_ERROR.
Referenced by classic_datapath::InternalExec().
|
static |
Load a structural manager from an xml file.
node | is a node of the xml tree. |
CM | is the refcount version of this. |
Definition at line 1745 of file structural_manager.cpp.
References xml_child::get_children(), and GET_CLASS_NAME.
Referenced by get_circ(), and read_structural_File().
void structural_manager::xwrite | ( | xml_element * | rootnode, |
const technology_nodeRef & | tn = technology_nodeRef() |
||
) | const |
Add a component to an xml tree.
rootnode | is the root node at which the xml representation of the operation is attached. |
Definition at line 1760 of file structural_manager.cpp.
References xml_child::add_child_element(), get_circ(), and structural_object::xwrite().
Referenced by get_circ(), and write_structural_File().
|
friend |
Friend definition of the << operator.
os | is the output stream |
s | is the circuit manager element |
Definition at line 353 of file structural_manager.hpp.
|
friend |
Friend definition of the << operator.
Pointer version.
os | is the output stream |
s | is the circuit manager element |
Definition at line 363 of file structural_manager.hpp.
|
private |
Structure that represent circuit.
Definition at line 114 of file structural_manager.hpp.
Referenced by add_module_from_technology_library(), get_circ(), INIT(), print(), and set_top_info().
|
private |
Graph containing all lines of the circuit.
Definition at line 109 of file structural_manager.hpp.
Referenced by build_graph(), get_PI(), INIT(), structural_manager(), WriteDot(), and ~structural_manager().
|
private |
Graph only composed by the data flow in the circuit.
Definition at line 105 of file structural_manager.hpp.
Referenced by INIT(), structural_manager(), WriteDot(), and ~structural_manager().
|
private |
debug level
Definition at line 96 of file structural_manager.hpp.
Referenced by add_constant(), add_module_from_technology_library(), build_graph(), check_structure(), create(), get_debug_level(), reconnect_signal_member(), and set_top_info().
|
private |
Bulk graph used to represent all graphs.
Definition at line 101 of file structural_manager.hpp.
Referenced by INIT(), structural_manager(), and ~structural_manager().
|
private |
class containing all the parameters
Definition at line 93 of file structural_manager.hpp.
Referenced by INIT(), and WriteDot().