VHDL Compilation via GHDL
Verilog and VHDL have historically been siloed. RTL Bench breaks down that wall by using GHDL to co-elaborate VHDL alongside Yosys, allowing you to mix both languages in a single project.
What is GHDL?
GHDL is the most popular open-source VHDL simulator. However, it is not just a simulator; it contains a powerful compiler that translates IEEE 1076-2008 VHDL into a format that Yosys can understand.
The Co-Elaboration Process
When you upload a .vhd file to RTL Bench, we don't just parse it as text. The backend runs:
ghdl -ato analyze and syntax-check the VHDL.ghdl --synthto map the behavioral VHDL into Yosys's internal RTLIL format.- Yosys takes over, optimizing the logic and mapping it to the standard cells of the target PDK.
Mixed-Language Projects
Because both VHDL and Verilog ultimately become RTLIL, RTL Bench can seamlessly instantiate a VHDL entity inside a SystemVerilog module, or vice versa.
// SystemVerilog Top Level
module top (
input logic clk,
output logic [7:0] result
);
// Instantiating a VHDL entity
vhdl_counter u_counter (
.clk(clk),
.count(result)
);
endmodule
Frequently asked questions
Elaboration resolves component instantiations, computes generic parameter values, unrolls generate loops, and constructs the static execution hierarchy and signal driver nets before simulation or synthesis begins.
Analysis (ghdl -a) performs lexical, syntactic, and semantic type checking on each compilation unit. Elaboration (ghdl -e) links analyzed units together into an executable design hierarchy.
Using the ghdl-yosys-plugin, GHDL elaborates the design and passes the instantiated hierarchy directly into Yosys internal RTLIL representation, enabling standard synthesis passes.