Altera_Forum
Honored Contributor
7 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 ports to signals.
I'm using a package with this declaration : PACKAGE Arrays_package IS type Generic_ARRAY_type is array(integer range <>) of std_logic_vector; END Arrays_package; the couple of components are pre_pre_buffer_conv and pre_buffer_conv and the code is presented below. How I can to declare the signal xdataout_preprebuffer? the errors thrown by analysis & elaboration stage were these Error (10381): VHDL Type Mismatch error at Naive_RNC_problem.vhd(235): indexed name returns a value whose type does not match "Generic_ARRAY_type", the type of the target expression Error: Quartus Prime Analysis & Elaboration was unsuccessful. 1 error, 0 warnings I believe that the signal xdataout_preprebuffer have to be declared as 2d array signal, but I don't know how to accomplish that. thanks, and sorry for my english