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
3
votes
1 answer

Using parameters with for loop in verilog for bit selection

I am designing some hardware in Verilog, but in an effort to keep things flexible, I am using parameters to set widths so that I can modify widths as needed without modifying code. One problem I have run into is in a section of code where I want to…
ras2124
  • 264
  • 1
  • 3
  • 10
2
votes
1 answer

Calculations with Real Numbers, Verilog HDL

I noticed that Verilog rounds my real number results into integer results. For example when I look at simulator, it shows the result of 17/2 as 9. What should I do? Is there anyway to define something like a: output real reg [11:0] output_value ? Or…
Amadeus
  • 352
  • 2
  • 8
  • 16
2
votes
1 answer

How to combine multiple arrays into one array in Verilog?

Here is my code: module MIPS_Processor(); reg [7:0] mem [0:4095]; // 4K memory cells that are 8 bits wide reg [7:0] code[0:1023]; // 1K memory cells that are 8 bits wide reg [31:0] registers[0:31]; // 32 registers that are 32…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
2
votes
1 answer

Does "signal" imply δ delay in VHDL?

Hello i was wondering how a signal declaration really works in VHDL. Does it imply delay since its an internal signal? Do signals have an internal memory? example: Architecture SD_BEH of SD is signal C: std_logic; begin process (A) begin …
BugShotGG
  • 5,008
  • 8
  • 47
  • 63
2
votes
3 answers

Getting only High Z on output

I am designing a simple bus with 3-state buffers. My buffers work fine, but in my design I only get 8'bZZZZZZZZ output whether the select is 1 or 0. Here is the design that I am working on: Here is my code: module part_1( input wire select, …
rDenghis
  • 21
  • 2
2
votes
1 answer

Emacs Verilog 'compilation exited abnormally with code 255'

module FullAdder (a, b, ci, r, co); input a, b, ci; output r, co; assign r = a ^ b ^ ci; assign co = (a&b) | ((a^b)&ci); endmodule // FullAdder module adder_4bit (A, B, ci, R, co); input [3:0] A, B; // [MSB:LSB] input ci; …
2
votes
2 answers

Assigning the entirety of a 2D packed array to a 1D packed array with the same number of elements

I have the following signals: logic [X-1:0][Y-1:0] twoDim; logic [(X*Y)-1:0] oneDim; I want to assign the entirety of twoDim to oneDim i.e. if I wrote something like this: assign oneDim = twoDim; And parameter X = 5 then I would expect the…
Guilty
  • 464
  • 4
  • 13
2
votes
1 answer

Bitstream Encryption

I have a question related to bitstream encryption using eFUSE option. If my FPGA has bitstream encryption key stored in the eFUSE, how Vivado will know the encryption key when generating new encrypted bitstream? Does Vivado has a method to readback…
2
votes
1 answer

Verilog always block properties - sequential vs. combinatorial

I understand that always block can be used to implement procedural and sequential logic. Will the gate-level realization of the following two codes be the same? If yes, what is the correct way of describing this continuous-time logic? a. module…
shlopkin
  • 35
  • 4
2
votes
2 answers

localparameters to make code generic to support different data widths

I am currently designing Verilog logic that is generic so that I can modify the width of registers based on parameters that is being passed as inputs to the module. The parameters are RWIDTH and BWIDTH. Currently I am testing it for two…
user2532296
  • 828
  • 1
  • 10
  • 27
2
votes
2 answers

$readmemh doesn't read the values from data file

I'm using readmemh like: reg [11:0] rom [0:121]; initial $readmemh("x.data", rom); My x.data file looks like: line 1: 1 line 2: 10 . . . line 118: 1110101 line 119: 1110110 line 120: 1110111 When I try to use rom[20] during the simulation,…
2
votes
1 answer

How to create boolean data type to standard logic in VHDL

Is there an existing function within the regular std.logic library to convert a boolean data type to std logic in vhdl?
2
votes
1 answer

Sorting a vector in VHDL

I was trying to sort a vector for example if the input is 101010 the output would be 111000. Every time when I am trying to simulate the code, my output is always all zeros. I am posting my code for your reference. If I am missing something or if…
2
votes
1 answer

What the difference between != and =/= in chisel?

The Chisel cheat-sheet give two way do express inequality : Chisel Explanation Width ============================== x != y Inequality 1 x =/= y Inequality 1 Are != and =/= equivalent ?
FabienM
  • 3,421
  • 23
  • 45
2
votes
1 answer

Is it possible to declare conditionnal signals in io bundle?

Is it possible to declare signal only if a parameter is set in chisel module ? Like it : class GbWrite (val debug_simu: Boolean = true) extends Module { val io = IO(new Bundle { //... /* debug */ if(debug_simu){ val countcol =…
FabienM
  • 3,421
  • 23
  • 45