SlideShare a Scribd company logo
Verilog Overview
MAHMOUD HAGHIGHI
WWW.POSEDGE.IR
VERILOG OVERVIEW12/20/2015 1
Overview
 Verilog Basics
 Simulation Tools
VERILOG OVERVIEW12/20/2015 2
Overview
 A Hardware Description Language (HDL) is a language used to describe a
digital system, for example, a computer or a component of a computer.
 A digital system can be described at several levels:
 Switch level: wires, resistors and transistors
 Gate level: logical gates and flip flops
 Register Transfer Level (RTL): registers and the transfers of information
between registers.
 Two Major HDLs in Industry
• VHDL
• Verilog
VERILOG OVERVIEW12/20/2015 3
Verilog vs. VHDL
VHDL
 “V” is short for Very High Speed Integrated Circuits.
 Designed for and sponsored by US Department of Defense.
 Designed by committee (1981-1985).
 Syntax based on Ada programming language.
 Was made an IEEE Standard in 1987.
Verilog
 Was introduced in 1985 by Gateway Design System Corporation, now a part of
Cadence Design Systems, Inc.'s Systems Division.
 Was made an IEEE Standard in 1995
 Syntax based on C programming language.
 Design examples using Verilog HDL
◦ Intel Pentium, AMD K5, K6, Atheon, ARM7, etc
◦ Thousands of ASIC designs using Verilog HDL
VERILOG OVERVIEW12/20/2015 4
Design Methodology
VERILOG OVERVIEW12/20/2015 5
Verilog HDL Models
 HDL model specifies the relationship between input signals and
output signals.
 In Verilog, A “module” contains the hardware description of the
circuit.
 Verilog code for a AND gate
Module definition
Ports definition
Module Structure
VERILOG OVERVIEW12/20/2015 6
Numbers
 Numbers are specified using the following form
<size><base format><number>
 Examples:
◦ x = 347 // decimal number
◦ x = 4’b101 // 4- bit binary number 0101
◦ x = 16’h87f7 // 16-bit hex number h87f7
◦ x = 2’b101010
◦ x = 2’d83
size of the number in bits. ’b (binary)
’d (decimal)
’o(octal)
’h(hex).
VERILOG OVERVIEW12/20/2015 7
operators
 Bitwise Operators
~ NOT
& AND
| OR
^ XOR
~| NOR
~& NAND
^~ or ~^ XNOR
 Logical & Relational Operators
!, &&, | |, ==, !=, >=, <=, >, <
VERILOG OVERVIEW12/20/2015 8
Ports
 There are three different port types:
• Input
• Output
• Inout
 Port definition:
• <port type> <portwidth> <port name>
• Example:
A(7:0) B(7:0)
C
my_module
U1
A(7:0) B(7:0)
C
VERILOG OVERVIEW12/20/2015 9
Data Types: Variables
 Two basic families of data types for variables: Nets and Registers
 Net variables – e.g. wire
• Memory less
• Variable used simply to connect components together
• Usually corresponds to a wire in the circuit.
 Register variables – e.g. reg
• Variable used to store data as part of a
behavioral description
• Like variables in ordinary procedural languages
 Note:
• reg should only be used with always and initial blocks (to be presented …)
• The reg variables store the last value that was procedurally assigned to them whereas
the wire variables represent physical connections between structural entities such as
gates.
A(7:0)
W(7:0)
C L K
A D
Fub1
U1
DA
CLK
VERILOG OVERVIEW12/20/2015 10
Continuous Assignment
 Continuous statement is used to model combinational logic.
 A continuous assignment statement is declared as follows:
assign <net_name> = variable;
 assign corresponds to a connection.
 Target is never a reg variable.
 Examples:
VERILOG OVERVIEW12/20/2015 11
Continuous Assignment
 Verilog code for a 4 bit adder:
