Verilog and VHDL: How Engineers Design Your PC’s Processors

Verilog and VHDL

If you have ever wondered how the different processors and memories that are in your PC are designed, then this interests you because we are going to explain directly and quickly what is the process used today by all companies in the sector, regardless what is their size and their specialization. To do this, we are going to talk about Verilog and VHDL , the two hardware description languages and the process of creating it, from the design table to your PC.

The processors and memories inside your PC are made up of hundreds of millions and even billions of transistors in a very small space, which makes them a superstructure made up of other structures that are also extremely complex.

Transistor

Such level of complexity and the microscopic size of the processors make it necessary a series of tools when designing them that allow engineers to create such systems quickly and efficiently, and this is where the description languages of the process come in. hardware.

Hardware Description Languages: Verilog and VHDL

Codigo Fuente

The languages most used to describe hardware are VHDL and Verilog , which have a syntax similar to that of C programming, but instead of executing a program, they describe the organization of the different parts of it based on interconnected modules ; Each module is described as follows:

  • Inputs: which are the data inputs that the module has.
  • The main code that this module makes with those input parameters.
  • The Output that is the module’s output data.

For example, in Verilog, to describe a logic AND gate the code would be the following:

 module AND_2 (output Y, input A, B);
and (Y, A, B);
endmodule;

Instead, in VHDL the modules are called entities:

 entity andGate is

    port (A: in std_logic;     
         B: in std_logic;      
         Y: out std_logic); 
end andGate;
architecture andLogic of andGate is
 begin
    Y <= A AND B;
end andLogic;

In both cases, an AND gate with two inputs (A, B) and one AND output is described.

Puerta AND tabla de verdad

Thanks to these hardware description languages, engineers can program modules that represent different basic elements such as logic gates, going through combinational and sequential circuits, and ending up with extremely complex systems, all through written code, allowing them to recycle even parts repeated very quickly.

The stages of hardware creation

Etapas creación hardware

Once the Verilog or VHDL code has been written, it is tested for operation on a simulator , a piece of software that engineers use to monitor every step of the way. At this stage the hardware is simulated at a very low speed, since what is intended to validate is that the hardware description code has been written correctly.

The next step is that of the emulator , where not all the hardware pieces in its design process go through this stage, but only those that are going to run a program. The concept of the emulator is the same as the ones we use to emulate old systems or consoles on our PCs, but in this case they work at a very low speed where the objective is to test small extracts of common software to see the performance of the architecture and power. optimize it.

Array de FPGAs

The third step is to transfer the Verilog or VHDL code to one or more interconnected FPGAs where the hardware will be tested at a physical level, and this is done to test the communication of the future processor with the memory and the external peripherals to which it will be connected. , while allowing engineers to know if the energy consumption specifications are within expectations.

Obleas Chips

These three steps are done recursively until a fully functional design is achieved, and then the Verilog or VHDL file is sent to the foundry for the chips to be printed on wafers , at which time quality and validation tests will be done before mass manufacturing.

In the beginning there were no hardware description languages

6502 Floorplan

Early PC processor designers lacked the tools of today, so they had to do things like draw hardware on paper and use breadboarding , a technique of unifying simpler electronic circuits on a circuit board. through cables (literally).

Breadboards Amiga

These simpler electronic circuits that they used in Breadboarding to create more complex chips used to be TTL or CMOS chips that had inside basic elements of the design of processors such as logic gates, combinational systems, sequential systems, ALUs, etc. This was done because at that time FPGAs did not exist to be able to test the hardware after programming it through Verilog or VHDL, so they had to create large-scale versions of the chips they created.

However, as the density of transistors increased, it became impossible for a few people to design a processor, and little by little hardware description languages and programmable logic were adopted for the design of new processors such as such as PAL, PLA, CPLD and, in the most complex part, FPGAs.