SlideShare ist ein Scribd-Unternehmen logo
1 von 20
CHAPTER 4
VHDL PROGRAMMING
COMPARISON BETWEEN DIFFERENT MODELLING
BEHAVIORAL DATA FLOW STRUCTURAL
IT consist of sequential
program statement
It consist of concurrent
statements
It is set of interconnect
component
It requires truth table for
design
It requires Boolean
expression
for design
It requires logical
diagrammed for design
It represents behavior It represents behavior It represents structure
It consist gate level
abstraction
It consist gate level
abstraction or algorithm
It consist RTL abstraction
It is expressed in a
sequential VHDL process
The view of data flow as
flowing a design from input
to output
The view is closest to
hardware
Syntax for VHDL programme
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity ………………. is
Port ( ……. : in STD_LOGIC;
……….. : in STD_LOGIC;
……………: out STD_LOGIC);
End……………….;
architecture Behavioral of ………..is
begin
……………;
……………………..;
……………………….;
end Behavioral
Write a VHDL Code for AND gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity and-gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of and-gate is
begin
y <= a and b;
end Behavioral;
Write a VHDL Code for OR gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity or-gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of or-gate is
begin
y <= a or b;
end Behavioral;
Write a VHDL Code for NOR gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity nor-gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of nor-gate is
begin
y <= a nor b;
end Behavioral;
Write a VHDL Code for NAND gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity nand -gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of nand-gate is
begin
y <= a nand b;
end Behavioral
Write a VHDL Code for EX-OR gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity exor-gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of exor-gate is
begin
y <= a xor b;
end Behavioral
Write a VHDL Code for EX-NOR gate
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity exnor-gate is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
y : out STD_LOGIC);
end and-gate;
architecture Behavioral of exnor-gate is
begin
y <= a xnor b;
end Behavioral
Write a VHDL Code for HALF ADDER
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
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 Behavioral of half-adder is
begin
Sum <= a xor b;
Carry <= a and b;
end Behavioral
Write a VHDL Code for HALF SUBSTRACTOR
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity half-substractor is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
diff : out STD_LOGIC
barrow : out STD_LOGIC);
end half-substractor;
architecture Behavioral of half-substractor is
begin
diff <= a xor b;
barrow <= ( not a ) and b;
end Behavioral
Write a VHDL Code for FULL ADDER
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity full-adder is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c: in STD_LOGIC;
sum: out STD_LOGIC
Carry : out STD_LOGIC);
end full-adder;
architecture Behavioral of full-adder is
begin
Sum <= a xor b xor c;
Carry <=( (a and b) or ( a and c ) or (b and c)) ;
end Behavioral
Write a VHDL Code for FULL SUBSTRACTOR
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity full-substractor is
Port ( a : in STD_LOGIC;
b : in STD_LOGIC;
c: in STD_LOGIC;
difference : out STD_LOGIC
Barrow : out STD_LOGIC);
end full-substractor
architecture Behavioral of full-adder is
begin
Difference <= a xor b xor c;
Barrow <=((not a) and b) or ( not a ) and c) or ( b and c));
end Behavioral
TYPES OF STATEMENTS
a) USING IF ELSE STATEMENT
b) USING CASE SELECT STATEMENT
c) USING WHEN ELSE STATEMENT
d) USING WITH SELECT STATEMENT
Write VHDL CODE FOR 4:1 MUX USING IF ELSE STATEMENT
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.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 Behavioral
multiplexer4_1 is
begin
mux : process (din,sel) is
begin
if (sel="00") then
dout <= din(3);
elsif (sel="01") then
dout <= din(2);
elsif (sel="10") then
dout <= din(1);
else
dout <= din(0);
end if;
end process;
end multiplexer4_1_arc;
Write VHDL CODE FOR 4:1 MUX USING CASE STATEMENT
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
• entity multiplexer_case is
port(
din : in STD_LOGIC_VECTOR(3 downto 0);
sel : in STD_LOGIC_VECTOR(1 downto 0);
dout : out STD_LOGIC );
end multiplexer_case;
• architecture multiplexer_case_arc of
multiplexer_case is
begin
mux : process (din,sel) is
begin
case sel is
when "00" => dout <= din(3);
when "01" => dout <= din(2);
when "10" => dout <= din(1);
when others => dout <= din(0);
end case;
end process mux;
end multiplexer_case_arc;
Write VHDL CODE FOR 4:1 MUX USING when else STATEMENT
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
• entity multiplexer_case is
port
• ( din : in STD_LOGIC_VECTOR(3 downto 0);
sel : in STD_LOGIC_VECTOR(1 downto 0);
dout : out STD_LOGIC );
end multiplexer_case;
• architecture multiplexer4_1_arc
of multiplexer4_1 is
begin
dout <= din(0) when (sel="00")
else
din(1) when (sel="01")
else
din(2) when (sel="10")
else
din(3) when others
• end multiplexer4_1_arc;en
Write VHDL CODE FOR 4:1 MUX USING with select STATEMENT
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
• entity multiplexer_case is
port
• ( din : in STD_LOGIC_VECTOR(3 downto 0);
sel : in STD_LOGIC_VECTOR(1 downto
0);
dout : out STD_LOGIC );
end multiplexer_case;
architecture multiplexer4_1_arc of
multiplexer_4_1 is
begin
with sel select
dout <= din(3) when "00",
din(2) when "01",
din(1) when "10",
din(0) when others;
end multiplexer4_1_arc;
Write VHDL CODE FOR 1:4 DMUX USING IF ELSE STATEMENT
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use
IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Dmultiplexer 1-4 DMUX
is
port( din : in;
sel : in STD_LOGIC_VECTOR(1
downto 0);
a : out STD_LOGIC
b : out STD_LOGIC
b : out STD_LOGIC
d : out STD_LOGIC);
end Dmultiplexer 1-4 DMUX ;
• architecture Behavioral
Dmultiplexer 1-4 DMUX is
begin
mux : process (din,sel) is
begin
if (sel="00") then
a <= din;
elsif (sel="01") then
b<= din;
elsif (sel="10") then
c <= din;
else
d <= din;
end if;
end process;
end Dmultiplexer 1-4 DMUX ;
Write VHDL CODE FOR 1:4 DMUX USING when else
STATEMENT
library IEEE;use
IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Dmultiplexer 1-4 DMUX
is
port( din : in;
sel : in STD_LOGIC_VECTOR(1
downto 0);
a : out STD_LOGIC
b : out STD_LOGIC
b : out STD_LOGIC
d : out STD_LOGIC);
end Dmultiplexer 1-4 DMUX ;
• architecture Dmultiplexer 1-4
DMUX is
begin
a<= din when (sel="00")
• else
b<= din when (sel="01")
• else
c<= din when (sel="10")
• else
d<= din when others
• end Dmultiplexer 1-4 DMUX arc;

