SlideShare a Scribd company logo
1
Verilog HDLVerilog HDL
ASIC DESIGN USING
FPGA
BEIT VII
KICSIT
Sept 19 2012 Lecture 8
2
Behavioral Model - Procedures
Sept 19 2012
• Sections of code intended for a specific task.
• Similar to a Hardware block.
• Procedural statements
• statements inside a procedure.
• they execute sequentially.
• e.g. 2-to-1 mux
Lecture 8
3
Behavioral Model - Procedures
Sept 19 2012
• Modules can contain any number of procedures
• Procedures execute in parallel (in respect to each
other)
• In behavioral modeling, everything comes in a
procedural block
Lecture 8
4
Behavioral Model - Procedures
Sept 19 2012
• Procedural block can be expressed in two types
of blocks:
• initial → they execute only once
• always → they execute forever (until
simulation finishes)
Lecture 8
5
“Initial” Blocks
Sept 19 2012
• This block starts with initial keyword
• This is not used in RTL
• This is non synthesizable
• All initial blocks execute concurrently in order
independent
• They execute only once
• This block is used only in Test Bench
Lecture 8
6
“Initial” Blocks
Sept 19 2012
• Start execution at sim. time zero and finish when
their last statement executes.
module nothing;
initial
$display (“I’m the first”);
initial begin
#50;
$display(“Really?”);
end
endmodule
Lecture 8
7
“Always” Blocks
Sept 19 2012
• This block starts with always keyword
• This block is more like H/W.
• Always Blocks execute forever until simulation
finishes.
• The always block can be viewed as continuously
repeated activity in a digital circuit starting from
power on.
Lecture 8
8
“Always” Blocks
Sept 19 2012
• Start execution at sim time zero and continue
until sim finishes.
Lecture 8
9
Procedural assignments
Sept 19 2012
• Blocking assignment =
• Regular assignment inside procedural block
• Assignment takes place immediately
• LHS must be a register
Lecture 8
10
Procedural assignments
Sept 19 2012
• Nonblocking assignment <=
• Compute right hand side
• Assignment takes place at the end of block
• LHS must be a register
Lecture 8
11
Procedural assignments
Sept 19 2012
• Nonblocking statements are used;
• whenever it is desired to make several register
assignments within the same time step without
regard to order or dependence upon each other.
• They are executed in two steps:
• The simulator evaluates the RHS.
• The assignment occurs at the end of the
time step.
Lecture 8
12
Procedural assignments
Sept 19 2012
• The order of concurrent evaluation is indeterminate
• Concurrent blocking assignments have
unpredictable results
always @(posedge clk)
#5 A = A + 1;
always @(posedge clk)
#5 B = A + 1;
• new value of B could be evaluated before or
after A changes Lecture 8
13
Procedural assignments
Sept 19 2012
• Concurrent non-blocking assignments have
predictable results
always @(posedge clk)
#5 A <= A + 1;
always @(posedge clk)
#5 B <= A + 1;
• New value of B will always be evaluated before
A changes.
Lecture 8
14
Example: Blocking/Non-blocking
Sept 19 2012 Lecture 8

More Related Content

PDF
Unit testing
PDF
Introduction to Monix Coeval
PPTX
From Imperative to Functional Programming (for Absolute Beginners)
PDF
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
PDF
RxSwift
PDF
Training Slides: 252 - Monitoring & Troubleshooting
PDF
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
PDF
Php Inspections (EA Extended): The Cookbook
Unit testing
Introduction to Monix Coeval
From Imperative to Functional Programming (for Absolute Beginners)
TMPA-2017: 5W+1H Static Analysis Report Quality Measure
RxSwift
Training Slides: 252 - Monitoring & Troubleshooting
TMPA-2017: Live testing distributed system fault tolerance with fault injecti...
Php Inspections (EA Extended): The Cookbook

Similar to Assic 8th Lecture (20)

PPT
Behavioral modeling
PPT
Fpga 08-behavioral-modeling-mealy-machine
PPTX
behavioralmodeling and Timing Control - P04.pptx
PPTX
VERILOG HDL :: Blocking & NON- Blocking assignments
PDF
Verilog-Behavioral Modeling .pdf
PPT
Verilog Lecture4 2014
PPTX
systemverilog and veriog presentation
PPTX
a verilog presentation for deep concept understa
PDF
rtl to gds lecture-10rrrrrrrrrrrrrrrrrrrrrrrrr.pdf
PPT
Assic 10th Lecture
PPTX
Lect 7: Verilog Behavioral model for Absolute Beginners
PDF
PPT
Coding verilog
PPTX
DSD MODULE-2 PPfhufdhhfddgjgfvhfdgjgvfdgbvv
PPTX
PPT
Verilogforlab
PDF
dokumen.tips_verilog-basic-ppt.pdf
PDF
Verilog Cheat sheet-2 (1).pdf
PDF
Verilog_Cheat_sheet_1672542963.pdf
PDF
Verilog_Cheat_sheet_1672542963.pdf
Behavioral modeling
Fpga 08-behavioral-modeling-mealy-machine
behavioralmodeling and Timing Control - P04.pptx
VERILOG HDL :: Blocking & NON- Blocking assignments
Verilog-Behavioral Modeling .pdf
Verilog Lecture4 2014
systemverilog and veriog presentation
a verilog presentation for deep concept understa
rtl to gds lecture-10rrrrrrrrrrrrrrrrrrrrrrrrr.pdf
Assic 10th Lecture
Lect 7: Verilog Behavioral model for Absolute Beginners
Coding verilog
DSD MODULE-2 PPfhufdhhfddgjgfvhfdgjgvfdgbvv
Verilogforlab
dokumen.tips_verilog-basic-ppt.pdf
Verilog Cheat sheet-2 (1).pdf
Verilog_Cheat_sheet_1672542963.pdf
Verilog_Cheat_sheet_1672542963.pdf
Ad

