PandA-2024.02
Public Member Functions | Private Attributes
module Class Referenceabstract

This class describes a generic module. More...

#include <structural_objects.hpp>

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

Public Member Functions

 module (int debug_level, const structural_objectRef o)
 Constructor. More...
 
 ~module () override=default
 destructor More...
 
unsigned int get_num_ports () const
 Return the total number of the ports. More...
 
structural_objectRef get_positional_port (unsigned int index) const
 return a port of the module given its position More...
 
void add_in_port (structural_objectRef p)
 Add an input port. More...
 
const structural_objectRef get_in_port (unsigned int n) const
 Return the ith input port. More...
 
unsigned int get_in_port_size () const
 Return the number of input ports. More...
 
void add_out_port (structural_objectRef p)
 Add an output port. More...
 
const structural_objectRef get_out_port (unsigned int n) const
 Return the ith output port. More...
 
unsigned int get_out_port_size () const
 Return the number of output ports. More...
 
void add_in_out_port (structural_objectRef p)
 Add an input-output port. More...
 
const structural_objectRef get_in_out_port (unsigned int n) const
 Return the ith input-output port. More...
 
unsigned int get_in_out_port_size () const
 Return the number of output ports. More...
 
void add_gen_port (structural_objectRef p)
 Add a generic port. More...
 
const structural_objectRef get_gen_port (unsigned int n) const
 Return the ith generic port. More...
 
unsigned int get_gen_port_size () const
 Return the number of generic ports. More...
 
void remove_port (const std::string &id)
 remove a port from the module More...
 
void add_internal_object (structural_objectRef c)
 Add an internal component/channel/signal/bus_connection_o. More...
 
void remove_internal_object (structural_objectRef s)
 
const structural_objectRef get_internal_object (unsigned int n) const
 Return the ith internal objects. More...
 
unsigned int get_internal_objects_size () const
 Return the number of internal objects. More...
 
void add_process (structural_objectRef p)
 Add a process to the module. More...
 
const structural_objectRef get_process (unsigned int n) const
 Return the ith process. More...
 
unsigned int get_process_size () const
 Return the number of internal processes. More...
 
void add_service (structural_objectRef p)
 Add a service to the module. More...
 
const structural_objectRef get_service (unsigned int n) const
 Return the ith service. More...
 
unsigned int get_service_size () const
 Return the number of services. More...
 
void add_event (structural_objectRef e)
 Add an event to the module. More...
 
const structural_objectRef get_event (unsigned int n) const
 Return the ith event. More...
 
unsigned int get_event_size () const
 Return the number of events. More...
 
void add_local_data (structural_objectRef d)
 Add a local data. More...
 
const structural_objectRef get_local_data (unsigned int n) const
 Return the ith local data. More...
 
unsigned int get_local_data_size () const
 Return the number of local data. More...
 
void set_NP_functionality (NP_functionalityRef f)
 Set the alternative module behavior descriptions (Non SystemC based). More...
 
const NP_functionalityRefget_NP_functionality () const
 Return the alternative functionalities. More...
 
void get_NP_library_parameters (structural_objectRef owner, std::vector< std::pair< std::string, structural_objectRef >> &parameters) const
 Return the list of object that can be parametrized. More...
 
void copy (structural_objectRef dest) const override
 Perform a copy of the module. More...
 
structural_objectRef find_member (const std::string &id, so_kind type, const structural_objectRef owner) const override
 Return the object named id of a given type which belongs to or it is associated with the object. More...
 
structural_objectRef find_isomorphic (const structural_objectRef key) const override
 Find key in this object. More...
 
void xload (const xml_element *Enode, structural_objectRef owner, structural_managerRef const &CM) override=0
 Load a structural_object starting from an xml file. More...
 
void xwrite (xml_element *rootnode) override=0
 Add a structural_object to an xml tree. More...
 
bool is_var_args () const
 True if one of the ports of the module has the attribute is_var_args=true. More...
 
void print (std::ostream &os) const override
 Print the module (for debug purpose) More...
 
