PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Data Fields | Static Public Attributes | Private Attributes
port_o Struct Reference

This class describes a port associated with a component or a channel. More...

#include <structural_objects.hpp>

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

Public Types

enum  port_direction
 Enumerative type describing the direction of a port. More...
 
enum  port_endianess { LITTLE = 0, BIG, NONE }
 Enumerative type describing the endianess of a port; NONE means that it has not been specified yet. More...
 
enum  port_interface : int
 Enum type describing if the port is associated with a specific interface type. More...
 

Public Member Functions

 port_o (int debug_level, const structural_objectRef o, port_direction dir, so_kind _port_type)
 Constructor. More...
 
 ~port_o () override=default
 Destructor. More...
 
void add_connection (structural_objectRef s)
 Bind this port with a signal/port. More...
 
void remove_connection (structural_objectRef s)
 remove a connection (signal/port) from this More...
 
bool is_connected (structural_objectRef s) const
 
void substitute_connection (structural_objectRef old_conn, structural_objectRef new_conn)
 
const structural_objectRef get_connection (unsigned int n) const
 Return connection bounded to this port. More...
 
unsigned int get_connections_size () const
 Return the number of connections bounded to this port. More...
 
port_direction get_port_direction () const
 Return the direction of the port. More...
 
void set_port_direction (port_direction dir)
 Set the direction of the port. More...
 
port_endianess get_port_endianess () const
 Return the endianess of the port. More...
 
void set_port_endianess (port_endianess end)
 Set the endianess of the port. More...
 
port_interface get_port_interface () const
 Return the port interface type of the port. More...
 
void set_port_interface (port_interface pi)
 Set the port interface type of the port. More...
 
unsigned int get_port_alignment () const
 Return the port interface alignment. More...
 
void set_port_alignment (unsigned int algn)
 Set the port interface alignment. More...
 
structural_objectRef get_connected_signal () const
 Return the connected signal, if any. More...
 
void set_port_size (unsigned int dim)
 Set port size. More...
 
unsigned long long get_port_size () const
 Get port size. More...
 
void set_is_var_args (bool c)
 set the is var_args attribute. More...
 
bool get_is_var_args () const
 return true if the port is a var_args More...
 
void set_is_clock (bool c)
 set the is clock attribute. More...
 
bool get_is_clock () const
 return true if the port is a clock More...
 
void set_is_extern (bool c)
 set the is_extern attribute. More...
 
bool get_is_extern () const
 return true if the port is extern More...
 
void set_bus_bundle (const std::string &name)
 Sets the bus bundle identifier. More...
 
std::string get_bus_bundle () const
 Returns the bus bundle identifier, if any. More...
 
void set_is_global (bool c)
 set the is_global attribute. More...
 
bool get_is_global () const
 return true if the port is global More...
 
void set_is_memory (bool c)
 set the is_memory attribute. More...
 
bool get_is_memory () const
 return true if the port is a memory port More...
 
void set_is_slave (bool c)
 set the is_slave attribute. More...
 
bool get_is_slave () const
 return true if the port works as slave memory port More...
 
void set_is_master (bool c)
 set the is_master attribute. More...
 
bool get_is_master () const
 return true if the port works as master memory port More...
 
void set_is_data_bus (bool c)
 set the is_data attribute. More...
 
bool get_is_data_bus () const
 return true if the port works as a data bus More...
 
void set_is_addr_bus (bool c)
 set the is_addr_bus attribute. More...
 
bool get_is_addr_bus () const
 return true if the port works as an address bus More...
 
void set_is_size_bus (bool c)
 set the is_size_bus attribute. More...
 
bool get_is_size_bus () const
 return true if the port works as a size bus More...
 
void set_is_tag_bus (bool c)
 set the is_tag_bus attribute. More...
 
bool get_is_tag_bus () const
 return true if the port works as an tag bus More...
 
void set_is_doubled (bool c)
 set the is_doubled attribute. More...
 
bool get_is_doubled () const
 return true if the port has a doubled size w.r.t the precision More...
 
void set_is_halved (bool c)
 set the is_halved attribute. More...
 
bool get_is_halved () const
 return true if the port has a halved size w.r.t the precision More...
 
structural_objectRef find_bounded_object (const structural_objectConstRef f_owner=structural_objectConstRef()) const
 Find the object bounded to the port. More...
 
void set_critical ()
 set the port as critical with respect to the timing path More...
 
bool get_critical () const
 return if the component is critical or not More...
 
void set_reverse ()
 Sets the port as reverse. More...
 
bool get_reverse () const
 Returns if the port as to be printed in a reverse mode. More...
 
void copy (structural_objectRef dest) const override
 Perform a copy of the port. 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
 Load a structural_object starting from an xml file. More...
 