Weitere ähnliche Inhalte

Was ist angesagt?

Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4Dr.YNM
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDLSSE_AndyLi
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDLanand hd
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeVLSI SYSTEM Design
 
Design and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilogDesign and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilogSTEPHEN MOIRANGTHEM
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gatesRakesh kumar jha
 
4.FPGA for dummies: Design Flow
4.FPGA for dummies: Design Flow4.FPGA for dummies: Design Flow
4.FPGA for dummies: Design FlowMaurizio Donna
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clockMantra VLSI
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL BasicRon Liu
 
Layout design on MICROWIND
Layout design on MICROWINDLayout design on MICROWIND
Layout design on MICROWINDvaibhav jindal
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDLanand hd
 
01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swetha01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swethaswethamg18
 
Basic concepts in Verilog HDL
Basic concepts in Verilog HDLBasic concepts in Verilog HDL
Basic concepts in Verilog HDLanand hd
 

Was ist angesagt? (20)

Data flow model -Lecture-4
Data flow model -Lecture-4Data flow model -Lecture-4
Data flow model -Lecture-4
 
Chapter 5 introduction to VHDL
Chapter 5 introduction to VHDLChapter 5 introduction to VHDL
Chapter 5 introduction to VHDL
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
Overview of digital design with Verilog HDL
Overview of digital design with Verilog HDLOverview of digital design with Verilog HDL
Overview of digital design with Verilog HDL
 
