Questions tagged [hdl]

HDL is a Hardware Description Language, a language used to design chips. The two major ones are Verilog and VHDL.

Taken from G.J. Lipovsky, "Hardware Description Languages: Voices from the Tower of Babel", Computer, Vol. 10, No. 6, June 1977, pp. 14-17. Paper available here.

A hardware description language can be used to describe the logic gates, the sequential machines, and the functional modules, along with their interconnection and their control, in a digital system. In a general sense, Boolean equations, logic diagrams, programrning languages, and Petri nets are hardware description languages: they can be used to describe some aspect of hardware and they have definable syntax and semantics. Specifically, what is more commonly referred to as a hardware description language is a variation of a programming language tuned to the overall needs of describing hardware.

Adapted from Hardware Description Language tutorial with very few modifications:

Hardware description language (HDL) is a specialized computer language used to program electronic and digital logic circuits. The structure, operation and design of the circuits are programmable using HDL. HDL includes a textual description consisting of operators, expressions, statements, inputs and outputs. Instead of generating a computer executable file, the HDL compilers provide a gate map. The gate map obtained is then downloaded to the programming device to check the operations of the desired circuit. The language helps to describe any digital circuit in the form of structural, behavioral and gate level and it is found to be an excellent programming language for FPGAs, CPLDs and ASICs.

The three common HDLs are Verilog, VHDL, and SystemC. Of these, SystemC is the newest. The HDLs will allow fast design and better verification. In most of the industries, Verilog and VHDL are common. Verilog, one of the main Hardware Description Language standardized as IEEE 1364 is used for designing all types of circuits. It consists of modules and the language allows Behavioral, Dataflow and Structural Description. VHDL (Very High Speed Integrated Circuit Hardware Description Language) is standardized by IEEE 1164. The design is composed of entities consisting of multiple architectures. SystemC is a language that consist a set of C++ classes and macros. It allows electronic system level and transaction modeling.

Need for HDLs

The Moore’s Law in the year 1970 has brought a drastic change in the field of IC technology. This change has made the developers to bring out complex digital and electronic circuits. But the problem was the absence of a better programming language allowing hardware and software codesign. Complex digital circuit designs require more time for development, synthesis, simulation and debugging. The arrival of HDLs has helped to solve this problem by allowing each module to be worked by a separate team.

All the goals like power, throughput, latency (delay), test coverage, functionality and area consumption required for a design can be known by using HDL. As a result, the designer can make the necessary engineering tradeoffs and can develop the design in a better and efficient way. Simple syntax, expressions, statements, concurrent and sequential programming is also necessary while describing the electronics circuits. All these features can be obtained by using a hardware description language. Now while comparing HDL and C languages, the major difference is that HDL provides the timing information of a design.

Benefits of HDL

The major benefit of the language is fast design and better verification. The Top-down design and hierarchical design method allows the design time; design cost and design errors to be reduced. Another major advantage is related to complex designs, which can be managed and verified easily. HDL provides the timing information and allows the design to be described in gate level and register transfer level. Reusability of resources is one of the other advantage.

See also:

906 questions
4
votes
1 answer

Always vs forever in Verilog HDL

What are the difference between the always keyword (not the always @ block) and forever keyword in Verilog HDL? always #1 a=!a; forever #1 a=!a; Here are my findings but I can't still quite draw the line between the two: From Wikipedia: The always…
ellekaie
  • 337
  • 1
  • 7
  • 21
4
votes
1 answer

Why using two flip-flops instead of one in this Verilog HDL code?

This code is a button debouncer. But I can't understand why there are two flips flops : reg PB_sync_0; always @(posedge clk) PB_sync_0 <= ~PB; // invert PB to make PB_sync_0 active high reg PB_sync_1; always @(posedge clk) PB_sync_1 <=…
user3821562
  • 41
  • 1
  • 3
4
votes
3 answers

How do I convert a number to two's complement in verilog?

I am trying to design a 4-bit adder subtracter in verilog. This is only the second thing I have ever written in verilog, and I don't know all the correct syntax yet. This is the module I have so far: module Question3(carryin, X, Y, Z, S, carryout,…
Zachary Wright
  • 23,480
  • 10
  • 42
  • 56