void xwrite (xml_element *rootnode) override
 Add a structural_object to an xml tree. More...
 
void add_n_ports (unsigned int n_ports, structural_objectRef owner)
 Specify the number of ports of a generic port_vector object and add its corresponding ports. More...
 
const structural_objectRef get_port (unsigned int n) const
 Return the ith port of the vector. More...
 
unsigned int get_ports_size () const
 Return the number of ports. More...
 
unsigned int get_lsb () const
 return the index of the least significant port More...
 
void print (std::ostream &os) const override
 Print the port (for debug purpose) More...
 
std::string get_kind_text () const override
 return the name of the class as a string. More...
 
enum so_kind get_kind () const override
 return the type of the class 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...
 
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...
 

Static Public Member Functions

static std::string GetString (enum port_direction)
 
static std::string GetString (enum port_interface)
 
static port_direction to_port_direction (const std::string &val)
 Convert a string into the corresponding port_direction enumerative type. More...
 
static port_interface to_port_interface (const std::string &val)
 Convert a string into the corresponding port_interface enumerative type. More...
 
static bool resize_if_busport (unsigned long long bus_size_bitsize, unsigned long long bus_addr_bitsize, unsigned long long bus_data_bitsize, unsigned long long bus_tag_bitsize, structural_objectRef port)
 auxiliary function used to resize the bus ports with respect to their associated bus size More...
 
static void resize_std_port (unsigned long long bitsize_variable, unsigned long long n_elements, int debug_level, structural_objectRef port)
 auxiliary function used to resize the standard ports More...
 
static void fix_port_properties (structural_objectRef port_i, structural_objectRef cir_port)
 copy the port properties from port_i to cir_port More...
 

Data Fields

std::string size_parameter
 custom size parameter More...
 

Static Public Attributes

static const unsigned int PARAMETRIC_PORT = static_cast<unsigned int>(-1)
 

Private Attributes

std::vector< Wrefcount< structural_object > > connected_objects
 The list of connections associated with the port. More...
 
port_direction dir
 direction of a port More...
 
port_endianess end
 endianess of a port More...
 
port_interface pi
 port interface type of a port More...
 
unsigned int aligment
 
bool is_var_args
 when true the port must be specialized at runtime depending on the number of input More...
 
bool is_clock
 when true the port is a clock port and has to be attached to a clock object More...
 
bool is_extern
 when true the port is an extern port More...
 
bool is_global
 when true the port is a global port More...
 
bool is_reverse
 when true the port is dumped as [0:msb-1] instead of [msb-1:0] More...
 
bool is_memory
 when true the port is a memory port More...
 
bool is_slave
 when true the port is a slave port More...
 
bool is_master
 when true the port is a master port More...
 
bool is_data_bus
 when true the port is a data bus More...
 
bool is_addr_bus
 when true the port is an address bus More...
 
bool is_size_bus
 when true the port is a size bus More...
 
bool is_tag_bus
 when true the port is a tag bus More...
 
bool is_doubled
 when true the port has a doubled size More...
 
bool is_halved
 when true the port has a halfed size More...
 
bool is_critical
 when true the port is involved into the critical path of the netlist More...
 
std::string bus_bundle
 bus bundle More...
 
unsigned int lsb
 least significant bit More...
 
std::vector< structural_objectRefports
 The list of ports associated with the port. More...
 
so_kind port_type
 port type More...
 

Static Private Attributes

default values associated with the members of the port_o class.
static const bool is_clock_DEFAULT = false
 
static const bool is_extern_DEFAULT = false
 
static const bool is_global_DEFAULT = false
 
static const bool is_memory_DEFAULT = false
 
static const bool is_slave_DEFAULT = false
 
static const bool is_master_DEFAULT = false
 
static const bool is_data_bus_DEFAULT = false
 
static const bool is_addr_bus_DEFAULT = false
 
static const bool is_tag_bus_DEFAULT = false
 
static const bool is_size_bus_DEFAULT = false
 
static const bool is_doubled_DEFAULT = false
 
static const bool is_halved_DEFAULT = false
 
static const bool is_critical_DEFAULT = false
 
static const bool is_reverse_DEFAULT = false
 
static const bool is_var_args_DEFAULT = false
 
static const unsigned port_interface_alignment_DEFAULT = 0
 

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 port associated with a component or a channel.

A port can be in relation with:

Definition at line 622 of file structural_objects.hpp.

Member Enumeration Documentation

◆ port_direction

Enumerative type describing the direction of a port.

Definition at line 626 of file structural_objects.hpp.

◆ port_endianess

Enumerative type describing the endianess of a port; NONE means that it has not been specified yet.

