SlideShare a Scribd company logo
DELAYS IN VERILOG
Delays in Verilog
Presented BY:
Jitu Mistry
At eiTRA centre
Why delays and timing so important ?
 They allow a degree of realism to be incorporated into
the modeling process.
 The time taken for changes to propagate through a
module may lead to race conditions in other modules.
 Some designs, such as high speed microprocessors, may
have very tight timing requirements that must be met.
7/30/2013
2
Types of Delays.
 Depending on the design approach,
 Gate-level Modeling
 Dataflow Modeling
 Behavioral Modeling
7/19/2013
3
Gate level modelling
 Propagation delay :
through the gate, and the time taken for the output to actually
change state, according to input.
 Gate level modelling delay described below as:-
 Rise
 Fall Min/Typ/Max values
 Turn-off
7/19/2013
4
The rise delay is associated with a gate output transition
to a 1 from another value(0,x,z).
Format: operation #( Rise_Val, fall_Val ) a1( out, i1, i2);
Ex: and #(1 , 0 ) a1(out ,i1,i2);
//Rise=1, Fall=0, Turn-Off=0
7/19/2013
5
Rise delay
7/19/2013
6
 buf #(2,0) (out,in);
Fall delay
The fall delay is associated with a gate output transition to
‘0’ from another state ‘1’
Format: operation #( Rise_Val, fall_Val ) a1( out, i1, i2);
Ex:-> and #(0 , 1 ) a1(out ,i1,i2);
// Rise=0 Fall=1 Turn-Off=0
7/19/2013
7
7/19/2013
8
buf #(0,2) (out,in);
buf #(2,3) (out,in);
The turn-off delay is associated with a gate output transition to the high
impedance value(z) from another value(0,1,x).
If the value changes to x, the minimum of three delay is considered.
Rise Delay 0,x,z -> 1
Fall Delay 1,x,z -> 0
Turn-Off Delay 0,1,x -> z
Number Of Delays Specified delays
1 Rise, fall and turn-off times of
equal length
2 Rise and fall times
3 Rise, fall and turn off
7/19/2013
9
Turn-off delay
 For each type of delay, there are three values, min,typ
and max can be specified.
 Any one value can be chosen at the start of the simulation
Because of IC fabrication process variations.
Ex:
And #( 2:3:4, 3:4:5, 4:5:6) a ( out, i1, i2 );
7/19/2013
10
Min, typ or max values
 In Verilog delays can be introduced with
#'num'
as in the examples below, where # is a special character
to introduce delay, and 'num' is the number of ticks
simulator should delay current statement execution.
 #1 a = b // Delay by 1, i.e. execute after 1 tick unit
7/19/2013
11
#'num'
 We can provide num value of different way by variable
or/and parameter
 Parameter delata= 10;
#delta out = in1& in2
Note: # There is no way we could synthesize delays, but
of course we can add delay to particular signals by
adding buffers.
7/19/2013
12
#'num'
#5 y = x + z; // line will execute after 5 unit delay
And
Y = #5 x + z; // assignment to y after the 5 unit delay
7/19/2013
13
#'num'
Dataflow Modelling
 As dataflow modelling use the concept of signals or values
 The delays are associated with the Net (e.g. a Wire)
along which the value is transmitted
 Delays values control the time between the change in a
right hand side operand and when the new value is
assigned to the left hand side.
#5 a = b; means a    b
7/19/2013
14
Dataflow Modelling
 Since values can be assigned to a net in a number of ways,
there are corresponding methods of specifying the
appropriate delays.
1. Regular Assignment Delay
2. Net Declaration Delay
3. Implicit Continuous Assignment
7/19/2013
15
Regular Assignment Delay
 To assign a delay in continuous assignment the delay
value is specified after the keyword assign.
 This is used to introduce a delay onto a net that has
already been declared.
 e.g. wire out;
assign #10 out = in1 & in2;
7/19/2013
16
Any change in values of in1 or in2
will result in the 10 time unit before
Recomputaion
Inertial delay
Net Declaration Delay
 The Delay to be attributed to a Net can be associated