void set_critical ()
 set the component as critical with respect to the timing path More...
 
bool get_critical () const
 return if the component is critical or not More...
 
void set_generated ()
 set the component as generated More...
 
bool get_generated () const
 return if the component has been generated or not More...
 
void set_multi_unit_multiplicity (unsigned int value)
 set_multi_unit_multiplicity More...
 
unsigned int get_multi_unit_multiplicity () const
 get_multi_unit_multiplicity More...
 
void set_keep_hierarchy (bool ky)
 set_keep_hierarchy More...
 
bool get_keep_hierarchy () const
 get_keep_hierarchy More...
 
void change_port_direction (structural_objectRef port, port_o::port_direction pdir)
 change the direction of a port More...
 
const std::string get_description () const
 Return the description associated with the module. More...
 
void set_description (const std::string &d)
 Set the description associated with the module. More...
 
const std::string get_copyright () const
 Return the copyright associated with the module. More...
 
void set_copyright (const std::string &c)
 Set the copyright associated with the module. More...
 
const std::string get_authors () const
 Return the authors of the functional description of the module. More...
 
void set_authors (const std::string &a)
 Set the authors associated with the module. More...
 
const std::string get_license () const
 Return the license of the functional description of the module. More...
 
void set_license (const std::string &l)
 Set the license associated with the module. More...
 
const std::string get_specialized () const
 Return a non-empty string when the component has been specialized. More...
 
void set_specialized (const std::string &s)
 Set the specialization string. More...
 
void AddParameter (const std::string &name, const std::string &default_value) override
 Add a parameter. More...
 
- Public Member Functions inherited from structural_object
 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...
 
const std::string get_path () const
 Return a unique identifier of the structural object. 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...
 

Private Attributes

std::vector< structural_objectRefin_ports
 input port of this module More...
 
std::vector< structural_objectRefout_ports
 output ports of this module More...
 
std::vector< structural_objectRefin_out_ports
 Input-output ports of this module. More...
 
std::vector< structural_objectRefgen_ports
 generic ports of this module More...
 
std::vector< structural_objectRefinternal_objects
 internal components/channels/signals/bus_connection_os (for structural modules) More...
 
std::vector< structural_objectReflocal_data
 List of local data associated with the module. More...
 
std::vector< structural_objectReflist_of_event
 List of event associated with the module. More...
 
std::vector< structural_objectReflist_of_process
 List of processes associated with the module. More...
 
std::vector< structural_objectReflist_of_service
 List of services associated with the module. More...
 
NP_functionalityRef NP_descriptions
 Alternative descriptions of the behavior of the module. More...
 
unsigned int last_position_port
 store the last index of the positional binding More...
 
bool is_critical
 when true the component is involved into the critical path of the netlist More...
 
bool is_generated
 when true the component has been internally generated More...
 
std::map< unsigned int, structural_objectRefpositional_map
 positional map, given the index return the port in that position More...
 
std::map< std::string, structural_objectRefindex_signals
 index for signals this table is used to quickly search internal signals used by find_member and find_isomorphic More...
 
std::map< std::string, structural_objectRefindex_constants
 index for constants this table is used to quickly search internal constants used by find_member and find_isomorphic More...
 
std::map< std::string, structural_objectRefindex_components
 index for components this table is used to quickly search internal components used by find_member and find_isomorphic More...
 
std::map< std::string, structural_objectRefindex_channels
 index for channels this table is used to quickly search internal channels used by find_member and find_isomorphic More...
 
std::map< std::string, structural_objectRefindex_bus_connections
 index for bus_connections this table is used to quickly search internal bus_connections used by find_member and find_isomorphic More...
 
std::string description
 Store the module description. More...
 
std::string copyright
 Store the copyright description. More...
 
std::string authors
 Store the list of authors. More...
 
std::string license
 Store some tags concerning the license type associated with the functional unit. More...
 
std::string specialized
 when non empty it defines with respect what module has been specialized More...
 
unsigned int multi_unit_multiplicity
 multi-unit multiplicity is the number of units implemented by this module all doing the same thing More...
 
