Back when my VHDL assignments returned when I was at school, I needed to have all our code in one file, so I don’t remember if you could write one file for each module and how it was done.
In this case, you will need to declare an object that you would use when defining behavior, if you would use it in the same way you would define prototypes, structures, classes, and something else in C or C ++. The difference here is that you don’t have the luxury of defining the header files for this “re-declaration” in VHDL (at least I don’t think there is an equivalent). Therefore, it seems quite reasonable to me that I should do this. Note that VHDL came out when C was very common, and the compilers were not "smart enough" as they are today.
The VHDL guru may have a definitive answer for this, but as I understand it.
Jeff mercado
source share