when the Net is declared.
 e.g.
// net delays
wire #10 out;
assign out = in1 & in2;
// the same effect as the following, generally
preferable
wire out;
assign #10 out = in1 & in2;
7/19/2013
17
assign #10 out = in1 & in2;
assign #10 out = in1 & in2;
Implicit Continuous Assignment
 Since a net can be implicitly assigned a value at its
declaration, it is possible to introduce a delay then, before that
assignment takes place.
 E.g.
wire #10 out = in1 & in2;
// same as
wire out;
assign #10 out = in1 & in2;
7/19/2013
20
Inertial delay
 Inertial delay is a measure of the elapsed time during
which a signal must persist at an input of a device in order
for a change to appear at an output.
 A pulse of duration less than the inertial delay does not
contain enough energy to cause the device to switch.
7/19/2013
21
Transport delay
 It is like ideal conductors; that is, they may be modeled as
having no resistance.
 In that case the waveform at the output is delayed but
otherwise matches the waveform at the input.
 Transport delay can also be useful when modeling
behavioral elements where the delay from input to output
is of interest, but there is no visibility into the behavior of
delays internal to the device
7/19/2013
22
DELAYS IN BEHAVIOURAL MODELLING
7/19/2013
23
There are following method
 Delay-based timing control
Regular
Intra- assignment
Zero delay
REGULAR DELAY CONTROL
 Regular delay control is used when a non –zero
delay is specified to the left of a procedural
assignment
 This is sometimes also referred to as inter-
assignment delay control
 Example:#10 q = x+y;
 It simply waits for the appropriate number of
timesteps before executing the command.
7/19/2013
24
INTRA ASSIGNMENT DELAY
 Instead of specifying delay control to the left of tha
assignment, it is possible to assign a delay to the
right of the assignment operator.
 Example: q = #10 x+y;
 With this kind of delay ,the value of x+y is stored
at the time that the assignment is executed, but this
value is not assigned to q until after the delay
period.
7/19/2013
25
7/19/201326
Delays in verilog
ZERO DELAY
 Zero delay is a method to ensure that a statement
is executed last,after all other statements in that
simulation time are execcuted.
 This is to to elminate race arround conditions.
 However if there are multiple zero delay
statements,the order between them is
nondeterministic.
 EX:#0 x=1
7/19/2013
28
SEQENTIAL BLOCKS
 The keywords begin and end are used to group
statements into seqential blocks.
 A statement is executed only after its preceeding
statement completes execution.
7/19/2013
29
7/19/201330
PARALLEL BLOCKS
 Parallel blocks, specified by keywords fork and
join,provide intresting simulation features.
 Statements in a parallel block are executed
concurrently.
 Ordering of statements is controlled by delay or
event control assigned to each statement.
7/19/2013
31
7/19/201332
Setup and Holdtime
 Very important in sequential logic.
 $setup(data_line, clk_line, limit);
 $hold(clk_line, data_line, limit);
7/19/2013
33
Thank you
7/19/2013
34
?

More Related Content

What's hot (20)

PDF
Verilog Tasks & Functions
anand hd
 
PPTX
Verilog
Mohamed Rayan
 
PPT
Switch level modeling
Devi Pradeep Podugu
 
PDF
BUilt-In-Self-Test for VLSI Design
Usha Mehta
 
PDF
Decimation and Interpolation
Fernando Ojeda
 
ODP
axi protocol
Azad Mishra
 
PDF
Synchronous and asynchronous clock
Nallapati Anindra
 
PPT
Multipliers in VLSI
Kiranmai Sony
 
PPT
FPGA
subin mathew
 
PDF
Overview of digital design with Verilog HDL
anand hd
 
PPSX
System on chip buses
Dr. A. B. Shinde
 
PDF
Arm instruction set
Mathivanan Natarajan
 
PDF
Data types in verilog
Nallapati Anindra
 
PPTX
Verilog Test Bench
Dr.YNM
 
PPTX
Verilog HDL
Mantra VLSI
 
