PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends
structural_manager Class Reference

This class manages the circuit structures. More...

#include <structural_manager.hpp>

Collaboration diagram for structural_manager:
Collaboration graph
[legend]

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 vertexget_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_collectionog
 Bulk graph used to represent all graphs. More...
 
graphdata_graph
 Graph only composed by the data flow in the circuit. More...
 
graphcircuit_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...
 

Detailed Description

This class manages the circuit structures.

Definition at line 79 of file structural_manager.hpp.

Member Enumeration Documentation

◆ circuit_graph_type

Enumerator
DATA_G 
COMPLETE_G 

Definition at line 85 of file structural_manager.hpp.

Constructor & Destructor Documentation

◆ structural_manager() [1/2]

structural_manager::structural_manager ( const structural_manager inst)
delete

◆ structural_manager() [2/2]

structural_manager::structural_manager ( const ParameterConstRef  Param)
explicit

This is the constructor of the structural_manager which initializes the data field.

Parameters
Paramis 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::~structural_manager ( )

Destructor.

Definition at line 91 of file structural_manager.cpp.

References circuit_graph, data_graph, and og.

Member Function Documentation

◆ add_connection()

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.

Parameters
srcis the source.
destis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_constant()

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;.

Parameters
idis the name of the constant;
owneris the reference to the owner of the constant;
typeis the type of the constant;
valueis the value of the constant in string form;
treenodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_module_from_technology_library()

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.

Parameters
idis the name of the object.
fu_nameis the name of the type.
library_nameis the name of the library.
owneris the owner of the object.
TMis the technology manager.
Returns
the object created.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_NP_functionality()

void structural_manager::add_NP_functionality ( structural_objectRef  cir,
NP_functionality::NP_functionaly_type  dt,
std::string  functionality_description 
)
static

Add a not-parsed functionality.

Parameters
owneris the reference to the owner of the functionality.
dtis the type of the not-parsed functionality.
descris 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_port()

structural_objectRef structural_manager::add_port ( const std::string &  id,
port_o::port_direction  pdir,
structural_objectRef  owner,
structural_type_descriptorRef  type_descr,
unsigned int  treenode = 0 
)
static

Create a new port.

Parameters
idis the name of the port.
pdirrepresent the direction of the port (in, out, in-out, gen).
owneris the reference to the owner of the port.
port_typeis the type of the port.
treenodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_port_vector()

structural_objectRef structural_manager::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 
)
static

Create a new port_vector.

Parameters
idis the name of the port_vector.
pdirrepresent the direction of the port_vector (in, out, in-out, gen).
n_portsis 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.
owneris the reference to the owner of the port_vector.
port_typeis the type of the port_vector.
treenodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_sensitivity()

void structural_manager::add_sensitivity ( structural_objectRef  obj,
structural_objectRef  pr 
)

Add an object to the sensitivity list of process/service.

Parameters
objis the object.
pris the process.

Definition at line 564 of file structural_manager.cpp.

◆ add_sign()

structural_objectRef structural_manager::add_sign ( std::string  id,
structural_objectRef  owner,
structural_type_descriptorRef  sign_type,
unsigned int  treenode = 0 
)
static

Create a new signal.

Parameters
idis the name of the signal.
owneris the reference to the owner of the signal.
sign_typeis the type of the signal.
treenodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_sign_vector()

structural_objectRef structural_manager::add_sign_vector ( std::string  id,
unsigned int  n_signs,
structural_objectRef  owner,
structural_type_descriptorRef  sign_type,
unsigned int  treenode = 0 
)
static

◆ build_graph()

void structural_manager::build_graph ( const structural_objectRef top,
graphs_collection bg 
)
private

◆ change_connection()

void structural_manager::change_connection ( structural_objectRef  old_obj,
structural_objectRef  new_obj,
structural_objectRef  owner 
)

◆ change_port_direction()

void structural_manager::change_port_direction ( structural_objectRef  port_object,
port_o::port_direction  pdir,
structural_objectRef  owner 
)
static

Change the direction of the port.

Parameters
port_objectis the port that will change the pdir
pdirrepresent the new direction of the port (in, out, in-out, gen).
owneris 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_bound()

bool structural_manager::check_bound ( structural_objectRef  src,
structural_objectRef  sign 
)
private

Function that check if a signal (or port) is already bound on a port.

Parameters
srcis the reference to the port.
signis the reference of the signal (or the second port).

Definition at line 110 of file structural_manager.cpp.

References sign.

◆ check_object()

