PandA-2024.02
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Friends
structural_object Class Referenceabstract

Base object for all the structural objects. More...

#include <structural_objects.hpp>

Inheritance diagram for structural_object:
Inheritance graph
[legend]
Collaboration diagram for structural_object:
Collaboration graph
[legend]

Public Member Functions

 structural_object (int debug_level, const structural_objectRef o)
 Constructor for the structural_object. More...
 
virtual ~structural_object ()=default
 virtual destructor More...
 
const structural_objectRef get_owner () const
 Return the owner. More...
 
void set_owner (const structural_objectRef new_owner)
 set the owner of the structural object More...
 
void set_treenode (unsigned int n)
 Set the treenode id associated with the structural_object. More...
 
unsigned int get_treenode () const
 Return the treenode id associated with the structural_object. More...
 
void set_id (const std::string &s)
 Set the identifier associated with the structural_object. More...
 
const std::string & get_id () const
 Return the identifier associated with the structural_object. More...
 
void set_type (const structural_type_descriptorRef &s)
 Set the type of the structural_object. More...
 
const structural_type_descriptorRefget_typeRef () const
 Return the type descriptor of the structural_object. More...
 
void type_resize (unsigned long long new_bit_size)
 Just resize the size of the bits of the object. More...
 
void type_resize (unsigned long long new_bit_size, unsigned long long new_vec_size)
 resizing of vector objects More...
 
void set_black_box (bool bb)
 Set the black box property associated with the structural_object. More...
 
bool get_black_box () const
 Return the black box property. More...
 
void SetParameter (const std::string &name, const std::string &value)
 Set a parameter value. More...
 
bool ExistsParameter (std::string name) const
 Check if a parameter has been specified. More...
 
std::string GetParameter (std::string name) const
 Get the value associated to parameter if it has been associated; if it has not specified returns the default. More...
 
std::string GetDefaultParameter (std::string name) const
 Get the value associated to parameter if it has been associate; It throws an exception if it has not been associated. More...
 
CustomMap< std::string, std::string > GetParameters () const
 return the whole set of parameters More...
 
virtual void AddParameter (const std::string &name, const std::string &default_value)
 Add a parameter. More...
 
const std::string get_path () const
 Return a unique identifier of the structural object. More...
 
virtual void copy (structural_objectRef dest) const
 Perform a copy of the structural object. More...
 
virtual structural_objectRef find_member (const std::string &id, so_kind type, const structural_objectRef owner) const =0
 Return the object named id of a given type which belongs to or it is associated with the object. More...
 
virtual structural_objectRef find_isomorphic (const structural_objectRef key) const =0
 Find key in this object. More...
 
virtual void xload (const xml_element *Enode, structural_objectRef owner, structural_managerRef const &CM)
 Load a structural_object starting from an xml file. More...
 
virtual void xwrite (xml_element *Enode)
 Add a structural_object to an xml tree. More...
 
virtual void print (std::ostream &os) const
 Print the structural_object (for debug purpose) More...
 
virtual std::string get_kind_text () const =0
 Virtual function used to get the string name of a structural_object instance. More...
 
virtual enum so_kind get_kind () const =0
 Virtual function used to find the real type of a structural_object instance. More...
 

Protected Member Functions

std::string convert_so_short (so_kind in) const
 Convert a so_kind in a short string. More...
 

Protected Attributes

friend structural_manager
 
int debug_level
 debug level for the object More...
 

Static Protected Attributes

static simple_indent PP
 pretty print functor object used by all print members to indent the output of the print function. More...
 

Private Attributes

Wrefcount< structural_objectowner
 The owner of the object. More...
 
std::string id
 Identifier for this component. More...
 
structural_type_descriptorRef type
 The description of the type. More...
 
unsigned int treenode
 index of the treenode in the tree_manager associated with the structural object. More...
 
bool black_box
 True if the structural object is a black box (e.g., a library component). More...
 
CustomMap< std::string, std::string > parameters
 Map between parameter string and related values of an instance. More...
 