PPTX
I2C Protocol
Sudhanshu Janwadkar
 
PPTX
FPGA TECHNOLOGY AND FAMILIES
revathilakshmi2
 
PDF
VLSI Fresher Resume
vikas kumar
 
PPT
Verilog tutorial
Maryala Srinivas
 
PDF
VLSI testing and analysis
Surekha PuriGosavi
 
Verilog Tasks & Functions
anand hd
 
Verilog
Mohamed Rayan
 
Switch level modeling
Devi Pradeep Podugu
 
BUilt-In-Self-Test for VLSI Design
Usha Mehta
 
Decimation and Interpolation
Fernando Ojeda
 
axi protocol
Azad Mishra
 
Synchronous and asynchronous clock
Nallapati Anindra
 
Multipliers in VLSI
Kiranmai Sony
 
Overview of digital design with Verilog HDL
anand hd
 
System on chip buses
Dr. A. B. Shinde
 
Arm instruction set
Mathivanan Natarajan
 
Data types in verilog
Nallapati Anindra
 
Verilog Test Bench
Dr.YNM
 
Verilog HDL
Mantra VLSI
 
I2C Protocol
Sudhanshu Janwadkar
 
FPGA TECHNOLOGY AND FAMILIES
revathilakshmi2
 
VLSI Fresher Resume
vikas kumar
 
Verilog tutorial
Maryala Srinivas
 
VLSI testing and analysis
Surekha PuriGosavi
 

Similar to Delays in verilog (20)

PPT
Advanced modeling techniques
dennis gookyi
 
PDF
Concepts of Behavioral modelling in Verilog HDL
anand hd
 
PPT
Behavioral modeling
dennis gookyi
 
PPT
Assic 9th Lecture
babak danyal
 
PPT
Unit 4 - Features of Verilog HDL (1).ppt
partheepan118
 
PPTX
behavioralmodeling and Timing Control - P04.pptx
MPrasannakumarM
 
PPT
VHDLhshdhdbbdbdbdbdbdbdbbdbrbrbrbfbfbbfb_PPT.ppt
7c7fs5n555
 
PPT
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Malik Tauqir Hasan
 
PPTX
System design using HDL - Module 2
Aravinda Koithyar
 
PPTX
HDL_verilog_unit_2_part-2_gatelevel.pptx
praveenbudihal
 
DOCX
Unit i
gopi5953
 
PDF
Notes: Verilog Part 4- Behavioural Modelling
Jay Baxi
 
PPTX
Domine specification section on VLSI.pptx
vasudeva873639
 
PPTX
Introduction to Verilog & code coverage
Jyun-Kai Hu
 
PPTX
Model simulation VHDL
Abd17m
 
PDF
Verilog HDL - 3
Prabhavathi P
 
PPTX
PTC(procedure timing control) in verilog hdl language.pptx
mayankasare
 
PPTX
Model simulation VHDL
Abd17m
 
PDF
RTL Coding Basics in verilog hardware language
MohammedAbdulAzeem51
 
PPT
07_Digital timing_&_Pipelining.ppt
BUCHUPALLIVIMALAREDD2
 
Advanced modeling techniques
dennis gookyi
 
Concepts of Behavioral modelling in Verilog HDL
anand hd
 
Behavioral modeling
dennis gookyi
 
Assic 9th Lecture
babak danyal
 
Unit 4 - Features of Verilog HDL (1).ppt
partheepan118
 
behavioralmodeling and Timing Control - P04.pptx
MPrasannakumarM
 
VHDLhshdhdbbdbdbdbdbdbdbbdbrbrbrbfbfbbfb_PPT.ppt
7c7fs5n555
 
Fpga 07-port-rules-gate-delay-data-flow-carry-look-ahead-adder
Malik Tauqir Hasan
 
System design using HDL - Module 2
Aravinda Koithyar
 
HDL_verilog_unit_2_part-2_gatelevel.pptx
praveenbudihal
 
Unit i
gopi5953
 
Notes: Verilog Part 4- Behavioural Modelling
Jay Baxi
 