bool keep_hierarchy
 when true the module has the keep_hierarchy attribute active More...
 

Additional Inherited Members

- Protected Member Functions inherited from structural_object
std::string convert_so_short (so_kind in) const
 Convert a so_kind in a short string. More...
 
- Protected Attributes inherited from structural_object
friend structural_manager
 
int debug_level
 debug level for the object More...
 
- Static Protected Attributes inherited from structural_object
static simple_indent PP
 pretty print functor object used by all print members to indent the output of the print function. More...
 

Detailed Description

This class describes a generic module.

A module can be further specialized in a channel or in a component. This class should be not instantiated. Only channels and components can be instantiated.

Definition at line 1757 of file structural_objects.hpp.

Constructor & Destructor Documentation

◆ module()

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

Constructor.

Parameters
ois the owner of the module.

Definition at line 2860 of file structural_objects.cpp.

◆ ~module()

module::~module ( )
overridedefault

destructor

Member Function Documentation

◆ add_event()

void module::add_event ( structural_objectRef  e)

Add an event to the module.

Parameters
eis the event.

Definition at line 3253 of file structural_objects.cpp.

References event_o_K, refcount< T >::get(), structural_object::get_kind(), structural_object::get_owner(), list_of_event, and THROW_ASSERT.

Referenced by xload().

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

◆ add_gen_port()

void module::add_gen_port ( structural_objectRef  p)

Add a generic port.

Parameters
pis the port.

Definition at line 2988 of file structural_objects.cpp.

References gen_ports, refcount< T >::get(), structural_object::get_owner(), last_position_port, positional_map, and THROW_ASSERT.

Referenced by xload().

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

◆ add_in_out_port()

void module::add_in_out_port ( structural_objectRef  p)

Add an input-output port.

Parameters
pis the port.

Definition at line 2966 of file structural_objects.cpp.

References refcount< T >::get(), structural_object::get_owner(), in_out_ports, last_position_port, positional_map, and THROW_ASSERT.

Referenced by copy(), and xload().

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

◆ add_in_port()

void module::add_in_port ( structural_objectRef  p)

Add an input port.

Parameters
pis the port.

Definition at line 2921 of file structural_objects.cpp.

References refcount< T >::get(), structural_object::get_owner(), in_ports, last_position_port, positional_map, and THROW_ASSERT.

Referenced by copy(), and xload().

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

◆ add_internal_object()

void module::add_internal_object ( structural_objectRef  c)

◆ add_local_data()

void module::add_local_data ( structural_objectRef  d)

Add a local data.

Parameters
dis the local data.

Definition at line 3272 of file structural_objects.cpp.

References data_o_K, refcount< T >::get(), structural_object::get_kind(), structural_object::get_owner(), local_data, and THROW_ASSERT.

Referenced by xload().

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

◆ add_out_port()

void module::add_out_port ( structural_objectRef  p)

Add an output port.

Parameters
pis the port .

Definition at line 2944 of file structural_objects.cpp.

References refcount< T >::get(), structural_object::get_owner(), last_position_port, out_ports, positional_map, and THROW_ASSERT.

Referenced by copy(), and xload().

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

◆ add_process()

void module::add_process ( structural_objectRef  p)

Add a process to the module.

Parameters
pis the process.

Definition at line 3215 of file structural_objects.cpp.

References action_o_K, refcount< T >::get(), structural_object::get_kind(), structural_object::get_owner(), list_of_process, and THROW_ASSERT.

Referenced by xload().

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

◆ add_service()

void module::add_service ( structural_objectRef  p)

Add a service to the module.

Parameters
pis the service.

Definition at line 3234 of file structural_objects.cpp.

References action_o_K, refcount< T >::get(), structural_object::get_kind(), structural_object::get_owner(), list_of_service, and THROW_ASSERT.

Referenced by xload().

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

◆ AddParameter()

void module::AddParameter ( const std::string &  name,
const std::string &  default_value 
)
overridevirtual

Add a parameter.

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

Reimplemented from structural_object.

Definition at line 4747 of file structural_objects.cpp.