Verilog tutorial
Verilog tutorialVerilog tutorial
Verilog tutorial
 
Clk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold timeClk-to-q delay, library setup and hold time
Clk-to-q delay, library setup and hold time
 
Design and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilogDesign and implementation of 32 bit alu using verilog
Design and implementation of 32 bit alu using verilog
 
FPGA
FPGAFPGA
FPGA
 
Convolution Codes
Convolution CodesConvolution Codes
Convolution Codes
 
verilog code for logic gates
verilog code for logic gatesverilog code for logic gates
verilog code for logic gates
 
4.FPGA for dummies: Design Flow
4.FPGA for dummies: Design Flow4.FPGA for dummies: Design Flow
4.FPGA for dummies: Design Flow
 
Divide by N clock
Divide by N clockDivide by N clock
Divide by N clock
 
Day2 Verilog HDL Basic
Day2 Verilog HDL BasicDay2 Verilog HDL Basic
Day2 Verilog HDL Basic
 
Layout design on MICROWIND
Layout design on MICROWINDLayout design on MICROWIND
Layout design on MICROWIND
 
VHDL CODE
VHDL CODE VHDL CODE
VHDL CODE
 
Shift Registers
Shift RegistersShift Registers
Shift Registers
 
VERILOG CODE FOR Adder
VERILOG CODE FOR AdderVERILOG CODE FOR Adder
VERILOG CODE FOR Adder
 
Modules and ports in Verilog HDL
Modules and ports in Verilog HDLModules and ports in Verilog HDL
Modules and ports in Verilog HDL
 
01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swetha01 Transition Fault Detection methods by Swetha
01 Transition Fault Detection methods by Swetha
 
Basic concepts in Verilog HDL
Basic concepts in Verilog HDLBasic concepts in Verilog HDL
Basic concepts in Verilog HDL
 

Andere mochten auch

VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsAmal Khailtash
 
见微知著——无线产品交互细节
见微知著——无线产品交互细节见微知著——无线产品交互细节
见微知著——无线产品交互细节elya
 
Design and Verification of Area Efficient Carry Select Adder
Design and Verification of Area Efficient Carry Select AdderDesign and Verification of Area Efficient Carry Select Adder
Design and Verification of Area Efficient Carry Select Adderijsrd.com
 
Csla 130319073823-phpapp01-140821210430-phpapp02
Csla 130319073823-phpapp01-140821210430-phpapp02Csla 130319073823-phpapp01-140821210430-phpapp02
Csla 130319073823-phpapp01-140821210430-phpapp02Jayaprakash Nagaruru
 
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...iosrjce
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adderABIN THOMAS
 
Low power & area efficient carry select adder
Low power & area efficient carry select adderLow power & area efficient carry select adder
Low power & area efficient carry select adderSai Vara Prasad P
 
Design & implementation of high speed carry select adder
Design & implementation of high speed carry select adderDesign & implementation of high speed carry select adder
Design & implementation of high speed carry select adderssingh7603
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection NetworkAli A Jalil
 
1.area efficient carry select adder
1.area efficient carry select adder1.area efficient carry select adder
1.area efficient carry select adderKUMARASWAMY JINNE
 
Enhanced low power, fast and area efficient carry select adder
Enhanced low power, fast and area efficient carry select adderEnhanced low power, fast and area efficient carry select adder
Enhanced low power, fast and area efficient carry select addereSAT Publishing House
 
