Forum Discussion
Altera_Forum
Honored Contributor
8 years agousing typedef intput argument for function
Hi I want to pass a signal with a defined typedef into a function, however I got this error: 10476: type identifier "data" does nto agree with its usage as "int_array" type. 10559...
Altera_Forum
Honored Contributor
8 years agoThis is because of the strong typing in VHDL.
The int_array type in the function_list package is not the same type as the one you declared in the "main" entity. Hence the missmatch when you call the sum function, as data is int_array, while the function wants work.function_list.int_array The fix here is to remove the type declaration from the main file. You dont need it as it is already declared in the included function_list package. note: VHDL 2008 includes the integer_vector type that is an array of integers.