Enumerator
LITTLE 
BIG 
NONE 

Definition at line 634 of file structural_objects.hpp.

◆ port_interface

Enum type describing if the port is associated with a specific interface type.

Definition at line 642 of file structural_objects.hpp.

Constructor & Destructor Documentation

◆ port_o()

port_o::port_o ( int  debug_level,
const structural_objectRef  o,
port_direction  dir,
so_kind  _port_type 
)

Constructor.

Parameters
ois the owner of the port
dirdefines the direction of the port.

Definition at line 1003 of file structural_objects.cpp.

Referenced by copy(), and xload().

Here is the caller graph for this function:

◆ ~port_o()

port_o::~port_o ( )
overridedefault

Destructor.

Member Function Documentation

◆ add_connection()

void port_o::add_connection ( structural_objectRef  s)

Bind this port with a signal/port.

Parameters
sis the connection

Definition at line 1042 of file structural_objects.cpp.

References connected_objects, constant_o_K, structural_object::get_kind(), get_kind(), structural_object::get_kind_text(), structural_object::get_owner(), structural_object::get_path(), port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, and THROW_ASSERT.

Here is the call graph for this function:

◆ add_n_ports()

void port_o::add_n_ports ( unsigned int  n_ports,
structural_objectRef  owner 
)

Specify the number of ports of a generic port_vector object and add its corresponding ports.

It can be done only on port_vectors not yet specialized. The type of the port is equal to the type descriptor of the port_vector.

Parameters
n_portsis the number of the ports.
owneris the reference version of "this".

Definition at line 5092 of file structural_objects.cpp.

References structural_object::debug_level, refcount< T >::get(), structural_object::get_path(), structural_object::get_typeRef(), port_o_K, port_vector_o_K, structural_object::set_id(), structural_object::set_type(), and THROW_ASSERT.

Here is the call graph for this function:

◆ copy()

void port_o::copy ( structural_objectRef  dest) const
overridevirtual

Perform a copy of the port.

Parameters
destdestination object.

connected_objects has to be updated outside!!!

Reimplemented from structural_object.

Definition at line 1526 of file structural_objects.cpp.

References aligment, bus_bundle, structural_object::copy(), structural_object::debug_level, DEBUG_LEVEL_VERY_PEDANTIC, dir, end, structural_object::get_path(), get_port(), index, is_addr_bus, is_clock, is_critical, is_data_bus, is_doubled, is_extern, is_global, is_halved, is_master, is_memory, is_reverse, is_size_bus, is_slave, is_tag_bus, is_var_args, lsb, pi, port_o(), port_o_K, ports, PRINT_DBG_MEX, size_parameter, STR, and THROW_ERROR.

Here is the call graph for this function:

◆ find_bounded_object()

structural_objectRef port_o::find_bounded_object ( const structural_objectConstRef  f_owner = structural_objectConstRef()) const

Find the object bounded to the port.

The object searched has the same owner of the port.

Returns
the object bounded to the port.

Definition at line 1352 of file structural_objects.cpp.

References connected_objects, constant_o_K, structural_object::get_id(), get_kind(), structural_object::get_owner(), structural_object::get_path(), INDENT_DBG_MEX, port_o_K, port_vector_o_K, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_UNREACHABLE.

Referenced by structural_manager::build_graph().

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

◆ find_isomorphic()

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

Find key in this object.

Parameters
keyis the object searched.

Implements structural_object.

Definition at line 1438 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, structural_object::get_id(), structural_object::get_kind(), structural_object::get_owner(), k, key, port_o_K, port_vector_o_K, ports, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.

Here is the call graph for this function:

◆ find_member()

structural_objectRef port_o::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.

Definition at line 1486 of file structural_objects.cpp.

References action_o_K, bus_connection_o_K, channel_o_K, component_o_K, connected_objects, constant_o_K, data_o_K, event_o_K, port_o_K, port_type, port_vector_o_K, ports, signal_o_K, signal_vector_o_K, THROW_ASSERT, and THROW_ERROR.

◆ fix_port_properties()

void port_o::fix_port_properties ( structural_objectRef  port_i,
structural_objectRef  cir_port 
)
static

◆ get_bus_bundle()

std::string port_o::get_bus_bundle ( ) const

Returns the bus bundle identifier, if any.

Definition at line 1247 of file structural_objects.cpp.

References bus_bundle.

◆ get_connected_signal()

structural_objectRef port_o::get_connected_signal ( ) const

Return the connected signal, if any.

Null pointer otherwise.

Definition at line 1101 of file structural_objects.cpp.

References connected_objects, structural_object::get_owner(), structural_object::get_path(), signal_o_K, signal_vector_o_K, and THROW_ASSERT.