More from babak danyal (20)

DOCX
applist
PPT
Easy Steps to implement UDP Server and Client Sockets
PPT
Java IO Package and Streams
PPT
Swing and Graphical User Interface in Java
PPT
Tcp sockets
PPTX
block ciphers and the des
PPT
key distribution in network security
PPT
Lecture10 Signal and Systems
PPT
Lecture8 Signal and Systems
PPT
Lecture7 Signal and Systems
PPT
Lecture6 Signal and Systems
PPT
Lecture5 Signal and Systems
PPT
Lecture4 Signal and Systems
PPT
Lecture3 Signal and Systems
PPT
Lecture2 Signal and Systems
PPT
Lecture1 Intro To Signa
PPT
Lecture9 Signal and Systems
PPT
Lecture9
PPT
Cns 13f-lec03- Classical Encryption Techniques
PPT
Classical Encryption Techniques in Network Security
applist
Easy Steps to implement UDP Server and Client Sockets
Java IO Package and Streams
Swing and Graphical User Interface in Java
Tcp sockets
block ciphers and the des
key distribution in network security
Lecture10 Signal and Systems
Lecture8 Signal and Systems
Lecture7 Signal and Systems
Lecture6 Signal and Systems
Lecture5 Signal and Systems
Lecture4 Signal and Systems
Lecture3 Signal and Systems
Lecture2 Signal and Systems
Lecture1 Intro To Signa
Lecture9 Signal and Systems
Lecture9
Cns 13f-lec03- Classical Encryption Techniques
Classical Encryption Techniques in Network Security
Ad

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Pre independence Education in Inndia.pdf
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Basic Mud Logging Guide for educational purpose
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Types and Its function , kingdom of life
PDF
Insiders guide to clinical Medicine.pdf
PDF
RMMM.pdf make it easy to upload and study
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Complications of Minimal Access Surgery at WLH
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
human mycosis Human fungal infections are called human mycosis..pptx
VCE English Exam - Section C Student Revision Booklet
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial disease of the cardiovascular and lymphatic systems
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPH.pptx obstetrics and gynecology in nursing
Pre independence Education in Inndia.pdf
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
Basic Mud Logging Guide for educational purpose
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Microbial diseases, their pathogenesis and prophylaxis
Cell Types and Its function , kingdom of life
Insiders guide to clinical Medicine.pdf
RMMM.pdf make it easy to upload and study
GDM (1) (1).pptx small presentation for students
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Complications of Minimal Access Surgery at WLH
O5-L3 Freight Transport Ops (International) V1.pdf

Assic 8th Lecture

  • 1. 1 Verilog HDLVerilog HDL ASIC DESIGN USING FPGA BEIT VII KICSIT Sept 19 2012 Lecture 8
  • 2. 2 Behavioral Model - Procedures Sept 19 2012 • Sections of code intended for a specific task. • Similar to a Hardware block. • Procedural statements • statements inside a procedure. • they execute sequentially. • e.g. 2-to-1 mux Lecture 8
  • 3. 3 Behavioral Model - Procedures Sept 19 2012 • Modules can contain any number of procedures • Procedures execute in parallel (in respect to each other) • In behavioral modeling, everything comes in a procedural block Lecture 8
  • 4. 4 Behavioral Model - Procedures Sept 19 2012 • Procedural block can be expressed in two types of blocks: • initial → they execute only once • always → they execute forever (until simulation finishes) Lecture 8
  • 5. 5 “Initial” Blocks Sept 19 2012 • This block starts with initial keyword • This is not used in RTL • This is non synthesizable • All initial blocks execute concurrently in order independent • They execute only once • This block is used only in Test Bench Lecture 8
  • 6. 6 “Initial” Blocks Sept 19 2012 • Start execution at sim. time zero and finish when their last statement executes. module nothing; initial $display (“I’m the first”); initial begin #50; $display(“Really?”); end endmodule Lecture 8
  • 7. 7 “Always” Blocks Sept 19 2012 • This block starts with always keyword • This block is more like H/W. • Always Blocks execute forever until simulation finishes. • The always block can be viewed as continuously repeated activity in a digital circuit starting from power on. Lecture 8
  • 8. 8 “Always” Blocks Sept 19 2012 • Start execution at sim time zero and continue until sim finishes. Lecture 8
  • 9. 9 Procedural assignments Sept 19 2012 • Blocking assignment = • Regular assignment inside procedural block • Assignment takes place immediately • LHS must be a register Lecture 8
  • 10. 10 Procedural assignments Sept 19 2012 • Nonblocking assignment <= • Compute right hand side • Assignment takes place at the end of block • LHS must be a register Lecture 8
  • 11. 11 Procedural assignments Sept 19 2012 • Nonblocking statements are used; • whenever it is desired to make several register assignments within the same time step without regard to order or dependence upon each other. • They are executed in two steps: • The simulator evaluates the RHS. • The assignment occurs at the end of the time step. Lecture 8
  • 12. 12 Procedural assignments Sept 19 2012 • The order of concurrent evaluation is indeterminate • Concurrent blocking assignments have unpredictable results always @(posedge clk) #5 A = A + 1; always @(posedge clk) #5 B = A + 1; • new value of B could be evaluated before or after A changes Lecture 8
  • 13. 13 Procedural assignments Sept 19 2012 • Concurrent non-blocking assignments have predictable results always @(posedge clk) #5 A <= A + 1; always @(posedge clk) #5 B <= A + 1; • New value of B will always be evaluated before A changes. Lecture 8