PandA-2024.02
|
Base object for all the structural objects. More...
#include <structural_objects.hpp>
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_descriptorRef & | get_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_object > | owner |
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... | |
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.
structural_object::structural_object | ( | int | debug_level, |
const structural_objectRef | o | ||
) |
Constructor for the structural_object.
o | is the owner (null object for the top object). |
Definition at line 587 of file structural_objects.cpp.
|
virtualdefault |
virtual destructor
|
virtual |
Add a parameter.
name | is the name of the parameter |
default_value | is 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().
|
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().
|
virtual |
Perform a copy of the structural object.
dest | destination object. |
the owner has to be already set.
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 747 of file structural_objects.cpp.
References black_box, structural_type_descriptor::copy(), debug_level, default_parameters, id, parameters, treenode, and type.
Referenced by fu_binding::add_gate(), structural_manager::add_module_from_technology_library(), ModuleGeneratorManager::add_port_parameters(), allocation::add_proxy_function_module(), allocation::add_proxy_function_wrapper(), fu_binding::add_to_SM(), port_o::copy(), event_o::copy(), data_o::copy(), action_o::copy(), constant_o::copy(), signal_o::copy(), module::copy(), and bus_connection_o::copy().
bool structural_object::ExistsParameter | ( | std::string | name | ) | const |
Check if a parameter has been specified.
name | is 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().
|
pure virtual |
Find key in this object.
key | is 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().
|
pure virtual |
Return the object named id of a given type which belongs to or it is associated with the object.
id | is the identifier of the object we are looking for. |
type | is the type of the object we are looking for. |
owner | is 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().
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().
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().
|
pure virtual |
Virtual function used to find the real type of a structural_object instance.
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().
|
pure virtual |
Virtual function used to get the string name of a structural_object instance.
Implemented in signal_o, and port_o.
Referenced by structural_manager::add_connection(), port_o::add_connection(), constant_o::add_connection(), module::add_internal_object(), top_entity::add_ports(), structural_manager::build_graph(), structural_manager::change_connection(), module::copy(), signal_o::find_member(), fu_binding::join_merge_split(), cs_interface::manage_extern_global_port_top(), fu_binding::manage_memory_ports_parallel_chained(), structural_manager::reconnect_signal_member(), VHDL_writer::write_component_declaration(), HDL_manager::write_module(), VHDL_writer::write_module_parametrization_decl(), module::xload(), event_o::xwrite(), data_o::xwrite(), action_o::xwrite(), constant_o::xwrite(), component_o::xwrite(), channel_o::xwrite(), and bus_connection_o::xwrite().
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().
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().
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.
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().
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.
name | is parameter name |
Definition at line 802 of file structural_objects.cpp.
References default_parameters, and THROW_ASSERT.
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.
name | is parameter name |
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().
CustomMap< std::string, std::string > structural_object::GetParameters | ( | ) | const |
return the whole set of parameters
Definition at line 808 of file structural_objects.cpp.
References default_parameters, functional_unit_K, functional_unit_template_K, technology_node::get_kind(), get_owner(), get_typeRef(), structural_type_descriptor::id_type, structural_type_descriptor::INT, structural_type_descriptor::OTHER, parameters, structural_type_descriptor::REAL, THROW_UNREACHABLE, structural_type_descriptor::UNKNOWN, and structural_type_descriptor::VECTOR_BOOL.
|
virtual |
Print the structural_object (for debug purpose)
os | is 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().
void structural_object::set_black_box | ( | bool | bb | ) |
Set the black box property associated with the structural_object.
bb | is 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().
void structural_object::set_id | ( | const std::string & | s | ) |
Set the identifier associated with the structural_object.
s | is a string identifying the structural_object. |
Definition at line 637 of file structural_objects.cpp.
Referenced by fu_binding::add_gate(), port_o::add_n_ports(), signal_o::add_n_signals(), fu_binding::add_to_SM(), allocation::BuildProxyWrapper(), WB4Intercon_interface::exec(), cs_interface::InternalExec(), TasteInterfaceGeneration::InternalExec(), WB4_interface::InternalExec(), constant_o::xload(), and signal_o::xload().
void structural_object::set_owner | ( | const structural_objectRef | new_owner | ) |
set the owner of the structural object
new_owner | is 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().
void structural_object::set_treenode | ( | unsigned int | n | ) |
Set the treenode id associated with the structural_object.
n | is the treenode id. |
Definition at line 627 of file structural_objects.cpp.
References treenode.
void structural_object::set_type | ( | const structural_type_descriptorRef & | s | ) |
Set the type of the structural_object.
s | is a type descriptor of a structural_object. |
Definition at line 647 of file structural_objects.cpp.
References type.
Referenced by port_o::add_n_ports(), signal_o::add_n_signals(), top_entity_parallel_cs::connect_loop_iter(), TopEntityMemoryMapped::insertStatusRegister(), conn_binding_cs::instantiate_suspension_component(), and cs_interface::InternalExec().
void structural_object::SetParameter | ( | const std::string & | name, |
const std::string & | value | ||
) |
Set a parameter value.
name | is parameter name |
value | is parameter value |
Definition at line 775 of file structural_objects.cpp.
References default_parameters, get_typeRef(), structural_type_descriptor::id_type, parameters, THROW_ASSERT, and symmetry::value.
Referenced by memory::add_memory_parameter(), classic_datapath::add_ports(), RTLCharacterization::AnalyzeCell(), WB4_interface::build_WB4_complete_logic(), TestbenchGeneration::Exec(), pipeline_controller::InternalExec(), TasteInterfaceGeneration::InternalExec(), memory::propagate_memory_parameters(), and fu_binding_cs::set_atomic_memory_parameter().
void structural_object::type_resize | ( | unsigned long long | new_bit_size | ) |
Just resize the size of the bits of the object.
Definition at line 658 of file structural_objects.cpp.
References structural_type_descriptor::BOOL, get_path(), structural_type_descriptor::id_type, structural_type_descriptor::INT, structural_type_descriptor::OTHER, structural_type_descriptor::REAL, structural_type_descriptor::size, THROW_ASSERT, THROW_ERROR, structural_type_descriptor::type, type, structural_type_descriptor::UINT, structural_type_descriptor::UNKNOWN, structural_type_descriptor::USER, structural_type_descriptor::VECTOR_BOOL, structural_type_descriptor::VECTOR_INT, structural_type_descriptor::VECTOR_REAL, structural_type_descriptor::vector_size, structural_type_descriptor::VECTOR_UINT, and structural_type_descriptor::VECTOR_USER.
Referenced by conn_binding::add_datapath_connection(), top_entity::add_input_register(), RTLCharacterization::add_input_register(), RTLCharacterization::add_output_register(), classic_datapath::add_ports(), minimal_interface::build_wrapper(), fu_binding_cs::connect_selector_kernel(), TestbenchGeneration::Exec(), fu_binding::join_merge_split(), cs_interface::resize_dimension_bus_port(), datapath_parallel_cs::resize_dimension_bus_port(), fu_binding_cs::resize_dimension_bus_port(), port_o::resize_if_busport(), port_o::resize_std_port(), conn_binding::specialise_mux(), and reg_binding_cs::specialise_reg().
void structural_object::type_resize | ( | unsigned long long | new_bit_size, |
unsigned long long | new_vec_size | ||
) |
resizing of vector objects
Definition at line 700 of file structural_objects.cpp.
References structural_type_descriptor::BOOL, get_path(), structural_type_descriptor::id_type, structural_type_descriptor::INT, structural_type_descriptor::OTHER, structural_type_descriptor::REAL, structural_type_descriptor::size, STR, THROW_ERROR, structural_type_descriptor::type, type, structural_type_descriptor::UINT, structural_type_descriptor::UNKNOWN, structural_type_descriptor::USER, structural_type_descriptor::VECTOR_BOOL, structural_type_descriptor::VECTOR_INT, structural_type_descriptor::VECTOR_REAL, structural_type_descriptor::vector_size, structural_type_descriptor::VECTOR_UINT, and structural_type_descriptor::VECTOR_USER.
|
virtual |
Load a structural_object starting from an xml file.
node | is a node of the xml tree. |
owner | is the refcount version of this. |
CM | is 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().
|
virtual |
Add a structural_object to an xml tree.
rootnode | is 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().
|
friend |
Friend definition of the << operator.
Definition at line 553 of file structural_objects.hpp.
|
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().
Definition at line 589 of file structural_objects.hpp.
Referenced by xwrite().
|
protected |
debug level for the object
Definition at line 362 of file structural_objects.hpp.
Referenced by port_o::add_n_ports(), signal_o::add_n_signals(), structural_manager::add_port(), structural_manager::add_port_vector(), structural_manager::add_sign(), structural_manager::add_sign_vector(), copy(), port_o::copy(), action_o::copy(), signal_o::copy(), module::copy(), port_o::resize_std_port(), xload(), and module::xload().
|
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().
|
private |
Identifier for this component.
Definition at line 341 of file structural_objects.hpp.
|
private |
The owner of the object.
Definition at line 338 of file structural_objects.hpp.
Referenced by get_owner(), and set_owner().
|
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().
|
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().
|
protected |
Definition at line 359 of file structural_objects.hpp.
|
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().
|
staticprivate |
Definition at line 588 of file structural_objects.hpp.
Referenced by xwrite().
|
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().