CustomMap< std::string, std::string > default_parameters
 Map between parameter string and its default value. More...
 

Static Private Attributes

default values associated with the members of the structural_type_descriptor class.
static const unsigned int treenode_DEFAULT = 0
 
static const bool black_box_DEFAULT = true
 

Friends

std::ostream & operator<< (std::ostream &os, const structural_objectRef o)
 Friend definition of the << operator. More...
 

Detailed Description

Base object for all the structural objects.

It provides a common interface for each structural object present in a design.

Definition at line 335 of file structural_objects.hpp.

Constructor & Destructor Documentation

◆ structural_object()

structural_object::structural_object ( int  debug_level,
const structural_objectRef  o 
)

Constructor for the structural_object.

Parameters
ois the owner (null object for the top object).

Definition at line 587 of file structural_objects.cpp.

◆ ~structural_object()

virtual structural_object::~structural_object ( )
virtualdefault

virtual destructor

Member Function Documentation

◆ AddParameter()

void structural_object::AddParameter ( const std::string &  name,
const std::string &  default_value 
)
virtual

Add a parameter.

Parameters
nameis the name of the parameter
default_valueis the default of the value

Reimplemented in module.

Definition at line 793 of file structural_objects.cpp.

References default_parameters, and THROW_ASSERT.

Referenced by top_entity_cs::add_context_switch_port_kernel(), memory::add_memory_parameter(), datapath_cs::add_ports(), module::AddParameter(), TasteInterfaceGeneration::InternalExec(), memory::propagate_memory_parameters(), and ModuleGeneratorManager::specialize_fu().

Here is the caller graph for this function:

◆ convert_so_short()

std::string structural_object::convert_so_short ( so_kind  in) const
protected

Convert a so_kind in a short string.

----------— structural object methods ------------------— //

Used in debugging.

Definition at line 555 of file structural_objects.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, signal_o_K, signal_vector_o_K, and THROW_UNREACHABLE.

Referenced by port_o::print(), constant_o::print(), signal_o::print(), channel_o::print(), and bus_connection_o::print().

Here is the caller graph for this function:

◆ copy()

void structural_object::copy ( structural_objectRef  dest) const
virtual

◆ ExistsParameter()

bool structural_object::ExistsParameter ( std::string  name) const

Check if a parameter has been specified.

Parameters
nameis parameter name

Definition at line 886 of file structural_objects.cpp.

References default_parameters.

Referenced by memory::add_memory_parameter(), memory::propagate_memory_parameters(), and fu_binding_cs::set_atomic_memory_parameter().

Here is the caller graph for this function:

◆ find_isomorphic()

virtual structural_objectRef structural_object::find_isomorphic ( const structural_objectRef  key) const
pure virtual

Find key in this object.

Parameters
keyis the object searched.

Implemented in bus_connection_o, channel_o, component_o, module, signal_o, constant_o, action_o, data_o, event_o, and port_o.

Referenced by module::copy(), and module::find_isomorphic().

Here is the caller graph for this function:

◆ find_member()

virtual structural_objectRef structural_object::find_member ( const std::string &  id,
so_kind  type,
const structural_objectRef  owner 
) const
pure virtual

Return the object named id of a given type which belongs to or it is associated with the object.

Parameters
idis the identifier of the object we are looking for.
typeis the type of the object we are looking for.
owneris the owner of the object named id.

Implemented in bus_connection_o, channel_o, component_o, module, signal_o, constant_o, action_o, data_o, event_o, and port_o.

