If I do not quite understand this completely, a constant or type cannot be declared at the top level of the file. Only packages, objects, architectures et.c. can be announced there. They can be declared in essence, but not up to port and general articles.
Often you want to define a type or constant for use in a port or general sentence of an entity, but since it is impossible to declare at the top level of the file, and not inside the object, where should it be declared?
source
share