{"id":3481,"date":"2015-02-12T16:30:19","date_gmt":"2015-02-13T00:30:19","guid":{"rendered":"https:\/\/blog.digilentinc.com\/?p=3481"},"modified":"2025-01-03T00:39:30","modified_gmt":"2025-01-03T08:39:30","slug":"verilog-vs-vhdl","status":"publish","type":"post","link":"https:\/\/digilent.com\/blog\/verilog-vs-vhdl\/","title":{"rendered":"Verilog vs. VHDL"},"content":{"rendered":"<p>At this point in reading the blog and going through the <a href=\"http:\/\/learn.blog.digilentinc.com\/\">Learn<\/a> material, you might realize that there is a lot of FPGA code. It doesn&#8217;t look like C, it doesn&#8217;t look like Java&#8230;what is it?<\/p>\n<p>&nbsp;<\/p>\n<p>When learning FPGA design, there are two languages to choose\u00a0from, Verilog or\u00a0VHDL. They are called HDLs, or hardware design languages. Unlike a language like C, where they define what you want the circuit to do, HDLs define how the hardware needs to be configured. \u00a0Now, it&#8217;s not exactly as clear as that, as you can code behaviorally or structurally in HDL, but that&#8217;s the main idea.<\/p>\n<p>&nbsp;<\/p>\n<p>So if you want to program FPGAs, which do you use?<\/p>\n<p>&nbsp;<\/p>\n<p>I use Verilog, but that&#8217;s only because that&#8217;s what I was taught. The languages are very close, so once you learn one it&#8217;s not to hard to learn the other. Thus,\u00a0picking one to learn first is not that big of a decision. But if you are concerned about it, the\u00a0general consensus is that it is much easier to learn VHDL and then <a href=\"https:\/\/digilent.com\/blog\/learning-verilog-on-fpga\/\" target=\"_blank\" rel=\"noopener\">learn Verilog<\/a>, because VHDL is the harder language to learn. However if you&#8217;ve already learned Verilog, I wouldn&#8217;t be too discouraged.<\/p>\n<p>&nbsp;<\/p>\n<p>They also say that is easier to Learn C, then C++, then Java, but I did it in the reverse\u00a0order and it wasn&#8217;t too bad. Another consideration is that in most industries other than defense, it is more common to use Verilog, so if you know what industry you want to work in,\u00a0you could learn the one that they use.<\/p>\n<p>&nbsp;<\/p>\n<p>The differences in usage and the differences in the languages stem from the history of their creation. VHDL was written as a description language, whereas Verilog was written as a hardware modeling language. As a result, VHDL is a strongly typed, verbose, deterministic language. Verilog, being the opposite in terms of its features,\u00a0looks similar to C code, which is why it is often easier to learn.<\/p>\n<p>&nbsp;<\/p>\n<p>Here is an example of both languages.<\/p>\n<figure id=\"attachment_5397\" aria-describedby=\"caption-attachment-5397\" style=\"width: 600px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/code.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-5397\" src=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/code-600x212.png\" alt=\"Verilog and VHDL code to implement a Mux.\" width=\"600\" height=\"212\" srcset=\"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/code-600x212.png 600w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/code-225x79.png 225w, https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/code.png 612w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><figcaption id=\"caption-attachment-5397\" class=\"wp-caption-text\">Verilog and VHDL code to implement a mux.<\/figcaption><\/figure>\n<ul>\n<li>If you are interested in learning more about either language, check out our <a href=\"http:\/\/learn.blog.digilentinc.com\/Documents\/241\">Learn module<\/a>\u00a0and\u00a0this <a href=\"http:\/\/electronics.stackexchange.com\/questions\/16767\/vhdl-or-verilog\">forum post<\/a>.<\/li>\n<li>If you want to learn more about the differences between Verilog and VHDL, check out <a href=\"https:\/\/digilent.com\/blog\/battle-over-the-fpga-vhdl-vs-verilog-who-is-the-true-champ\/\" target=\"_blank\" rel=\"noopener\">our in depth comparison page<\/a>.<\/li>\n<li>Check out <a href=\"https:\/\/digilent.com\/blog\/can-we-do-better-than-verilog-and-vhdl-for-fpgas\/\" target=\"_blank\" rel=\"noopener\">more options when it comes to debugging FPGA designs<\/a>.<\/li>\n<\/ul>\n<p>Are you ready to unleash your creativity and dive into the world of digital design? Explore the endless possibilities with <a href=\"https:\/\/digilent.com\/shop\/boards-and-components\/system-boards\/fpga-boards\/\">Digilent FPGA boards<\/a> and bring your ideas to life!<\/p>\n<div class='watch-action'><div class='watch-position align-left'><div class='action-like'><a class='lbg-style6 like-3481 jlk' data-task='like' data-post_id='3481' data-nonce='45de443549' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Like' \/><span class='lc-3481 lc'>+12<\/span><\/a><\/div><div class='action-unlike'><a class='unlbg-style6 unlike-3481 jlk' data-task='unlike' data-post_id='3481' data-nonce='45de443549' rel='nofollow'><img src='https:\/\/digilent.com\/blog\/wp-content\/plugins\/wti-like-post-pro\/images\/pixel.gif' title='Unlike' \/><span class='unlc-3481 unlc'>0<\/span><\/a><\/div><\/div> <div class='status-3481 status align-left'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>At this point in reading the blog and going through the learn material, you might realize that there is a lot of FPGA code. It doesn&#8217;t look like C, it doesn&#8217;t look like Java&#8230;what is it?<\/p>\n","protected":false},"author":18,"featured_media":5398,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35,1563],"tags":[1662],"ppma_author":[4466],"class_list":["post-3481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-fpga","category-guide","tag-fpga"],"jetpack_featured_media_url":"https:\/\/digilent.com\/blog\/wp-content\/uploads\/2015\/02\/progLanguages.jpg","authors":[{"term_id":4466,"user_id":18,"is_guest":0,"slug":"kaitlyn","display_name":"Kaitlyn Franz","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/3f16f6159d3666c6fd05a4b73a18c286?s=96&d=mm&r=g","author_category":"","user_url":"","last_name":"Franz","last_name_2":"","first_name":"Kaitlyn","first_name_2":"","job_title":"","description":""}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/comments?post=3481"}],"version-history":[{"count":4,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3481\/revisions"}],"predecessor-version":[{"id":31263,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/posts\/3481\/revisions\/31263"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media\/5398"}],"wp:attachment":[{"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/media?parent=3481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/categories?post=3481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/tags?post=3481"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/digilent.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=3481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}