Domine specification section on VLSI.pptx
vasudeva873639
 
Introduction to Verilog & code coverage
Jyun-Kai Hu
 
Model simulation VHDL
Abd17m
 
Verilog HDL - 3
Prabhavathi P
 
PTC(procedure timing control) in verilog hdl language.pptx
mayankasare
 
Model simulation VHDL
Abd17m
 
RTL Coding Basics in verilog hardware language
MohammedAbdulAzeem51
 
07_Digital timing_&_Pipelining.ppt
BUCHUPALLIVIMALAREDD2
 
Ad

Recently uploaded (20)

PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
community health nursing question paper 2.pdf
Prince kumar
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPTX
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PPTX
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
PDF
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
community health nursing question paper 2.pdf
Prince kumar
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
How to Convert an Opportunity into a Quotation in Odoo 18 CRM
Celine George
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
A PPT on Alfred Lord Tennyson's Ulysses.
Beena E S
 
The-Ever-Evolving-World-of-Science (1).pdf/7TH CLASS CURIOSITY /1ST CHAPTER/B...
Sandeep Swamy
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
DIGESTION OF CARBOHYDRATES,PROTEINS,LIPIDS
raviralanaresh2
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
How to Set Up Tags in Odoo 18 - Odoo Slides
Celine George
 
Ad