Referenced by conn_binding::add_command_ports(), top_entity::add_command_signals(), structural_manager::add_connection(), top_entity_cs::add_context_switch_port(), top_entity_cs::add_context_switch_port_kernel(), fu_binding::add_gate(), top_entity_cs::add_input_register(), RTLCharacterization::add_input_register(), RTLCharacterization::add_output_register(), top_entity::add_ports(), classic_datapath::add_ports(), ParallelMemoryConnBinding::add_to_SM(), StateTransitionGraphManager::add_to_SM(), fu_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(), allocation::BuildProxyFunctionVerilog(), allocation::BuildProxyFunctionVHDL(), allocation::BuildProxyWrapper(), top_entity_parallel_cs::BW_loop_iter(), structural_manager::check_object(), 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(), WB4_interface::connect_with_signal(), WB4_interface::connect_with_signal_name(), conn_binding_cs::connectOutOr(), HWDiscrepancyAnalysis::Exec(), 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(), TasteInterfaceGeneration::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), top_entity::InternalExec(), datapath_parallel_cs::InternalExec(), fu_binding::kill_proxy_memory_units(), 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_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(), ParallelMemoryFuBinding::manage_module_ports(), conn_binding::mux_allocation(), top_entity_parallel_cs::resize_controller_parallel(), StateTransitionGraphManager::specialise_mu(), reg_binding_cs::specialise_reg(), HDL_manager::write_fsm(), signal_o::xload(), and module::xload().

Here is the caller graph for this function:

◆ get_black_box()

bool structural_object::get_black_box ( ) const

Return the black box property.

Definition at line 770 of file structural_objects.cpp.

References black_box.

Referenced by module::set_NP_functionality(), HDL_manager::write_module(), and module::xload().

Here is the caller graph for this function:

◆ get_id()

const std::string & structural_object::get_id ( ) const

Return the identifier associated with the structural_object.

Definition at line 642 of file structural_objects.cpp.

References id.

Referenced by conn_binding::add_command_ports(), top_entity::add_command_signals(), structural_manager::add_connection(), conn_binding::add_datapath_connection(), module::add_internal_object(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), fu_binding::add_to_SM(), module_interface::AddConnection(), module_interface::AddConstant(), module::AddParameter(), module_interface::AddSignal(), RTLCharacterization::AnalyzeCell(), FunctionalUnitStep::AnalyzeFu(), minimal_interface::build_wrapper(), allocation::BuildProxyFunctionVerilog(), allocation::BuildProxyFunctionVHDL(), allocation::BuildProxyWrapper(), module::change_port_direction(), structural_manager::check_structure(), fu_binding_cs::connect_selector_kernel(), WB4_interface::connect_with_signal(), ModuleGeneratorManager::create_generic_module(), WB4Intercon_interface::exec(), port_o::find_bounded_object(), port_o::find_isomorphic(), constant_o::find_isomorphic(), signal_o::find_isomorphic(), module::find_isomorphic(), BackendFlow::GenerateSynthesisScripts(), get_path(), get_typeRef(), TestbenchGeneration::Initialize(), conn_binding_cs::instantiate_suspension_component(), TestbenchAcknowledgeModuleGenerator::InternalExec(), TestbenchArrayModuleGenerator::InternalExec(), TestbenchAXIMModuleGenerator::InternalExec(), TestbenchFifoModuleGenerator::InternalExec(), TestbenchHandshakeModuleGenerator::InternalExec(), TestbenchNoneModuleGenerator::InternalExec(), TestbenchValidModuleGenerator::InternalExec(), TestbenchOvalidModuleGenerator::InternalExec(), TestbenchAxisModuleGenerator::InternalExec(), Write_validModuleGenerator::InternalExec(), Read_acknowledgeModuleGenerator::InternalExec(), Read_axisModuleGenerator::InternalExec(), Read_fifoModuleGenerator::InternalExec(), Read_handshakeModuleGenerator::InternalExec(), Read_validModuleGenerator::InternalExec(), ReadWrite_arrayModuleGenerator::InternalExec(), ReadWrite_m_axiModuleGenerator::InternalExec(), ReadWriteDP_arrayModuleGenerator::InternalExec(), Write_axisModuleGenerator::InternalExec(), Write_noneModuleGenerator::InternalExec(), Write_handshakeModuleGenerator::InternalExec(), Write_acknowledgeModuleGenerator::InternalExec(), Write_fifoModuleGenerator::InternalExec(), Read_noneModuleGenerator::InternalExec(), cs_interface::InternalExec(), TopEntityMemoryMapped::InternalExec(), WB4_interface::InternalExec(), fu_binding::kill_proxy_function_units(), VHDL_writer::may_slice_string(), verilog_writer::may_slice_string(), conn_binding::mux_connection(), cg_edge_info::print(), structural_manager::print(), propagateInterface(), module::remove_internal_object(), module::remove_port(), fu_binding::specialise_fu(), VHDL_writer::type_converter_size(), verilog_writer::type_converter_size(), VHDL_writer::write_io_signal_post_fix(), verilog_writer::write_io_signal_post_fix(), VHDL_writer::write_io_signal_post_fix_vector(), verilog_writer::write_io_signal_post_fix_vector(), HDL_manager::write_module(), VHDL_writer::write_module_instance_begin(), verilog_writer::write_module_instance_begin(), VHDL_writer::write_module_parametrization_decl(), VHDL_writer::write_port_binding(), verilog_writer::write_port_binding(), verilog_writer::write_port_declaration(), VHDL_writer::write_port_declaration(), verilog_writer::write_signal_declaration(), VHDL_writer::write_signal_declaration(), VHDL_writer::write_vector_port_binding(), verilog_writer::write_vector_port_binding(), port_o::xload(), signal_o::xload(), module::xload(), and port_o::xwrite().