Here is the call graph for this function:

◆ get_connection()

const structural_objectRef port_o::get_connection ( unsigned int  n) const

Return connection bounded to this port.

Parameters
nis the index of the connection

Definition at line 1157 of file structural_objects.cpp.

References connected_objects, and THROW_ASSERT.

◆ get_connections_size()

unsigned int port_o::get_connections_size ( ) const

Return the number of connections bounded to this port.

Definition at line 1163 of file structural_objects.cpp.

References connected_objects.

◆ get_critical()

bool port_o::get_critical ( ) const

return if the component is critical or not

Definition at line 1584 of file structural_objects.cpp.

References is_critical.

Referenced by structural_manager::build_graph().

Here is the caller graph for this function:

◆ get_is_addr_bus()

bool port_o::get_is_addr_bus ( ) const

return true if the port works as an address bus

Definition at line 1307 of file structural_objects.cpp.

References is_addr_bus.

◆ get_is_clock()

bool port_o::get_is_clock ( ) const

return true if the port is a clock

Definition at line 1227 of file structural_objects.cpp.

References is_clock.

◆ get_is_data_bus()

bool port_o::get_is_data_bus ( ) const

return true if the port works as a data bus

Definition at line 1297 of file structural_objects.cpp.

References is_data_bus.

◆ get_is_doubled()

bool port_o::get_is_doubled ( ) const

return true if the port has a doubled size w.r.t the precision

Definition at line 1337 of file structural_objects.cpp.

References is_doubled.

◆ get_is_extern()

bool port_o::get_is_extern ( ) const

return true if the port is extern

Definition at line 1237 of file structural_objects.cpp.

References is_extern.

◆ get_is_global()

bool port_o::get_is_global ( ) const

return true if the port is global

Definition at line 1257 of file structural_objects.cpp.

References is_global.

◆ get_is_halved()

bool port_o::get_is_halved ( ) const

return true if the port has a halved size w.r.t the precision

Definition at line 1347 of file structural_objects.cpp.

References is_halved.

◆ get_is_master()

bool port_o::get_is_master ( ) const

return true if the port works as master memory port

Definition at line 1287 of file structural_objects.cpp.

References is_master.

◆ get_is_memory()

bool port_o::get_is_memory ( ) const

return true if the port is a memory port

Definition at line 1267 of file structural_objects.cpp.

References is_memory.

◆ get_is_size_bus()

bool port_o::get_is_size_bus ( ) const

return true if the port works as a size bus

Definition at line 1317 of file structural_objects.cpp.

References is_size_bus.

◆ get_is_slave()

bool port_o::get_is_slave ( ) const

return true if the port works as slave memory port

Definition at line 1277 of file structural_objects.cpp.

References is_slave.

◆ get_is_tag_bus()

bool port_o::get_is_tag_bus ( ) const

return true if the port works as an tag bus

Definition at line 1327 of file structural_objects.cpp.

References is_tag_bus.

◆ get_is_var_args()

bool port_o::get_is_var_args ( ) const

return true if the port is a var_args

Definition at line 1217 of file structural_objects.cpp.

References is_var_args.

◆ get_kind()

enum so_kind port_o::get_kind ( ) const
inlineoverridevirtual

return the type of the class

Implements structural_object.

Definition at line 1057 of file structural_objects.hpp.

Referenced by add_connection(), and find_bounded_object().

Here is the caller graph for this function:

◆ get_kind_text()

std::string port_o::get_kind_text ( ) const
inlineoverridevirtual

return the name of the class as a string.

Implements structural_object.

Definition at line 1043 of file structural_objects.hpp.

References port_vector_o_K.

Referenced by xwrite().

Here is the caller graph for this function:

◆ get_lsb()

unsigned int port_o::get_lsb ( ) const
inline

return the index of the least significant port

Definition at line 999 of file structural_objects.hpp.

References structural_type_descriptor::print().

Here is the call graph for this function:

◆ get_port()

const structural_objectRef port_o::get_port ( unsigned int  n) const

Return the ith port of the vector.

It checks that a port exists at position n.

Parameters
nis the index of the port

Definition at line 5110 of file structural_objects.cpp.

References structural_object::get_path(), port_vector_o_K, STR, and THROW_ASSERT.

Referenced by copy().

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

◆ get_port_alignment()

unsigned int port_o::get_port_alignment ( ) const

Return the port interface alignment.

Definition at line 1202 of file structural_objects.cpp.

References aligment.

◆ get_port_direction()

port_o::port_direction port_o::get_port_direction ( ) const

Return the direction of the port.

Definition at line 1168 of file structural_objects.cpp.

References dir.

◆ get_port_endianess()