Delays in verilog

  • 1. DELAYS IN VERILOG Delays in Verilog Presented BY: Jitu Mistry At eiTRA centre
  • 2. Why delays and timing so important ?  They allow a degree of realism to be incorporated into the modeling process.  The time taken for changes to propagate through a module may lead to race conditions in other modules.  Some designs, such as high speed microprocessors, may have very tight timing requirements that must be met. 7/30/2013 2
  • 3. Types of Delays.  Depending on the design approach,  Gate-level Modeling  Dataflow Modeling  Behavioral Modeling 7/19/2013 3
  • 4. Gate level modelling  Propagation delay : through the gate, and the time taken for the output to actually change state, according to input.  Gate level modelling delay described below as:-  Rise  Fall Min/Typ/Max values  Turn-off 7/19/2013 4
  • 5. The rise delay is associated with a gate output transition to a 1 from another value(0,x,z). Format: operation #( Rise_Val, fall_Val ) a1( out, i1, i2); Ex: and #(1 , 0 ) a1(out ,i1,i2); //Rise=1, Fall=0, Turn-Off=0 7/19/2013 5 Rise delay
  • 7. Fall delay The fall delay is associated with a gate output transition to ‘0’ from another state ‘1’ Format: operation #( Rise_Val, fall_Val ) a1( out, i1, i2); Ex:-> and #(0 , 1 ) a1(out ,i1,i2); // Rise=0 Fall=1 Turn-Off=0 7/19/2013 7
  • 9. The turn-off delay is associated with a gate output transition to the high impedance value(z) from another value(0,1,x). If the value changes to x, the minimum of three delay is considered. Rise Delay 0,x,z -> 1 Fall Delay 1,x,z -> 0 Turn-Off Delay 0,1,x -> z Number Of Delays Specified delays 1 Rise, fall and turn-off times of equal length 2 Rise and fall times 3 Rise, fall and turn off 7/19/2013 9 Turn-off delay
  • 10.  For each type of delay, there are three values, min,typ and max can be specified.  Any one value can be chosen at the start of the simulation Because of IC fabrication process variations. Ex: And #( 2:3:4, 3:4:5, 4:5:6) a ( out, i1, i2 ); 7/19/2013 10 Min, typ or max values
  • 11.  In Verilog delays can be introduced with #'num' as in the examples below, where # is a special character to introduce delay, and 'num' is the number of ticks simulator should delay current statement execution.  #1 a = b // Delay by 1, i.e. execute after 1 tick unit 7/19/2013 11 #'num'
  • 12.  We can provide num value of different way by variable or/and parameter  Parameter delata= 10; #delta out = in1& in2 Note: # There is no way we could synthesize delays, but of course we can add delay to particular signals by adding buffers. 7/19/2013 12 #'num'
  • 13. #5 y = x + z; // line will execute after 5 unit delay And Y = #5 x + z; // assignment to y after the 5 unit delay 7/19/2013 13 #'num'
  • 14. Dataflow Modelling  As dataflow modelling use the concept of signals or values  The delays are associated with the Net (e.g. a Wire) along which the value is transmitted  Delays values control the time between the change in a right hand side operand and when the new value is assigned to the left hand side. #5 a = b; means a    b 7/19/2013 14
  • 15. Dataflow Modelling  Since values can be assigned to a net in a number of ways, there are corresponding methods of specifying the appropriate delays. 1. Regular Assignment Delay 2. Net Declaration Delay 3. Implicit Continuous Assignment 7/19/2013 15
  • 16. Regular Assignment Delay  To assign a delay in continuous assignment the delay value is specified after the keyword assign.  This is used to introduce a delay onto a net that has already been declared.  e.g. wire out; assign #10 out = in1 & in2; 7/19/2013 16 Any change in values of in1 or in2 will result in the 10 time unit before Recomputaion Inertial delay
  • 17. Net Declaration Delay  The Delay to be attributed to a Net can be associated when the Net is declared.  e.g. // net delays wire #10 out; assign out = in1 & in2; // the same effect as the following, generally preferable wire out; assign #10 out = in1 & in2; 7/19/2013 17
  • 18. assign #10 out = in1 & in2;
  • 19. assign #10 out = in1 & in2;
  • 20. Implicit Continuous Assignment  Since a net can be implicitly assigned a value at its declaration, it is possible to introduce a delay then, before that assignment takes place.  E.g. wire #10 out = in1 & in2; // same as wire out; assign #10 out = in1 & in2; 7/19/2013 20
  • 21. Inertial delay  Inertial delay is a measure of the elapsed time during which a signal must persist at an input of a device in order for a change to appear at an output.  A pulse of duration less than the inertial delay does not contain enough energy to cause the device to switch. 7/19/2013 21
  • 22. Transport delay  It is like ideal conductors; that is, they may be modeled as having no resistance.  In that case the waveform at the output is delayed but otherwise matches the waveform at the input.  Transport delay can also be useful when modeling behavioral elements where the delay from input to output is of interest, but there is no visibility into the behavior of delays internal to the device 7/19/2013 22
  • 23. DELAYS IN BEHAVIOURAL MODELLING 7/19/2013 23 There are following method  Delay-based timing control Regular Intra- assignment Zero delay
  • 24. REGULAR DELAY CONTROL  Regular delay control is used when a non –zero delay is specified to the left of a procedural assignment  This is sometimes also referred to as inter- assignment delay control  Example:#10 q = x+y;  It simply waits for the appropriate number of timesteps before executing the command. 7/19/2013 24
  • 25. INTRA ASSIGNMENT DELAY  Instead of specifying delay control to the left of tha assignment, it is possible to assign a delay to the right of the assignment operator.  Example: q = #10 x+y;  With this kind of delay ,the value of x+y is stored at the time that the assignment is executed, but this value is not assigned to q until after the delay period. 7/19/2013 25
  • 28. ZERO DELAY  Zero delay is a method to ensure that a statement is executed last,after all other statements in that simulation time are execcuted.  This is to to elminate race arround conditions.  However if there are multiple zero delay statements,the order between them is nondeterministic.  EX:#0 x=1 7/19/2013 28
  • 29. SEQENTIAL BLOCKS  The keywords begin and end are used to group statements into seqential blocks.  A statement is executed only after its preceeding statement completes execution. 7/19/2013 29
  • 31. PARALLEL BLOCKS  Parallel blocks, specified by keywords fork and join,provide intresting simulation features.  Statements in a parallel block are executed concurrently.  Ordering of statements is controlled by delay or event control assigned to each statement. 7/19/2013 31
  • 33. Setup and Holdtime  Very important in sequential logic.  $setup(data_line, clk_line, limit);  $hold(clk_line, data_line, limit); 7/19/2013 33