VHDL Flashcards
How do we always begin a VHDL code?
By defining the libraries that will be used. e.g. library IEEE; use IEEE.std_logic_1164.all;
What is an entity?
The entity is equivalent to the symbol schematic design. It provides the name of the circuit and its interfaces.
(In the digital design project, the signals defined in entity represented signals (or PORTS) that were shared between two codes which were manipulated to get the FPGA to function accordingly).
What does the architecture represent?
The architecture contains the behaviour of the circuit.
architecture structural of circuit1
BEGIN
–code for circuit behaviour, e.g. gate logic
END:
What are the direction that a port can have?
In, out and inout.
- in = input
- out = output
- inout = bidirectional
Where are the ports defined?
In the entity
What is a port type?
A port type is defined for each port (input/output) in the entity, and describes the format of the information.
What is the standard port type for a single bit?
std_logic
What is a std_logic_vector?
A standard logic vector is the standard type for a one dimensional array.
How do we define a standard logic vector which contains 8 bits?
std_logic_vector(7 downto 0)
What are the values that a std_logic vector can have?
- ‘U’ - Uninitialised
- ‘X’ - Forcing unknown
- ‘0’ - Forcing 0
- ‘1’ - Forcing 1
- ‘Z’ - High impedance
- ‘W’ - Weak Unknown
- ‘L’ - Weak 0
- ‘H’ - Weak 1
- ’-‘ - Don’t care
How is code in the architecture evaluated?
In parallel, (concurrency) this means that the statements/process within the architecture are evaluated at the statement rather than one after another.
How is a process statement evaluated?
When a signal is the sensitivity list has made a transition which causes the process to be evaluated.
This is done sequentially, this means the statements are evaluated one after another like in software programming e.g. in C or python
What do we use to represent a wire?
signal
What is meant by a structural coding style?
Structural is a label that helps to idenitfy the coding style within the architecture.
The structural coding style refers to describing a design using module instances, such as lower-level building blocks like AND gates and flip-flops
What is a behavioural coding style?
The architecture is defined to be structural.
This means that the code within the architecture uses only process statements.