bool structural_manager::check_object ( std::string  id,
structural_objectRef  owner,
so_kind  type 
)
static

Verify if the component is already associated with owner.

Parameters
idis the name of the object.
so_kindis the type of the object.
Returns
true if the object is already associated with owner, false otherwise.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_structure()

void structural_manager::check_structure ( structural_objectRef  obj,
bool  permissive = false 
)
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ check_type()

bool structural_manager::check_type ( structural_objectRef  src_type,
structural_objectRef  dest_type 
)
private

Check if two type structural object are consistent.

Parameters
src_typeis the first structural object.
dest_typeis the second structural object.
Returns
true if the two structural objects are consistent.

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create()

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.

Parameters
idis the name of the object.
ctyperepresent the type of the object (component or channel).
owneris the owner of the object.
obj_typeis the type descriptor of the object.
treenodeis 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.

Here is the call graph for this function:

◆ get_circ()

const structural_objectRef structural_manager::get_circ ( ) const
inline

Get a reference to circ field.

Returns
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_debug_level()

int structural_manager::get_debug_level ( ) const
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().

Here is the caller graph for this function:

◆ get_PI()

const vertex & structural_manager::get_PI ( structural_objectRef  level) const

Return the PI vertex of the circuit, at a specific level.

Parameters
levelrepresent the reference to the required level.

Definition at line 842 of file structural_manager.cpp.

References circuit_graph, graph::GetGraphInfo(), and THROW_ASSERT.

Here is the call graph for this function:

◆ INIT()

void structural_manager::INIT ( bool  permissive = false)

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print()

void structural_manager::print ( std::ostream &  os) const

Function that prints the circuit data structure.

Parameters
osis the output stream

Definition at line 829 of file structural_manager.cpp.

References circuit, and structural_object::get_id().

Here is the call graph for this function:

◆ reconnect_signal_member()

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.

Here is the call graph for this function:

◆ remove_connection()

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().

Here is the caller graph for this function:

◆ remove_empty_signal()

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.

◆ remove_module()

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().

Here is the call graph for this function:

◆ set_top_info() [1/2]

void structural_manager::set_top_info ( const std::string &  id,
const technology_managerRef LM,
const std::string &  Library = "" 
)

◆ set_top_info() [2/2]

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.

Parameters
o_tnis the owner c_object.
tnis the treenode.
Returns
the c_object. Set the characteristics of the Top object.
Parameters
idis the name of the object.
module_typeis the type of the top object.
treenodeis the treenode of the object.

Definition at line 123 of file structural_manager.cpp.

References circuit, and debug_level.

◆ SetParameter()

void structural_manager::SetParameter ( const std::string &  name,
const std::string &  value 
)

Specify a parameter for the top module.

Parameters
nameis the parameter name
valueis the parameter value

Definition at line 557 of file structural_manager.cpp.

References component_o_K, get_circ(), and THROW_ASSERT.

Here is the call graph for this function:

◆ WriteDot()

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().

Here is the caller graph for this function:

◆ xload()

void structural_manager::xload ( const xml_element node,
structural_managerRef const &  CM 
)
static

Load a structural manager from an xml file.

Parameters
nodeis a node of the xml tree.
CMis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xwrite()

void structural_manager::xwrite ( xml_element rootnode,
const technology_nodeRef tn = technology_nodeRef() 
) const

Add a component to an xml tree.

Parameters
rootnodeis 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().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream& operator<< ( std::ostream &  os,
const structural_manager s 
)
friend

Friend definition of the << operator.

Parameters
osis the output stream
sis the circuit manager element

Definition at line 353 of file structural_manager.hpp.

◆ operator<< [2/2]

std::ostream& operator<< ( std::ostream &  os,
const structural_managerRef  s 
)
friend

Friend definition of the << operator.

Pointer version.

Parameters
osis the output stream
sis the circuit manager element

Definition at line 363 of file structural_manager.hpp.

Field Documentation

◆ circuit

structural_objectRef structural_manager::circuit
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().

◆ circuit_graph

graph* structural_manager::circuit_graph
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().

◆ data_graph

graph* structural_manager::data_graph
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().

◆ debug_level

int structural_manager::debug_level
private

◆ og

graphs_collection* structural_manager::og
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().

◆ Param

const ParameterConstRef structural_manager::Param
private

class containing all the parameters

Definition at line 93 of file structural_manager.hpp.

Referenced by INIT(), and WriteDot().


The documentation for this class was generated from the following files:

Generated on Mon Feb 12 2024 13:04:04 for PandA-2024.02 by doxygen 1.8.13