VHDL is a programming language?

Asked

Viewed 6,112 times

19

VHDL is a language very present in books dealing with logic circuits, but little is spoken of it in other contexts. There is not even a tag no Stack Overflow em Português. Então:

  • VHDL is a programming language?
  • What is the basic purpose of the VHDL language? Where is it used?
  • It is only used with logic ports or has another application?
  • 3

    This question was created mainly in order to test the reception of the community before the VHDL language, which is being discussed at the finish line.

  • 2

    But it exists in Soen: https://stackoverflow.com/questions/tagged/vhdl?sort=votes

  • https://pt.meta.stackoverflow.com/a/6129/132

  • 2

    And we even have syntax coloring specific for VHDL with <!-- language: lang-vhdl -->

4 answers

12

VHDL is a programming language?

Do you consider an Unrestricted Grammar a programming language? Each of these grammar solves a problem in the same way that a Turing machine solves a problem. You can even write all the processing of a Turing machine using Unrestricted Grammars. I described a Context-Free Grammar that writes/recognizes Unrestricted Grammars in a reply about What is a language meta?.

Let’s face it doesn’t seem very programmatic this... Description of circuits (including reentrant circuits to make memories and latches) seems to me a little more related to programming than Unrestricted Grammars. We can also do a whole programming using XML, with tags if, for and function calls (including allowing recursion), but XML remains a markup language.

Frankly, I think even Turing Complete (or as close as the circuits allow), VHDL should not be considered programming language. Meanwhile, is also not considered programming language, but is still pertinent to Sopt.

What is the basic purpose of the VHDL language? Where is it used?

I used to make a clock and manipulate 8-segment display, but that was just a college experience. You can implement an entire ULA (logic-arithmetic unit) processor with VHDL. It also has application to make specific parts of perceptron-simile neural networks faster.

In the Network Laboratory of the State University of Ceará (LARCES-UECE), the staff used VHDL and Verylog HDL to program net-Fpgas and create an emitter in the order of Gigabyte per second. Very useful to see if a switch can handle the load, can write much more agilely than you dream of using a traditional computer, notebook or desktop.

It is only used with logic ports or has another application?

I believe I have nothing to add at this point, see response from Uzmkartanis

UPDATE

According to the IEEE, VHDL is a programming language. From the description that the IEEE provides on this link about VHDL:

A hardware Description language used in the Creation and analysis of Electronic Circuits.

In free translation:

A hardware description language used in the creation and analysis of electronic circuits.

In the IEEE rankings (the page itself provides other alternatives for rankings), VHDL occupies the 7th position of programming language aimed at embedded systems and 30a considering all available niches.

Ratifying sources

In the ranking of TIOBE index July 2017, VHDL is at position 99, and Verilog (another hardware description language) at 98.

Criticism of the IEEE classification of programming language

I found nowhere described what is considered as a programming language by the IEEE. I found only the ranking method quantitative, but I couldn’t notice if at any point he cites what he considers programming language.

In this ranking, the IEEE also placed as programming language the following:

  1. Arduino

    Based on Processing, the Native language for the Arduino microcontroller has become the Basis of a Huge number of home-Brew and prototype Devices.

  2. HTML

    A Specialized language for describing the Appearance and content of Web pages.

About HTML, I think it was a strange wobble.

More about HTML vs programming language here, here, here and here.

About Arduino, the IEEE explanation is that it is a language derived from Processing; when he referred to Arduino in the list, he refers to this excerpt (source):

In addition to using Traditional Compiler toolchains, the Arduino project provides an Integrated Development Environment (IDE) based on the Processing language project.

In free translation:

In addition to the traditional toolchains build, the Arduino project also provides an IDE based on the project language Processing

10


VHDL

VHDL stands for VHSIC Hardware Description Language, where VHSIC stands for Very High Speed Integrated Circuits; that is, in a free translation, it means description language of hardware for high-speed integrated circuits. The name itself says: description language. The concept of programming language is somewhat abstract (in my understanding at least), because in a more common sense the programming language is the one capable of creating a program - sequence of commands that instruct and guide the execution in hardware to perform a certain task. In this definition, VHDL is not a programming language, because the result of a VHDL code is not a program, but an electronic circuit - actually a mapping of routes that will define the circuit when recorded on an integrated circuit such as ASIC or FPGA. However, another accepted definition for a programming language is to be Turing Complete. It is possible to implement a Turing machine with VHDL, so this makes it a language Turing Complete, is, in this definition, a programming language. In my own experience, being or not a programming language and being you beginner in VHDL, do not join. It is very common to see people starting on VHDL writing code the way they write programs in C/Python/etc and this causes a lot of confusion. While in these languages you know that the code is sequential, one command runs after another, in VHDL everything happens in parallel, because as it comes to an electronic circuit, you are not working with values stored in a memory, but electrical signals.

Interesting readings:

What characterizes a programming language?

What is a programming language, IDE and compiler?

Here comes the story

The history of VHDL is very simple and very useful to understand the essence of language. It was developed by DARPA, Defense Advanced Research Projects Agency or United States Defense Advanced Research Projects Agency for the purpose of documenting projects developed by third parties and provided to the Armed Forces. In the case of military technology, for security reasons, a company had no access to the entire project and needed to develop only a part of it without knowing the rest. Having numerous companies serving numerous documentations with distinct and schematic patterns of complex circuits made the process of unification of these parts very expensive. Thus, they decided to create a description language of hardware, where all technology suppliers should use it to document their products, thus facilitating the development of the project itself. At first, the only function of language was the description of the circuit, so it was nothing more than a structured text, but were already studying concomitantly a way to develop a language capable of generating circuits from a textual definition and the structure defined by VHDL proved to be quite promising. Soon after, then, already appeared the synthesizers of VHDL, software capable of generating the circuit from the VHDL, and the simulators, software capable of simulating the behavior of the circuit from the VHDL code. This all happened in the mid-1980s and already in 1987 the VHDL language was put in the public domain, being standardized by IEEE (IEEE 1076). In the public domain, as expected, the language grew rapidly, having a new version released in 1993, changes made in 2000 and 2002 and the latest version being released in 2008 - almost 10 years of the latest version and commercial synthesizers still do not fully support this version (in my view, the most negative point of the language).

