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

How to use parameterized bitwidth for a constant value in Verilog?

Consider the following example: parameter BITWIDTH = 16; This works: logic [1:0][BITWIDTH-1:0] var = {16'h30, 16'h40}; This doesn't work: logic [1:0][BITWIDTH-1:0] var = {BITWIDTH'h30, BITWIDTH'h40}; How can I use parameters in the above line…
3
votes
2 answers

What are best practices for optimizing pipeline throughput for fpga implementations?

How does one for example make the best use of retiming and/or c-slow to make the most of a given pipeline. With retiming, some modules get better results by putting the shift registers on the inputs (forward register balancing), while other modules…
mrflibble
  • 67
  • 1
  • 1
  • 3
3
votes
2 answers

not a valid l-value - verilog compiler error

module fronter ( arc, length, clinic ) ; input [7:0] arc; output reg [7:0] length ; input [1:0] clinic; input en0, en1, en2, en3; // 11 // clock generator is here g_cal A( en0) ; g_cal B( en1) ; g_cal C( en2) ; g_cal D( en3) ; always…
user478571
3
votes
1 answer

Is it possible to pass constant parameters UPWARDS through module hierarchy in Verilog / SystemVerilog?

Assume you have a module at a low-level in your hierarchy that has a fairly complex parameter calculation. This parameter calculation can not be conveniently replicated in a higher-level module, because it uses information from other parameters at…
A. Name
  • 33
  • 4
3
votes
1 answer

How to create port map that maps a single signal to 1 bit of a std_logic_vector?

I am designing some hardware using VHDL. My design requires the use of a 12-bit ripple counter that will utimately get connected as shown in the schematic screenshot below. I found an existing entity & architecture for a ripple counter from online…
GnUfTw
  • 337
  • 1
  • 4
  • 19
3
votes
1 answer

How to get size of UInt() in chisel?

Maybe it's easy but I can't simply found how to get the bitsize of an UInt() value in Chisel ? I know how to set a size by declaration : val a = UInt(INPUT, 16) But to get the 'a' size, is there a property like : val size = a.? Or : val size =…
FabienM
  • 3,421
  • 23
  • 45
3
votes
1 answer

Finite state machine VHDL reset

I am new to VHDL and I have a question about the implementation of a FSM. I would like the behaviour shown in the picture (where I implemented the same FSM with AHDL). When I implement it in VHDL I have a different behaviour of the reset : if it…
AM93
  • 45
  • 7
3
votes
1 answer

What is "net" in HDL synthesis

I am a beginner in circuit synthesis, and I came across the word net a lot, but I am never able to find its standard definition. It seems to me that it refers to any kind of "black box" where it receives inputs and produce outputs. So it can be a…
xtt
  • 857
  • 1
  • 8
  • 24
3
votes
2 answers

Synthesis global instance count

I couldn't find any questions related to this, but it is possible that I just don't know what to search for. When using a synthesis tool (let's say Synplify if you need a specific tool but it would be best if there were a standard compliant version…
hops
  • 231
  • 4
  • 12
3
votes
2 answers

Scope of `define macros

This question is regarding system verilog macros. I have a top-module, sub-module and a sub-sub module. sub-sub module instantiated in sub-module instantiated in top module. If I define a macro `define abc in the sub module, will the code written…
3
votes
1 answer

Creating a lookup table in CHISEL

I am trying to create a lookup table in Chisel of width 72 bits and 1024 entries. These 1024 entries are stored separately in a file, which I read into my code. The code I have written so far is: import Chisel._ import scala.io.Source._ module…
titan
  • 122
  • 10
3
votes
1 answer

How can assign a synthesizable string to a byte array in SystemVerilog?

I want to initialize a byte array (or any other possible type) to a long string. For example define: string str = "abcdefg". I read these two links (Link 1 & Link 2) but I couldn't find a simple way. These are two hard code ways which I found: 1_…
Soheil Shababi
  • 119
  • 1
  • 10
3
votes
2 answers

How to store data and program permanently in an FPGA?

From what I surfed, once the power goes off in an FPGA you've to program it again. But I'm trying to implement an FPGA based security system using verilog. In that, I want the password of the system to be permanently stored i.e. even when the power…
3
votes
2 answers

Verilog : Variable index is not supported in signal

I get an error saying 'Index is not supported in signal'. From what I can see the error is on the left hand side of the non-blocking assignment. Why does the code below give an error and is there a way to work around it? ... parameter width =…
Ming Peng
  • 33
  • 1
  • 5
3
votes
3 answers

Modules in Verilog: output reg vs assign reg to wire output

Let's say module_a has register_a in it, which needs to be linked to module_b. Should register_a be declared separately and assigned to an output of module_a: reg register_a; assign output_a = register_a; or should we just declare output_a with a…
Hassaan
  • 253
  • 4
  • 13