EEVblog Electronics Community Forum
Electronics => FPGA => Topic started by: zapta on December 17, 2024, 08:40:31 pm
-
A question for experience designers. Is it common or useful to mix verilog and system-verilog files (RTL and testbenches) in the same project?
Also, is it common to distinguish between verilog and system verilog files by the extension? E.g. .v and .sv.
-
A question for experience designers. Is it common or useful to mix verilog and system-verilog files (RTL and testbenches) in the same project?
Also, is it common to distinguish between verilog and system verilog files by the extension? E.g. .v and .sv.
Very common. Your HDL tool might support Verilog syntax only (or more likely the synthesize-able subset of the Verilog language, as defined by the vendor).
Or your vendor tool might support SystemVerilog (or again a synthesize-able subset of it) language input as well.
For your testbench, if your simulator supports SystemVerilog, then your testbench might be written in that dialect, and it references your design in Verilog).
The vendor synthesis tools will never see the testbench code, so they can be written in whatever dialects of Verilog your simulator supports.
Heck you could even write your testbench in VHDL if your simulator supports mixed language input on files.
For most tools it is general practice (and may be required, depends on the tool) for Verilog files to be .v extension and SystemVerilog files to be a .sv extension.
-
You can even mix VHDL, Verilog and SystemVerilog in the same project for most cases.
But yeah as usual in the FPGA world, the details are very tool specific. Every vendor does things slightly differently and might support a slightly different list of features as actually being synthesizeable.
-
BTW, from 2009 Verilog and SystemVerilog are officially the same language. Last Verilog standard IEEE Std 1364-2005 was superseded by IEEE Std 1800-2009 (which is the SystemVerilog standard)
-
BTW, from 2009 Verilog and SystemVerilog are officially the same language. Last Verilog standard IEEE Std 1364-2005 was superseded by IEEE Std 1800-2009 (which is the SystemVerilog standard)
Which helps now if you are using current FPGA/CPLD design software, but if you are using legacy 90s/00s software as I do there is still Verilog vs SystemVerilog to deal with.
-
Nowadays I only use Verilog to create a wrapper for Vivado IPI components because it still doesn't support SystemVerilog (which is a shame really). SystemVerilog is better in every way you can think of, so I see no reason not to use it.