SlideShare a Scribd company logo
1 of 36
Goals-The intent of this work is to introduce VHDL to engineers who will
be using the language to describe circuits for implementation in
programmable logic or ASICs. To this end, we will avoid prolonged
discussions that are appropriate only for developers of simulation models
and system-level simulations, and concentrate instead on those aspects of
the language that are most useful for circuit synthesis. We will give you
enough information to quickly get started using VHDL, and will suggest
coding styles that are appropriate using a wide variety of available synthesis
and simulation tools.
Learning Outcomes-Write synthesisable verilog.
Write a verilog testbench to test verilog modules.
Analyse code coverage of a verilog testbench..
Target a verilog design to an FPGA board.
Analyse and debug verilog modules.
Introduction To VHDL
Mr.S.S.Gurav
SITCOE,Yadrav
VHDL
What is VHDL?
V H I S C  Very High Speed Integrated Circuit
Hardware
Description
Language
History of VHDL
• Designed by IBM, Texas Instruments, and Intermetrics as part of the
DoD funded VHSIC program
• Standardized by the IEEE in 1987: IEEE 1076-1987
• Enhanced version of the language defined in 1993: IEEE 1076-1993
• Additional standardized packages provide definitions of data types and
expressions of timing data
– IEEE 1164 (data types)
– IEEE 1076.3 (numeric)
– IEEE 1076.4 (timing)
Traditional vs. Hardware Description
Languages
• Procedural programming languages provide the how or recipes
– for computation
– for data manipulation
– for execution on a specific hardware model
• Hardware description languages describe a system
– Systems can be described from many different points of view
• Behavior: what does it do?
• Structure: what is it composed of?
• Functional properties: how do I interface to it?
• Physical properties: how fast is it?
Why do we Describe Systems?
• Design Specification
– unambiguous definition of components and
interfaces in a large design
• Design Simulation
– verify system/subsystem/chip performance
prior to design implementation
• Design Synthesis
– automated generation of a hardware design
Digital System Design Flow
Requirements
Functional Design
Register Transfer
Level Design
Logic Design
Circuit Design
Physical Design
Description for Manufacture
Behavioral Simulation
RTL Simulation
Validation
Logic Simulation
Verification
Timing Simulation
Circuit Analysis
Design Rule Checking
Fault Simulation
• Design flows operate at multiple
levels of abstraction
• Need a uniform description to
translate between levels
• Increasing costs of design and
fabrication necessitate greater
reliance on automation via CAD
tools
– $5M - $100M to design new
chips
– Increasing time to market
pressures
A Synthesis Design Flow
Requirements
Functional Design
Register Transfer
Level Design
Synthesis
Place and Route
Timing Extraction
VHDL Model
(VHDL)
VHDL Model
Logic Simulation
Behavioral Simulation
• Automation of design refinement steps
• Feedback for accurate simulation
• Example targets: ASICs, FPGAs
Domains and Levels of Modeling
high level of
abstraction
FunctionalStructural
Geometric “Y-chart” due to
Gajski & Kahn
low level of
abstraction
Domains and Levels of Modeling
FunctionalStructural
Geometric “Y-chart” due to
Gajski & Kahn
Algorithm
(behavioral)
Register-Transfer
Language
Boolean Equation
Differential Equation
Domains and Levels of Modeling
FunctionalStructural
Geometric “Y-chart” due to
Gajski & Kahn
Processor-Memory
Switch
Register-Transfer
Gate
Transistor
Domains and Levels of Modeling
FunctionalStructural
Geometric “Y-chart” due to
Gajski & Kahn
Polygons
Sticks
Standard Cells
Floor Plan
Basic VHDL Concepts
• Interfaces
• Modeling (Behavior, Dataflow, Structure)
• Test Benches
• Analysis, elaboration, simulation
• Synthesis
• ENTITY Declarations
The primary purpose of the entity is to declare the signals in the
component's interface. All signals to be interfaced are listed in the PORT
clause. In some respect ENTITY is similar to the SYMBOL in a schematic
entry tool.
• PORT Clause
PORT clause declares the interface signals of the object to the outside
world. There are three parts to a PORT clause- Name, Mode, Data Type.
There are 5 PORT modes available:
• IN –
Indicates that the only signal driver is outside this block being declared.
• OUT –
Indicates that the only signal driver is within the component.
• BUFFER – I
Indicates there may be signal drivers both inside and outside of the
block. However only one may drive this signal at one time
• INOUT -- indicates there may be signal drivers both inside and outside of
the block. Many may drive this signal at one time, but a bus resolution
function is required to determine what values the signal will assume.
Basic Structure of a VHDL File
• Entity
– Entity declaration:
interface to outside
world; defines input
and output signals
– Architecture: describes
the entity, contains
processes, components
operating concurrently
Entity Declaration
entity NAME_OF_ENTITY is
port (signal_names: mode type;
signal_names: mode type;
:
signal_names: mode type);
end [NAME_OF_ENTITY] ;
• NAME_OF_ENTITY: user defined
• signal_names: list of signals (both input and
output)
• mode: in, out, buffer, inout
• type: boolean, integer, character, std_logic
Entity Examples …
entity half_adder is
port(
A,B: in std_logic;
sum, carry: out std_logic);
end half_adder;
Half ADDER
A
B
SUM
CARRY
Modeling Styles
• There are three modeling styles:
• Behavioral (Sequential)
• Structural
• Data flow
Behavioral (Sequential)
• Behavior Modeling Style shows that how our system performs
according to current input values.
• In behavor Modeling, we defines that what value we get at the
output corresponding to input values.
• We Defines the function / Behavior of our Digital Systems in
Behavior Modeling Style.
• Behavior Modeling Style works on Sequential Execution.
• 4 to 1 multiplexer using if else.vhd
library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity multiplexer_4_1 is
port( din : in STD_LOGIC_VECTOR(3
downto 0);
sel : in STD_LOGIC_VECTOR(1
downto 0);
dout : out STD_LOGIC);
end multiplexer_4_1;
• architecture multiplexer4_1_arc
of multiplexer_4_1 is
begin
mux : process (din,sel) is
begin
if (sel="00") then
dout <= din(0);
elsif (sel="01") then
dout <= din(1);
elsif (sel="10") then
dout <= din(2);
else
dout <= din(3);
end if;
end process mux;
end multiplexer4_1_arc;
• 1 to 4 demultilexer using
case.vhd
library IEEE;
use
IEEE.STD_LOGIC_1164.all;
entity demultiplexer_case is
port(
din : in STD_LOGIC;
sel : in
STD_LOGIC_VECTOR(1downto 0);
dout : out
STD_LOGIC_VECTOR(3down to 0)
);
end demultiplexer_case;
• architecture demultiplexer_case_arc of
demultiplexer_case is
begin
demux : process (din,sel) is
begin
case sel is
when "00" => dout <= din & "00";
when "01" => dout <= '0' & din & "01";
• when "10" => dout <= "01" & din &
‘10';
when others => dout <= “10" & din;
end case;
end process demux;
end demultiplexer_case_arc;
Structural
• Structural Modeling Style shows the Graphical
Representation of modules/ instances / components with
their Interconnection.
• In Structural Modeling Style We defines that how our
Components / Registers / Modules are Connected to each
other using Nets/ Wires.
• Structural Modeling Style is based on Net-List Language.
• Structural Modeling Style works on Concurrent Execution.
• Design of 2 to 1 multiplexer
using Structural Modeling
Style.vhd
library IEEE;
use
IEEE.STD_LOGIC_1164.all;
entity multiplexer2_1 is
port(
a : in STD_LOGIC;
b : in STD_LOGIC;
sel : in STD_LOGIC;
dout : out STD_LOGIC
);
end multiplexer2_1;
• architecture multiplexer2_1_arc of
multiplexer2_1 is
component and2 is
port (a : in STD_LOGIC;
b : in STD_LOGIC;
dout : out STD_LOGIC
);
end component and2;
component or2 is
port (a : in STD_LOGIC;
b : in STD_LOGIC;
dout : out STD_LOGIC
);
end component or2;
component not1 is
port (a : in STD_LOGIC;
dout : out STD_LOGIC
);
end component not1;
Data flow
• Data Flow Modeling Style Shows that how the data /
signal flows from input to ouput threw the registers /
Components. Data Flow Modeling Style works on
Concurrent Execution
• entity Half_Adder is
port(
a : in STD_LOGIC;
b : in STD_LOGIC;
sum : out STD_LOGIC;
carry : out STD_LOGIC
);
end Half_Adder;
architecture Half_Adder_arc of
Half_Adder is
begin
sum <= a xor b;
carry <= a and b;
end Half_Adder_arc;
• entity multiplexer_4_1 is
port(
a : in STD_LOGIC;
b : in STD_LOGIC;
c : in STD_LOGIC;
d : in STD_LOGIC;
x : in STD_LOGIC;
y : in STD_LOGIC;
dout : out STD_LOGIC );
end multiplexer_4_1;
architecture multiplexer_4_1_arc of
multiplexer_4_1 is
begin
dout <= ((not x) and (not y) and a) or
((not x) and y and b) or
(x and (not y) and c) or
(x and y and d);
end multiplexer_4_1_arc;
Half Adder
library ieee;
use ieee.std_logic_1164.all;
entity half_adder is
port(
x,y: in std_logic;
sum, carry: out std_logic);
end half_adder;
architecture myadd of half_adder is
begin
sum <= x xor y;
carry <= x and y;
end myadd;
Architecture Examples: Behavioral Description
• Entity FULLADDER is
port ( A, B, C: in std_logic;
SUM, CARRY: in std_logic);
end FULLADDER;
• Architecture CONCURRENT of FULLADDER is
begin
SUM <= A xor B xor C after 5 ns;
CARRY <= (A and B) or (B and C) or (A and C) after 3
ns;
end CONCURRENT;
Architecture Examples: Structural Description …
• architecture STRUCTURAL of FULLADDER is
signal S1, C1, C2 : bit;
component HA
port (I1, I2 : in bit; S, C : out bit);
end component;
component OR
port (I1, I2 : in bit; X : out bit);
end component;
begin
INST_HA1 : HA port map (I1 => B, I2 => C, S => S1, C => C1);
INST_HA2 : HA port map (I1 => A, I2 => S1, S => SUM, C => C2);
INST_OR : OR port map (I1 => C2, I2 => C1, X => CARRY);
end STRUCTURAL;
I1 S
HA
I2 C
I1 S
HA
I2 C I1
OR
I2 x
A
C
B
CARRY
SUM
S1
C1
C2
Data Objects
• There are three types of data objects:
• Signals
• Can be considered as wires in a schematic.
• Can have current value and future values.
• Variables and Constants
• Used to model the behavior of a circuit.
• Used in processes, procedures and functions.
Data Types
• Integer
• Integer
• Minimum range for any implementation as defined by standard: -
2,147,483,647 to 2,147,483,647
• Integer assignment example
• Array
• Array
• Used to collect one or more elements of a similar type in a single
construct.
• Elements can be any VHDL data type.
Predefined Operators
• Logical operators
• Arithmetic operators
• Comparison (relational) operators
• Shift operators
• Matching comparison operators
Logical operators
• Logical Operators Used to perform logical operations. The data must be
of type BIT, STD_LOGIC, or STD_ULOGIC (or, obviously, their
respective extensions, BIT_VECTOR, STD_LOGIC_VECTOR, or
STD_ULOGIC_VECTOR). The logical operators are:
• NOT
• AND
• OR
• NAND
• NOR
• XOR
• XNOR
•• Examples:
• y <= NOT a AND b; -- (a'.b)
• y <= NOT (a AND b); -- (a.b)'
• y <= a NAND b; -- (a.b)'
Arithmetic Operators
• The arithmetic operators are:
• Addition (+)
• Subtraction (-)
• Multiplication (*)
• Division (/)
• Exponentiation (**)
Comparison Operators
• Also called relational operators, the comparison operators are:
• Equal to (=
• Not equal to (/=)
• Less than (<)
• Greater than (>)
• 4 Less than or equal to (<=)
• Greater than or equal to (>=)
Shift Operators
• Introduced in VHDL93,
• shift operators are used for shifting data vectors. They are:
• Shift left logic (SLL): Positions on the right are filled with '0's.
Shift right logic
• (SRL): Positions on the left are filled with '0's. Shift left
arithmetic
• (SLA): Rightmost bit is replicated on the right. Shift right
arithmetic
• (SRA): Leftmost bit is replicated on the left. Rotate left (ROL):
Circular shift to the left. Rotate right (ROR): Circular shift to
the right.

More Related Content

What's hot (20)

VHDL
VHDLVHDL
VHDL
 
Vhdl
VhdlVhdl
Vhdl
 
Introduction to-vhdl
Introduction to-vhdlIntroduction to-vhdl
Introduction to-vhdl
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDL
 
Lecture1
Lecture1Lecture1
Lecture1
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
VHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDLVHDL-Behavioral-Programs-Structure of VHDL
VHDL-Behavioral-Programs-Structure of VHDL
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Vhdl programming
Vhdl programmingVhdl programming
Vhdl programming
 
Vhdl design flow
Vhdl design flowVhdl design flow
Vhdl design flow
 
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
 
Lecture3 combinational blocks
Lecture3 combinational blocksLecture3 combinational blocks
Lecture3 combinational blocks
 
Hardware Description Language
Hardware Description Language Hardware Description Language
Hardware Description Language
 
VHDL CODES
VHDL CODES VHDL CODES
VHDL CODES
 
Vhdl basic unit-2
Vhdl basic unit-2Vhdl basic unit-2
Vhdl basic unit-2
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
VHDL
VHDLVHDL
VHDL
 
Introduction to VHDL - Part 1
Introduction to VHDL - Part 1Introduction to VHDL - Part 1
Introduction to VHDL - Part 1
 
How to design Programs using VHDL
How to design Programs using VHDLHow to design Programs using VHDL
How to design Programs using VHDL
 

Similar to Vhdl new

Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Digital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxDigital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxMalligaarjunanN
 
VHDL summer training (ppt)
 VHDL summer training (ppt) VHDL summer training (ppt)
VHDL summer training (ppt)HoneyKumar34
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdlArshit Rai
 
hardware description language power point presentation
hardware description language power point presentationhardware description language power point presentation
hardware description language power point presentationdhananjeyanrece
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresherNima Shafiee
 
Session 02 _rtl_design_with_vhdl 101
Session 02 _rtl_design_with_vhdl 101Session 02 _rtl_design_with_vhdl 101
Session 02 _rtl_design_with_vhdl 101Mahmoud Abdellatif
 
L6_Slides_vhdl coures temporary hair dye for dark hair
L6_Slides_vhdl coures temporary hair dye for dark hairL6_Slides_vhdl coures temporary hair dye for dark hair
L6_Slides_vhdl coures temporary hair dye for dark hairloyad20119
 

Similar to Vhdl new (20)

VHDL_VIKAS.pptx
VHDL_VIKAS.pptxVHDL_VIKAS.pptx
VHDL_VIKAS.pptx
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Digital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptxDigital principle and computer design Presentation (1).pptx
Digital principle and computer design Presentation (1).pptx
 
VHDL summer training (ppt)
 VHDL summer training (ppt) VHDL summer training (ppt)
VHDL summer training (ppt)
 
Verilog
VerilogVerilog
Verilog
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
Summer training vhdl
Summer training vhdlSummer training vhdl
Summer training vhdl
 
hardware description language power point presentation
hardware description language power point presentationhardware description language power point presentation
hardware description language power point presentation
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
 
Session 02 _rtl_design_with_vhdl 101
Session 02 _rtl_design_with_vhdl 101Session 02 _rtl_design_with_vhdl 101
Session 02 _rtl_design_with_vhdl 101
 
S6 cad5
S6 cad5S6 cad5
S6 cad5
 
Himanshu Shivhar (1)
Himanshu Shivhar (1)Himanshu Shivhar (1)
Himanshu Shivhar (1)
 
Tutor1
Tutor1Tutor1
Tutor1
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
 
L6_Slides_vhdl coures temporary hair dye for dark hair
L6_Slides_vhdl coures temporary hair dye for dark hairL6_Slides_vhdl coures temporary hair dye for dark hair
L6_Slides_vhdl coures temporary hair dye for dark hair
 
vhdl
vhdlvhdl
vhdl
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Digital_system_design_A (1).ppt
Digital_system_design_A (1).pptDigital_system_design_A (1).ppt
Digital_system_design_A (1).ppt
 

Recently uploaded

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
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
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2RajaP95
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ
 
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
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
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
 
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
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
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
 

Recently uploaded (20)

Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
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
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2HARMONY IN THE HUMAN BEING - Unit-II UHV-2
HARMONY IN THE HUMAN BEING - Unit-II UHV-2
 
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
 
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
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
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
 
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
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
🔝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...
 
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
 

Vhdl new

  • 1. Goals-The intent of this work is to introduce VHDL to engineers who will be using the language to describe circuits for implementation in programmable logic or ASICs. To this end, we will avoid prolonged discussions that are appropriate only for developers of simulation models and system-level simulations, and concentrate instead on those aspects of the language that are most useful for circuit synthesis. We will give you enough information to quickly get started using VHDL, and will suggest coding styles that are appropriate using a wide variety of available synthesis and simulation tools. Learning Outcomes-Write synthesisable verilog. Write a verilog testbench to test verilog modules. Analyse code coverage of a verilog testbench.. Target a verilog design to an FPGA board. Analyse and debug verilog modules.
  • 3. VHDL What is VHDL? V H I S C  Very High Speed Integrated Circuit Hardware Description Language
  • 4. History of VHDL • Designed by IBM, Texas Instruments, and Intermetrics as part of the DoD funded VHSIC program • Standardized by the IEEE in 1987: IEEE 1076-1987 • Enhanced version of the language defined in 1993: IEEE 1076-1993 • Additional standardized packages provide definitions of data types and expressions of timing data – IEEE 1164 (data types) – IEEE 1076.3 (numeric) – IEEE 1076.4 (timing)
  • 5. Traditional vs. Hardware Description Languages • Procedural programming languages provide the how or recipes – for computation – for data manipulation – for execution on a specific hardware model • Hardware description languages describe a system – Systems can be described from many different points of view • Behavior: what does it do? • Structure: what is it composed of? • Functional properties: how do I interface to it? • Physical properties: how fast is it?
  • 6. Why do we Describe Systems? • Design Specification – unambiguous definition of components and interfaces in a large design • Design Simulation – verify system/subsystem/chip performance prior to design implementation • Design Synthesis – automated generation of a hardware design
  • 7. Digital System Design Flow Requirements Functional Design Register Transfer Level Design Logic Design Circuit Design Physical Design Description for Manufacture Behavioral Simulation RTL Simulation Validation Logic Simulation Verification Timing Simulation Circuit Analysis Design Rule Checking Fault Simulation • Design flows operate at multiple levels of abstraction • Need a uniform description to translate between levels • Increasing costs of design and fabrication necessitate greater reliance on automation via CAD tools – $5M - $100M to design new chips – Increasing time to market pressures
  • 8. A Synthesis Design Flow Requirements Functional Design Register Transfer Level Design Synthesis Place and Route Timing Extraction VHDL Model (VHDL) VHDL Model Logic Simulation Behavioral Simulation • Automation of design refinement steps • Feedback for accurate simulation • Example targets: ASICs, FPGAs
  • 9. Domains and Levels of Modeling high level of abstraction FunctionalStructural Geometric “Y-chart” due to Gajski & Kahn low level of abstraction
  • 10. Domains and Levels of Modeling FunctionalStructural Geometric “Y-chart” due to Gajski & Kahn Algorithm (behavioral) Register-Transfer Language Boolean Equation Differential Equation
  • 11. Domains and Levels of Modeling FunctionalStructural Geometric “Y-chart” due to Gajski & Kahn Processor-Memory Switch Register-Transfer Gate Transistor
  • 12. Domains and Levels of Modeling FunctionalStructural Geometric “Y-chart” due to Gajski & Kahn Polygons Sticks Standard Cells Floor Plan
  • 13. Basic VHDL Concepts • Interfaces • Modeling (Behavior, Dataflow, Structure) • Test Benches • Analysis, elaboration, simulation • Synthesis
  • 14. • ENTITY Declarations The primary purpose of the entity is to declare the signals in the component's interface. All signals to be interfaced are listed in the PORT clause. In some respect ENTITY is similar to the SYMBOL in a schematic entry tool. • PORT Clause PORT clause declares the interface signals of the object to the outside world. There are three parts to a PORT clause- Name, Mode, Data Type. There are 5 PORT modes available: • IN – Indicates that the only signal driver is outside this block being declared. • OUT – Indicates that the only signal driver is within the component. • BUFFER – I Indicates there may be signal drivers both inside and outside of the block. However only one may drive this signal at one time • INOUT -- indicates there may be signal drivers both inside and outside of the block. Many may drive this signal at one time, but a bus resolution function is required to determine what values the signal will assume.
  • 15. Basic Structure of a VHDL File • Entity – Entity declaration: interface to outside world; defines input and output signals – Architecture: describes the entity, contains processes, components operating concurrently
  • 16. Entity Declaration entity NAME_OF_ENTITY is port (signal_names: mode type; signal_names: mode type; : signal_names: mode type); end [NAME_OF_ENTITY] ; • NAME_OF_ENTITY: user defined • signal_names: list of signals (both input and output) • mode: in, out, buffer, inout • type: boolean, integer, character, std_logic
  • 17. Entity Examples … entity half_adder is port( A,B: in std_logic; sum, carry: out std_logic); end half_adder; Half ADDER A B SUM CARRY
  • 18. Modeling Styles • There are three modeling styles: • Behavioral (Sequential) • Structural • Data flow
  • 19. Behavioral (Sequential) • Behavior Modeling Style shows that how our system performs according to current input values. • In behavor Modeling, we defines that what value we get at the output corresponding to input values. • We Defines the function / Behavior of our Digital Systems in Behavior Modeling Style. • Behavior Modeling Style works on Sequential Execution.
  • 20. • 4 to 1 multiplexer using if else.vhd library IEEE; use IEEE.STD_LOGIC_1164.all; entity multiplexer_4_1 is port( din : in STD_LOGIC_VECTOR(3 downto 0); sel : in STD_LOGIC_VECTOR(1 downto 0); dout : out STD_LOGIC); end multiplexer_4_1; • architecture multiplexer4_1_arc of multiplexer_4_1 is begin mux : process (din,sel) is begin if (sel="00") then dout <= din(0); elsif (sel="01") then dout <= din(1); elsif (sel="10") then dout <= din(2); else dout <= din(3); end if; end process mux; end multiplexer4_1_arc;
  • 21. • 1 to 4 demultilexer using case.vhd library IEEE; use IEEE.STD_LOGIC_1164.all; entity demultiplexer_case is port( din : in STD_LOGIC; sel : in STD_LOGIC_VECTOR(1downto 0); dout : out STD_LOGIC_VECTOR(3down to 0) ); end demultiplexer_case; • architecture demultiplexer_case_arc of demultiplexer_case is begin demux : process (din,sel) is begin case sel is when "00" => dout <= din & "00"; when "01" => dout <= '0' & din & "01"; • when "10" => dout <= "01" & din & ‘10'; when others => dout <= “10" & din; end case; end process demux; end demultiplexer_case_arc;
  • 22. Structural • Structural Modeling Style shows the Graphical Representation of modules/ instances / components with their Interconnection. • In Structural Modeling Style We defines that how our Components / Registers / Modules are Connected to each other using Nets/ Wires. • Structural Modeling Style is based on Net-List Language. • Structural Modeling Style works on Concurrent Execution.
  • 23. • Design of 2 to 1 multiplexer using Structural Modeling Style.vhd library IEEE; use IEEE.STD_LOGIC_1164.all; entity multiplexer2_1 is port( a : in STD_LOGIC; b : in STD_LOGIC; sel : in STD_LOGIC; dout : out STD_LOGIC ); end multiplexer2_1; • architecture multiplexer2_1_arc of multiplexer2_1 is component and2 is port (a : in STD_LOGIC; b : in STD_LOGIC; dout : out STD_LOGIC ); end component and2; component or2 is port (a : in STD_LOGIC; b : in STD_LOGIC; dout : out STD_LOGIC ); end component or2; component not1 is port (a : in STD_LOGIC; dout : out STD_LOGIC ); end component not1;
  • 24. Data flow • Data Flow Modeling Style Shows that how the data / signal flows from input to ouput threw the registers / Components. Data Flow Modeling Style works on Concurrent Execution
  • 25. • entity Half_Adder is port( a : in STD_LOGIC; b : in STD_LOGIC; sum : out STD_LOGIC; carry : out STD_LOGIC ); end Half_Adder; architecture Half_Adder_arc of Half_Adder is begin sum <= a xor b; carry <= a and b; end Half_Adder_arc; • entity multiplexer_4_1 is port( a : in STD_LOGIC; b : in STD_LOGIC; c : in STD_LOGIC; d : in STD_LOGIC; x : in STD_LOGIC; y : in STD_LOGIC; dout : out STD_LOGIC ); end multiplexer_4_1; architecture multiplexer_4_1_arc of multiplexer_4_1 is begin dout <= ((not x) and (not y) and a) or ((not x) and y and b) or (x and (not y) and c) or (x and y and d); end multiplexer_4_1_arc;
  • 26. Half Adder library ieee; use ieee.std_logic_1164.all; entity half_adder is port( x,y: in std_logic; sum, carry: out std_logic); end half_adder; architecture myadd of half_adder is begin sum <= x xor y; carry <= x and y; end myadd;
  • 27. Architecture Examples: Behavioral Description • Entity FULLADDER is port ( A, B, C: in std_logic; SUM, CARRY: in std_logic); end FULLADDER; • Architecture CONCURRENT of FULLADDER is begin SUM <= A xor B xor C after 5 ns; CARRY <= (A and B) or (B and C) or (A and C) after 3 ns; end CONCURRENT;
  • 28. Architecture Examples: Structural Description … • architecture STRUCTURAL of FULLADDER is signal S1, C1, C2 : bit; component HA port (I1, I2 : in bit; S, C : out bit); end component; component OR port (I1, I2 : in bit; X : out bit); end component; begin INST_HA1 : HA port map (I1 => B, I2 => C, S => S1, C => C1); INST_HA2 : HA port map (I1 => A, I2 => S1, S => SUM, C => C2); INST_OR : OR port map (I1 => C2, I2 => C1, X => CARRY); end STRUCTURAL; I1 S HA I2 C I1 S HA I2 C I1 OR I2 x A C B CARRY SUM S1 C1 C2
  • 29. Data Objects • There are three types of data objects: • Signals • Can be considered as wires in a schematic. • Can have current value and future values. • Variables and Constants • Used to model the behavior of a circuit. • Used in processes, procedures and functions.
  • 30. Data Types • Integer • Integer • Minimum range for any implementation as defined by standard: - 2,147,483,647 to 2,147,483,647 • Integer assignment example
  • 31. • Array • Array • Used to collect one or more elements of a similar type in a single construct. • Elements can be any VHDL data type.
  • 32. Predefined Operators • Logical operators • Arithmetic operators • Comparison (relational) operators • Shift operators • Matching comparison operators
  • 33. Logical operators • Logical Operators Used to perform logical operations. The data must be of type BIT, STD_LOGIC, or STD_ULOGIC (or, obviously, their respective extensions, BIT_VECTOR, STD_LOGIC_VECTOR, or STD_ULOGIC_VECTOR). The logical operators are: • NOT • AND • OR • NAND • NOR • XOR • XNOR •• Examples: • y <= NOT a AND b; -- (a'.b) • y <= NOT (a AND b); -- (a.b)' • y <= a NAND b; -- (a.b)'
  • 34. Arithmetic Operators • The arithmetic operators are: • Addition (+) • Subtraction (-) • Multiplication (*) • Division (/) • Exponentiation (**)
  • 35. Comparison Operators • Also called relational operators, the comparison operators are: • Equal to (= • Not equal to (/=) • Less than (<) • Greater than (>) • 4 Less than or equal to (<=) • Greater than or equal to (>=)
  • 36. Shift Operators • Introduced in VHDL93, • shift operators are used for shifting data vectors. They are: • Shift left logic (SLL): Positions on the right are filled with '0's. Shift right logic • (SRL): Positions on the left are filled with '0's. Shift left arithmetic • (SLA): Rightmost bit is replicated on the right. Shift right arithmetic • (SRA): Leftmost bit is replicated on the left. Rotate left (ROL): Circular shift to the left. Rotate right (ROR): Circular shift to the right.