{"id":445,"date":"2019-07-13T13:03:16","date_gmt":"2019-07-13T13:03:16","guid":{"rendered":"http:\/\/nitk.acm.org\/blog\/?p=445"},"modified":"2019-12-15T15:12:32","modified_gmt":"2019-12-15T15:12:32","slug":"the-language-of-circuits","status":"publish","type":"post","link":"https:\/\/nitk.acm.org\/blog\/2019\/07\/13\/the-language-of-circuits\/","title":{"rendered":"The Language of circuits"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">What is Hardware Description Language?<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Many of us are familiar with basic digital logic and logic-gate based circuits, through our school and first-year courses. <\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">Digital logic is the basic backbone of almost every small and big electronic system around us, starting from microwave ovens to huge supercomputers.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At the elementary level, we see that any digital circuit can be described by using some basic logic gates through boolean equations. This is a pretty world until one steps into a real-world scenario, like a digital camera for example, which has thousands of such inputs and outputs, where deriving the boolean equations and drawing the circuits would not be a child\u2019s play.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u201cHardware Description Languages\u201d (HDLs) were made to solve such problems easily. It is also a class of computer languages in itself, but the purpose of having them is completely different. Languages like C and Python are used to describe software that runs on a given piece of hardware. HDLs whereas, \u201cdescribe\u201d hardware through their various constructs.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Three of the most popular HDLs are:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Verilog<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">VHDL<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">SystemVerilog<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">To realise their importance with a simple example, say you have to design a 4:1 multiplexer, the boolean equations for it would look something like this:\u00a0<\/span><\/p>\n<p style=\"text-align: center;\"><b>Q =<\/b> <b>a&#8217; b&#8217; <\/b><b>A + a&#8217; <\/b><b>b <\/b><b>B + <\/b><b>a <\/b><b>b&#8217; C + a b D<\/b><b><\/b><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400;\">Whereas, the VHDL code for the same would be:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-446\" src=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2019\/07\/shivams-hdl.png\" alt=\"\" width=\"450\" height=\"469\" srcset=\"https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2019\/07\/shivams-hdl.png 450w, https:\/\/nitk.acm.org\/blog\/wp-content\/uploads\/2019\/07\/shivams-hdl-288x300.png 288w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/p>\n<p><span style=\"font-weight: 400;\">Quantitatively, the statements look lengthy, but in an overall sense, this snippet tries to describe the behaviour of the circuit instead of assigning equations directly.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The main highlight is, this is all one needs to do when they have a multiplexer in mind, without the need for things like simplification using K Maps etc. One can simply harness the power of those languages and associated tools, just to \u201cdescribe\u201d their design. Then it is the job of the compiler to interpret this description as boolean equations.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">One very interesting and important point about those languages is that they are inherently concurrent and not sequential (like C and Python). N lines of a piece of code would all work parallelly without a restricted order. Although sequential behaviour, if required can be achieved through certain language constructs.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">This is particularly useful in the development of large-sized ASICs (Application Specific Integrated Circuits) and reconfigurable hardware like Programmable Logic Devices (PLDs) and FPGAs (Field Programmable Gate Arrays).<\/span><\/p>\n<p><span style=\"font-weight: 400;\">It is really interesting as well as important for an electronics engineer to know one of these languages!<\/span><\/p>\n<p style=\"padding-left: 30px;\"><em> &#8211; Shivam Potdar<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Hardware Description Language? Many of us are familiar with basic digital logic and logic-gate based circuits, through our school and first-year courses. Digital logic is the basic backbone of almost every small and big electronic system around us, starting from microwave ovens to huge supercomputers.\u00a0 At the elementary level, we see that any&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[10,26],"tags":[125,126],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-tech","category-vidyut","tag-hardware","tag-programming"],"_links":{"self":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/comments?post=445"}],"version-history":[{"count":6,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":631,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/posts\/445\/revisions\/631"}],"wp:attachment":[{"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/media?parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/categories?post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nitk.acm.org\/blog\/wp-json\/wp\/v2\/tags?post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}