Unconnected ports that are unconstrained arrays
Is your capability/feature request related to a problem?
For a port that is unconnected, if it is an unconstrained array, then the dimensions of that port shall be an NULL array.
Why is this relevant? For an AxiStreamTransmitter (or receiver) there are a number of ports that are optional to use. They are also flexible in length. Combining these two makes it difficult to give inputs a default value and allow outputs that are not connected to have a size.
entity AxiStreamTransmitter is
port (
-- Globals
Clk : in std_logic ;
nReset : in std_logic ;
-- AXI Transmitter Functional Interface
TValid : out std_logic ;
TReady : in std_logic ;
TID : out std_logic_vector ;
TDest : out std_logic_vector ;
TUser : out std_logic_vector ;
TData : out std_logic_vector ;
TStrb : out std_logic_vector ;
TKeep : out std_logic_vector ;
TLast : out std_logic ;
-- Testbench Transaction Interface
TransRec : inout StreamRecType
) ;
I think the language currently makes this illegal.
The alternative to this example is to use generics to size the unconstrained ports. Unfortunately this does not reduce the amount of work that is needed to actually use the component.