Obtaining a Port Object - Obtaining a Port Object - 2026.1 English - UG1483

Vitis Model Composer User Guide (UG1483)

Document ID
UG1483
Release Date
2026-06-23
Version
2026.1 English

After you add a port to a block descriptor, you often need to configure its individual attributes. Before configuring the port, you must obtain a descriptor for it. SysgenBlockDescriptor provides methods for accessing the port objects that are associated with it. For example, the following method retrieves the port named din on the this_block descriptor:

Accessing a SysgenPortDescriptor object:

din = this_block.port('din'); 

The preceding code creates an object din and assigns it to the descriptor returned by the port function call.

SysgenBlockDescriptor also provides methods inport and outport, that return a port object given a port index. A port index is the index of the port (in the order shown on the block interface). It ranges from 1 to the total number of input and output ports on the block. These methods are useful when you need to iterate through the block's ports (for example, for error checking).