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
5
votes
3 answers

If statement and assigning wires in Verilog

I am trying to figure out the basics of assigning wires based on combinational logic. I have: wire val; wire x; wire a; wire b; always @* begin if(val == 00) //I want to assign x = a if(val == 01) //I want to assign x = b end where a and b are…
T.T.T.
  • 33,367
  • 47
  • 130
  • 168
5
votes
3 answers

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

Here's my code: CHIP PC { IN in[16],load,inc,reset; OUT out[16]; PARTS: Inc16(in = regout, out = incout); Mux16(a = regout, b = incout, sel = inc, out = incdecision); Mux16(a = incdecision, b = false, sel = reset, out =…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
4
votes
1 answer

Verilog execution order

I'm just starting to learn Verilog on my own after taking a course on VHDL. I'm having a trouble understanding the order in which behavioral statements are executed. Here is the code in question. // This file is an experiment into the order in which…
Chris Morin
  • 51
  • 1
  • 5
4
votes
2 answers

How to break always block in Verilog?

I am trying to simulate a simple MIPS processor using behavior code in Verilog. I have finished writing the code but I reach to a final step where I want to break the always block after done with executing the MIPS instructions. Here is my…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
4
votes
2 answers

how to view memory waveform?

I can't view memory using gtkwave: module internal_memory( output [31:0] hrdata, input mem_enable, input [31:0] haddr, input [31:0] hwdata, input hwrite, input hreset, input hclk ); …
e19293001
  • 2,783
  • 9
  • 42
  • 54
4
votes
1 answer

Verilog: differences between if statement and case statement

I am new to Verilog language and want to do some practices to get familiar with it. And I encountered this problem on HDLbits: DFF8ar This problem asks me to create 8 D flip-flops with active-high asynchronous reset. I use a case statement to handle…
user239216
  • 327
  • 2
  • 4
4
votes
3 answers

using always@* | meaning and drawbacks

can you say what is the meaning of that always @ * Is there any possible side effects after using that statement ?
user478571
4
votes
1 answer

Inner product (Dot product .) between two signal 4 bits using Chisel3

I'm a fresher in using Chisel3 to build the hardware components. Now, I'm trying to make a small module in which there are 2 inputs (vector A and vector B) and 1 outputs (out with 1 bits Unsigned Integer). Out is a Dot Product of A and B. I declared…
nhvlong06
  • 41
  • 1
4
votes
1 answer

Expression _GEN_7 is used as a FEMALE but can only be used as a MALE

I am trying to write a Scala transform for firrtl, and at some point , I have a bunch of wires which should be connected to the input port. Because the number of wires could be to high, I dont want to connect each wire with a port, but concatenate…
maku lulaj
  • 168
  • 9
4
votes
3 answers

How to force usage of python 3 in cocotb?

I'm using CocoTB to test my HDL design, but as I understand, it's possible to use it with python2.7 or python3. In setup.py config file I can see that both are supported : [...] "Programming Language :: Python :: 2.7", "Programming…
FabienM
  • 3,421
  • 23
  • 45
4
votes
2 answers

Can't printf with PeekPokeTester in Chisel3

I'm trying to print some value when testing my chisel3 design with this testbench code : package taptempo import chisel3._ import chisel3.iotesters import chisel3.iotesters.{ChiselFlatSpec, Driver, PeekPokeTester} import…
FabienM
  • 3,421
  • 23
  • 45
4
votes
4 answers

Formal verification with Chisel

Is it possible to do formal verification with Chisel3 HDL language? If yes, is there an open-source software to do that ? I know that we can do verilog formal verification with Yosys, but with chisel ?
FabienM
  • 3,421
  • 23
  • 45
4
votes
1 answer

What is difference between index(9) and index(9 downto 9) in vhdl?

logic index : unsigned(9 downto 0) ; type fft_data is array (3 downto 0) of unsigned(16 downto 0); signal tmp,signal fmax_data :fft_data; tmp = fmax_data(to_integer(index(9))); Above part of the code gives following compilation error;…
4
votes
3 answers

What is a LINT/synthesis safe statement to throw an error at compile time?

I have a module that is passed a parameter then instantiates another module corresponding to the defined parameter. However, in the event that a case isn't defined for a certain combination of parameters, I would like an error to be thrown at…
Charles Clayton
  • 17,005
  • 11
  • 87
  • 120
4
votes
1 answer

Initialize data in Mem (Chisel)

I would like to initialize the memory bitmem by setting all bits to 1 when intialized for the first time. I have seen inits used for ROM, and I wonder if there are similar ways to initialize value in Mem? val bitmem = Mem(Bits(width = conf.ways),…
Mrchacha
  • 197
  • 1
  • 17
1 2
3
60 61