RAM Source code and Test Bench
RAM Source code and Test BenchRAM Source code and Test Bench
RAM Source code and Test BenchRaj Mohan
 

Andere mochten auch (16)

VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x AdditionsVHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
VHDL Packages, Coding Styles for Arithmetic Operations and VHDL-200x Additions
 
见微知著——无线产品交互细节
见微知著——无线产品交互细节见微知著——无线产品交互细节
见微知著——无线产品交互细节
 
Ddhdl 15
Ddhdl 15Ddhdl 15
Ddhdl 15
 
Design and Verification of Area Efficient Carry Select Adder
Design and Verification of Area Efficient Carry Select AdderDesign and Verification of Area Efficient Carry Select Adder
Design and Verification of Area Efficient Carry Select Adder
 
Test Bench Development
Test Bench DevelopmentTest Bench Development
Test Bench Development
 
Csla 130319073823-phpapp01-140821210430-phpapp02
Csla 130319073823-phpapp01-140821210430-phpapp02Csla 130319073823-phpapp01-140821210430-phpapp02
Csla 130319073823-phpapp01-140821210430-phpapp02
 
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...
VLSI Implementation of Vedic Multiplier Using Urdhva– Tiryakbhyam Sutra in VH...
 
Design and development of carry select adder
Design and development of carry select adderDesign and development of carry select adder
Design and development of carry select adder
 
Low power & area efficient carry select adder
Low power & area efficient carry select adderLow power & area efficient carry select adder
Low power & area efficient carry select adder
 
Design & implementation of high speed carry select adder
Design & implementation of high speed carry select adderDesign & implementation of high speed carry select adder
Design & implementation of high speed carry select adder
 
Interconnection Network
Interconnection NetworkInterconnection Network
Interconnection Network
 
Basics of Vhdl
Basics of VhdlBasics of Vhdl
Basics of Vhdl
 
Programs of VHDL
Programs of VHDLPrograms of VHDL
Programs of VHDL
 
1.area efficient carry select adder
1.area efficient carry select adder1.area efficient carry select adder
1.area efficient carry select adder
 
Enhanced low power, fast and area efficient carry select adder
Enhanced low power, fast and area efficient carry select adderEnhanced low power, fast and area efficient carry select adder
Enhanced low power, fast and area efficient carry select adder
 
RAM Source code and Test Bench
RAM Source code and Test BenchRAM Source code and Test Bench
RAM Source code and Test Bench
 

Ähnlich wie Vhdl programming

Ähnlich wie Vhdl programming (20)

Vhdl basic unit-2
Vhdl basic unit-2Vhdl basic unit-2
Vhdl basic unit-2
 
Vhdl introduction
Vhdl introductionVhdl introduction
Vhdl introduction
 
VHDL_VIKAS.pptx
VHDL_VIKAS.pptxVHDL_VIKAS.pptx
VHDL_VIKAS.pptx
 
Dica ii chapter slides
Dica ii chapter slidesDica ii chapter slides
Dica ii chapter slides
 
Verilogspk1
Verilogspk1Verilogspk1
Verilogspk1
 
Vhdl new
Vhdl newVhdl new
Vhdl new
 
Vhd lhigh2003
Vhd lhigh2003Vhd lhigh2003
Vhd lhigh2003
 
Learning vhdl by examples
Learning vhdl by examplesLearning vhdl by examples
Learning vhdl by examples
 
VHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLESVHDL PROGRAMS FEW EXAMPLES
VHDL PROGRAMS FEW EXAMPLES
 
Lecture2 vhdl refresher
Lecture2 vhdl refresherLecture2 vhdl refresher
Lecture2 vhdl refresher
 
learning vhdl by examples
learning vhdl by exampleslearning vhdl by examples
learning vhdl by examples
 
Introduction to VHDL
Introduction to VHDLIntroduction to VHDL
Introduction to VHDL
 
Digital system design lab manual
Digital system design lab manualDigital system design lab manual
Digital system design lab manual
 
