GO-V.ORG
As seen in

Verilog

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems.[7] It is most commonly used in the design and verification of digital circuits, with the highest level of abstraction being at the register-transfer level.[5] It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits.[5] In 2009, the Verilog standard (IEEE 1364-2005) was merged into the SystemVerilog standard, creating IEEE Standard 1800-2009.[5] Since then, Verilog has been officially part of the SystemVerilog language.[5] The current version is IEEE standard 1800-2023.[5]

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems.[7] It is most commonly used in the design and verification of digital circuits, with the highest level of abstraction being at the register-transfer level.[5] It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits.[5] In 2009, the Verilog standard (IEEE 1364-2005) was merged into the SystemVerilog standard, creating IEEE Standard 1800-2009.[5] Since then, Verilog has been officially part of the SystemVerilog language.[5] The current version is IEEE standard 1800-2023.[5] ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming languages they model physical hardware, including concurrent operation, signal timing, and electrical behavior.[1] There are two types of assignment operators; a blocking assignment (=), and a non-blocking ( >>.[src] A generate–endgenerate construct (similar to VHDL's generate–endgenerate) allows Verilog-2001 to control instance and statement instantiation through normal decision operators (case–if–else).[6] Using generate–endgenerate, Verilog-2001 can instantiate an array of instances, with control over the connectivity of the individual instances.[src] File I/O has been improved by several new system tasks.[src] And finally, a few syntax additions were introduced to improve code readability (e.g.[src] always @*, named parameter override, C-style function/task/module header declaration).[src] Verilog-2001 is the version of Verilog supported by the majority of commercial EDA software packages.[1] ===Verilog 2005=== Not to be confused with SystemVerilog, Verilog 2005 (IEEE Standard 1364-2005) consists of minor corrections, spec clarifications, and a few new language features (such as the uwire keyword).[5] A separate part of the Verilog standard, Verilog-AMS, attempts to integrate analog and mixed signal modeling with traditional Verilog.[1] ===SystemVerilog=== The advent of hardware verification languages such as OpenVera, and Verisity's e language encouraged the development of Superlog by Co-Design Automation Inc (acquired by Synopsys).[5] The foundations of Superlog and Vera were donated to Accellera, which later became the IEEE standard P1800-2005: SystemVerilog.[5] SystemVerilog is a superset of Verilog-2005, with many new features and capabilities to aid design verification and design modeling.[5] As of 2009, the SystemVerilog and Verilog language standards were merged into SystemVerilog 2009 (IEEE Standard 1800-2009).[5] ===Updates since 2009=== The SystemVerilog standard was subsequently updated in 2012, 2017, and most recently in December 2023.[5] ==Example== A simple example of two flip-flops follows: module toplevel(clock,reset); input clock; input reset; reg flop1; reg flop2; always @ (posedge reset or posedge clock) if (reset) begin flop1 The operator in Verilog is another aspect of its being a hardware description language as opposed to a normal procedural language.[7] This is known as a "non-blocking" assignment.[src] Its action does not register until after the always block has executed.[src] This means that the order of the assignments is irrelevant and will produce the same result: flop1 and flop2 will swap values every clock.[src] The other assignment operator = is referred to as a blocking assignment.[src] When = assignment is used, for the purposes of logic, the target variable is updated immediately.[src] In the above example, had the statements used the = blocking operator instead of , flop1 and flop2 would not have been swapped.[src] Instead, as in traditional programming, the compiler would understand to simply set flop1 equal to flop2 (and subsequently ignore the redundant logic to set flop2 equal to flop1).[src] An example counter circuit follows: module Div20x (rst, clk, cet, cep, count, tc); // TITLE 'Divide-by-20 Counter with enables' // enable CEP is a clock enable only // enable CET is a clock enable and // enables the TC output // a counter using the Verilog language parameter size = 5; parameter length = 20; input rst; // These inputs/outputs represent input clk; // connections to the module.[7] input cet; input cep; output [size-1:0] count; output tc; reg [size-1:0] count; // Signals assigned // within an always // (or initial)block // must be of type reg wire tc; // Other signals are of type wire // The always statement below is a parallel // execution statement that // executes any time the signals // rst or clk transition from low to high always @ (posedge clk or posedge rst) if (rst) // This causes reset of the cntr count An example of delays: ...[src] reg a, b, c, d; wire e; ...[src] always @(b or e) begin a = b & e; b = a | b; #5 c = b; d = #6 c ^ e; end The always clause above illustrates the other type of method of use, i.e.[src] it executes whenever any of the entities in the list (the b or e) changes.[src] When one of these changes, a is immediately assigned a new value, and due to the blocking assignment, b is assigned a new value afterward (taking into account the new value of a).[src] After a delay of 5 time units, c is assigned the value of b and the value of c ^ e is tucked away in an invisible store.[src] Then after 6 more time units, d is assigned the value that was tucked away.[src] Signals that are driven from within a process (an initial or always block) must be of type reg.[src] Signals that are driven from outside a process must be of type wire.[src] The keyword reg does not necessarily imply a hardware register.[src] ==Definition of constants== The definition of constants in Verilog supports the addition of a width parameter.[src] The basic syntax is: ' Where: size: The bit-width of the constant (optional, but strongly recommended) base: The radix specifier - b (binary), o (octal), d (decimal), h (hexadecimal) value: The numeric value in the specified base Examples: 16'h1A23 or 16'h1a23 – Hexadecimal 1A23 lower and upper case are allowed (using 16 bits) 20'd44 – Decimal 44 (using 20 bits – 0 extension is automatic) 4'b1010 – Binary 1010 (using 4 bits) 6'o77 – Octal 77 (using 6 bits) ==Synthesizable constructs== There are several statements in Verilog that have no analog in real hardware, such as the $display command.[1] However, the examples presented here are the classic (and limited) subset of the language that has a direct mapping to real gates.[src] // Mux examples — Three ways to do the same thing.[src] // The first example uses continuous assignment wire out; assign out = sel ?[src] a : b; // the second example uses a procedure // to accomplish the same thing.[src] reg out; always @(a or b or sel) begin case(sel) 1'b0: out = b; 1'b1: out = a; endcase end // Finally — you can use if/else in a // procedural structure.[src] reg out; always @(a or b or sel) if (sel) out = a; else out = b; The next interesting structure is a transparent latch; it will pass the input to the output when the gate signal is set for "pass-through", and captures the input and stores it upon transition of the gate signal to "hold".[src] The output will remain stable regardless of the input signal while the gate is set to "hold".[src] In the example below the "pass-through" level of the gate would be when the value of the if clause is true, i.e.[src] gate = 1.[src] This is read "if gate is true, the din is fed to latch_out continuously." Once the if clause is false, the last value at latch_out will remain and is independent of the value of din.[src] // Transparent latch example reg latch_out; always @(gate or din) if(gate) latch_out = din; // Pass through state // Note that the else isn't required here.[src] The variable // latch_out will follow the value of din while gate is // high.[src] When gate goes low, latch_out will remain constant.[src] The flip-flop is the next significant template; in Verilog, the D-flop is the simplest, and it can be modeled as: reg q; always @(posedge clk) q The significant thing to notice in the example is the use of the non-blocking assignment.[1] A basic rule of thumb is to use reg q; always @(posedge clk or posedge reset) if(reset) q The next variant is including both an asynchronous reset and asynchronous set condition; again the convention comes into play, i.e.[1] the reset term is followed by the set term.[src] reg q; always @(posedge clk or posedge reset or posedge set) if(reset) q Note: If this model is used to model a Set/Reset flip flop then simulation errors can result.[src] Consider the following test sequence of events.[src] 1) reset goes high 2) clk goes high 3) set goes high 4) clk goes high again 5) reset goes low followed by 6) set going low.[src] Assume no setup and hold violations.[src] In this example the always @ statement would first execute when the rising edge of reset occurs which would place q to a value of 0.[src] The next time the always block executes would be the rising edge of clk which again would keep q at a value of 0.[src] The always block then executes when set goes high which because reset is high forces q to remain at 0.[src] This condition may or may not be correct depending on the actual flip flop.[src] However, this is not the main problem with this model.[src] Notice that when reset goes low, that set is still high.[src] In a real flip flop this will cause the output to go to a 1.[src] However, in this model it will not occur because the always block is triggered by rising edges of set and reset – not levels.[src] A different approach may be necessary for set/reset flip flops.[src] The final basic variant is one that implements a D-flop with a mux feeding its input.[src] The mux has a d-input and feedback from the flop itself.[src] This allows a gated load function.[src] // Basic structure with an EXPLICIT feedback path always @(posedge clk) if(gate) q Note that there are no "initial" blocks mentioned in this description.[src] There is a split between FPGA and ASIC synthesis tools on this structure.[src] FPGA tools allow initial blocks where reg values are established instead of using a "reset" signal.[src] ASIC synthesis tools don't support such a statement.[src] The reason is that an FPGA's initial state is something that is downloaded into the memory tables of the FPGA.[src] An ASIC is an actual hardware implementation.[src] ==Initial and always== There are two separate ways of declaring a Verilog process.[src] These are the always and the initial keywords.[src] The always keyword indicates a free-running process.[src] The initial keyword indicates a process executes exactly once.[src] Both constructs begin execution at simulator time 0, and both execute until the end of the block.[src] Once an always block has reached its end, it is rescheduled (again).[src] It is a common misconception to believe that an initial block will execute before an always -block.[src] In fact, it is better to think of the initial-block as a special-case of the always-block, one which terminates after it completes for the first time.[src] //Examples: initial begin a = 1; // Assign a value to reg a at time 0 #1; // Wait 1 time unit b = a; // Assign the value of reg a to reg b end always @(a or b) // Any time a or b CHANGE, run the process begin if (a) c = b; else d = ~b; end // Done with this block, now return to the top (i.e.[src] the @ event-control) always @(posedge a)// Run whenever reg a has a low to high change a These are the classic uses for these two keywords, but there are two significant additional uses.[src] The most common of these is an always keyword without the @(...) sensitivity list.[src] It is possible to use always as shown below: always begin // Always begins executing at time 0 and NEVER stops clk = 0; // Set clk to 0 #1; // Wait for 1 time unit clk = 1; // Set clk to 1 #1; // Wait 1 time unit end // Keeps executing — so continue back at the top of the begin The always keyword acts similar to the C language construct while(1) {..} in the sense that it will execute forever.[src] The other interesting exception is the use of the initial keyword with the addition of the forever keyword.[src] The example below is functionally identical to the always example above.[src] initial forever // Start at time 0 and repeat the begin/end forever begin clk = 0; // Set clk to 0 #1; // Wait for 1 time unit clk = 1; // Set clk to 1 #1; // Wait 1 time unit end ==Fork/join== The fork/join pair are used by Verilog to create parallel processes.[src] All statements (or blocks) between a fork/join pair begin execution simultaneously upon execution flow hitting the fork.[src] Execution continues after the join upon completion of the longest running statement or block between the fork and join.[src] initial fork $write("A"); // Print char A $write("B"); // Print char B begin #1; // Wait 1 time unit $write("C"); // Print char C end join The way the above is written, it is possible to have either the sequences "ABC" or "BAC" print out.[src] The order of simulation between the first $write and the second $write depends on the simulator implementation, and may purposefully be randomized by the simulator.[src] This allows the simulation to contain both accidental race conditions as well as intentional non-deterministic behavior.[src] Notice that VHDL cannot dynamically spawn multiple processes like Verilog.[1] ==Race conditions== The order of execution is not always guaranteed within Verilog.[src] This can best be illustrated by a classic example.[src] Consider the code snippet below: initial a = 0; initial b = a; initial begin #1; $display("Value a=%d Value of b=%d",a,b); end Depending on the order of execution of the initial blocks, it could be zero and zero, or alternately zero and some other arbitrary uninitialized value.[src] The $display statement will always execute after both assignment blocks have completed, due to the #1 delay.[src] ==Operators== Note: These operators are not shown in order of precedence.[src] ==Four-valued logic== The IEEE 1364 standard defines a four-valued logic with four states: 0, 1, Z (high impedance), and X (unknown logic value).[5] For the competing VHDL, a dedicated standard for multi-valued logic exists as IEEE 1164 with nine levels.[5] ==System tasks== System tasks are available to handle simple I/O and various design measurement functions during simulation.[src] All system tasks are prefixed with $ to distinguish them from user tasks and functions.[src] This section presents a short list of the most frequently used tasks.[src] It is by no means a comprehensive list.[src] $display – Print to screen a line followed by an automatic newline.[src] $write – Print to screen a line without the newline.[src] $swrite – Print to variable a line without the newline.[src] $sscanf – Read from variable a format-specified string.[src] (*Verilog-2001) $fopen – Open a handle to a file (read or write) $fdisplay – Print a line from a file followed by an automatic newline.[src] $fwrite – Print to file a line without the newline.[src] $fscanf – Read from file a format-specified string.[src] (*Verilog-2001) $fclose – Close and release an open file handle.[src] $readmemh – Read hex file content into a memory array.[src] $readmemb – Read binary file content into a memory array.[src] $monitor – Print out all the listed variables when any change value.[src] $time – Value of current simulation time.[src] $dumpfile – Declare the VCD (Value Change Dump) format output file name.[src] $dumpvars – Turn on and dump the variables.[src] $dumpports – Turn on and dump the variables in Extended-VCD format.[src] $random – Return a random value.[src] ==Program Language Interface (PLI)== The PLI provides a programmer with a mechanism to transfer control from Verilog to a program function written in C language.[7] It is officially deprecated by IEEE Std 1364-2005 in favor of the newer Verilog Procedural Interface, which completely replaces the PLI.[7] The PLI (now VPI) enables Verilog to cooperate with other programs written in the C language such as test harnesses, instruction set simulators of a microcontroller, debuggers, and so on.[1] For example, it provides the C functions tf_putlongp() and tf_getlongp() which are used to write and read the 64-bit integer argument of the current Verilog task or function, respectively.[src] For 32-bit integers, tf_putp() and tf_getp() are used.[src] ==Simulation software== For information on Verilog simulators, see the list of Verilog simulators.[1] ==See also== ===Additional material=== (VPI) ===Similar languages=== , the main competitor to Verilog and SystemVerilog.[1] and providing HDL event-driven semantics built on top of Scala ==References== Notes Cornell ECE576 Course illustrating synthesis constructs (The HDL Testbench Bible) ==External links== ===Standards development=== – The official standard for Verilog 2005 (not free).[5] IEEE P1364 – working group for Verilog (inactive) IEEE P1800.[7] – Working group for SystemVerilog (replaces above).[src] Verilog syntax – A 1995 description of the syntax in Backus-Naur form.[1] This predates the IEEE-1364 standard.[5] ===Language extensions=== Verilog AUTOs — an open-source meta-comment used by industry IP to simplify maintaining Verilog code[7]

147 sentences · 147 cited inline · 7 references stored

References

  1. ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming languages they model physical hardware, including concurrent operation, signal tim . · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming languages they model physical hardware, including concurrent operation, signal tim ." ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming la. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming languages they model physical hardware, including concurrent operation, signal tim ." ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming la. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming la. (2026). ==Overview== Hardware description languages such as Verilog use software-like syntax, but unlike software programming languages they model physical hardware, including concurrent operation, signal tim . Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  2. Phil · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "Phil." Oral History of Philip Raymond "Phil" Moorby. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "Phil." Oral History of Philip Raymond "Phil" Moorby. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA Oral History of Philip Raymond "Phil" Moorby. (2026). Phil. Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  3. [https://standards.ieee.org/ieee/1800/4934/ IEEE 1800-2012], IEEE, 2012 . · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "[https://standards.ieee.org/ieee/1800/4934/ IEEE 1800-2012], IEEE, 2012 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "[https://standards.ieee.org/ieee/1800/4934/ IEEE 1800-2012], IEEE, 2012 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA https://standards. (2026). [https://standards.ieee.org/ieee/1800/4934/ IEEE 1800-2012], IEEE, 2012 . Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  4. [https://standards.ieee.org/ieee/1800/6700/ IEEE 1800-2017], IEEE, 2017 . · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "[https://standards.ieee.org/ieee/1800/6700/ IEEE 1800-2017], IEEE, 2017 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "[https://standards.ieee.org/ieee/1800/6700/ IEEE 1800-2017], IEEE, 2017 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA https://standards. (2026). [https://standards.ieee.org/ieee/1800/6700/ IEEE 1800-2017], IEEE, 2017 . Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  5. [https://standards.ieee.org/ieee/1800/7743/ IEEE 1800-2023, IEEE Approved Draft Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language], IEEE, 2023 . · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "[https://standards.ieee.org/ieee/1800/7743/ IEEE 1800-2023, IEEE Approved Draft Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language], IEEE, 2023 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "[https://standards.ieee.org/ieee/1800/7743/ IEEE 1800-2023, IEEE Approved Draft Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language], IEEE, 2023 ." https://standards. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA https://standards. (2026). [https://standards.ieee.org/ieee/1800/7743/ IEEE 1800-2023, IEEE Approved Draft Standard for SystemVerilog--Unified Hardware Design, Specification, and Verification Language], IEEE, 2023 . Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  6. Cummings, Clifford E. SystemVerilog – Is This The Merging of Verilog & VHDL? . SNUG Boston 2003 . 2003. · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "Cummings, Clifford E. SystemVerilog – Is This The Merging of Verilog & VHDL? . SNUG Boston 2003 . 2003." Cummings, Clifford E. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "Cummings, Clifford E. SystemVerilog – Is This The Merging of Verilog & VHDL? . SNUG Boston 2003 . 2003." Cummings, Clifford E. 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA Cummings, Clifford E. (2026). Cummings, Clifford E. SystemVerilog – Is This The Merging of Verilog & VHDL? . SNUG Boston 2003 . 2003. Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

  7. IEEE Standard Verilog® Hardware Description Language . · retrieved 2026-10-03 · rev 1378373800
    Cite this reference

    MLA "IEEE Standard Verilog® Hardware Description Language ." 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800. Accessed 03 December 2026.

    Chicago "IEEE Standard Verilog® Hardware Description Language ." 2026-10-03. https://en.wikipedia.org/w/index.php?oldid=1378373800.

    APA encyclopegia.org. (2026). IEEE Standard Verilog® Hardware Description Language . Retrieved December 3, 2026, from https://en.wikipedia.org/w/index.php?oldid=1378373800

Cite this article

MLA

"Verilog." encyclopegia.org, 2026, https://encyclopegia.org/wiki/verilog. Accessed 03 December 2026.

Chicago

"Verilog." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/verilog.

APA

encyclopegia.org. (2026). Verilog. Retrieved December 3, 2026, from https://encyclopegia.org/wiki/verilog

Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON

CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1378373800 · 0.5 · snapshot enwiki-001378373800

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.