VERILOG OVERVIEW12/20/2015 12
Procedural Assignment
 Used for modeling sequential circuits.
 A procedural assignment statement is declared as follows:
Always @(event list) begin
<reg_name> <= variable;
end
 The assignment will be performed whenever one of the events in “event_list”
occurs.
VERILOG OVERVIEW12/20/2015 13
Procedural Assignment
 Example: D-FF
VERILOG OVERVIEW12/20/2015 14
D
clk
Out
Interconnecting Modules
 In order to use a module, it should be
instantiated:
<Module_name> <Instant_name> (<port mapping>)
 Example: using two mux2 to build a mux4
(actually this is not an mux4-1 !!!)
In(1 :0 ) O ut
se l
mux2_i1
mux2In4(3:0)
sel4(1:0)
In(1 :0 ) O ut
se l
mux2_i2
mux2
In4(3:2)
In4(1:0)
sel4[1]
sel4[0]
Out4(1:0)
w(1:0)
w[1]
w[0]
In4(3:0)
sel4(1:0)
VERILOG OVERVIEW12/20/2015 15
Primitives
 No declaration required (predefined)
 Can only be instantiated
 Example: and a1 (C, A, B); //instance name
• Usually better to provide instance name for debugging.
 Example: or o1 (SET, ~A, C ),
o2(N, ABC,SET );
 Example: and #(10) a2(o, i1, i2); // name + delay
VERILOG OVERVIEW12/20/2015 16
12/20/2015 VERILOG OVERVIEW 17
Test Bench
module <test module name> ;
// Data type declaration
// Instantiate module ( call the module that is going to be tested)
// Apply the stimulus
// Display results
endmodule
 Usefull commands:
• initial
• #delay
• forever
Tester
DUT
(Design
Under Test)
Test bench
12/20/2015 VERILOG OVERVIEW 18
Test Bench Example
Simulation Tools
VERILOG OVERVIEW12/20/2015 19
Overview
 Simulation tools:
• Aldec Active-HDL
• Xilinx Isim
• Modelsim
• Altium Designer
• …
 Simulation Phases:
• Pre-synthesize (our talk)
• Post-synthesize
• Post-Place and root
VERILOG OVERVIEW12/20/2015 20
Active HDL Tutorial
 Creating a simple project in Active HDL
 Step 1: Create a new workspace
VERILOG OVERVIEW12/20/2015 21
Active HDL Tutorial
 Step 2: name your workspace
VERILOG OVERVIEW12/20/2015 22
Active HDL Tutorial
 Step 3: Choose “Create an Empty Design with Design Flow”.
VERILOG OVERVIEW12/20/2015 23
Active HDL Tutorial
 Step 4: Set default language to VERILOG
VERILOG OVERVIEW12/20/2015 24
Active HDL Tutorial
 Step 5: Enter a name for your design
VERILOG OVERVIEW12/20/2015 25
Active HDL Tutorial
 Step 6: Make a new Verilog Source
VERILOG OVERVIEW12/20/2015 26
Active HDL Tutorial
 Step 7: follow the wizard
VERILOG OVERVIEW12/20/2015 27
Active HDL Tutorial
 Step 8: Enter the name of your Verilog module
VERILOG OVERVIEW12/20/2015 28
 Step 9: Add ports to your module
Active HDL Tutorial
VERILOG OVERVIEW12/20/2015 29
Active HDL Tutorial
 Step 10: Add your code after port declaration (here the continuous
assignment for adder)
VERILOG OVERVIEW12/20/2015 30
Active HDL Tutorial
 Step 11: Compile the module
VERILOG OVERVIEW12/20/2015 31
Active HDL Tutorial
 Step 12: Initialize Simulation
VERILOG OVERVIEW12/20/2015 32
Active HDL Tutorial
 Step 13: the software will ask you to select the Top-level module… do it!
VERILOG OVERVIEW12/20/2015 33
Active HDL Tutorial
 In case you get this error…