port_o::port_endianess port_o::get_port_endianess ( ) const

Return the endianess of the port.

Definition at line 1182 of file structural_objects.cpp.

References end.

◆ get_port_interface()

port_o::port_interface port_o::get_port_interface ( ) const

Return the port interface type of the port.

Definition at line 1192 of file structural_objects.cpp.

References pi.

◆ get_port_size()

unsigned long long port_o::get_port_size ( ) const

Get port size.

Returns
the dimension of the port

Definition at line 5128 of file structural_objects.cpp.

References structural_object::get_typeRef(), and structural_type_descriptor::size.

Here is the call graph for this function:

◆ get_ports_size()

unsigned int port_o::get_ports_size ( ) const

Return the number of ports.

When the port_vector has not yet specialized 0 is returned.

Definition at line 5117 of file structural_objects.cpp.

References structural_object::get_path(), port_vector_o_K, and THROW_ASSERT.

Here is the call graph for this function:

◆ get_reverse()

bool port_o::get_reverse ( ) const

Returns if the port as to be printed in a reverse mode.

Definition at line 1594 of file structural_objects.cpp.

References is_reverse.

◆ GetString() [1/2]

static std::string port_o::GetString ( enum  port_direction)
static

◆ GetString() [2/2]

static std::string port_o::GetString ( enum  port_interface)
static

◆ is_connected()

bool port_o::is_connected ( structural_objectRef  s) const

Definition at line 1083 of file structural_objects.cpp.

References connected_objects, and THROW_ASSERT.

◆ print()

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

Print the port (for debug purpose)

Parameters
osis an output stream

Reimplemented from structural_object.

Definition at line 1871 of file structural_objects.cpp.

References aligment, connected_objects, structural_object::convert_so_short(), dir, GetString(), pi, port_interface_alignment_DEFAULT, ports, structural_object::PP, structural_object::print(), and STR.

Here is the call graph for this function:

◆ remove_connection()

void port_o::remove_connection ( structural_objectRef  s)

remove a connection (signal/port) from this

Parameters
sis the connection to be removed

Definition at line 1066 of file structural_objects.cpp.

References connected_objects, structural_object::get_path(), and THROW_ASSERT.

Here is the call graph for this function:

◆ resize_if_busport()

bool port_o::resize_if_busport ( unsigned long long  bus_size_bitsize,
unsigned long long  bus_addr_bitsize,
unsigned long long  bus_data_bitsize,
unsigned long long  bus_tag_bitsize,
structural_objectRef  port 
)
static

auxiliary function used to resize the bus ports with respect to their associated bus size

Parameters
bus_size_bitsizebitsize of sizes
bus_addr_bitsizebitsize of addresses
bus_data_bitsizebitsize of data
bus_tag_bitsizebitsize of tag
portis the port to be resized
Returns
bool True if resize happened, false else

Definition at line 5133 of file structural_objects.cpp.

References structural_object::get_kind(), pi(), port_vector_o_K, structural_object::type_resize(), and U.

Referenced by fu_binding::add_to_SM(), TasteInterfaceGeneration::InternalExec(), TopEntityMemoryMapped::resizing_IO(), fu_binding::specialise_fu(), and RTLCharacterization::specialize_fu().

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

◆ resize_std_port()

void port_o::resize_std_port ( unsigned long long  bitsize_variable,
unsigned long long  n_elements,
int  debug_level,
structural_objectRef  port 
)
static

auxiliary function used to resize the standard ports

Parameters
bitsize_variableis the bitsize
n_elementsis the number of elements
debug_levelis the debug level
portis the port to be resized

Definition at line 5157 of file structural_objects.cpp.

References structural_object::debug_level, DEBUG_LEVEL_PEDANTIC, structural_object::get_kind(), structural_object::get_path(), INDENT_DBG_MEX, pi(), port_vector_o_K, STR, THROW_ASSERT, and structural_object::type_resize().

Referenced by classic_datapath::InternalExec(), fu_binding::join_merge_split(), fu_binding::manage_extern_global_port(), RTLCharacterization::resize_port(), and fu_binding::specialise_fu().

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

◆ set_bus_bundle()

void port_o::set_bus_bundle ( const std::string &  name)

Sets the bus bundle identifier.

Definition at line 1242 of file structural_objects.cpp.

References bus_bundle.

◆ set_critical()

void port_o::set_critical ( )

set the port as critical with respect to the timing path

Definition at line 1579 of file structural_objects.cpp.

References is_critical.

◆ set_is_addr_bus()

void port_o::set_is_addr_bus ( bool  c)

set the is_addr_bus attribute.

Parameters
cwhen true the port is a port used as an address bus

Definition at line 1302 of file structural_objects.cpp.

