Entity DeclarationsGeneric Clause
Generics may be used for readability, maintenance and configuration
Generic clause syntax :
- If optional default_value is missing in generic clause declaration, it must be present when component is to be used (i.e. instantiated)
Generic clause example :
- The generic My_ID, with a default value of 37, can be referenced by any architecture of the entity with this generic clause
- The default can be overridden at component instantiation
GENERIC (generic_name : type [:= default_value]);
GENERIC (My_ID : INTEGER := 37);
The inclusion of the GENERIC statement creates parameter to be passed on to the architectures of this entity. These parameters may be used to characterize the component by setting propagation delay, component ids, etc.
Generics are discussed further in the Structural VHDL module.