I have a top level module and an enumeration type declared there. Now I created several submodules (with an IN port of the that type) and instantiated them. However, resolving the enumeration type in submodules fails.
Is it possible to reuse the enumeration type and if, how?
Electronic – VHDL: enumeration types in entities of submodules
vhdl
Best Answer
Use a package and include that package at the top of each module.
Here is an example of a package:
To include it in each module just add this where you have your other use statements:
Every module you include the package on, you can use your custom enum type.