I want to create an entity that has two constants. I would prefer the declaration to be in the entity declaration and not in the architecture, but I need to use the constants in the architecture.
- If I define them in the entity declaration, will they be known in the architecture?
- When I use the entity as a component, will I need to redefine the constants again, or could I write only the ports?
- Any other differences that I should be aware of?
To answer your questions:
But as Charles said in his answer, you may want to consider using generics instead of constants if they are actually “constants” that you want to sometimes change.