Applications and Use

As quoted in the question, one of the most common and simple applications of language is in the study of logic circuits and Boolean algebra. Many books in the field use VHDL examples and many universities use the language as a tool in the initial study of digital systems. For example, considering the logic gate AND below, it is possible to identify two inputs, A and B, and one output, C. The expected behavior of the logic gate is presented in the truth table.

inserir a descrição da imagem aqui

Source: https://www.embarcados.com.br/cis-de-portas-logicas/

With VHDL it is possible to reproduce the behavior of this logic port for educational purposes. With the word reserved entity it is possible to create a black box by defining the inputs and outputs of our project. In this case, the inputs A and B and the output C all represent digital signals and therefore can be represented by a bit. It is said black box because only the inputs and outputs of the circuit are defined, without defining its behavior. See the implementation below:

entity porta_e is
    port (
        signal A: in bit;
        signal B: in bit;
        signal C: out bit
    );
end entity;

That is, we create an entity called porta_e which has three doors: sign A, type input bit, signal B, entry of type bit, and the C signal, output type bit. Note that it has not been defined how these signals will be treated nor what is the behavior of our entity. With entity only the interface of the component with the external world is defined. The behavior of the circuit is defined using the reserved word architecture:

architecture rtl of porta_e is
begin
    C <= A and B;
end architecture;

In this case, we create an architecture called rtl, linked to the entity porta_e, that defines the desired behavior for our circuit, that is, the C signal receives the result of the operation and between A and B. The operator and for operations of the type bit already has native implementation in VHDL and is interpreted correctly by any synthesizer. The full AND port code would be:

entity porta_e is
    port (
        signal A: in bit;
        signal B: in bit;
        signal C: out bit
    );
end entity;

architecture rtl of porta_e is
begin
    C <= A and B;
end architecture;

By way of example, synthesizing the above code with Altera’s Quartus Prime Lite Edition (one of the largest companies in the Fpgas business), generates the following circuit:

inserir a descrição da imagem aqui

Exactly the circuit we hoped to get, but this is one of the most basic applications of language. Its application itself cannot be described, it varies according to the need and creativity of each, because any digital circuit can be implemented using VHDL. It can go from a simple logic port, as shown, to a modem for high-speed transmissions through fiber optics or more complex than that. By way of example, it is possible to recreate microcontrollers, even allowing you to program it using other languages, such as C or Assembly. It is possible to create video drivers from scratch, audio drivers, memories, etc. Basically any digital circuit. The VHDL generated circuit that makes the calculus of the Fourier transform, for example, is so great that it is impossible to represent it visibly here (nor is it complete):

inserir a descrição da imagem aqui


A Little Jabá

An example of what can be done with VHDL is a project I developed together with 2 colleagues during graduation. The project consists of connecting a camcorder and a monitor to the development board. With VHDL, a standard image (black and gray stripes in the video below) is generated that is displayed on the monitor. With the camcorder, the monitor image is captured and sent to the board where the image will be treated by VHDL. The VHDL then compares the image it received from the camcorder to the image it sent to the monitor and performs certain actions according to the difference in the image. In this case, the VHDL recognized the position of the hand in front of the monitor and played a different sound for each stripe of the image. The goal was to recreate a behavior similar to touch screen, or better, motion sensitive completely with VHDL, ie, all the logic and digital image processing is done in hardware, without any other programming language or use of image processing libraries.

https://youtu.be/xXxqDf_zIt8

  • When it says "commercial synthesizers do not yet fully support this version". These unsupported functions can still be simulated (can simulate, but not to synthesize)?

  • @Inkeliz depends on the simulator used. I believe that none has support for all proposed changes in the 2008 version, but some already support much.

7

According to the own tag wiki ONLYen and of Wikipedia, with free translation, adapted for question:

VHDL is a programming language?

Depends, you are asking to whom? There are those who disagree, there are those who agree. In my view, yes, and by the vote on the goal also agree that is.

Some language points are operators and expressions, constants, conditional controls, packages, variables.


What is the basic purpose of the VHDL language? Where is it used?

VHDL - Hardware Description Language - is a language used in electronic design to describe digital systems such as field programmable port arrays and integrated circuits. VHDL is a hardware description language.


It is only used with logic ports or has another application?

VHDL is commonly used to write text models that describe a logic circuit. This model is processed by a synthesis program, only if it is part of the logic design. A simulation program is used to test the design of logic using simulation models to represent the logic circuits that interact with the project.

It is also used in CPLD, FPGA and ASIC.


It may not be a known theme, but it is always good to add knowledge that does good to the site.

I believe I have nothing to add on that point, look at the excellent reply by Jefferson Quesado

0

VHDL is a programming language. Only that it has particularities relative to its objectives, which are simulation and implementation of digital circuits in microelectronics.

It is commonly used, as is Verilog, another branch language, to describe the hardware circuits present on computer chips. Using it is extremely more practical than designing the logical gates and their connections.

In addition to describing how it should work or how it should actually be a certain digital circuit, it provides adequate means to write small programs, called testbenches, which are not intended to become physical hardware, but serve as a means of testing the working of the developing hardware, by means of computer simulations.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.