References structural_object::AddParameter(), structural_object::get_id(), NP_functionality::LIBRARY, MEMORY_PARAMETER, and NP_descriptions.

Here is the call graph for this function:

◆ change_port_direction()

void module::change_port_direction ( structural_objectRef  port,
port_o::port_direction  pdir 
)

change the direction of a port

Parameters
portis the port to be moved
pdiris the new direction

Definition at line 4642 of file structural_objects.cpp.

References gen_ports, structural_object::get_id(), in_out_ports, in_ports, out_ports, and THROW_ASSERT.

Here is the call graph for this function:

◆ copy()

void module::copy ( structural_objectRef  dest) const
overridevirtual

◆ find_isomorphic()

structural_objectRef module::find_isomorphic ( const structural_objectRef  key) const
overridevirtual

◆ find_member()

structural_objectRef module::find_member ( const std::string &  id,
so_kind  type,
const structural_objectRef  owner 
) const
overridevirtual

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.

Implements structural_object.

Reimplemented in channel_o, and component_o.

Definition at line 3326 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, gen_ports, in_out_ports, in_ports, index_bus_connections, index_channels, index_components, index_constants, index_signals, list_of_event, list_of_process, list_of_service, local_data, out_ports, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.

Referenced by component_o::find_member(), channel_o::find_member(), get_NP_library_parameters(), and xload().

Here is the caller graph for this function:

◆ get_authors()

const std::string module::get_authors ( ) const
inline

Return the authors of the functional description of the module.

Definition at line 2183 of file structural_objects.hpp.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_copyright()

const std::string module::get_copyright ( ) const
inline

Return the copyright associated with the module.

Definition at line 2167 of file structural_objects.hpp.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_critical()

bool module::get_critical ( ) const

return if the component is critical or not

Definition at line 2880 of file structural_objects.cpp.

References is_critical.

◆ get_description()

const std::string module::get_description ( ) const
inline

Return the description associated with the module.

Definition at line 2151 of file structural_objects.hpp.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_event()

const structural_objectRef module::get_event ( unsigned int  n) const

Return the ith event.

Parameters
nis the index of the event.

Definition at line 3261 of file structural_objects.cpp.

References list_of_event, and THROW_ASSERT.

◆ get_event_size()

unsigned int module::get_event_size ( ) const

Return the number of events.

Definition at line 3267 of file structural_objects.cpp.

References list_of_event.

◆ get_gen_port()

const structural_objectRef module::get_gen_port ( unsigned int  n) const

Return the ith generic port.

Parameters
nis the index of the port

Definition at line 2999 of file structural_objects.cpp.

References gen_ports, and THROW_ASSERT.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_gen_port_size()

unsigned int module::get_gen_port_size ( ) const

Return the number of generic ports.

Definition at line 3005 of file structural_objects.cpp.

References gen_ports.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_generated()

bool module::get_generated ( ) const

return if the component has been generated or not

Definition at line 2890 of file structural_objects.cpp.

References is_generated.

◆ get_in_out_port()

const structural_objectRef module::get_in_out_port ( unsigned int  n) const

Return the ith input-output port.

Parameters
nis the index of the port.

Definition at line 2977 of file structural_objects.cpp.

References in_out_ports, and THROW_ASSERT.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_in_out_port_size()

unsigned int module::get_in_out_port_size ( ) const

Return the number of output ports.

Definition at line 2983 of file structural_objects.cpp.

References in_out_ports.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_in_port()

const structural_objectRef module::get_in_port ( unsigned int  n) const

◆ get_in_port_size()

unsigned int module::get_in_port_size ( ) const

◆ get_internal_object()

const structural_objectRef module::get_internal_object ( unsigned int  n) const

Return the ith internal objects.

Parameters
nis the index of the objects.

Definition at line 3204 of file structural_objects.cpp.

References internal_objects, and THROW_ASSERT.

Referenced by structural_manager::build_graph(), computeResources(), and HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_internal_objects_size()

unsigned int module::get_internal_objects_size ( ) const

Return the number of internal objects.