VERILOG OVERVIEW12/20/2015 34
Active HDL Tutorial
 Go to Design > Setting > Simulation > Verilog and uncheck “Verilog
Optimization”
VERILOG OVERVIEW12/20/2015 35
Active HDL Tutorial
 Step 14: from File > New > Waveform open a new waveform window
VERILOG OVERVIEW12/20/2015 36
Active HDL Tutorial
 Step 15: Select signals from the left window and Drag-and-Drop them to the
right
VERILOG OVERVIEW12/20/2015 37
Active HDL Tutorial
 Step 16: Right click on any signal in the right panel and select Stimulators (if it
is already inactive, make sure initialization is performed)
VERILOG OVERVIEW12/20/2015 38
Active HDL Tutorial
 Step 17: choose stimulator for input signala
VERILOG OVERVIEW12/20/2015 39
Active HDL Tutorial
 Step 18: now you can run simulation by pressing “run for” button.
VERILOG OVERVIEW12/20/2015 40
12/20/2015 VERILOG OVERVIEW 41
For more tutorials please visit our website
Click Here
Ad

More Related Content

What's hot (20)

VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
VandanaPagar1
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
Ankur Gupta
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
Dr.YNM
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.ppt
CoEBMSITM
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
raju reddy
 
Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
Vinchipsytm Vlsitraining
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
Dr.YNM
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDL
E2MATRIX
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functions
anand hd
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginners
Dr.YNM
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
Rakesh kumar jha
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
anand hd
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
dennis gookyi
 
Verilog HDL CODES
Verilog HDL CODES Verilog HDL CODES
Verilog HDL CODES
OmkarDarekar6
 
verilog
verilogverilog
verilog
Shrikant Vaishnav
 
Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)
Alok Singh
 
Session 6 sv_randomization
Session 6 sv_randomizationSession 6 sv_randomization
Session 6 sv_randomization
Nirav Desai
 
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
anand hd
 
Static_Timing_Analysis_in_detail.pdf
Static_Timing_Analysis_in_detail.pdfStatic_Timing_Analysis_in_detail.pdf
Static_Timing_Analysis_in_detail.pdf
Usha Mehta
 
gate level modeling
gate level modelinggate level modeling
gate level modeling
VandanaBR2
 
VHDL- gate level modelling
VHDL- gate level modellingVHDL- gate level modelling
VHDL- gate level modelling
VandanaPagar1
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
Ankur Gupta
 
Verilog Test Bench
Verilog Test BenchVerilog Test Bench
Verilog Test Bench
Dr.YNM
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.ppt
CoEBMSITM
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
raju reddy
 
Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
Dr.YNM
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDL
E2MATRIX
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functions
anand hd
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginners
Dr.YNM
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
Rakesh kumar jha
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
anand hd
 
Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)Basics of digital verilog design(alok singh kanpur)
Basics of digital verilog design(alok singh kanpur)
Alok Singh
 
Session 6 sv_randomization
Session 6 sv_randomizationSession 6 sv_randomization
Session 6 sv_randomization
Nirav Desai
 
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
anand hd
 
Static_Timing_Analysis_in_detail.pdf
Static_Timing_Analysis_in_detail.pdfStatic_Timing_Analysis_in_detail.pdf
Static_Timing_Analysis_in_detail.pdf
Usha Mehta
 
gate level modeling
gate level modelinggate level modeling
gate level modeling
VandanaBR2
 

Viewers also liked (20)

Verilog HDL Training Course
Verilog HDL Training CourseVerilog HDL Training Course
Verilog HDL Training Course
Paul Laskowski
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
amnis_azeneth
 
frequency counter
frequency counterfrequency counter
frequency counter
Gayan Sameera
 
test generation
test generationtest generation
test generation
dennis gookyi
 
adc dac converter
adc dac converteradc dac converter
adc dac converter
Gaurav Rai
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
Abhiraj Bohra
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
Pantech ProLabs India Pvt Ltd
 
