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');
In the above code, an object din is created and assigned 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).