4
votes
1 answer

Converting York Lava function to Kansas Lava

I have here a York Lava function that I want to rewrite in Kansas Lava. But it doesn't want to work and I don't know I should do it actually. Can someone help me with this please? {-Serial In - Parallel Out shiftregister. The serial bit is inserted…
Daan Mouha
  • 580
  • 1
  • 6
  • 20
4
votes
1 answer

Distinguish between simulation and HDL code generation in simulink

I am building a model using Simulink / Matlab Embedded Coder which is then converted to VHDL through HDL Coder. It should behave slightly different in simulation versus HDL, in particular concerning debug-output. Is there a programmatic way to…
mbschenkel
  • 1,865
  • 1
  • 18
  • 40
4
votes
10 answers

Where should I begin with HDLs?

I am a self-taught embedded developer. I mostly use AVRs programmed in C and ASM, but I have dabbled with other systems. I am looking to move onto more complex devices like CPLDs and FPGAs, but I have no idea where to start. So my one and a half…
jeremy
  • 4,421
  • 4
  • 23
  • 27
4
votes
3 answers

Is there any way to create a high level language interpreter implemented in hardware?

Some random thoughts caught me and I just cannot get it out. I am thinking since morden processors are just interpreters for different kinds of assembly languages, is there anyway to create some high-level language interpreters directly implemented…
4
votes
2 answers

Testing my HDL Code (Verilog/VHDL) without an FPGA?

I've written a module in Verilog using vi as my editor and now I want to test it. What are my options if I have no board? How can I give my module inputs? Where can I see the results? I have access to VCS by the way. Thank you.
Ryan
  • 441
  • 1
  • 5
  • 12
3
votes
2 answers

how can i know if my code is Synthesizable? [Verilog]

In designing a circuit in verilog using top-down method, I can start from the behavior of a circuit followed by defining the details in every module to construct a structural circuit that is synthesizable. But how can I know if my code is…
e19293001
  • 2,783
  • 9
  • 42
  • 54
3
votes
1 answer

ALU NOOP case infers a latch: Is this OK?

I'm designing an ALU in Verilog with a combinational always block and cases for every opcode. In the case of NOOP, nothing should happen, so I'm just setting result = result. I understand why this infers a latch. My question is: is there a better…
richbai90
  • 4,994
  • 4
  • 50
  • 85
3
votes
1 answer

Trying to build a PC (counter) for the nand2tetris , but I'm having some trouble with the logic

The project aims to build a program counter. The description are as follows: // This file is part of www.nand2tetris.org // and the book "The Elements of Computing Systems" // by Nisan and Schocken, MIT Press. // File name:…
3
votes
1 answer

Passing a vector and performing operations on it results in X

This is the module that I'm trying to implement. What I want to do is, receive a vector say 2 bits wide having 4 elements that I linearize and pass from the testbench to the test_module1. Now I want to de-linearize it and perform some combinational…
3
votes
3 answers

Simple VHDL testbench procedure for sending serial bytes?

I'm trying to remove bitbashing in my design and sending test signals from outside the DUT using a procedure. The format of the serialized message is a start bit of '0', the byte with MSB first, and a stop bit of '1'. The line idles at '1'. I think…
comc cmoc
  • 47
  • 1
  • 6
3
votes
2 answers

Is it possible to have a while loop in chisel based on a condition of Chisel data types?

Here's what I'm trying to accomplish: I have a Chisel accelerator which calls another Chisel accelerator and passes in a value. I want the second one to have a while loop in it where the condition is partially based on the input value. Here's some…
anc
  • 191
  • 1
  • 19
3
votes
1 answer

2D Array Of Signals with generic in VHDL - Array of Unconstrained Array

Is it posible to make array of unconstrained array in vhdl? I am using XCELIUM 18.03-s001. This is how I declare signal type in pkg_test.vhd: library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all; package pkg_test is type…
SakaSerbia
  • 117
  • 1
  • 13