Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHow to instantiate multiple components with variable number of ports in vhdl?
I want to instantiate several times a couple of components using a for generate syntax, these components have a variable number of ports and I don't have an idea of how assing these variable size por...
Altera_Forum
Honored Contributor
8 years agoThe problem arrises because the pre_pre_buffer_conv entity requires a connection that is a Generic_ARRAY_type, but it is a different size to the input data type. The initial problem is that xdataout_preprebuffer(i) is a single std_logic_vector that is no_bits wide.
But the connection requires a Generic_ARRAY_type that is no_col_filt entries of std_logic_vector(no_col_fil*no_bits-1 downto 0). So this array dimensions do not map to the input at all. You need to somehow create a teporary signal inside the entity that will re-map the input array to the required size. It also should not be in a generate loop as it currently is.