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

How to set a signal at both posedge and negedge of a clock?

I'm trying to implement a controller with the function that sends out the same clock signal as its input clock. But the controller can also halt the output signal if needed. I'm implementing it on Xilinx ISE. My idea is: At the negedge of the input…
Tommytml
  • 23
  • 4
2
votes
2 answers

What is the difference between these 2 counters?

What is the difference between these two statements if they are inside an always_ff @(posedge clk) block? if(~Intf.DataFull) begin rWrPageCntr <= rWrPageCntr - 1; end vs rWrPageCntr <= rWrPageCntr - ~Intf.DataFull;
2
votes
1 answer

How to define output Reg in Chisel properly

You may know "output reg" in Verilog, very helpful feature. But in Chisel I can't find how to do similar things. When I need register output I should do this: package filter import chisel3._ class TestReg extends Module { val io = IO( new…
DDRDmakar
  • 38
  • 5
2
votes
1 answer

How do I create a C/C++ preprocessor style macro in Chisel HDL?

I am rewriting a Verilog project to Chisel HDL. The project has several de-coupled subcomponents like (ex.v, mem.v, or wb.v) and a configuration file named defines.v, which is `included in the subcomponents. For example, Contents in…
nalzok
  • 14,965
  • 21
  • 72
  • 139
2
votes
2 answers

Quartus does not allow using a Generate block in Verilog

Pretty simple problem. Given the following code: module main( output reg [1:0][DATA_WIDTH-1:0] dOut, input wire [1:0][DATA_WIDTH-1:0] dIn, input wire [1:0][ADDR_WIDTH-1:0] addr, input wire [1:0] wren, input wire clk ); …
Kraken
  • 189
  • 5
2
votes
1 answer

Unable to compile Micron's DDR3 memory model in Modelsim

I downloaded the memory model for the DDR3 bank that I'd be testing in simulation using Modelsim (2019.2) from Micron's website (link). I followed the instructions from the README file to compile it, but I ran into syntax errors. I don't think…
surabhig
  • 33
  • 5
2
votes
2 answers

Estimating area required by a VHDL implementation

I've got a few VHDL files, which I can compile with ghdl on Debian. The same files have been adapted by some for an ASIC implementation. There's one "large area" implementation and one "compact" implementation for an algorithm. I'd like to write…
Nakedible
  • 4,067
  • 7
  • 34
  • 40
2
votes
1 answer

Verilog LRM Nondeterminism

I am facing some doubts regarding the nondeterminism in Verilog Scheduling Semantics mentioned in the Verilog LRM. Below is the excerpt which I am unable to understand: "Another source of nondeterminism is that statements without time-control…
Raksh23
  • 131
  • 4
2
votes
2 answers

Parameterizing a module based on an interface (SystemVerilog)

I have a highly hierarchical design in SystemVerilog (synthesized using Xilinx Vivado). I use parametrized interfaces and modules. Some data types inside the interfaces are calculated using (interface internal) functions, based on their parameters.…
Equilibrius
  • 328
  • 1
  • 13
2
votes
1 answer

trying to use multiple components, form a combinatorial loop

I created each module and a test bench. each does exactly what its supposed to in the simulator. but when i attempt to synthesize i get the error "2170 - Unit VgaTest : the following signal(s) form a combinatorial loop: U1/Madd_divider_lut<1>"…
2
votes
1 answer

What is the purpose of 'pure' keyword in the clash tutorial example?

In Clash official website, there is the following example : >>> sampleN @System 4 (register 0 (pure (8 :: Signed 8))) I know what is a pure function, but why this keyword here ? If I remove it I got an error : Clash.Prelude> sampleN @System 4…
FabienM
  • 3,421
  • 23
  • 45
2
votes
1 answer

How to pass some Bundles as Module parameters?

I'm Writing a wishbone plumbing package to generate Intercon Modules for my designs. In this package named wbplumbing I declared two Bundle for Wishbone Master and Slave interfaces: class WbMaster (val dwidth: Int, val awidth: Int)…
FabienM
  • 3,421
  • 23
  • 45
2
votes
1 answer

How to count time in chisel with iotesters?

Is there a way to get the step value in iotesters ? Currently I'm using a var counter but I'm sure there is a better way : class MyTest (dut: MyModule) extends PeekPokeTester(dut) { var timeCounter = 0 for(i <- 0 to 10) { step(1) …
FabienM
  • 3,421
  • 23
  • 45
2
votes
1 answer

ALU hdl produces wrong values

(nand2tetris course) Expected result: | x | y |zx |nx |zy |ny | f |no | out | | 0000000000000000 | 1111111111111111 | 1 | 1 | 1 | 1 | 1 | 1 | 0000000000000001 | My HDL code's result: | x | …
Sebastian Nielsen
  • 3,835
  • 5
  • 27
  • 43
2
votes
1 answer

Is there a way to warn wrong clock domain crossing in Chisel3?

As I read from Chisel wiki, it is possible to declare several clock domain in a single module. But if we need to read/write a signal through two different clock domains it's important to manage metastability (with dual d-latch, asynchronous fifo,…
FabienM
  • 3,421
  • 23
  • 45