The Language of circuits

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. 

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’s play.

“Hardware Description Languages” (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, “describe” hardware through their various constructs.

Three of the most popular HDLs are:

  1. Verilog
  2. VHDL
  3. SystemVerilog

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: 

Q = a’ b’ A + a’ b B + a b’ C + a b D

 

Whereas, the VHDL code for the same would be:

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. 

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 “describe” their design. Then it is the job of the compiler to interpret this description as boolean equations. 

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.

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).

It is really interesting as well as important for an electronics engineer to know one of these languages!

– Shivam Potdar

Leave a Reply

Your email address will not be published. Required fields are marked *