SlideShare a Scribd company logo
12
Most read
14
Most read
19
Most read
Verilog HDL
Gookyi Dennis A. N.
(dennisgookyi@gmail.com)
May.27.2014
Contents
 Module Modeling Styles
 Modules
 Structural Modeling
 Dataflow Modeling
 Behavioral Modeling
 Mixed-Style Modeling
 Simulation
 Basic Simulation Constructs
 Related Compiler Directive and System Tasks
2
Modules
 A Verilog HDL module consist of two major parts:
The interface
The internal (body)
 Block diagram of a full adder is shown below
3
The Interface: Port Declaration
 The interface signals can be grouped into one of the
following three types: input, output or inout
 A complete interface can be divided into three parts: port
list, port declaration and data type declaration
4
Port Declaration
 The declaration of a port and its associated data type can
be combined into a single line as below:
 Port list, port declaration and their associated data types
can be put into a single list. This is called port list
declaration or ANSI C style
5
Port Connections
 Two methods are used to connect ports to external
signals:
Named association: ports to be connected to external signals
are specified by listing their names. The order of the ports is
not important
Positional association: the signals to be connected must have
the same order as in the port list. All unconnected ports are
left blank
 The two methods cannot be mixed
6
Port Connections
7
Modeling the Internal of a Module
 The internal or body can be modeled using one of the
following styles:
Structural Style
Gate level
Switch level
Dataflow Style
Behavioral Style
Mixed Style
RTL = Behavioral + Dataflow Styles
8
Structural Modeling
 Structural modeling of a design is by connecting required
instantiations of built-in primitives, user defined primitives
or other modules through nets
 Structural style is one way to model a complex digital
system in a hierarchical manner
9
Structural Modeling
10
Dataflow Modeling
 The module is described by specifying the data flow
between registers and how the data is processed
 This is done through a set of continuous assignment
statements
 A continuous assignment starts with the keyword assign
and has a syntax as below:
assign [delay] l_value = expression;
11
Dataflow Modeling
 The block diagram of a full adder is shown below:
12
Waveform
13
Behavioral Modeling
 The module is described in terms of the desired design
algorithm without concerning the hardware
implementation details
 The module uses procedural constructs: initial and always
14
Mixed modeling
 The design is described in terms of the mixing of the
previous styles
 It is most commonly used in modeling large designs
 Register-Transfer level (RTL) is usually used in industry to
mean the combination of behavioral and dataflow
constructs
 Below is a full adder constructed with basic logic gates:
15
Mixed modeling
16
Simulation
 For a design to be useful, it must be verified to make sure
that it can operate according to the requirement
 Two basic simulation structures are available in Verilog:
The first is to take the UUT as an instantiated module in the
stimulus module
The second considers both stimulus block and UUT as the
separate instantiated module at the top-level module
17
Related Compiler Directives:
`timescale Directive
 In simulations, we need to specify the physical unit of
measure
 This is accomplished using:
`timescale time_unit/time_precision
 time unit : This is the time to be used as one unit for all
the delays used in the design.
 time precision : This represents the minimum delay which
needs to be considered during simulation or it decides
that how many decimal point would be used with the time
unit.
18
`timescale Directive
 Code
 Waveform
19
`timescale Directive
 Code
 Waveform
20
A Complete Testbench
 Block diagram
21
A Complete Testbench
22
Waveform
23

More Related Content

What's hot (20)

PPTX
Linear block coding
jknm
 
PDF
Instruction formats-in-8086
MNM Jain Engineering College
 
PDF
Prom
Syed Saeed
 
PPTX
Introduction to digital logic
Kamal Acharya
 
PPT
Multiplexers & Demultiplexers
Jayanshu Gundaniya
 
PPTX
1.ripple carry adder, full adder implementation using half adder.
MdFazleRabbi18
 
PPTX
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
PPTX
Fpga architectures and applications
Sudhanshu Janwadkar
 
PPTX
Digital electronics logic families
BLESSINAR0
 
PPSX
Lect 2 ARM processor architecture
Dr.YNM
 
PPT
Embedded c program and programming structure for beginners
Kamesh Mtec
 
PPT
Shift Registers
Abhilash Nair
 