vhdl
vhdlvhdl
vhdl
NAGASAI547
 
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
 
Fpga
FpgaFpga
Fpga
Yogesh Mashalkar
 
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
 
Description
DescriptionDescription
Description
Himanshu Gautam
 
Digital Circuit Verification Hardware Descriptive Language Verilog
Digital Circuit Verification Hardware Descriptive Language VerilogDigital Circuit Verification Hardware Descriptive Language Verilog
Digital Circuit Verification Hardware Descriptive Language Verilog
Abhiraj Bohra
 
Choosing the right processor
Choosing the right processorChoosing the right processor
Choosing the right processor
Pantech ProLabs India Pvt Ltd
 
Frequency counter
Frequency counterFrequency counter
Frequency counter
Eng. Dr. Dennis N. Mwighusa
 
Verilogforlab
VerilogforlabVerilogforlab
Verilogforlab
Shankar Bhukya
 
Verilog
VerilogVerilog
Verilog
DEVANSHU JAISWAL
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
Matlab isim link
Matlab isim linkMatlab isim link
Matlab isim link
Mohamed Abdelsalam
 
Fft ppt
Fft pptFft ppt
Fft ppt
Puneet Gupta
 
Ad

Similar to Verilog overview (20)

01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
22el060
 
Verilog HDL
Verilog HDL Verilog HDL
Verilog HDL
HasmukhPKoringa
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl ppr
Prabhavathi P
 
Prepare a Verilog HDL code for the following register Positive Edge.pdf
Prepare a Verilog HDL code for the following register  Positive Edge.pdfPrepare a Verilog HDL code for the following register  Positive Edge.pdf
Prepare a Verilog HDL code for the following register Positive Edge.pdf
ezonesolutions
 
Verilogspk1
Verilogspk1Verilogspk1
Verilogspk1
supriya kurlekar
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
Dhaval Shukla
 
Xilinx training in mohali
Xilinx training in mohaliXilinx training in mohali
Xilinx training in mohali
Arwinder paul singh
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
SIVA NAGENDRA REDDY
 
Vhdl new
Vhdl newVhdl new
Vhdl new
Sharad Institute of Technology,college of Engineering,Yadrav
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
Melissa Luster
 
Digital Design and Computer architecture Lec5b
Digital Design and Computer architecture Lec5bDigital Design and Computer architecture Lec5b
Digital Design and Computer architecture Lec5b
signalssystems002
 
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
Azhar Syed
 
vlsi design using verilog presentaion 1
vlsi design using verilog   presentaion 1vlsi design using verilog   presentaion 1
vlsi design using verilog presentaion 1
MANDHASAIGOUD1
 
Xilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar ChandigarhXilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar Chandigarh
E2Matrix
 
Xilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara JalandharXilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara Jalandhar
E2Matrix
 
1.ppt
1.ppt1.ppt
1.ppt
ManojKumar297202
 
S6 cad5
S6 cad5S6 cad5
S6 cad5
Padhmakumar PK
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.ppt
MrRRThirrunavukkaras
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdl
Ravi Sony
 
Verilog for synthesis - combinational rev a.pdf
Verilog for synthesis - combinational rev a.pdfVerilog for synthesis - combinational rev a.pdf
Verilog for synthesis - combinational rev a.pdf
AzeemMohammedAbdul
 
01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
01-Verilog Introductiokkkkkkkkkkkkkkkn.ppt
22el060
 
An Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl pprAn Introductory course on Verilog HDL-Verilog hdl ppr
An Introductory course on Verilog HDL-Verilog hdl ppr
Prabhavathi P
 
Prepare a Verilog HDL code for the following register Positive Edge.pdf
Prepare a Verilog HDL code for the following register  Positive Edge.pdfPrepare a Verilog HDL code for the following register  Positive Edge.pdf
Prepare a Verilog HDL code for the following register Positive Edge.pdf
ezonesolutions
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
Melissa Luster
 
