PORT - Communication Port Declaration

Synopsis

The PORT construct enables the creation of communication ports for an entity. Ports from different entities are connected together via links allowing entities to exchange information.

The XPORT construct enables different instances of an entity to have different numbers of ports. This is often convenient for busses, for example.

PORT Syntax

PORT ( port_name, message_type, port_type )

Example

PORT ( processor_to_memory, DataLink, SOURCE )

XPORT Syntax

XPORT (no_of_ports, port_name, message_type, port_type )

Example

ENTITY bus (
PORTS (
XPORT(2, input,l_bus,DESTINATION);
XPORT(2, output,l_bus,SOURCE);
)
);
AENTITY bus BUS1 (
DESCRIPTION("bus1")
ATTRIB ( XPORT (input, 3) );
);
This creates a bus (BUS1) with 3 input ports (input0, input1, input2) and 2 output ports (output0, output1).