PPT
boolean algebra and logic simplification
Unsa Shakir
 
PPT
Programmable Logic Devices Plds
Gaditek
 
PPTX
Assembly 8086
Mustafa Salah
 
PDF
Basic structures in vhdl
Raj Mohan
 
PPTX
Latches and flip flop
Shuaib Hotak
 
PPTX
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
elprocus
 
PDF
Structural modelling
Revathi Subramaniam
 
PDF
VLSI Lab manual PDF
UR11EC098
 
Linear block coding
jknm
 
Instruction formats-in-8086
MNM Jain Engineering College
 
Introduction to digital logic
Kamal Acharya
 
Multiplexers & Demultiplexers
Jayanshu Gundaniya
 
1.ripple carry adder, full adder implementation using half adder.
MdFazleRabbi18
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Fpga architectures and applications
Sudhanshu Janwadkar
 
Digital electronics logic families
BLESSINAR0
 
Lect 2 ARM processor architecture
Dr.YNM
 
Embedded c program and programming structure for beginners
Kamesh Mtec
 
Shift Registers
Abhilash Nair
 
boolean algebra and logic simplification
Unsa Shakir
 
Programmable Logic Devices Plds
Gaditek
 
Assembly 8086
Mustafa Salah
 
Basic structures in vhdl
Raj Mohan
 
Latches and flip flop
Shuaib Hotak
 
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
elprocus
 
Structural modelling
Revathi Subramaniam
 
VLSI Lab manual PDF
UR11EC098
 

Viewers also liked (18)

PPT
Verilog Lecture1
Béo Tú
 
PDF
Lecture 2 verilog
venravi10
 
PPTX
Verilog
Mohamed Rayan
 
PPT
Verilog Lecture5 hust 2014
Béo Tú
 
PPT
Short.course.introduction.to.vhdl for beginners
Ravi Sony
 
DOCX
Description
Himanshu Gautam
 
PPTX
vhdl
NAGASAI547
 
PDF
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Peter Breuer
 
PDF
Delays in verilog
JITU MISTRY
 
PPTX
Verilog
DEVANSHU JAISWAL
 
PPT
Verilogforlab
Shankar Bhukya
 
PDF
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
PPTX
Verilog overview
posdege
 
PDF
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
PPT
Verilog 語法教學
艾鍗科技
 
PPTX
What is FPGA?
GlobalLogic Ukraine
 
PPTX
VLSI VHDL
vishwesh sharma
 
Verilog Lecture1
Béo Tú
 
Lecture 2 verilog
venravi10
 
Verilog
Mohamed Rayan
 
Verilog Lecture5 hust 2014
Béo Tú
 
Short.course.introduction.to.vhdl for beginners
Ravi Sony
 
Description
Himanshu Gautam
 
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Peter Breuer
 
Delays in verilog
JITU MISTRY
 
Verilogforlab
Shankar Bhukya
 
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
Verilog overview
posdege
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
Verilog 語法教學
艾鍗科技
 
What is FPGA?
GlobalLogic Ukraine
 
VLSI VHDL
vishwesh sharma
 
Ad

Similar to Verilog hdl (20)

PPTX
It Verilog High Definition Language.pptx
nibankargogoi567
 
PDF
Ece iv-fundamentals of hdl [10 ec45]-notes
siddu kadiwal
 
PDF
Chapter 01
Amirul Islam
 
PPTX
Designmethodology1
kollatiMeenakshi
 
PPT
VHDL lecture 1.ppt
seemasylvester
 
PPTX
Introduction to iec 61131 3
Pratibha Yadav
 
PPTX
Systems analysis and design in a changing world 5E.pptx
mnassar75g
 
PPT
slide8.ppt
ssuserd3cf02
 
PPTX
Hardware Description Language
Prachi Pandey
 
PDF
2004 snug-boston-presentation system-verilog_fifo_channel
AkhilReddy Sankati
 
PPTX
Chapter 04 the processor
Bảo Hoang
 
PPTX
Floating point ALU using VHDL implemented on FPGA
Azhar Syed
 
PPT
03 Synthesis (1).ppt
ShreyasMahesh
 
DOC
Wi Fi documantation
vijaykumar vodnala
 
PDF
Design and Implementation of HDLC Controller by Using Crc-16
IJMER
 
PDF
DIGITAL DESIGN THROUGH VERILOG FOR IV TH YEAR STUDENTS
ssuser03e980
 
PDF
SE2018_Lec 16_ Architectural Design
Amr E. Mohamed
 
PDF
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
cscpconf
 
It Verilog High Definition Language.pptx
nibankargogoi567
 
Ece iv-fundamentals of hdl [10 ec45]-notes
siddu kadiwal
 
Chapter 01
Amirul Islam
 
Designmethodology1
kollatiMeenakshi
 
VHDL lecture 1.ppt
seemasylvester
 
Introduction to iec 61131 3
Pratibha Yadav
 
Systems analysis and design in a changing world 5E.pptx
mnassar75g
 
slide8.ppt
ssuserd3cf02
 
Hardware Description Language
Prachi Pandey
 
2004 snug-boston-presentation system-verilog_fifo_channel
AkhilReddy Sankati
 
Chapter 04 the processor
Bảo Hoang
 
Floating point ALU using VHDL implemented on FPGA
Azhar Syed
 
03 Synthesis (1).ppt
ShreyasMahesh
 
Wi Fi documantation
vijaykumar vodnala
 
Design and Implementation of HDLC Controller by Using Crc-16
IJMER
 
DIGITAL DESIGN THROUGH VERILOG FOR IV TH YEAR STUDENTS
ssuser03e980
 
SE2018_Lec 16_ Architectural Design
Amr E. Mohamed
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
cscpconf
 
Ad

More from dennis gookyi (19)

PPT
Verilog hdl design examples
dennis gookyi
 
PPT
Wishbone tutorials
dennis gookyi
 
PPT
Verilog HDL Verification
dennis gookyi
 
PPT
Synthesis
dennis gookyi
 
PPT
System design methodology
dennis gookyi
 
PPT
Wishbone classic bus cycle
dennis gookyi
 
PPTX
Design options for digital systems
dennis gookyi
 
PPT
Wishbone interface and bus cycles
dennis gookyi
 
PPT
Encoder decoder
dennis gookyi
 
PPT
Advanced modeling techniques
dennis gookyi
 
PPT
4 bit add sub
dennis gookyi
 
PPT
Hierachical structural modeling
dennis gookyi
 
PPT
Behavioral modeling
dennis gookyi
 
PPT
Biosensors
dennis gookyi
 
PPT
structural modeling, hazards
dennis gookyi
 
PPTX
Finite state machines
dennis gookyi
 
PPTX
test generation
dennis gookyi
 
PPTX
faults in digital systems
dennis gookyi
 
PPTX
basic concepts of reliability
dennis gookyi
 
Verilog hdl design examples
dennis gookyi
 
Wishbone tutorials
dennis gookyi
 
Verilog HDL Verification
dennis gookyi
 
Synthesis
dennis gookyi
 
System design methodology
dennis gookyi
 
Wishbone classic bus cycle
dennis gookyi
 
Design options for digital systems
dennis gookyi
 
Wishbone interface and bus cycles
dennis gookyi
 
Encoder decoder
dennis gookyi
 
Advanced modeling techniques
dennis gookyi
 
4 bit add sub
dennis gookyi
 
Hierachical structural modeling
dennis gookyi
 
Behavioral modeling
dennis gookyi
 
Biosensors
dennis gookyi
 
structural modeling, hazards
dennis gookyi
 
Finite state machines
dennis gookyi
 
test generation
dennis gookyi
 
faults in digital systems
dennis gookyi
 
basic concepts of reliability
dennis gookyi
 

Recently uploaded (20)

PPTX
How to Add New Item in CogMenu in Odoo 18
Celine George
 
PDF
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
PPTX
SYMPATHOMIMETICS[ADRENERGIC AGONISTS] pptx
saip95568
 
PPTX
Project 4 PART 1 AI Assistant Vocational Education
barmanjit380
 
PPTX
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
PPTX
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
PDF
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
PDF
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
PPT
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
PPTX
Peer Teaching Observations During School Internship
AjayaMohanty7
 
PPTX
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 
PPTX
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
PPTX
JSON, XML and Data Science introduction.pptx
Ramakrishna Reddy Bijjam
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PPTX
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
PDF
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PDF
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
PDF
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
How to Add New Item in CogMenu in Odoo 18
Celine George
 
The Power of Compound Interest (Stanford Initiative for Financial Decision-Ma...
Stanford IFDM
 
SYMPATHOMIMETICS[ADRENERGIC AGONISTS] pptx
saip95568
 
Project 4 PART 1 AI Assistant Vocational Education
barmanjit380
 
Comparing Translational and Rotational Motion.pptx
AngeliqueTolentinoDe
 
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
Wikinomics How Mass Collaboration Changes Everything Don Tapscott
wcsqyzf5909
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Peer Teaching Observations During School Internship
AjayaMohanty7
 
How to Configure Refusal of Applicants in Odoo 18 Recruitment
Celine George
 
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
JSON, XML and Data Science introduction.pptx
Ramakrishna Reddy Bijjam
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
Elo the Hero is an story about a young boy who became hero.
TeacherEmily1
 
Lesson 1 : Science and the Art of Geography Ecosystem
marvinnbustamante1
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
Our Guide to the July 2025 USPS® Rate Change
Postal Advocate Inc.
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 

Verilog hdl

  • 2. Contents  Module Modeling Styles  Modules  Structural Modeling  Dataflow Modeling  Behavioral Modeling  Mixed-Style Modeling  Simulation  Basic Simulation Constructs  Related Compiler Directive and System Tasks 2
  • 3. Modules  A Verilog HDL module consist of two major parts: The interface The internal (body)  Block diagram of a full adder is shown below 3
  • 4. The Interface: Port Declaration  The interface signals can be grouped into one of the following three types: input, output or inout  A complete interface can be divided into three parts: port list, port declaration and data type declaration 4
  • 5. Port Declaration  The declaration of a port and its associated data type can be combined into a single line as below:  Port list, port declaration and their associated data types can be put into a single list. This is called port list declaration or ANSI C style 5
  • 6. Port Connections  Two methods are used to connect ports to external signals: Named association: ports to be connected to external signals are specified by listing their names. The order of the ports is not important Positional association: the signals to be connected must have the same order as in the port list. All unconnected ports are left blank  The two methods cannot be mixed 6
  • 8. Modeling the Internal of a Module  The internal or body can be modeled using one of the following styles: Structural Style Gate level Switch level Dataflow Style Behavioral Style Mixed Style RTL = Behavioral + Dataflow Styles 8
  • 9. Structural Modeling  Structural modeling of a design is by connecting required instantiations of built-in primitives, user defined primitives or other modules through nets  Structural style is one way to model a complex digital system in a hierarchical manner 9
  • 11. Dataflow Modeling  The module is described by specifying the data flow between registers and how the data is processed  This is done through a set of continuous assignment statements  A continuous assignment starts with the keyword assign and has a syntax as below: assign [delay] l_value = expression; 11
  • 12. Dataflow Modeling  The block diagram of a full adder is shown below: 12
  • 14. Behavioral Modeling  The module is described in terms of the desired design algorithm without concerning the hardware implementation details  The module uses procedural constructs: initial and always 14
  • 15. Mixed modeling  The design is described in terms of the mixing of the previous styles  It is most commonly used in modeling large designs  Register-Transfer level (RTL) is usually used in industry to mean the combination of behavioral and dataflow constructs  Below is a full adder constructed with basic logic gates: 15
  • 17. Simulation  For a design to be useful, it must be verified to make sure that it can operate according to the requirement  Two basic simulation structures are available in Verilog: The first is to take the UUT as an instantiated module in the stimulus module The second considers both stimulus block and UUT as the separate instantiated module at the top-level module 17
  • 18. Related Compiler Directives: `timescale Directive  In simulations, we need to specify the physical unit of measure  This is accomplished using: `timescale time_unit/time_precision  time unit : This is the time to be used as one unit for all the delays used in the design.  time precision : This represents the minimum delay which needs to be considered during simulation or it decides that how many decimal point would be used with the time unit. 18
  • 21. A Complete Testbench  Block diagram 21