What Is Synthesizable VHDL Code: Definition and Examples
VHDL code is the part of VHDL that can be converted into actual hardware circuits by synthesis tools. It uses constructs that represent real hardware components like gates, flip-flops, and registers, avoiding simulation-only features.How It Works
Think of synthesizable VHDL code as a recipe that a machine can follow to build a physical circuit. Just like a chef needs clear instructions to bake a cake, synthesis tools need clear, hardware-friendly code to create digital chips.
Not all VHDL code can be turned into hardware. Some parts are only for testing or simulation, like imagining how a circuit behaves without actually building it. Synthesizable code uses simple, real-world building blocks such as logic gates and memory elements, so the synthesis tool can map the code to actual hardware components.
Example
This example shows a simple synthesizable VHDL code for a 2-input AND gate. It uses basic logic that synthesis tools can convert into hardware.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity AndGate is
Port ( A : in STD_LOGIC;
B : in STD_LOGIC;
Y : out STD_LOGIC);
end AndGate;
architecture Behavioral of AndGate is
begin
Y <= A and B;
end Behavioral;When to Use
Use synthesizable VHDL code when you want to design real digital hardware like FPGAs or ASICs. This code is essential for creating circuits that will be physically built and run on chips.
For example, if you are designing a processor, memory controller, or any digital logic, you write synthesizable VHDL so synthesis tools can generate the hardware layout. Non-synthesizable code is only for simulation and testing, not for actual hardware creation.
Key Points
- Synthesizable VHDL describes hardware components that can be physically built.
- It avoids simulation-only features like delays or file I/O.
- Common synthesizable constructs include signals, processes, and concurrent assignments.
- Synthesis tools convert this code into gates, flip-flops, and other hardware elements.