VHDL summer training (ppt)
 VHDL summer training (ppt) VHDL summer training (ppt)
VHDL summer training (ppt)
 
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
 
Practical file
Practical filePractical file
Practical file
 
Digital system design practical file
Digital system design practical fileDigital system design practical file
Digital system design practical file
 
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
 
Spdas2 vlsibput
Spdas2 vlsibputSpdas2 vlsibput
Spdas2 vlsibput
 
Digital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECEDigital System Design Lab Report - VHDL ECE
Digital System Design Lab Report - VHDL ECE
 

Kürzlich hochgeladen

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
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
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...RajaP95
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝soniya singh
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 

Kürzlich hochgeladen (20)

The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
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
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
IMPLICATIONS OF THE ABOVE HOLISTIC UNDERSTANDING OF HARMONY ON PROFESSIONAL E...
 
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
(TARA) Talegaon Dabhade Call Girls Just Call 7001035870 [ Cash on Delivery ] ...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
Model Call Girl in Narela Delhi reach out to us at 🔝8264348440🔝
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

Vhdl programming

  • 2. COMPARISON BETWEEN DIFFERENT MODELLING BEHAVIORAL DATA FLOW STRUCTURAL IT consist of sequential program statement It consist of concurrent statements It is set of interconnect component It requires truth table for design It requires Boolean expression for design It requires logical diagrammed for design It represents behavior It represents behavior It represents structure It consist gate level abstraction It consist gate level abstraction or algorithm It consist RTL abstraction It is expressed in a sequential VHDL process The view of data flow as flowing a design from input to output The view is closest to hardware
  • 3. Syntax for VHDL programme library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity ………………. is Port ( ……. : in STD_LOGIC; ……….. : in STD_LOGIC; ……………: out STD_LOGIC); End……………….; architecture Behavioral of ………..is begin ……………; ……………………..; ……………………….; end Behavioral
  • 4. Write a VHDL Code for AND gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity and-gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of and-gate is begin y <= a and b; end Behavioral;
  • 5. Write a VHDL Code for OR gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity or-gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of or-gate is begin y <= a or b; end Behavioral;
  • 6. Write a VHDL Code for NOR gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity nor-gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of nor-gate is begin y <= a nor b; end Behavioral;
  • 7. Write a VHDL Code for NAND gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity nand -gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of nand-gate is begin y <= a nand b; end Behavioral
  • 8. Write a VHDL Code for EX-OR gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity exor-gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of exor-gate is begin y <= a xor b; end Behavioral
  • 9. Write a VHDL Code for EX-NOR gate library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity exnor-gate is Port ( a : in STD_LOGIC; b : in STD_LOGIC; y : out STD_LOGIC); end and-gate; architecture Behavioral of exnor-gate is begin y <= a xnor b; end Behavioral
  • 10. Write a VHDL Code for HALF ADDER library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; 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 Behavioral of half-adder is begin Sum <= a xor b; Carry <= a and b; end Behavioral
  • 11. Write a VHDL Code for HALF SUBSTRACTOR library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity half-substractor is Port ( a : in STD_LOGIC; b : in STD_LOGIC; diff : out STD_LOGIC barrow : out STD_LOGIC); end half-substractor; architecture Behavioral of half-substractor is begin diff <= a xor b; barrow <= ( not a ) and b; end Behavioral
  • 12. Write a VHDL Code for FULL ADDER library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity full-adder is Port ( a : in STD_LOGIC; b : in STD_LOGIC; c: in STD_LOGIC; sum: out STD_LOGIC Carry : out STD_LOGIC); end full-adder; architecture Behavioral of full-adder is begin Sum <= a xor b xor c; Carry <=( (a and b) or ( a and c ) or (b and c)) ; end Behavioral
  • 13. Write a VHDL Code for FULL SUBSTRACTOR library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity full-substractor is Port ( a : in STD_LOGIC; b : in STD_LOGIC; c: in STD_LOGIC; difference : out STD_LOGIC Barrow : out STD_LOGIC); end full-substractor architecture Behavioral of full-adder is begin Difference <= a xor b xor c; Barrow <=((not a) and b) or ( not a ) and c) or ( b and c)); end Behavioral
  • 14. TYPES OF STATEMENTS a) USING IF ELSE STATEMENT b) USING CASE SELECT STATEMENT c) USING WHEN ELSE STATEMENT d) USING WITH SELECT STATEMENT
  • 15. Write VHDL CODE FOR 4:1 MUX USING IF ELSE STATEMENT library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.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 Behavioral multiplexer4_1 is begin mux : process (din,sel) is begin if (sel="00") then dout <= din(3); elsif (sel="01") then dout <= din(2); elsif (sel="10") then dout <= din(1); else dout <= din(0); end if; end process; end multiplexer4_1_arc;
  • 16. Write VHDL CODE FOR 4:1 MUX USING CASE STATEMENT library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; • entity multiplexer_case is port( din : in STD_LOGIC_VECTOR(3 downto 0); sel : in STD_LOGIC_VECTOR(1 downto 0); dout : out STD_LOGIC ); end multiplexer_case; • architecture multiplexer_case_arc of multiplexer_case is begin mux : process (din,sel) is begin case sel is when "00" => dout <= din(3); when "01" => dout <= din(2); when "10" => dout <= din(1); when others => dout <= din(0); end case; end process mux; end multiplexer_case_arc;
  • 17. Write VHDL CODE FOR 4:1 MUX USING when else STATEMENT library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; • entity multiplexer_case is port • ( din : in STD_LOGIC_VECTOR(3 downto 0); sel : in STD_LOGIC_VECTOR(1 downto 0); dout : out STD_LOGIC ); end multiplexer_case; • architecture multiplexer4_1_arc of multiplexer4_1 is begin dout <= din(0) when (sel="00") else din(1) when (sel="01") else din(2) when (sel="10") else din(3) when others • end multiplexer4_1_arc;en
  • 18. Write VHDL CODE FOR 4:1 MUX USING with select STATEMENT library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; • entity multiplexer_case is port • ( din : in STD_LOGIC_VECTOR(3 downto 0); sel : in STD_LOGIC_VECTOR(1 downto 0); dout : out STD_LOGIC ); end multiplexer_case; architecture multiplexer4_1_arc of multiplexer_4_1 is begin with sel select dout <= din(3) when "00", din(2) when "01", din(1) when "10", din(0) when others; end multiplexer4_1_arc;
  • 19. Write VHDL CODE FOR 1:4 DMUX USING IF ELSE STATEMENT library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Dmultiplexer 1-4 DMUX is port( din : in; sel : in STD_LOGIC_VECTOR(1 downto 0); a : out STD_LOGIC b : out STD_LOGIC b : out STD_LOGIC d : out STD_LOGIC); end Dmultiplexer 1-4 DMUX ; • architecture Behavioral Dmultiplexer 1-4 DMUX is begin mux : process (din,sel) is begin if (sel="00") then a <= din; elsif (sel="01") then b<= din; elsif (sel="10") then c <= din; else d <= din; end if; end process; end Dmultiplexer 1-4 DMUX ;
  • 20. Write VHDL CODE FOR 1:4 DMUX USING when else STATEMENT library IEEE;use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity Dmultiplexer 1-4 DMUX is port( din : in; sel : in STD_LOGIC_VECTOR(1 downto 0); a : out STD_LOGIC b : out STD_LOGIC b : out STD_LOGIC d : out STD_LOGIC); end Dmultiplexer 1-4 DMUX ; • architecture Dmultiplexer 1-4 DMUX is begin a<= din when (sel="00") • else b<= din when (sel="01") • else c<= din when (sel="10") • else d<= din when others • end Dmultiplexer 1-4 DMUX arc;