{"id":621,"date":"2019-08-12T23:26:01","date_gmt":"2019-08-12T17:56:01","guid":{"rendered":"https:\/\/editor.eduplusnow.com\/?p=621"},"modified":"2019-08-12T23:26:01","modified_gmt":"2019-08-12T17:56:01","slug":"using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide","status":"publish","type":"post","link":"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/","title":{"rendered":"Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide"},"content":{"rendered":"<h2><b>Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide<\/b><\/h2>\n<hr \/>\n<p><span style=\"font-weight: 400;\">Verilog HDL was first introduced in 1984 by Prabhu Goel and Phil Moorby. Back then, it was a propriety HDL and was maintained by Gateway Design Automation Inc. Till 1990, a lot of revisions were released for the language. However, in 1990, Cadence Design System took over Gateway Design Automation Inc. Understanding the potential of this language, Cadence transferred it to the public domain with the name OVI (Open Verilog International).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In 2005, minor corrections of the language were published along with SystemVerilog, which is a superset of VHDL. In 2009, Verilog and SystemVerilog were merged and even today, this remains as one of the highly used languages for verification and IC design.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In this article, we will discuss the basics of Verilog HDL.<\/span><\/p>\n<h3><b>Verilog Basics<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">VHDL is the most commonly utilised Hardware Description Languages (HDL) due to its ease of circuit simulation. With this language, it is possible to use multiple abstractions such as data flow, structural, and behavioural code styles.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">And if you know a thing or two about digital circuits, you can know a lot about Verilog design.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here\u2019s a simple example.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The circuit has two input ports and one output port, and the logic used is AND logic. The two inputs functionally use AND logic to give a single output.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, the description of this logic in Verilog is:<\/span><\/p>\n<p><i><span style=\"font-weight: 400;\">entity sample_1 is<\/span><\/i><\/p>\n<p><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0Port (X: in STD_LOGIC;<\/span><\/i><\/p>\n<p><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Y: in STD_LOGIC;<\/span><\/i><\/p>\n<p><i><span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Z: out STD_LOGIC);<\/span><\/i><\/p>\n<p><i><span style=\"font-weight: 400;\">end sample_1;<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Verilog\u2019s syntax is simple, it starts by defining the module name with the <\/span><i><span style=\"font-weight: 400;\">entity<\/span><\/i><span style=\"font-weight: 400;\">, which concludes with the <\/span><i><span style=\"font-weight: 400;\">end<\/span><\/i><span style=\"font-weight: 400;\">. <\/span><i><span style=\"font-weight: 400;\">STD_LOGIC<\/span><\/i><span style=\"font-weight: 400;\"> is a common data type used in Verilog.\u00a0<\/span><\/p>\n<h3><b>Building Blocks of VHDL<\/b><\/h3>\n<h4><b>Modules<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The first building block of VHDL is a module. It is a collection of design blocks at a lower level. Here, various elements of the design are grouped in a module which can be used at various instances in the design itself. This block starts with the <\/span><i><span style=\"font-weight: 400;\">module<\/span><\/i><span style=\"font-weight: 400;\"> and concludes with the <\/span><i><span style=\"font-weight: 400;\">endmodule<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h4><b>Ports<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">A module needs an interface to communicate, and this is provided by ports. The circuit environment can communicate with the module through ports. Take the IC chip, for instance. The <\/span><i><span style=\"font-weight: 400;\">input<\/span><\/i><span style=\"font-weight: 400;\"> and <\/span><i><span style=\"font-weight: 400;\">output<\/span><\/i><span style=\"font-weight: 400;\"> pins in this chip are ports.<\/span><\/p>\n<h4><b>Processes<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The processes in VHDL are used inside the architecture. These processes execute sequentially. In the behavioural model, processes are extremely important. For a model to simulate effectively, all of its components should be described in one or multiple processes.<\/span><\/p>\n<h4><b>Assignments<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">A signal assignment changes the waveform outputs. It can be used inside an architecture or process directly. Usually, we use either sequential or concurrent signal assignment.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For instance, a sequential assignment when present inside the process executes once the process ends.\u00a0<\/span><\/p>\n<h3><b>VHDL Code Styles<\/b><\/h3>\n<h4><b>Behavioural<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">It is the highest abstraction level which defines the circuit based on its behaviour. If you know how your circuit will behave, you can design it using behavioural code style.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This code style is like the natural language processing of the circuit\u2019s functionality.<\/span><\/p>\n<h4><b>Structural<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Structural code style is similar to assembly language as it uses logic gates to define the circuit\u2019s functionality. Designing a circuit with this code style matches the gate-level logic implementation.<\/span><\/p>\n<h4><b>Data Flow<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The code style at this level defines the flow of data in the design components of the circuit. For instance, it uses Register Transfer Logic or RTL to define the circuit\u2019s functionality.\u00a0<\/span><\/p>\n<h3><b>VHDL Design Methodologies<\/b><\/h3>\n<h4><b>Top-down<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The top-down approach builds the top-level block first and then identifies its sub-level blocks. These are divided till the leaf-level is reached.<\/span><\/p>\n<h4><b>Bottom-up<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">The bottom-up approach is traditional, which means that the logic is defined at the gate-level. First, building blocks are identified, then these are constantly used to build bigger cells until we have the top-level block of the design.<\/span><\/p>\n<h4><b>Hybrid<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">In practice, the hybrid approach is utilised. The design architect defines the top-level block, the logic designer decides the structure of the top-level and sub-level blocks, and circuit designer defines the leaf-level blocks.<\/span><\/p>\n<h3><b>Simulation vs Synthesis Model<\/b><\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Simulation<\/b><\/td>\n<td><b>Synthesis<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Requires a sensitivity list<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Uses logic such as combinational, large sensitive storage, and edge-sensitive storage.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Verifies circuit timing<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Provides netlist as output.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">Verifies circuit functionality<\/span><\/td>\n<td><span style=\"font-weight: 400;\">Converts VHDL description into components such as in FPGA or CPLD.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><span style=\"font-weight: 400;\">Conclusion\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Verilog HDL is an important part of circuit design. With highly complex circuit behaviour, Verilog allows designers to confide in the design by reducing the chances of failure. Further, it accelerates simulation which reduces the time-to-market. With all these benefits, it is impossible for the circuit designers to not use Verilog for hardware description and verification.\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide Verilog HDL was first introduced in 1984 by Prabhu Goel and Phil Moorby. Back then, it was a propriety HDL and was maintained by Gateway Design Automation Inc. Till 1990, a lot of revisions were released for the language. However, in 1990, Cadence Design System &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":622,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,3,21,4],"tags":[234,393,395,398,399,401],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v16.0.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide - Edu plus now Blog<\/title>\n<meta name=\"description\" content=\"This article provides an overview of Verilog HDL and its use in programmable logic design. Read more \u2026\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"4 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/#website\",\"url\":\"https:\/\/blog.eduplusnow.com\/blog\/\",\"name\":\"Edu plus now Blog\",\"description\":\"Just another WordPress site\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/blog.eduplusnow.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/blog.eduplusnow.com\/blog\/wp-content\/uploads\/2019\/08\/Image2.jpg\",\"width\":1000,\"height\":563},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/#webpage\",\"url\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\",\"name\":\"Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide - Edu plus now Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/#primaryimage\"},\"datePublished\":\"2019-08-12T17:56:01+00:00\",\"dateModified\":\"2019-08-12T17:56:01+00:00\",\"author\":{\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/#\/schema\/person\/5f873cbf920d9068c9190f6847b9b650\"},\"description\":\"This article provides an overview of Verilog HDL and its use in programmable logic design. Read more \\u2026\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/\",\"url\":\"https:\/\/blog.eduplusnow.com\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\",\"url\":\"https:\/\/blog.eduplusnow.com\/blog\/using-verilog-hdl-in-programmable-logic-design-a-comprehensive-guide\/\",\"name\":\"Using Verilog HDL in Programmable Logic Design: A Comprehensive Guide\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/#\/schema\/person\/5f873cbf920d9068c9190f6847b9b650\",\"name\":\"editor@eduplusnow.com\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.eduplusnow.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a5b495db0bdab37964c4b2e2b72f45e6?s=96&d=mm&r=g\",\"caption\":\"editor@eduplusnow.com\"},\"sameAs\":[\"https:\/\/blog.eduplusnow.com\/blog\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/posts\/621"}],"collection":[{"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/comments?post=621"}],"version-history":[{"count":0,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/posts\/621\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/media\/622"}],"wp:attachment":[{"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/media?parent=621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/categories?post=621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eduplusnow.com\/blog\/wp-json\/wp\/v2\/tags?post=621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}