Definition at line 3210 of file structural_objects.cpp.

References internal_objects.

Referenced by structural_manager::build_graph(), computeResources(), and HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_keep_hierarchy()

bool module::get_keep_hierarchy ( ) const

get_keep_hierarchy

Returns
if the module has the keep_hierarchy active or not

Definition at line 2910 of file structural_objects.cpp.

References keep_hierarchy.

◆ get_license()

const std::string module::get_license ( ) const
inline

Return the license of the functional description of the module.

Definition at line 2199 of file structural_objects.hpp.

Referenced by HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_local_data()

const structural_objectRef module::get_local_data ( unsigned int  n) const

Return the ith local data.

Parameters
nrepresent the index of the local data.

Definition at line 3280 of file structural_objects.cpp.

References local_data, and THROW_ASSERT.

◆ get_local_data_size()

unsigned int module::get_local_data_size ( ) const

Return the number of local data.

Definition at line 3286 of file structural_objects.cpp.

References local_data.

◆ get_multi_unit_multiplicity()

unsigned int module::get_multi_unit_multiplicity ( ) const

get_multi_unit_multiplicity

Returns
the number of units implemented by this module

Definition at line 2900 of file structural_objects.cpp.

References multi_unit_multiplicity.

◆ get_NP_functionality()

const NP_functionalityRef & module::get_NP_functionality ( ) const

Return the alternative functionalities.

Definition at line 3308 of file structural_objects.cpp.

References NP_descriptions.

Referenced by computeResources(), and HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_NP_library_parameters()

void module::get_NP_library_parameters ( structural_objectRef  owner,
std::vector< std::pair< std::string, structural_objectRef >> &  parameters 
) const

Return the list of object that can be parametrized.

This function is usually used by the backend.

Parameters
owneris the refcount version of this.

Definition at line 3313 of file structural_objects.cpp.

References find_member(), NP_functionality::get_library_parameters(), NP_descriptions, param, and port_vector_o_K.

Here is the call graph for this function:

◆ get_num_ports()

unsigned int module::get_num_ports ( ) const

Return the total number of the ports.

Definition at line 2870 of file structural_objects.cpp.

References last_position_port.

◆ get_out_port()

const structural_objectRef module::get_out_port ( unsigned int  n) const

Return the ith output port.

Parameters
nis the index of the port

Definition at line 2955 of file structural_objects.cpp.

References out_ports, and THROW_ASSERT.

Referenced by FunctionalUnitStep::AnalyzeFu(), structural_manager::build_graph(), allocation::BuildProxyWrapper(), TopEntityMemoryMapped::resizing_IO(), conn_binding::specialise_mux(), RTLCharacterization::specialize_fu(), and HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_out_port_size()

unsigned int module::get_out_port_size ( ) const

Return the number of output ports.

Definition at line 2961 of file structural_objects.cpp.

References out_ports.

Referenced by FunctionalUnitStep::AnalyzeFu(), structural_manager::build_graph(), allocation::BuildProxyWrapper(), TopEntityMemoryMapped::resizing_IO(), RTLCharacterization::specialize_fu(), and HDL_manager::write_module().

Here is the caller graph for this function:

◆ get_positional_port()

structural_objectRef module::get_positional_port ( unsigned int  index) const

return a port of the module given its position

Parameters
indexis the position of the port.

Definition at line 2915 of file structural_objects.cpp.

References positional_map, and THROW_ASSERT.

◆ get_process()

const structural_objectRef module::get_process ( unsigned int  n) const

Return the ith process.

Parameters
nis the index of the process.

Definition at line 3223 of file structural_objects.cpp.

References list_of_process, and THROW_ASSERT.

◆ get_process_size()

unsigned int module::get_process_size ( ) const

Return the number of internal processes.

Definition at line 3229 of file structural_objects.cpp.

References list_of_process.

◆ get_service()

const structural_objectRef module::get_service ( unsigned int  n) const

Return the ith service.

Parameters
nis the index of the service.

Definition at line 3242 of file structural_objects.cpp.

References list_of_service, and THROW_ASSERT.