Digital Design and Computer architecture Lec5b
Digital Design and Computer architecture Lec5bDigital Design and Computer architecture Lec5b
Digital Design and Computer architecture Lec5b
signalssystems002
 
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
Azhar Syed
 
vlsi design using verilog presentaion 1
vlsi design using verilog   presentaion 1vlsi design using verilog   presentaion 1
vlsi design using verilog presentaion 1
MANDHASAIGOUD1
 
Xilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar ChandigarhXilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar Chandigarh
E2Matrix
 
Xilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara JalandharXilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara Jalandhar
E2Matrix
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.ppt
MrRRThirrunavukkaras
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdl
Ravi Sony
 
Verilog for synthesis - combinational rev a.pdf
Verilog for synthesis - combinational rev a.pdfVerilog for synthesis - combinational rev a.pdf
Verilog for synthesis - combinational rev a.pdf
AzeemMohammedAbdul
 
Ad

Recently uploaded (20)

Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Modelling of Concrete Compressive Strength Admixed with GGBFS Using Gene Expr...
Journal of Soft Computing in Civil Engineering
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
How to Build a Desktop Weather Station Using ESP32 and E-ink DisplayHow to Build a Desktop Weather Station Using ESP32 and E-ink Display
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
CircuitDigest
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 
Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025Transport modelling at SBB, presentation at EPFL in 2025
Transport modelling at SBB, presentation at EPFL in 2025
Antonin Danalet
 
Uses of drones in civil construction.pdf
Uses of drones in civil construction.pdfUses of drones in civil construction.pdf
Uses of drones in civil construction.pdf
surajsen1729
 
Nanometer Metal-Organic-Framework Literature Comparison
Nanometer Metal-Organic-Framework  Literature ComparisonNanometer Metal-Organic-Framework  Literature Comparison
Nanometer Metal-Organic-Framework Literature Comparison
Chris Harding
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
How to Build a Desktop Weather Station Using ESP32 and E-ink DisplayHow to Build a Desktop Weather Station Using ESP32 and E-ink Display
How to Build a Desktop Weather Station Using ESP32 and E-ink Display
CircuitDigest
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Artificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptxArtificial intelligence and machine learning.pptx
Artificial intelligence and machine learning.pptx
rakshanatarajan005
 
acid base ppt and their specific application in food
acid base ppt and their specific application in foodacid base ppt and their specific application in food
acid base ppt and their specific application in food
Fatehatun Noor
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
Evonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdfEvonik Overview Visiomer Specialty Methacrylates.pdf
Evonik Overview Visiomer Specialty Methacrylates.pdf
szhang13
 
SICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introductionSICPA: Fabien Keller - background introduction
SICPA: Fabien Keller - background introduction
fabienklr
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
Autodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User InterfaceAutodesk Fusion 2025 Tutorial: User Interface
Autodesk Fusion 2025 Tutorial: User Interface
Atif Razi
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdfDavid Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry - Specializes In AWS, Microservices And Python.pdf
David Boutry
 