References is_addr_bus.

◆ set_is_clock()

void port_o::set_is_clock ( bool  c)

set the is clock attribute.

Parameters
cwhen true the port is a clock port and has to be attached to a clock object

Definition at line 1222 of file structural_objects.cpp.

References is_clock.

◆ set_is_data_bus()

void port_o::set_is_data_bus ( bool  c)

set the is_data attribute.

Parameters
cwhen true the port is a port used as a data bus

Definition at line 1292 of file structural_objects.cpp.

References is_data_bus.

◆ set_is_doubled()

void port_o::set_is_doubled ( bool  c)

set the is_doubled attribute.

Parameters
cwhen true the port has a doubled size w.r.t the precision

Definition at line 1332 of file structural_objects.cpp.

References is_doubled.

◆ set_is_extern()

void port_o::set_is_extern ( bool  c)

set the is_extern attribute.

Parameters
cwhen true the port is a extern port and has to be attached to an extern object

Definition at line 1232 of file structural_objects.cpp.

References is_extern.

◆ set_is_global()

void port_o::set_is_global ( bool  c)

set the is_global attribute.

Parameters
cwhen true the port is a global port and has to be attached to a global object

Definition at line 1252 of file structural_objects.cpp.

References is_global.

◆ set_is_halved()

void port_o::set_is_halved ( bool  c)

set the is_halved attribute.

Parameters
cwhen true the port has a halved size w.r.t the precision

Definition at line 1342 of file structural_objects.cpp.

References is_halved.

◆ set_is_master()

void port_o::set_is_master ( bool  c)

set the is_master attribute.

Parameters
cwhen true the port is a port used to interact with the onchip or offchip memory as master

Definition at line 1282 of file structural_objects.cpp.

References is_master.

◆ set_is_memory()

void port_o::set_is_memory ( bool  c)

set the is_memory attribute.

Parameters
cwhen true the port is a port used to interact with the onchip or offchip memory

Definition at line 1262 of file structural_objects.cpp.

References is_memory.

◆ set_is_size_bus()

void port_o::set_is_size_bus ( bool  c)

set the is_size_bus attribute.

Parameters
cwhen true the port is a port used as a size bus

Definition at line 1312 of file structural_objects.cpp.

References is_size_bus.

◆ set_is_slave()

void port_o::set_is_slave ( bool  c)

set the is_slave attribute.

Parameters
cwhen true the port is a port used to interact with the onchip or offchip memory as slave

Definition at line 1272 of file structural_objects.cpp.

References is_slave.

◆ set_is_tag_bus()

void port_o::set_is_tag_bus ( bool  c)

set the is_tag_bus attribute.

Parameters
cwhen true the port is a port used as an tag bus

Definition at line 1322 of file structural_objects.cpp.

References is_tag_bus.

◆ set_is_var_args()

void port_o::set_is_var_args ( bool  c)

set the is var_args attribute.

Parameters
cwhen true the port has a variable numbers of inputs

Definition at line 1212 of file structural_objects.cpp.

References is_var_args.

◆ set_port_alignment()

void port_o::set_port_alignment ( unsigned int  algn)

Set the port interface alignment.

Definition at line 1207 of file structural_objects.cpp.

References aligment.

◆ set_port_direction()

void port_o::set_port_direction ( port_direction  dir)

Set the direction of the port.

Definition at line 1173 of file structural_objects.cpp.

References dir, and ports.

◆ set_port_endianess()

void port_o::set_port_endianess ( port_endianess  end)

Set the endianess of the port.

Definition at line 1187 of file structural_objects.cpp.

References end.

◆ set_port_interface()

void port_o::set_port_interface ( port_interface  pi)

Set the port interface type of the port.

Definition at line 1197 of file structural_objects.cpp.

References pi.

◆ set_port_size()

void port_o::set_port_size ( unsigned int  dim)

Set port size.

Parameters
dimis the new dimension of the port

Definition at line 5123 of file structural_objects.cpp.

References structural_object::get_typeRef(), and structural_type_descriptor::size.

Here is the call graph for this function:

◆ set_reverse()

void port_o::set_reverse ( )

Sets the port as reverse.

Definition at line 1589 of file structural_objects.cpp.

References is_reverse.

◆ substitute_connection()

void port_o::substitute_connection ( structural_objectRef  old_conn,
structural_objectRef  new_conn 
)

Definition at line 1116 of file structural_objects.cpp.

References connected_objects, structural_object::get_kind(), structural_object::get_path(), signal_o_K, and THROW_ERROR.

Here is the call graph for this function:

◆ to_port_direction()

port_o::port_direction port_o::to_port_direction ( const std::string &  val)
static

Convert a string into the corresponding port_direction enumerative type.

Parameters
valis the string version of the enum.

Definition at line 1720 of file structural_objects.cpp.

References GetString().

Referenced by TestbenchAcknowledgeModuleGenerator::InternalExec(), TestbenchValidModuleGenerator::InternalExec(), TestbenchOvalidModuleGenerator::InternalExec(), TestbenchArrayModuleGenerator::InternalExec(), TestbenchHandshakeModuleGenerator::InternalExec(), TestbenchNoneModuleGenerator::InternalExec(), TestbenchAxisModuleGenerator::InternalExec(), TestbenchFifoModuleGenerator::InternalExec(), xload(), and module::xload().

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

◆ to_port_interface()

port_o::port_interface port_o::to_port_interface ( const std::string &  val)
static

Convert a string into the corresponding port_interface enumerative type.

Parameters
valis the string version of the enum.

Definition at line 1733 of file structural_objects.cpp.

References GetString().

Referenced by xload().

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

◆ xload()

void port_o::xload ( const xml_element Enode,
structural_objectRef  owner,
structural_managerRef const &  CM 
)
overridevirtual

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.

the field connected_objects has to be updated outside!!!

Reimplemented from structural_object.

Definition at line 1599 of file structural_objects.cpp.

References aligment, CE_XVM, dir, xml_child::get_children(), GET_CLASS_NAME, structural_manager::get_debug_level(), structural_object::get_id(), is_addr_bus, is_clock, is_critical, is_data_bus, is_doubled, is_extern, is_global, is_halved, is_master, is_memory, is_reverse, is_size_bus, is_slave, is_tag_bus, is_var_args, LOAD_XVFM, LOAD_XVM, lsb, max, min, pi, port_o(), port_o_K, port_type, port_vector_o_K, ports, size_parameter, THROW_ASSERT, to_port_direction(), to_port_interface(), and structural_object::xload().

Here is the call graph for this function:

◆ xwrite()

void port_o::xwrite ( xml_element rootnode)
overridevirtual

Field Documentation

◆ aligment

unsigned int port_o::aligment
private

◆ bus_bundle

std::string port_o::bus_bundle
private

bus bundle

Definition at line 1123 of file structural_objects.hpp.

Referenced by copy(), get_bus_bundle(), and set_bus_bundle().

◆ connected_objects

std::vector<Wrefcount<structural_object> > port_o::connected_objects
private

◆ dir

port_direction port_o::dir
private

direction of a port

Definition at line 1067 of file structural_objects.hpp.

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

◆ end

port_endianess port_o::end
private

endianess of a port

Definition at line 1070 of file structural_objects.hpp.

Referenced by copy(), get_port_endianess(), and set_port_endianess().

◆ is_addr_bus

bool port_o::is_addr_bus
private

when true the port is an address bus

Definition at line 1105 of file structural_objects.hpp.

Referenced by copy(), get_is_addr_bus(), set_is_addr_bus(), xload(), and xwrite().

◆ is_addr_bus_DEFAULT

const bool port_o::is_addr_bus_DEFAULT = false
staticprivate

Definition at line 1145 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_clock

bool port_o::is_clock
private

when true the port is a clock port and has to be attached to a clock object

Definition at line 1081 of file structural_objects.hpp.

Referenced by copy(), get_is_clock(), set_is_clock(), xload(), and xwrite().

◆ is_clock_DEFAULT

const bool port_o::is_clock_DEFAULT = false
staticprivate

Definition at line 1138 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_critical

bool port_o::is_critical
private

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

Definition at line 1120 of file structural_objects.hpp.

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

◆ is_critical_DEFAULT

const bool port_o::is_critical_DEFAULT = false
staticprivate

Definition at line 1150 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_data_bus

bool port_o::is_data_bus
private

when true the port is a data bus

Definition at line 1102 of file structural_objects.hpp.

Referenced by copy(), get_is_data_bus(), set_is_data_bus(), xload(), and xwrite().

◆ is_data_bus_DEFAULT

const bool port_o::is_data_bus_DEFAULT = false
staticprivate

Definition at line 1144 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_doubled

bool port_o::is_doubled
private

when true the port has a doubled size

Definition at line 1114 of file structural_objects.hpp.

Referenced by copy(), get_is_doubled(), set_is_doubled(), xload(), and xwrite().

◆ is_doubled_DEFAULT

const bool port_o::is_doubled_DEFAULT = false
staticprivate

Definition at line 1148 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_extern

bool port_o::is_extern
private

when true the port is an extern port

Definition at line 1084 of file structural_objects.hpp.

Referenced by copy(), get_is_extern(), set_is_extern(), xload(), and xwrite().

◆ is_extern_DEFAULT

