Skip to content

VLSIFacts

Let's Program the Transistors

  • Home
  • DHD
    • Digital Electronics
    • Fault Tolerant System Design
    • TLM
    • Verification
    • Verilog
    • VHDL
    • Xilinx
  • Embedded System
    • 8085 uP
    • 8086 uP
    • 8051 uC
  • VLSI Technology
    • Analog Electronics
    • Memory Devices
    • VLSI Circuits
  • Interview
    • Interview Experience
    • Training Experience
    • Question Bank
  • Notifications
  • QUIZ
  • Community
  • Job Board
  • Contact Us

Delay in Assignment (#) in Verilog

Posted on March 29, 2016June 17, 2025 By vlsifacts No Comments on Delay in Assignment (#) in Verilog

Syntax: #delay

It delays execution for a specific amount of time, ‘delay’.

There are two types of delay assignments in Verilog:

Delayed assignment:

#Δt variable = expression; // “expression” gets evaluated after the time delay Δt and assigned to the “variable” immediately

Intra-assignment delay:

variable = #Δt expression; // “expression” gets evaluated at time 0 but gets assigned to the “variable” after the time delay Δt

Example:

module delay_test(
   input a,  // Assume a=0 initialized at time 0
   input b,  // Assume b=1 initialized at time 0
   output reg c,
   output reg d);
   initial 
   begin
      #20 c = (a|b); //a|b gets evaluated after 20ns and gets assigned to ‘c’ immediately
      d = #50 (a&b); //a&b gets evaluated at time 20ns but gets assigned to ‘c’ after 70ns (20ns+50ns)
   end
endmodule
Delay_Assignment

Note: #(delay) can not be synthesized. So we do not use #(delay) in RTL module to create delay. There are other methods which can be used to create delays in RLT module. #(delay) can be used in testbench files to create delays.

Spread the Word

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to email a link to a friend (Opens in new window) Email
  • Click to print (Opens in new window) Print

Like this:

Like Loading...

Related posts:

  1. Blocking (immediate) and Non-Blocking (deferred) Assignments in Verilog
  2. Case and Conditional Statements Synthesis CAUTION !!!
  3. Synopsys – Interview Questions – based on Synthesis and Simulation
  4. Different Coding Styles of Verilog Language
Verilog

Post navigation

Previous Post: PMOS is no longer the Culprit
Next Post: Blocking (immediate) and Non-Blocking (deferred) Assignments in Verilog

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top Posts & Pages

  • ASCII Code
  • Different Coding Styles of Verilog Language
  • Circuit Design of a 4-bit Binary Counter Using D Flip-flops
  • Truth Tables, Characteristic Equations and Excitation Tables of Different Flipflops
  • NAND and NOR gate using CMOS Technology

Copyright © 2025 VLSIFacts.

Powered by PressBook WordPress theme

Subscribe to Our Newsletter

%d