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

More Related Content

What's hot

Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorialraju reddy
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilogJITU MISTRY
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL BasicRon Liu
 
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
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilogvenravi10
 
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 pprPrabhavathi P
 
Basic concepts in Verilog HDL
Basic concepts in Verilog HDLBasic concepts in Verilog HDL
Basic concepts in Verilog HDLanand hd
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog Ramdas Mozhikunnath
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Praveen Kumar
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginnersDr.YNM
 
gate level modeling
gate level modelinggate level modeling
gate level modelingVandanaBR2
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014Béo Tú
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDFUR11EC098
 

What's hot (20)

Verilog HDL
Verilog HDLVerilog HDL
Verilog HDL
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
verilog
verilogverilog
verilog
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
 
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
 
Lecture 2 verilog
Lecture 2   verilogLecture 2   verilog
Lecture 2 verilog
 
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
 
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
 
Verilog
VerilogVerilog
Verilog
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)Level sensitive scan design(LSSD) and Boundry scan(BS)
Level sensitive scan design(LSSD) and Boundry scan(BS)
 
Gate level design -For beginners
Gate level design -For beginnersGate level design -For beginners
Gate level design -For beginners
 
gate level modeling
gate level modelinggate level modeling
gate level modeling
 
Data Flow Modeling
Data Flow ModelingData Flow Modeling
Data Flow Modeling
 
Verilog Lecture4 2014
Verilog Lecture4 2014Verilog Lecture4 2014
Verilog Lecture4 2014
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
 
Verilog HDL- 2
Verilog HDL- 2Verilog HDL- 2
Verilog HDL- 2
 
Verilog lab manual (ECAD and VLSI Lab)
Verilog lab manual (ECAD and VLSI Lab)Verilog lab manual (ECAD and VLSI Lab)
Verilog lab manual (ECAD and VLSI Lab)
 

Viewers also liked

Verilog HDL Training Course
Verilog HDL Training CourseVerilog HDL Training Course
Verilog HDL Training CoursePaul Laskowski
 
adc dac converter
adc dac converteradc dac converter
adc dac converterGaurav Rai
 
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
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLE2MATRIX
 
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 VerilogAbhiraj Bohra
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumHossam Hassan
 

Viewers also liked (20)

Verilog HDL Training Course
Verilog HDL Training CourseVerilog HDL Training Course
Verilog HDL Training Course
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
frequency counter
frequency counterfrequency counter
frequency counter
 
test generation
test generationtest generation
test generation
 
adc dac converter
adc dac converteradc dac converter
adc dac converter
 
vhdl
vhdlvhdl
vhdl
 
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
 
Fpga
FpgaFpga
Fpga
 
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...
 
Description
DescriptionDescription
Description
 
System Verilog Tutorial - VHDL
System Verilog Tutorial - VHDLSystem Verilog Tutorial - VHDL
System Verilog Tutorial - VHDL
 
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
 
Choosing the right processor
Choosing the right processorChoosing the right processor
Choosing the right processor
 
Verilog hdl
Verilog hdlVerilog hdl
Verilog hdl
 
Frequency counter
Frequency counterFrequency counter
Frequency counter
 
Verilogforlab
VerilogforlabVerilogforlab
Verilogforlab
 
Verilog
VerilogVerilog
Verilog
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
 
Matlab isim link
Matlab isim linkMatlab isim link
Matlab isim link
 
Fft ppt
Fft pptFft ppt
Fft ppt
 

Similar to Verilog overview

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
 
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.pdfezonesolutions
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemMelissa Luster
 
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
 
vlsi design using verilog presentaion 1
vlsi design using verilog   presentaion 1vlsi design using verilog   presentaion 1
vlsi design using verilog presentaion 1MANDHASAIGOUD1
 
Xilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar ChandigarhXilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar ChandigarhE2Matrix
 
Xilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara JalandharXilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara JalandharE2Matrix
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.pptCoEBMSITM
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptMrRRThirrunavukkaras
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdlRavi 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.pdfAzeemMohammedAbdul
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLRevathi Subramaniam
 

Similar to Verilog overview (20)

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)
 
Verilog HDL
Verilog HDL Verilog HDL
Verilog HDL
 
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
 
Verilogspk1
Verilogspk1Verilogspk1
Verilogspk1
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
Xilinx training in mohali
Xilinx training in mohaliXilinx training in mohali
Xilinx training in mohali
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Vhdl new
Vhdl newVhdl new
Vhdl new
 
The Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging SystemThe Principle Of Ultrasound Imaging System
The Principle Of Ultrasound Imaging System
 
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
 
vlsi design using verilog presentaion 1
vlsi design using verilog   presentaion 1vlsi design using verilog   presentaion 1
vlsi design using verilog presentaion 1
 
Xilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar ChandigarhXilinx Training in Jalandhar Chandigarh
Xilinx Training in Jalandhar Chandigarh
 
Xilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara JalandharXilinx Training in Phagwara Jalandhar
Xilinx Training in Phagwara Jalandhar
 
1.ppt
1.ppt1.ppt
1.ppt
 
S6 cad5
S6 cad5S6 cad5
S6 cad5
 
Basics of Verilog.ppt
Basics of Verilog.pptBasics of Verilog.ppt
Basics of Verilog.ppt
 
Verilog Hardware Description Language.ppt
Verilog Hardware Description Language.pptVerilog Hardware Description Language.ppt
Verilog Hardware Description Language.ppt
 
Short.course.introduction.to.vhdl
Short.course.introduction.to.vhdlShort.course.introduction.to.vhdl
Short.course.introduction.to.vhdl
 
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
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDL
 

Recently uploaded

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvLewisJB
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Recently uploaded (20)

Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvvWork Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

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