Here is the caller graph for this function:

◆ get_kind()

virtual enum so_kind structural_object::get_kind ( ) const
pure virtual

Virtual function used to find the real type of a structural_object instance.

Returns
a so_kind enum identifying the object type.

Implemented in signal_o, and port_o.

Referenced by conn_binding::add_command_ports(), structural_manager::add_connection(), port_o::add_connection(), constant_o::add_connection(), conn_binding::add_datapath_connection(), module::add_event(), module::add_internal_object(), module::add_local_data(), structural_manager::add_module_from_technology_library(), structural_manager::add_NP_functionality(), structural_manager::add_port(), structural_manager::add_port_vector(), top_entity::add_ports(), module::add_process(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), module::add_service(), structural_manager::add_sign(), structural_manager::add_sign_vector(), fu_binding::add_to_SM(), conn_binding::add_to_SM(), RTLCharacterization::AnalyzeCell(), structural_manager::build_graph(), minimal_interface::build_wrapper(), allocation::BuildProxyWrapper(), structural_manager::change_port_direction(), WB4_interface::connect_with_signal_name(), module::copy(), TestbenchGeneration::Exec(), port_o::find_isomorphic(), constant_o::find_isomorphic(), signal_o::find_isomorphic(), module::find_isomorphic(), channel_o::find_isomorphic(), HDL_manager::get_post_order_structural_components(), TasteInterfaceGeneration::InternalExec(), HDL_manager::io_signal_fix_ith(), HDL_manager::io_signal_fix_ith_vector(), 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_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(), verilog_writer::may_slice_string(), VHDL_writer::may_slice_string(), conn_binding::mux_connection(), cg_edge_info::print(), structural_manager::reconnect_signal_member(), module::remove_internal_object(), structural_manager::remove_module(), port_o::resize_if_busport(), port_o::resize_std_port(), fu_binding::specialise_fu(), RTLCharacterization::specialize_fu(), port_o::substitute_connection(), verilog_writer::type_converter_size(), VHDL_writer::type_converter_size(), VHDL_writer::write_io_signal_post_fix(), verilog_writer::write_io_signal_post_fix(), VHDL_writer::write_io_signal_post_fix_vector(), verilog_writer::write_io_signal_post_fix_vector(), verilog_writer::write_library_declaration(), VHDL_writer::write_library_declaration(), HDL_manager::write_module(), VHDL_writer::write_module_declaration(), VHDL_writer::write_module_definition_end(), VHDL_writer::write_module_instance_begin(), verilog_writer::write_module_instance_begin(), VHDL_writer::write_module_internal_declaration(), VHDL_writer::write_module_parametrization(), verilog_writer::write_module_parametrization(), VHDL_writer::write_module_parametrization_decl(), verilog_writer::write_module_parametrization_decl(), VHDL_writer::write_port_binding(), verilog_writer::write_port_binding(), verilog_writer::write_port_declaration(), VHDL_writer::write_port_declaration(), verilog_writer::write_signal_declaration(), VHDL_writer::write_signal_declaration(), VHDL_writer::write_vector_port_binding(), verilog_writer::write_vector_port_binding(), signal_o::xload(), and module::xload().

Here is the caller graph for this function:

◆ get_kind_text()

virtual std::string structural_object::get_kind_text ( ) const
pure virtual

◆ get_owner()

const structural_objectRef structural_object::get_owner ( ) const

Return the owner.

Definition at line 595 of file structural_objects.cpp.

References Wrefcount< T >::lock(), and owner.

Referenced by conn_binding::add_command_ports(), structural_manager::add_connection(), port_o::add_connection(), conn_binding::add_datapath_connection(), module::add_event(), module::add_gen_port(), module::add_in_out_port(), module::add_in_port(), module::add_internal_object(), module::add_local_data(), module::add_out_port(), module::add_process(), module::add_service(), minimal_interface::build_wrapper(), structural_manager::change_connection(), structural_manager::check_structure(), module::copy(), port_o::find_bounded_object(), port_o::find_isomorphic(), constant_o::find_isomorphic(), signal_o::find_isomorphic(), module::find_isomorphic(), channel_o::find_isomorphic(), port_o::get_connected_signal(), get_path(), GetParameters(), HDL_manager::io_signal_fix_ith(), HDL_manager::io_signal_fix_ith_vector(), signal_o::is_full_connected(), VHDL_writer::may_slice_string(), verilog_writer::may_slice_string(), cg_edge_info::print(), VHDL_writer::type_converter_size(), verilog_writer::type_converter_size(), VHDL_writer::write_io_signal_post_fix(), verilog_writer::write_io_signal_post_fix(), VHDL_writer::write_io_signal_post_fix_vector(), verilog_writer::write_io_signal_post_fix_vector(), VHDL_writer::write_port_binding(), verilog_writer::write_port_binding(), VHDL_writer::write_vector_port_binding(), verilog_writer::write_vector_port_binding(), and signal_o::xload().

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

◆ get_path()

const std::string structural_object::get_path ( ) const

Return a unique identifier of the structural object.

It is composed by the identifier of the current structural object and by its owners separated by the HIERARCHY_SEPARATOR. Structural objects are viewed as elements of a standard filesystem.

Definition at line 991 of file structural_objects.cpp.

References get_id(), get_owner(), and HIERARCHY_SEPARATOR.

Referenced by conn_binding::add_command_ports(), structural_manager::add_connection(), port_o::add_connection(), structural_manager::add_constant(), conn_binding::add_datapath_connection(), module::add_internal_object(), port_o::add_n_ports(), structural_manager::add_port(), structural_manager::add_port_vector(), structural_manager::add_sign(), structural_manager::add_sign_vector(), conn_binding::add_sparse_logic_dp(), module_interface::AddConnection(), module_interface::AddConstant(), module_interface::AddSignal(), structural_manager::build_graph(), WB4_interface::connect_with_signal_name(), port_o::copy(), signal_o::copy(), module::copy(), structural_manager::create(), HWDiscrepancyAnalysis::Exec(), port_o::find_bounded_object(), module::find_isomorphic(), port_o::get_connected_signal(), module::get_in_port(), port_o::get_port(), signal_o::get_port(), port_o::get_ports_size(), signal_o::get_signal(), TasteInterfaceGeneration::InternalExec(), add_library::InternalExec(), cs_interface::manage_extern_global_port_top(), fu_binding::manage_memory_ports_parallel_chained(), conn_binding::mux_allocation(), conn_binding::mux_connection(), jms_sorter::operator()(), print(), structural_manager::reconnect_signal_member(), port_o::remove_connection(), module::remove_port(), port_o::resize_std_port(), fu_binding::specialise_fu(), StateTransitionGraphManager::specialise_mu(), conn_binding::specialise_mux(), reg_binding::specialise_reg(), port_o::substitute_connection(), VHDL_writer::type_converter_size(), type_resize(), VHDL_writer::write_component_declaration(), HDL_manager::write_module(), VHDL_writer::write_module_parametrization(), verilog_writer::write_module_parametrization(), VHDL_writer::write_port_binding(), verilog_writer::write_port_binding(), verilog_writer::write_vector_port_binding(), module::xload(), xwrite(), port_o::xwrite(), constant_o::xwrite(), signal_o::xwrite(), and channel_o::xwrite().

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

◆ get_treenode()

unsigned int structural_object::get_treenode ( ) const

Return the treenode id associated with the structural_object.

Definition at line 632 of file structural_objects.cpp.

References treenode.

◆ get_typeRef()

const structural_type_descriptorRef & structural_object::get_typeRef ( ) const

Return the type descriptor of the structural_object.

Definition at line 652 of file structural_objects.cpp.

References get_id(), THROW_ASSERT, and type.

Referenced by top_entity::add_command_signals(), structural_manager::add_connection(), conn_binding::add_datapath_connection(), top_entity_cs::add_input_register(), top_entity::add_input_register(), RTLCharacterization::add_input_register(), port_o::add_n_ports(), signal_o::add_n_signals(), RTLCharacterization::add_output_register(), cs_interface::add_parameter_port(), ModuleGeneratorManager::add_port_parameters(), top_entity::add_ports(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), module_interface::add_sign(), module_interface::add_sign_vector(), ParallelMemoryFuBinding::add_to_SM(), fu_binding::add_to_SM(), module_interface::AddSignal(), RTLCharacterization::AnalyzeCell(), FunctionalUnitStep::AnalyzeFu(), structural_manager::build_graph(), WB4_interface::build_WB4_complete_logic(), minimal_interface::build_wrapper(), allocation::BuildProxyFunctionVHDL(), allocation::BuildProxyWrapper(), structural_manager::check_type(), WB4_interface::connect_with_signal_name(), module::copy(), AllocationInformation::estimate_call_delay(), WB4Intercon_interface::exec(), module::get_in_port(), port_o::get_port_size(), GetParameter(), GetParameters(), TopEntityMemoryMapped::insertMemoryMappedRegister(), pipeline_controller::InternalExec(), cs_interface::InternalExec(), add_library::InternalExec(), WB4_interface::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_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(), ParallelMemoryFuBinding::manage_module_ports(), VHDL_writer::may_slice_string(), verilog_writer::may_slice_string(), conn_binding::mux_allocation(), RTLCharacterization::resize_port(), port_o::set_port_size(), SetParameter(), fu_binding::specialise_fu(), ModuleGeneratorManager::specialize_fu(), VHDL_writer::type_converter_size(), verilog_writer::type_converter_size(), VHDL_writer::write_module_parametrization(), verilog_writer::write_module_parametrization(), VHDL_writer::write_module_parametrization_decl(), VHDL_writer::write_port_binding(), verilog_writer::write_port_declaration(), VHDL_writer::write_port_declaration(), verilog_writer::write_signal_declaration(), VHDL_writer::write_signal_declaration(), TestbenchGeneration::write_verilator_testbench(), module::xload(), and port_o::xwrite().

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

◆ GetDefaultParameter()

std::string structural_object::GetDefaultParameter ( std::string  name) const

Get the value associated to parameter if it has been associate; It throws an exception if it has not been associated.

Parameters
nameis parameter name
Returns
parameter value

Definition at line 802 of file structural_objects.cpp.

References default_parameters, and THROW_ASSERT.