Verilog overview

  • 2. Overview  Verilog Basics  Simulation Tools VERILOG OVERVIEW12/20/2015 2
  • 3. Overview  A Hardware Description Language (HDL) is a language used to describe a digital system, for example, a computer or a component of a computer.  A digital system can be described at several levels:  Switch level: wires, resistors and transistors  Gate level: logical gates and flip flops  Register Transfer Level (RTL): registers and the transfers of information between registers.  Two Major HDLs in Industry • VHDL • Verilog VERILOG OVERVIEW12/20/2015 3
  • 4. Verilog vs. VHDL VHDL  “V” is short for Very High Speed Integrated Circuits.  Designed for and sponsored by US Department of Defense.  Designed by committee (1981-1985).  Syntax based on Ada programming language.  Was made an IEEE Standard in 1987. Verilog  Was introduced in 1985 by Gateway Design System Corporation, now a part of Cadence Design Systems, Inc.'s Systems Division.  Was made an IEEE Standard in 1995  Syntax based on C programming language.  Design examples using Verilog HDL ◦ Intel Pentium, AMD K5, K6, Atheon, ARM7, etc ◦ Thousands of ASIC designs using Verilog HDL VERILOG OVERVIEW12/20/2015 4
  • 6. Verilog HDL Models  HDL model specifies the relationship between input signals and output signals.  In Verilog, A “module” contains the hardware description of the circuit.  Verilog code for a AND gate Module definition Ports definition Module Structure VERILOG OVERVIEW12/20/2015 6
  • 7. Numbers  Numbers are specified using the following form <size><base format><number>  Examples: ◦ x = 347 // decimal number ◦ x = 4’b101 // 4- bit binary number 0101 ◦ x = 16’h87f7 // 16-bit hex number h87f7 ◦ x = 2’b101010 ◦ x = 2’d83 size of the number in bits. ’b (binary) ’d (decimal) ’o(octal) ’h(hex). VERILOG OVERVIEW12/20/2015 7
  • 8. operators  Bitwise Operators ~ NOT & AND | OR ^ XOR ~| NOR ~& NAND ^~ or ~^ XNOR  Logical & Relational Operators !, &&, | |, ==, !=, >=, <=, >, < VERILOG OVERVIEW12/20/2015 8
  • 9. Ports  There are three different port types: • Input • Output • Inout  Port definition: • <port type> <portwidth> <port name> • Example: A(7:0) B(7:0) C my_module U1 A(7:0) B(7:0) C VERILOG OVERVIEW12/20/2015 9
  • 10. Data Types: Variables  Two basic families of data types for variables: Nets and Registers  Net variables – e.g. wire • Memory less • Variable used simply to connect components together • Usually corresponds to a wire in the circuit.  Register variables – e.g. reg • Variable used to store data as part of a behavioral description • Like variables in ordinary procedural languages  Note: • reg should only be used with always and initial blocks (to be presented …) • The reg variables store the last value that was procedurally assigned to them whereas the wire variables represent physical connections between structural entities such as gates. A(7:0) W(7:0) C L K A D Fub1 U1 DA CLK VERILOG OVERVIEW12/20/2015 10
  • 11. Continuous Assignment  Continuous statement is used to model combinational logic.  A continuous assignment statement is declared as follows: assign <net_name> = variable;  assign corresponds to a connection.  Target is never a reg variable.  Examples: VERILOG OVERVIEW12/20/2015 11
  • 12. Continuous Assignment  Verilog code for a 4 bit adder: VERILOG OVERVIEW12/20/2015 12
  • 13. Procedural Assignment  Used for modeling sequential circuits.  A procedural assignment statement is declared as follows: Always @(event list) begin <reg_name> <= variable; end  The assignment will be performed whenever one of the events in “event_list” occurs. VERILOG OVERVIEW12/20/2015 13
  • 14. Procedural Assignment  Example: D-FF VERILOG OVERVIEW12/20/2015 14 D clk Out
  • 15. Interconnecting Modules  In order to use a module, it should be instantiated: <Module_name> <Instant_name> (<port mapping>)  Example: using two mux2 to build a mux4 (actually this is not an mux4-1 !!!) In(1 :0 ) O ut se l mux2_i1 mux2In4(3:0) sel4(1:0) In(1 :0 ) O ut se l mux2_i2 mux2 In4(3:2) In4(1:0) sel4[1] sel4[0] Out4(1:0) w(1:0) w[1] w[0] In4(3:0) sel4(1:0) VERILOG OVERVIEW12/20/2015 15
  • 16. Primitives  No declaration required (predefined)  Can only be instantiated  Example: and a1 (C, A, B); //instance name • Usually better to provide instance name for debugging.  Example: or o1 (SET, ~A, C ), o2(N, ABC,SET );  Example: and #(10) a2(o, i1, i2); // name + delay VERILOG OVERVIEW12/20/2015 16
  • 17. 12/20/2015 VERILOG OVERVIEW 17 Test Bench module <test module name> ; // Data type declaration // Instantiate module ( call the module that is going to be tested) // Apply the stimulus // Display results endmodule  Usefull commands: • initial • #delay • forever Tester DUT (Design Under Test) Test bench
  • 18. 12/20/2015 VERILOG OVERVIEW 18 Test Bench Example
  • 20. Overview  Simulation tools: • Aldec Active-HDL • Xilinx Isim • Modelsim • Altium Designer • …  Simulation Phases: • Pre-synthesize (our talk) • Post-synthesize • Post-Place and root VERILOG OVERVIEW12/20/2015 20
  • 21. Active HDL Tutorial  Creating a simple project in Active HDL  Step 1: Create a new workspace VERILOG OVERVIEW12/20/2015 21
  • 22. Active HDL Tutorial  Step 2: name your workspace VERILOG OVERVIEW12/20/2015 22
  • 23. Active HDL Tutorial  Step 3: Choose “Create an Empty Design with Design Flow”. VERILOG OVERVIEW12/20/2015 23
  • 24. Active HDL Tutorial  Step 4: Set default language to VERILOG VERILOG OVERVIEW12/20/2015 24
  • 25. Active HDL Tutorial  Step 5: Enter a name for your design VERILOG OVERVIEW12/20/2015 25
  • 26. Active HDL Tutorial  Step 6: Make a new Verilog Source VERILOG OVERVIEW12/20/2015 26
  • 27. Active HDL Tutorial  Step 7: follow the wizard VERILOG OVERVIEW12/20/2015 27
  • 28. Active HDL Tutorial  Step 8: Enter the name of your Verilog module VERILOG OVERVIEW12/20/2015 28
  • 29.  Step 9: Add ports to your module Active HDL Tutorial VERILOG OVERVIEW12/20/2015 29
  • 30. Active HDL Tutorial  Step 10: Add your code after port declaration (here the continuous assignment for adder) VERILOG OVERVIEW12/20/2015 30
  • 31. Active HDL Tutorial  Step 11: Compile the module VERILOG OVERVIEW12/20/2015 31
  • 32. Active HDL Tutorial  Step 12: Initialize Simulation VERILOG OVERVIEW12/20/2015 32
  • 33. Active HDL Tutorial  Step 13: the software will ask you to select the Top-level module… do it! VERILOG OVERVIEW12/20/2015 33
  • 34. Active HDL Tutorial  In case you get this error… VERILOG OVERVIEW12/20/2015 34
  • 35. Active HDL Tutorial  Go to Design > Setting > Simulation > Verilog and uncheck “Verilog Optimization” VERILOG OVERVIEW12/20/2015 35
  • 36. Active HDL Tutorial  Step 14: from File > New > Waveform open a new waveform window VERILOG OVERVIEW12/20/2015 36
  • 37. Active HDL Tutorial  Step 15: Select signals from the left window and Drag-and-Drop them to the right VERILOG OVERVIEW12/20/2015 37
  • 38. Active HDL Tutorial  Step 16: Right click on any signal in the right panel and select Stimulators (if it is already inactive, make sure initialization is performed) VERILOG OVERVIEW12/20/2015 38
  • 39. Active HDL Tutorial  Step 17: choose stimulator for input signala VERILOG OVERVIEW12/20/2015 39
  • 40. Active HDL Tutorial  Step 18: now you can run simulation by pressing “run for” button. VERILOG OVERVIEW12/20/2015 40
  • 41. 12/20/2015 VERILOG OVERVIEW 41 For more tutorials please visit our website Click Here
  翻译: