SlideShare a Scribd company logo
1 of 23
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

Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modellingVandanaPagar1
 
Demultiplexer with vhdl code
Demultiplexer  with vhdl codeDemultiplexer  with vhdl code
Demultiplexer with vhdl codeVishal Bait
 
Basics of Digital Design and Verilog
Basics of Digital Design and VerilogBasics of Digital Design and Verilog
Basics of Digital Design and VerilogGanesan Narayanasamy
 
Hardware description languages
Hardware description languagesHardware description languages
Hardware description languagesAkhila Rahul
 
Lect 7: Verilog Behavioral model for Absolute Beginners
Lect 7: Verilog Behavioral model for Absolute BeginnersLect 7: Verilog Behavioral model for Absolute Beginners
Lect 7: Verilog Behavioral model for Absolute BeginnersDr.YNM
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & DecoderSyed Saeed
 
Concepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLConcepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLanand hd
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language Prachi Pandey
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gatesRakesh kumar jha
 
Verilog Lecture2 thhts
Verilog Lecture2 thhtsVerilog Lecture2 thhts
Verilog Lecture2 thhtsBéo Tú
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and DemultiplexersGargiKhanna1
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorialraju reddy
 
Logic synthesis,flootplan&placement
Logic synthesis,flootplan&placementLogic synthesis,flootplan&placement
Logic synthesis,flootplan&placementshaik sharief
 
Basic concepts in Verilog HDL
Basic concepts in Verilog HDLBasic concepts in Verilog HDL
Basic concepts in Verilog HDLanand hd
 

What's hot (20)

Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
 
Demultiplexer with vhdl code
Demultiplexer  with vhdl codeDemultiplexer  with vhdl code
Demultiplexer with vhdl code
 
Basics of Digital Design and Verilog
Basics of Digital Design and VerilogBasics of Digital Design and Verilog
Basics of Digital Design and Verilog
 
Hardware description languages
Hardware description languagesHardware description languages
Hardware description languages
 
Verilog HDL
Verilog HDL Verilog HDL
Verilog HDL
 
Lect 7: Verilog Behavioral model for Absolute Beginners
Lect 7: Verilog Behavioral model for Absolute BeginnersLect 7: Verilog Behavioral model for Absolute Beginners
Lect 7: Verilog Behavioral model for Absolute Beginners
 
Switch level modeling
Switch level modelingSwitch level modeling
Switch level modeling
 
VHDL- data types
VHDL- data typesVHDL- data types
VHDL- data types
 
Encoder & Decoder
Encoder & DecoderEncoder & Decoder
Encoder & Decoder
 
Concepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDLConcepts of Behavioral modelling in Verilog HDL
Concepts of Behavioral modelling in Verilog HDL
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
Verilog Lecture2 thhts
Verilog Lecture2 thhtsVerilog Lecture2 thhts
Verilog Lecture2 thhts
 
Multiplexers and Demultiplexers
Multiplexers and DemultiplexersMultiplexers and Demultiplexers
Multiplexers and Demultiplexers
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Logic synthesis,flootplan&placement
Logic synthesis,flootplan&placementLogic synthesis,flootplan&placement
Logic synthesis,flootplan&placement
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Basic concepts in Verilog HDL
Basic concepts in Verilog HDLBasic concepts in Verilog HDL
Basic concepts in Verilog HDL
 

Viewers also liked

Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1Béo Tú
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilogvenravi10
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Béo Tú
 
Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners Ravi Sony
 
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Peter Breuer
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilogJITU MISTRY
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumHossam Hassan
 
Verilog overview
Verilog overviewVerilog overview
Verilog overviewposdege
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesRicardo Castro
 
Verilog 語法教學
Verilog 語法教學 Verilog 語法教學
Verilog 語法教學 艾鍗科技
 

Viewers also liked (17)

Verilog Lecture1
Verilog Lecture1Verilog Lecture1
Verilog Lecture1
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilog
 
Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014Verilog Lecture5 hust 2014
Verilog Lecture5 hust 2014
 
Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners Short.course.introduction.to.vhdl for beginners
Short.course.introduction.to.vhdl for beginners
 
Description
DescriptionDescription
Description
 
vhdl
vhdlvhdl
vhdl
 
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...Tutorial: Formal Methods for Hardware Verification - Overview and Application...
Tutorial: Formal Methods for Hardware Verification - Overview and Application...
 
Fpga
FpgaFpga
Fpga
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
Verilog
VerilogVerilog
Verilog
 
Verilogforlab
VerilogforlabVerilogforlab
Verilogforlab
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
 
Verilog overview
Verilog overviewVerilog overview
Verilog overview
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gatesExperiment write-vhdl-code-for-realize-all-logic-gates
Experiment write-vhdl-code-for-realize-all-logic-gates
 
Verilog 語法教學
Verilog 語法教學 Verilog 語法教學
Verilog 語法教學
 
What is FPGA?
What is FPGA?What is FPGA?
What is FPGA?
 
VLSI VHDL
VLSI VHDLVLSI VHDL
VLSI VHDL
 

Similar to Verilog hdl

Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notessiddu kadiwal
 
Introduction to iec 61131 3
Introduction to iec 61131 3Introduction to iec 61131 3
Introduction to iec 61131 3Pratibha Yadav
 
2004 snug-boston-presentation system-verilog_fifo_channel
2004 snug-boston-presentation system-verilog_fifo_channel2004 snug-boston-presentation system-verilog_fifo_channel
2004 snug-boston-presentation system-verilog_fifo_channelAkhilReddy Sankati
 
Chapter 04 the processor
Chapter 04   the processorChapter 04   the processor
Chapter 04 the processorBảo Hoang
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAAzhar Syed
 
03 Synthesis (1).ppt
03 Synthesis  (1).ppt03 Synthesis  (1).ppt
03 Synthesis (1).pptShreyasMahesh
 
Design and Implementation of HDLC Controller by Using Crc-16
Design and Implementation of HDLC Controller by Using Crc-16Design and Implementation of HDLC Controller by Using Crc-16
Design and Implementation of HDLC Controller by Using Crc-16IJMER
 
SE2018_Lec 16_ Architectural Design
SE2018_Lec 16_ Architectural DesignSE2018_Lec 16_ Architectural Design
SE2018_Lec 16_ Architectural DesignAmr E. Mohamed
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER cscpconf
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdlRavi Sony
 
Hierachical structural modeling
Hierachical structural modelingHierachical structural modeling
Hierachical structural modelingdennis gookyi
 
Fpga implementation of a functional microcontroller
Fpga implementation of a functional microcontrollerFpga implementation of a functional microcontroller
Fpga implementation of a functional microcontrollereSAT Publishing House
 

Similar to Verilog hdl (20)

Ece iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notesEce iv-fundamentals of hdl [10 ec45]-notes
Ece iv-fundamentals of hdl [10 ec45]-notes
 
Chapter 01
Chapter 01Chapter 01
Chapter 01
 
Designmethodology1
Designmethodology1Designmethodology1
Designmethodology1
 
VHDL lecture 1.ppt
VHDL lecture 1.pptVHDL lecture 1.ppt
VHDL lecture 1.ppt
 
DSD
DSDDSD
DSD
 
Introduction to iec 61131 3
Introduction to iec 61131 3Introduction to iec 61131 3
Introduction to iec 61131 3
 
slide8.ppt
slide8.pptslide8.ppt
slide8.ppt
 
2004 snug-boston-presentation system-verilog_fifo_channel
2004 snug-boston-presentation system-verilog_fifo_channel2004 snug-boston-presentation system-verilog_fifo_channel
2004 snug-boston-presentation system-verilog_fifo_channel
 
Chapter 04 the processor
Chapter 04   the processorChapter 04   the processor
Chapter 04 the processor
 
Floating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGAFloating point ALU using VHDL implemented on FPGA
Floating point ALU using VHDL implemented on FPGA
 
03 Synthesis (1).ppt
03 Synthesis  (1).ppt03 Synthesis  (1).ppt
03 Synthesis (1).ppt
 
Wi Fi documantation
Wi Fi documantationWi Fi documantation
Wi Fi documantation
 
Design and Implementation of HDLC Controller by Using Crc-16
Design and Implementation of HDLC Controller by Using Crc-16Design and Implementation of HDLC Controller by Using Crc-16
Design and Implementation of HDLC Controller by Using Crc-16
 
Mini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave GeneratorMini Project- ROM Based Sine Wave Generator
Mini Project- ROM Based Sine Wave Generator
 
SE2018_Lec 16_ Architectural Design
SE2018_Lec 16_ Architectural DesignSE2018_Lec 16_ Architectural Design
SE2018_Lec 16_ Architectural Design
 
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
IMPLEMENTATION OF USER INTERFACE FOR MICROPROCESSOR TRAINER
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdl
 
Hierachical structural modeling
Hierachical structural modelingHierachical structural modeling
Hierachical structural modeling
 
Fpga implementation of a functional microcontroller
Fpga implementation of a functional microcontrollerFpga implementation of a functional microcontroller
Fpga implementation of a functional microcontroller
 
Hd6
Hd6Hd6
Hd6
 

More from dennis gookyi

Verilog hdl design examples
Verilog hdl design examplesVerilog hdl design examples
Verilog hdl design examplesdennis gookyi
 
Verilog HDL Verification
Verilog HDL VerificationVerilog HDL Verification
Verilog HDL Verificationdennis gookyi
 
System design methodology
System design methodologySystem design methodology
System design methodologydennis gookyi
 
Wishbone classic bus cycle
Wishbone classic bus cycleWishbone classic bus cycle
Wishbone classic bus cycledennis gookyi
 
Design options for digital systems
Design options for digital systemsDesign options for digital systems
Design options for digital systemsdennis gookyi
 
Wishbone interface and bus cycles
Wishbone interface and bus cyclesWishbone interface and bus cycles
Wishbone interface and bus cyclesdennis gookyi
 
Advanced modeling techniques
Advanced modeling techniquesAdvanced modeling techniques
Advanced modeling techniquesdennis gookyi
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazardsdennis gookyi
 
Finite state machines
Finite state machinesFinite state machines
Finite state machinesdennis gookyi
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systemsdennis gookyi
 
basic concepts of reliability
basic concepts of reliabilitybasic concepts of reliability
basic concepts of reliabilitydennis gookyi
 

More from dennis gookyi (18)

Verilog hdl design examples
Verilog hdl design examplesVerilog hdl design examples
Verilog hdl design examples
 
Wishbone tutorials
Wishbone tutorialsWishbone tutorials
Wishbone tutorials
 
Verilog HDL Verification
Verilog HDL VerificationVerilog HDL Verification
Verilog HDL Verification
 
Synthesis
SynthesisSynthesis
Synthesis
 
System design methodology
System design methodologySystem design methodology
System design methodology
 
Wishbone classic bus cycle
Wishbone classic bus cycleWishbone classic bus cycle
Wishbone classic bus cycle
 
Design options for digital systems
Design options for digital systemsDesign options for digital systems
Design options for digital systems
 
Wishbone interface and bus cycles
Wishbone interface and bus cyclesWishbone interface and bus cycles
Wishbone interface and bus cycles
 
Encoder decoder
Encoder decoderEncoder decoder
Encoder decoder
 
Advanced modeling techniques
Advanced modeling techniquesAdvanced modeling techniques
Advanced modeling techniques
 
4 bit add sub
4 bit add sub4 bit add sub
4 bit add sub
 
Behavioral modeling
Behavioral modelingBehavioral modeling
Behavioral modeling
 
Biosensors
BiosensorsBiosensors
Biosensors
 
structural modeling, hazards
structural modeling, hazardsstructural modeling, hazards
structural modeling, hazards
 
Finite state machines
Finite state machinesFinite state machines
Finite state machines
 
test generation
test generationtest generation
test generation
 
faults in digital systems
faults in digital systemsfaults in digital systems
faults in digital systems
 
basic concepts of reliability
basic concepts of reliabilitybasic concepts of reliability
basic concepts of reliability
 

Recently uploaded

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsPooky Knightsmith
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdfMr Bounab Samir
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 

Recently uploaded (20)

INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Mental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young mindsMental Health Awareness - a toolkit for supporting young minds
Mental Health Awareness - a toolkit for supporting young minds
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
MS4 level being good citizen -imperative- (1) (1).pdf
MS4 level   being good citizen -imperative- (1) (1).pdfMS4 level   being good citizen -imperative- (1) (1).pdf
MS4 level being good citizen -imperative- (1) (1).pdf
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 

Verilog hdl

  • 1. Verilog HDL Gookyi Dennis A. N. (dennisgookyi@gmail.com) May.27.2014
  • 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