◆ get_service_size()

unsigned int module::get_service_size ( ) const

Return the number of services.

Definition at line 3248 of file structural_objects.cpp.

References list_of_service.

◆ get_specialized()

const std::string module::get_specialized ( ) const
inline

Return a non-empty string when the component has been specialized.

The string identify with respect what the component has been specialized (e.g., generic_device, behavior...)

Definition at line 2216 of file structural_objects.hpp.

◆ is_var_args()

bool module::is_var_args ( ) const

True if one of the ports of the module has the attribute is_var_args=true.

Definition at line 3457 of file structural_objects.cpp.

References get_in_port(), and get_in_port_size().

Here is the call graph for this function:

◆ print()

void module::print ( std::ostream &  os) const
overridevirtual

Print the module (for debug purpose)

Parameters
osis an output stream

Reimplemented from structural_object.

Reimplemented in channel_o, and component_o.

Definition at line 4555 of file structural_objects.cpp.

References authors, copyright, description, gen_ports, in_out_ports, in_ports, internal_objects, license, list_of_event, list_of_process, list_of_service, local_data, NP_descriptions, out_ports, structural_object::PP, NP_functionality::print(), and structural_object::print().

Referenced by component_o::print(), and channel_o::print().

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

◆ remove_internal_object()

void module::remove_internal_object ( structural_objectRef  s)

◆ remove_port()

void module::remove_port ( const std::string &  id)

remove a port from the module

Parameters
idis the name of the port

Definition at line 3010 of file structural_objects.cpp.

References gen_ports, structural_object::get_id(), structural_object::get_path(), in_out_ports, in_ports, last_position_port, out_ports, positional_map, and THROW_ASSERT.

Here is the call graph for this function:

◆ set_authors()

void module::set_authors ( const std::string &  a)
inline

Set the authors associated with the module.

Definition at line 2191 of file structural_objects.hpp.

Referenced by copy().

Here is the caller graph for this function:

◆ set_copyright()

void module::set_copyright ( const std::string &  c)
inline

Set the copyright associated with the module.

Definition at line 2175 of file structural_objects.hpp.

Referenced by copy().

Here is the caller graph for this function:

◆ set_critical()

void module::set_critical ( )

set the component as critical with respect to the timing path

Definition at line 2875 of file structural_objects.cpp.

References is_critical.

Referenced by copy().

Here is the caller graph for this function:

◆ set_description()

void module::set_description ( const std::string &  d)
inline

Set the description associated with the module.

Definition at line 2159 of file structural_objects.hpp.

Referenced by copy().

Here is the caller graph for this function:

◆ set_generated()

void module::set_generated ( )

set the component as generated

Definition at line 2885 of file structural_objects.cpp.

References is_generated.

Referenced by copy().

Here is the caller graph for this function:

◆ set_keep_hierarchy()

void module::set_keep_hierarchy ( bool  ky)

set_keep_hierarchy

Parameters
kyis true when the module has the keep_hierarchy attribute true

Definition at line 2905 of file structural_objects.cpp.

References keep_hierarchy.

Referenced by copy().

Here is the caller graph for this function:

◆ set_license()

void module::set_license ( const std::string &  l)
inline

Set the license associated with the module.

Definition at line 2207 of file structural_objects.hpp.

Referenced by copy().

Here is the caller graph for this function:

◆ set_multi_unit_multiplicity()

void module::set_multi_unit_multiplicity ( unsigned int  value)

set_multi_unit_multiplicity

Parameters
valueis the number of units implemented by this module all doing the same thing

Definition at line 2895 of file structural_objects.cpp.

References multi_unit_multiplicity, and symmetry::value.

Referenced by copy().

Here is the caller graph for this function:

◆ set_NP_functionality()

void module::set_NP_functionality ( NP_functionalityRef  f)

◆ set_specialized()

void module::set_specialized ( const std::string &  s)
inline

Set the specialization string.

Definition at line 2224 of file structural_objects.hpp.

◆ xload()

void module::xload ( const xml_element Enode,
structural_objectRef  owner,
structural_managerRef const &  CM 
)
overridepure 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.

if the scope is not included, it means that is an external connection. In this case, go on

it can be connected to a primary scalar port or a constant or a signal

it can be connected to a (scalar) port module or a primary vector port element or a vector signal element check if it is a module

it can be connected to an element of a vector port of a module

Reimplemented from structural_object.

Implemented in channel_o, and component_o.

Definition at line 4001 of file structural_objects.cpp.

References add_event(), add_gen_port(), add_in_out_port(), add_in_port(), add_internal_object(), add_local_data(), add_out_port(), add_process(), add_service(), authors, CE_XVM, component_o_K, constant_o_K, xml_node::convert_escaped(), copyright, structural_object::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, description, structural_object::find_member(), find_member(), structural_object::get_black_box(), xml_child::get_children(), GET_CLASS_NAME, get_connections(), xml_text_node::get_content(), structural_object::get_id(), structural_object::get_kind(), structural_object::get_kind_text(), structural_object::get_path(), structural_object::get_typeRef(), HIERARCHY_SEPARATOR, keep_hierarchy, license, LOAD_XVFM, multi_unit_multiplicity, NP_descriptions, port_o_K, port_vector_o_K, PRINT_DBG_MEX, signal_o_K, signal_vector_o_K, specialized, SplitString(), THROW_ASSERT, THROW_ERROR, THROW_WARNING, port_o::to_port_direction(), NP_functionality::xload(), and structural_object::xload().

Referenced by component_o::xload(), and channel_o::xload().

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

◆ xwrite()

void module::xwrite ( xml_element rootnode)
overridepure 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 from structural_object.

Implemented in channel_o, and component_o.

Definition at line 4428 of file structural_objects.cpp.

References xml_child::add_child_element(), xml_child::add_child_text(), authors, copyright, description, gen_ports, in_out_ports, in_ports, internal_objects, keep_hierarchy, license, list_of_event, list_of_process, list_of_service, local_data, NP_descriptions, out_ports, specialized, NP_functionality::xwrite(), and structural_object::xwrite().

Referenced by component_o::xwrite(), and channel_o::xwrite().

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

Field Documentation

◆ authors

std::string module::authors
private

Store the list of authors.

Definition at line 1828 of file structural_objects.hpp.

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

◆ copyright

std::string module::copyright
private

Store the copyright description.

Definition at line 1825 of file structural_objects.hpp.

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

◆ description

std::string module::description
private

Store the module description.

Definition at line 1822 of file structural_objects.hpp.

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

◆ gen_ports

std::vector<structural_objectRef> module::gen_ports
private

◆ in_out_ports

std::vector<structural_objectRef> module::in_out_ports
private

◆ in_ports

std::vector<structural_objectRef> module::in_ports
private

◆ index_bus_connections

std::map<std::string, structural_objectRef> module::index_bus_connections
private

index for bus_connections this table is used to quickly search internal bus_connections used by find_member and find_isomorphic

Definition at line 1819 of file structural_objects.hpp.

Referenced by add_internal_object(), copy(), find_isomorphic(), find_member(), and remove_internal_object().

◆ index_channels

std::map<std::string, structural_objectRef> module::index_channels
private

index for channels this table is used to quickly search internal channels used by find_member and find_isomorphic

Definition at line 1815 of file structural_objects.hpp.

Referenced by add_internal_object(), copy(), find_isomorphic(), find_member(), and remove_internal_object().

◆ index_components

std::map<std::string, structural_objectRef> module::index_components
private

index for components this table is used to quickly search internal components used by find_member and find_isomorphic

Definition at line 1811 of file structural_objects.hpp.

Referenced by add_internal_object(), find_isomorphic(), find_member(), and remove_internal_object().

◆ index_constants

std::map<std::string, structural_objectRef> module::index_constants
private

index for constants this table is used to quickly search internal constants used by find_member and find_isomorphic

Definition at line 1807 of file structural_objects.hpp.

Referenced by add_internal_object(), copy(), find_isomorphic(), and find_member().