◆ GetParameter()

std::string structural_object::GetParameter ( std::string  name) const

Get the value associated to parameter if it has been associated; if it has not specified returns the default.

Parameters
nameis parameter name
Returns
parameter value

Definition at line 782 of file structural_objects.cpp.

References default_parameters, get_typeRef(), structural_type_descriptor::id_type, parameters, and THROW_ASSERT.

Referenced by memory::add_memory_parameter(), TestbenchGeneration::Exec(), and memory::propagate_memory_parameters().

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

◆ GetParameters()

CustomMap< std::string, std::string > structural_object::GetParameters ( ) const

◆ print()

void structural_object::print ( std::ostream &  os) const
virtual

Print the structural_object (for debug purpose)

Parameters
osis an output stream

Reimplemented in bus_connection_o, channel_o, component_o, module, signal_o, constant_o, action_o, data_o, event_o, and port_o.

Definition at line 979 of file structural_objects.cpp.

References black_box, get_path(), PP, treenode, and type.

Referenced by conn_binding::mux_connection(), port_o::print(), event_o::print(), data_o::print(), action_o::print(), constant_o::print(), signal_o::print(), module::print(), bus_connection_o::print(), and verilog_writer::write_module_parametrization().

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

◆ set_black_box()

void structural_object::set_black_box ( bool  bb)

Set the black box property associated with the structural_object.

Parameters
bbis true when the object is a black box, false otherwise. The black box property has mean only in case of components and channels.

Definition at line 765 of file structural_objects.cpp.

References black_box.

Referenced by module::add_internal_object(), pipeline_controller::InternalExec(), fsm_controller::InternalExec(), TasteInterfaceGeneration::InternalExec(), top_entity_parallel_cs::InternalExec(), classic_datapath::InternalExec(), datapath_parallel_cs::InternalExec(), and module::set_NP_functionality().

Here is the caller graph for this function:

◆ set_id()

void structural_object::set_id ( const std::string &  s)

◆ set_owner()

void structural_object::set_owner ( const structural_objectRef  new_owner)

set the owner of the structural object

Parameters
new_owneris the owner (null object for the top object).

Definition at line 600 of file structural_objects.cpp.

References owner, and THROW_ASSERT.

Referenced by WB4Intercon_interface::exec(), cs_interface::InternalExec(), minimal_interface::InternalExec(), TasteInterfaceGeneration::InternalExec(), top_entity_parallel_cs::InternalExec(), and WB4_interface::InternalExec().

Here is the caller graph for this function:

◆ set_treenode()

void structural_object::set_treenode ( unsigned int  n)

Set the treenode id associated with the structural_object.

Parameters
nis the treenode id.

Definition at line 627 of file structural_objects.cpp.

References treenode.

◆ set_type()

void structural_object::set_type ( const structural_type_descriptorRef s)

◆ SetParameter()

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

◆ type_resize() [1/2]

void structural_object::type_resize ( unsigned long long  new_bit_size)

◆ type_resize() [2/2]

void structural_object::type_resize ( unsigned long long  new_bit_size,
unsigned long long  new_vec_size 
)

◆ xload()

void structural_object::xload ( const xml_element Enode,
structural_objectRef  owner,
structural_managerRef const &  CM 
)
virtual

Load a structural_object starting from an xml file.

Parameters
nodeis a node of the xml tree.
owneris the refcount version of this.
CMis the circuit manager.

owner not managed by xload

Reimplemented in bus_connection_o, channel_o, component_o, module, signal_o, constant_o, action_o, data_o, event_o, and port_o.

Definition at line 891 of file structural_objects.cpp.

References black_box, CE_XVM, xml_node::convert_escaped(), debug_level, DEBUG_LEVEL_VERY_PEDANTIC, default_parameters, xml_child::get_children(), GET_CLASS_NAME, xml_text_node::get_content(), xml_node::get_line(), LOAD_XVM, PRINT_DBG_MEX, THROW_ASSERT, THROW_ERROR, treenode, type, and structural_type_descriptor::xload().

