-
Notifications
You must be signed in to change notification settings - Fork 0
VHDL
The picture below illustrates how to convert between the most common VHDL types.
These functions are part of the numeric_std library.
(picture found at https://www.bitweenie.com/listings/vhdl-type-conversion/)
In VHDL it is advisable to use a divide and conquer approach. The pictures and the code below show how to make a hierarchical design composed out of two identical sub-modules.
The architecture of the TopLevel module should be:
Where :
- e_name is the name of the entity
- g_list is the list of design constants
- p_list is the list of design pins
Instead of
end entity
, it is possible to writeend {e_name}
A component is a term used for a VHDL sub-system that is instantiated within a higher-level system.
It must be declared in the higher-level architecture system before the begin
statement.
A component only needs to be declared once. It can then be used as many times as necessary in the higher-level system architecture after the begin
statement.
/!\The port definitions of the component must match the port definitions of the sub-system’s entity exactly.
Concurrent constructions correspond to combinatorial logic, and should not be used inside processes.
- When-else
- With select
These constructions correspond to sequential logic and should be used inside processes.
- If-then
- Case-is
- For loop