◆ index_signals

std::map<std::string, structural_objectRef> module::index_signals
private

index for signals this table is used to quickly search internal signals used by find_member and find_isomorphic

Definition at line 1803 of file structural_objects.hpp.

Referenced by add_internal_object(), copy(), find_isomorphic(), find_member(), and remove_internal_object().

◆ internal_objects

std::vector<structural_objectRef> module::internal_objects
private

internal components/channels/signals/bus_connection_os (for structural modules)

Definition at line 1772 of file structural_objects.hpp.

Referenced by add_internal_object(), copy(), get_internal_object(), get_internal_objects_size(), print(), remove_internal_object(), and xwrite().

◆ is_critical

bool module::is_critical
private

when true the component is involved into the critical path of the netlist

Definition at line 1793 of file structural_objects.hpp.

Referenced by copy(), get_critical(), and set_critical().

◆ is_generated

bool module::is_generated
private

when true the component has been internally generated

Definition at line 1796 of file structural_objects.hpp.

Referenced by copy(), get_generated(), and set_generated().

◆ keep_hierarchy

bool module::keep_hierarchy
private

when true the module has the keep_hierarchy attribute active

Definition at line 1840 of file structural_objects.hpp.

Referenced by copy(), get_keep_hierarchy(), set_keep_hierarchy(), xload(), and xwrite().

◆ last_position_port

unsigned int module::last_position_port
private

store the last index of the positional binding

Definition at line 1790 of file structural_objects.hpp.

Referenced by add_gen_port(), add_in_out_port(), add_in_port(), add_out_port(), copy(), get_num_ports(), and remove_port().

◆ license

std::string module::license
private

Store some tags concerning the license type associated with the functional unit.

Definition at line 1831 of file structural_objects.hpp.

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

◆ list_of_event

std::vector<structural_objectRef> module::list_of_event
private

List of event associated with the module.

Definition at line 1778 of file structural_objects.hpp.

Referenced by add_event(), find_member(), get_event(), get_event_size(), print(), and xwrite().

◆ list_of_process

std::vector<structural_objectRef> module::list_of_process
private

List of processes associated with the module.

Definition at line 1781 of file structural_objects.hpp.

Referenced by add_process(), find_member(), get_process(), get_process_size(), print(), and xwrite().

◆ list_of_service

std::vector<structural_objectRef> module::list_of_service
private

List of services associated with the module.

Definition at line 1784 of file structural_objects.hpp.

Referenced by add_service(), find_member(), get_service(), get_service_size(), print(), and xwrite().

◆ local_data

std::vector<structural_objectRef> module::local_data
private

List of local data associated with the module.

Definition at line 1775 of file structural_objects.hpp.

Referenced by add_local_data(), find_member(), get_local_data(), get_local_data_size(), print(), and xwrite().

◆ multi_unit_multiplicity

unsigned int module::multi_unit_multiplicity
private

multi-unit multiplicity is the number of units implemented by this module all doing the same thing

Definition at line 1837 of file structural_objects.hpp.

Referenced by copy(), get_multi_unit_multiplicity(), set_multi_unit_multiplicity(), and xload().

◆ NP_descriptions

NP_functionalityRef module::NP_descriptions
private

Alternative descriptions of the behavior of the module.

Definition at line 1787 of file structural_objects.hpp.

Referenced by AddParameter(), copy(), get_NP_functionality(), get_NP_library_parameters(), print(), set_NP_functionality(), xload(), and xwrite().

◆ out_ports

std::vector<structural_objectRef> module::out_ports
private

◆ positional_map

std::map<unsigned int, structural_objectRef> module::positional_map
private

positional map, given the index return the port in that position

Definition at line 1799 of file structural_objects.hpp.

Referenced by add_gen_port(), add_in_out_port(), add_in_port(), add_out_port(), copy(), get_positional_port(), and remove_port().

◆ specialized

std::string module::specialized
private

when non empty it defines with respect what module has been specialized

Definition at line 1834 of file structural_objects.hpp.

Referenced by xload(), and xwrite().


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

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