Referenced by port_o::xload(), event_o::xload(), data_o::xload(), action_o::xload(), signal_o::xload(), module::xload(), and bus_connection_o::xload().

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

◆ xwrite()

void structural_object::xwrite ( xml_element Enode)
virtual

Add a structural_object to an xml tree.

Parameters
rootnodeis the root node at which the xml representation of the structural object is attached.

Reimplemented in bus_connection_o, channel_o, component_o, module, signal_o, constant_o, action_o, data_o, event_o, and port_o.

Definition at line 945 of file structural_objects.cpp.

References xml_child::add_child_element(), xml_child::add_child_text(), black_box, black_box_DEFAULT, default_parameters, get_path(), STR, treenode, treenode_DEFAULT, type, WRITE_XNVM2, WRITE_XVM, and structural_type_descriptor::xwrite().

Referenced by structural_manager::xwrite(), port_o::xwrite(), event_o::xwrite(), data_o::xwrite(), action_o::xwrite(), constant_o::xwrite(), signal_o::xwrite(), module::xwrite(), and bus_connection_o::xwrite().

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

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const structural_objectRef  o 
)
friend

Friend definition of the << operator.

Definition at line 553 of file structural_objects.hpp.

Field Documentation

◆ black_box

bool structural_object::black_box
private

True if the structural object is a black box (e.g., a library component).

Definition at line 350 of file structural_objects.hpp.

Referenced by copy(), get_black_box(), print(), set_black_box(), xload(), and xwrite().

◆ black_box_DEFAULT

const bool structural_object::black_box_DEFAULT = true
staticprivate

Definition at line 589 of file structural_objects.hpp.

Referenced by xwrite().

◆ debug_level

int structural_object::debug_level
protected

◆ default_parameters

CustomMap<std::string, std::string> structural_object::default_parameters
private

Map between parameter string and its default value.

Definition at line 356 of file structural_objects.hpp.

Referenced by AddParameter(), copy(), ExistsParameter(), GetDefaultParameter(), GetParameter(), GetParameters(), SetParameter(), xload(), and xwrite().

◆ id

std::string structural_object::id
private

Identifier for this component.

Definition at line 341 of file structural_objects.hpp.

Referenced by copy(), and get_id().

◆ owner

Wrefcount<structural_object> structural_object::owner
private

The owner of the object.

Definition at line 338 of file structural_objects.hpp.

Referenced by get_owner(), and set_owner().

◆ parameters

CustomMap<std::string, std::string> structural_object::parameters
private

Map between parameter string and related values of an instance.

Definition at line 353 of file structural_objects.hpp.

Referenced by copy(), GetParameter(), GetParameters(), and SetParameter().

◆ PP

simple_indent structural_object::PP
staticprotected

pretty print functor object used by all print members to indent the output of the print function.

Definition at line 369 of file structural_objects.hpp.

Referenced by structural_type_descriptor::check_type(), print(), port_o::print(), event_o::print(), data_o::print(), action_o::print(), constant_o::print(), signal_o::print(), module::print(), channel_o::print(), and bus_connection_o::print().

◆ structural_manager

friend structural_object::structural_manager
protected

Definition at line 359 of file structural_objects.hpp.

◆ treenode

unsigned int structural_object::treenode
private

index of the treenode in the tree_manager associated with the structural object.

Definition at line 347 of file structural_objects.hpp.

Referenced by copy(), get_treenode(), print(), set_treenode(), xload(), and xwrite().

◆ treenode_DEFAULT

const unsigned int structural_object::treenode_DEFAULT = 0
staticprivate

Definition at line 588 of file structural_objects.hpp.

Referenced by xwrite().

◆ type

structural_type_descriptorRef structural_object::type
private

The description of the type.

Definition at line 344 of file structural_objects.hpp.

Referenced by copy(), get_typeRef(), print(), set_type(), type_resize(), xload(), and xwrite().


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

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