const bool port_o::is_extern_DEFAULT = false
staticprivate

Definition at line 1139 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_global

bool port_o::is_global
private

when true the port is a global port

Definition at line 1087 of file structural_objects.hpp.

Referenced by copy(), get_is_global(), set_is_global(), xload(), and xwrite().

◆ is_global_DEFAULT

const bool port_o::is_global_DEFAULT = false
staticprivate

Definition at line 1140 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_halved

bool port_o::is_halved
private

when true the port has a halfed size

Definition at line 1117 of file structural_objects.hpp.

Referenced by copy(), get_is_halved(), set_is_halved(), xload(), and xwrite().

◆ is_halved_DEFAULT

const bool port_o::is_halved_DEFAULT = false
staticprivate

Definition at line 1149 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_master

bool port_o::is_master
private

when true the port is a master port

Definition at line 1099 of file structural_objects.hpp.

Referenced by copy(), get_is_master(), set_is_master(), xload(), and xwrite().

◆ is_master_DEFAULT

const bool port_o::is_master_DEFAULT = false
staticprivate

Definition at line 1143 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_memory

bool port_o::is_memory
private

when true the port is a memory port

Definition at line 1093 of file structural_objects.hpp.

Referenced by copy(), get_is_memory(), set_is_memory(), xload(), and xwrite().

◆ is_memory_DEFAULT

const bool port_o::is_memory_DEFAULT = false
staticprivate

Definition at line 1141 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_reverse

bool port_o::is_reverse
private

when true the port is dumped as [0:msb-1] instead of [msb-1:0]

Definition at line 1090 of file structural_objects.hpp.

Referenced by copy(), get_reverse(), set_reverse(), xload(), and xwrite().

◆ is_reverse_DEFAULT

const bool port_o::is_reverse_DEFAULT = false
staticprivate

Definition at line 1151 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_size_bus

bool port_o::is_size_bus
private

when true the port is a size bus

Definition at line 1108 of file structural_objects.hpp.

Referenced by copy(), get_is_size_bus(), set_is_size_bus(), xload(), and xwrite().

◆ is_size_bus_DEFAULT

const bool port_o::is_size_bus_DEFAULT = false
staticprivate

Definition at line 1147 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_slave

bool port_o::is_slave
private

when true the port is a slave port

Definition at line 1096 of file structural_objects.hpp.

Referenced by copy(), get_is_slave(), set_is_slave(), xload(), and xwrite().

◆ is_slave_DEFAULT

const bool port_o::is_slave_DEFAULT = false
staticprivate

Definition at line 1142 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_tag_bus

bool port_o::is_tag_bus
private

when true the port is a tag bus

Definition at line 1111 of file structural_objects.hpp.

Referenced by copy(), get_is_tag_bus(), set_is_tag_bus(), xload(), and xwrite().

◆ is_tag_bus_DEFAULT

const bool port_o::is_tag_bus_DEFAULT = false
staticprivate

Definition at line 1146 of file structural_objects.hpp.

Referenced by xwrite().

◆ is_var_args

bool port_o::is_var_args
private

when true the port must be specialized at runtime depending on the number of input

Definition at line 1078 of file structural_objects.hpp.

Referenced by copy(), get_is_var_args(), set_is_var_args(), xload(), and xwrite().

◆ is_var_args_DEFAULT

const bool port_o::is_var_args_DEFAULT = false
staticprivate

Definition at line 1152 of file structural_objects.hpp.

Referenced by xwrite().

◆ lsb

unsigned int port_o::lsb
private

least significant bit

Definition at line 1126 of file structural_objects.hpp.

Referenced by copy(), and xload().

◆ PARAMETRIC_PORT

const unsigned int port_o::PARAMETRIC_PORT = static_cast<unsigned int>(-1)
static

◆ pi

port_interface port_o::pi
private

port interface type of a port

Definition at line 1073 of file structural_objects.hpp.

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

◆ port_interface_alignment_DEFAULT

const unsigned port_o::port_interface_alignment_DEFAULT = 0
staticprivate

Definition at line 1153 of file structural_objects.hpp.

Referenced by print(), and xwrite().

◆ port_type

so_kind port_o::port_type
private

port type

Definition at line 1132 of file structural_objects.hpp.

Referenced by find_member(), and xload().

◆ ports

std::vector<structural_objectRef> port_o::ports
private

The list of ports associated with the port.

Definition at line 1129 of file structural_objects.hpp.

Referenced by copy(), find_isomorphic(), find_member(), print(), set_port_direction(), xload(), and xwrite().

◆ size_parameter

std::string port_o::size_parameter

custom size parameter

Definition at line 674 of file structural_objects.hpp.

Referenced by copy(), and xload().


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

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