I want to read input values from a file and store them in an array
I have defined a custom array type in a package as :
TYPE qit IS ('0', '1', 'Z', 'X');
...
Type qitArray IS Array(Natural Range <>) OF qit;
and I have a procedure defined as :
Procedure ReadFromFile(Signal Output : OUT qitArray; File_Name : IN String; Delay : Time);
In Test Bench, I have declared a qitArray signal and I have passed it to procedure as parameter like this :
Constant Input_FName : String := "input_file.txt";
...
Signal Output : qitArray;
Begin
ReadFromFile(Output, Input_FName, 20 ns);
...
End;
there is no compile error on the package file, but when I want to compile Test Bench, an error says :
Array type of "Output" does not have an index constraint
The array length is unknown
How can I use an unknown-length array type ( or dynamic array ) as parameter in a procedure ?
size/length
like in C. \$\endgroup\$