Professional Documents
Culture Documents
Verilog Vs VHDL: June 13, 2011
Verilog Vs VHDL: June 13, 2011
Verilog vs VHDL
Muhammad Yasir ● June 13, 2011
Introduction
Verilog and VHDL are two industry standard Hardware Description Languages (HDL) that are used in
writing programs for electronic integrated circuits (ICs) i.e., ASIC and FPGA. Many system designers face
this issue: which HDL language to choose – Verilog or VHDL. The answer is by no means easy or trivial.
Both of these languages are widely compared and contrasted without any clearly defined victor. Both of
them have their own merits and demerits and have different origins. Both of these languages hold major
market shares of hardware description languages being used around the globe. It is difficult to say with
certainty which one is better or superior; however, VHDL is older of the two. You can produce robust
designs and comprehensive test environments with both languages, for both ASIC and FPGA.
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.
Some of the most widely compared and contrasted features of Verilog and VHDL are:
1. Concurrency : A common characteristic of both these hardware description languages is that unlike
software programming languages like C, Java and C++ etc., both these languages are concurrent in
their behavior and program execution, as these languages are meant to design and simulate
hardware.
2. Predefined Constructs: As compared with VHDL, Verilog HDL has more predefined operators,
predefined gates and predefined resolution functions. Verilog also includes don’t care notation.
3. Lower Level Modeling Capability: Verilog is better suited to modeling devices at lower level (i.e.,
Gate Level and Switch Level) than VHDL. This is why Verilog is deemed more efficient and
appropriate for IC designing.
4. Modeling Primitive Capability: As compared with VHDL, Verilog includes convenient truth table
syntax to model primitives. However, the VITAL packages in VHDL provide this feature.
5. High Level Modeling Capability: As compared with Verilog, VHDL includes more constructs
(abstract data types and packages etc.) for high level modeling. This is why VHDL is considered
appropriate for system level modeling.
6. Case Sensitivity: Unlike VHDL, Verilog is a case sensitive language.
7. Semantics: Both VHDL and Verilog have simulation-based semantics.
8. Compilation and Interpretation: VHDL is compiled, while Verilog is an interpretative language.
9. Simulation and Control Capabilities: Verilog defines a set of basic simulation control capabilities
(system tasks) within language. As a result of these predefined system tasks and a lack of complex
data types, Verilog users often run batch or command-line simulations and debug design problems
by viewing waveforms from simulation results database. Unlike Verilog, VHDL does not define any
simulation control and monitoring capabilities within language. These capabilities are tool-dependent.
Due to the lack of language-defined simulation control command and because of user defined type
capabilities, VHDL users usually rely on interactive GUI environments for debugging design
problems.
10. Dynamic Memory Allocation: VHDL supports dynamic memory allocation (pointer types), while
Verilog has no such feature.
11. Roots of Languages: VHDL is more readable and a strongly typed language with its roots from
Ada. While, Verilog because of having its roots from C is more like C and is considered inherently
sequential. Because of its affinity with C, Verilog is preferred by C programmers.
12. Lack of Constructs: Not all the constructs and operators are included in both languages. For
example, unlike Verilog, VHDL does not have unary reduction operator. Similarly, unlike VHDL,
Verilog does not have mod operator and concurrent procedure statement. So neither of these two
hardware description languages is perfect.
13. Data types: Verilog has very simple data types, while VHDL allows users to create more complex
data types.
14. Physical Types: VHDL supports physical types while Verilog does not support physical types.
15. Named Events: Verilog supports named events while VHDL does not support named events.
16. Enumerated Types: VHDLhas enumerated types (FSM modeling) while Verilog does not support
this concept.
17. Associative/Sparse arrays: Verilog does not support the concept of Associative/sparse
arrays,while VHDL partially supports this concept,which can be modeled in VHDL using access
types.
18. Class/Inheritance: There is no concept of class/inheritance in both Verilog and VHDL.
19. Data Packing : Both Verilog and VHDL do not support data packing.
20. Conditional & Iterative Generation: Both Verilog (using if,if-else,case and for) and VHDL (using if
and for) support conditional and iterative genration.
21. Superior Features of Verilog:
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.
· Verilog has clearer distinction between register and nets. Nets are used to model electrical
connections, while registers hold values and act as memory elements.
· Nets have strengths and delay properties which emphasize their physical aspects. The delay
may consist of up to 9 values; a different value may be assigned for each transition 0, 1 or z
and for each minimum, typical and maximum case. Such a delay attached to a net is added to
the delay of each assigned statement. The net types include
wire,tri,wand,triand,wor,trior,tri0,tril(resistive),supply0,supply1 and trireg (with charge storage).
· Primitive gates include and, or, xor & not.
· Verilog is concise and easier to learn as compared with VHDL. Unlike Verilog, VHDL is
extremely verbose, which means it requires many characters to say something simple. This is
why there are many different ways of saying the same thing in VHDL which makes it
complicated and confusing. VHDL is exact in nature and difficult to learn. Verilog is deemed
quicker to code and debug as compared with VHDL.
· Unlike VHDL, Verilog has fork-join block. This construct lets you have nested parallel
sequential blocks inside each other. This is a very powerful feature which is sometimes
termed as ‘multi-threading’. You cannot have this feature in VHDL unless you use explicit
synchronizations between two different processes.
· Unlike VHDL, Verilog is not a strongly typed language and this is why a 32-bit bus may be
connected with and 8-bit bus by just padding the extra bits. Verilog does not require additional
coding to convert from one data type to another data type like integer to bit-vector. So it does
not have to pay the performance penalty caused by strong type checking and the designer
productivity is also expected to be high in this case.
22. Superior Features of VHDL:
· Unlike Verilog, the concept of packages in VHDL, library management and separate
compilation makes it an ideal candidate for higher level system modeling. There is no concept
of packages in Verilog. Functions and procedures used within a module have to be defined
inside the same module and thus they cannot be shared by different modules. However, the
concept of package in Verilog may be emulated by declaring and instantiating a fictitious
module with functions and procedures. Verilog, unlike VHDL, does not support library
management and separate compilation. This is why; Verilog requires all modules being used
in same simulation must be written in the same file.
· Unlike VHDL, Verilog types are very restrictive and are specific to IC modeling (wire, supply0,
supply1 etc.). Many abstract data types may be defined in VHDL while Verilog data types are
predefined.
· Unlike VHDL, Verilog has no concept of configurations and it lacks generics and textio.
· Unlike VHDL, Verilog has no access types.
· Unlike Verilog, VHDL has extensive type checking feature; this is why many errors may be
caught before synthesis and simulation.
· VHDL provides more details in assignment and application of individual cells and signals
within FPGA, but this requires a much better understanding of the FPGA. As compared with
VHDL, Verilog despite being much easier to learn is neither efficient in use of available cells
nor does it necessarily generate the fastest running implementation from the components
available in FPGA.
· Unlike Verilog, the verbosity of VHDL makes it self-documenting.
· VHDL semantics are unambiguous and VHDL based design may easily be ported from one
tool to another. This is why race conditions are never a concern for VHDL users. Simulation
semantics in Verilog are more ambiguous than in VHDL. Though this ambiguity in Verilog
semantics, gives designer more flexibility in applying optimization but it can also (and often
does) result in race conditions if careful coding guidelines are not followed. It is highly
probable that a Verilog based design generates different results on different vendors’ tools or
on different releases of the same vendor’s tool.
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.
· The advantage of strong typing in VHDL is that the potential bugs in the design may be
identified as early in a verification process as possible. Many problems that strong typing
uncover are identified during analysis/compilation of the source code.
In order to avoid the potential delay that may be caused by integration of different fragments of design
developed by different government contractors using their own proprietary software development tools, the
US government mandated that all the products developed under government contract must use VHDL
software design tool. This is why, in USA companies involved with government and defense related projects
use VHDL for their embedded systems development, while companies involved with commercial projects
mostly use Verilog for their projects.
The European Space Agency (ESA) is an organization with 14 European member states, and with Canada
as an associate member. The purpose of ESA is to promote cooperation among the member states in
space research and technology and their applications.ESA has played an important role in promoting VHDL
in Europe as a standard Hardware Description Language for embedded systems development (i.e. ASICs
and FPGAs etc.).
The “Search Volume Index Graph” and “News Reference Volume Graph” of Google Trends for Verilog
versus VHDL are shown in Figure 1 below:
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.
Figure 1: Google Trends - Search Volume Index and News Reference Volume Graphs
The Figure 1 shows that, over all, over a period of time ranging from 2004 to present time, people around
the globe have searched much more for VHDL as compared with Verilog. However, these searches for
VHDL in particular and Verilog in general have gradually declined over this period of time. It may be noted
that much more search queries were generated for VHDL as compared with Verilog over the period of time
ranging from 2004 to 2007.While,the search queries generated by people around the globe for both Verilog
and VHDL seem be roughly equal over the period of time ranging from 2010 to present time.
It is evident from Figure 1 that over the period of time ranging from 2004 to present time, Verilog has
appeared more than VHDL in Google news stories.
The regions, cities and languages in which people searched for Verilog as compared with VHDL are shown
in Figure 2 below:
Coclusion
It may easily be concluded from this article that both of these hardware description languages have their
unique advantages and disadvantages and neither of them is perfect or ideal. The bottom line is that for
ASIC designs, Verilog more closely defines the hardware. For higher level modeling, Verilog appears very
limited because of the lack of packages and minimal type definitions (records, access and enumeration
etc.).Anything that can be done in Verilog can also be done in VHDL; however the reverse does not seem
possible. The HDL programmer is bound to adopt some engineering trade-off to meet his design
requirements and should be familiar with both of these hardware description languages.
References:
1. http://www.angelfire.com/in/rajesh52/verilogvhdl.html
2. http://groups.google.com/group/comp.lang.vhdl/browse_thread/thread/
4bdeb69ef2f16dac/186b2b45950a74ff?q=VHDL++Verilog&rnum=10&pli=1
3. http://class.ee.iastate.edu/ee465/ee465s02/notes/billfuchs.pdf
4. http://www.bawankule.com/verilogcenter/contest.html.
5. http://au.answers.yahoo.com/question/index?qid=20110516233018AAvhDbO
6. http://www.verilog.com/
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.
7. http://inst.eecs.berkeley.edu/~eecsba1/sp97/reports/eecsba1h/verilog.html
8. http://www.deepchip.com/items/dvcon07-02.html
9. http://www.ece.msstate.edu/~reese/EE8993/lectures/verilog.pdf
10.http://stackoverflow.com/questions/4967493/does-anybody-have-quantitative-
data-on-vhdl-versus-verilog-use
11. http://trends.google.com/trends?q=vhdl,+verilog&date=all&geo=all&ctab=0&sort=1&sa=N
12. http://www.differencebetween.net/technology/difference-between-verilog-and-vhdl/
13.http://www.aldec.com
14. http://www.doulos.com/knowhow/faq/vhdl_faq/
15. http://www.google.com/intl/en/trends/about.html
16. http://www.google.com/trends?q=Verilog,VHDL
17. http://inst.eecs.berkeley.edu/~eecsba1/sp97/reports/eecsba1h/verilog.html
18. “Comparison of VHDL,Verilog and SystemVerilog”,Stephen Bailey,Technical Marketing
Engineer Model Technology http://www.model.com
19.The book "VHDL Designer's Reference",Jean-Michel,Kulwar Academic Publishers 1992.
https://www.fpgarelated.com/showarticle/376/verilog-vs-vhdl
© 2016 Muhammad Yasir & FPGARelated.com, all rights reserved.