SlideShare a Scribd company logo
Write complete VHDL codes for the following schematic.
Solution
for shift reg:
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity pipo is
Port ( ClrN,load,clk : in STD_LOGIC;
D3,D2,D1,D0 : in STD_LOGIC;
Q3,Q2,Q1,Q0 : out STD_LOGIC);
end pipo;
architecture Behavioral of pipo is
component D_ff is
Port ( clock,ClrN : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC);
end component;
signal clock:STD_LOGIC;
begin
clock<= load and clk;
u3:D_Ff port map(clock,ClrN,D3,Q3);
u2:D_Ff port map(clock,ClrN,D2,Q2);
u1:D_Ff port map(clock,ClrN,D1,Q1);
U0:D_Ff port map(clock,ClrN,D0,Q0);
end Behavioral;
for D-Flipflop:
entity D_FF is
Port ( clock,ClrN : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC);
end D_FF;
architecture Behavioral of D_FF is
begin
process(clk,ClrN)
begin
if(ClrN = '0') then
if(falling_edge(clk)) then
Q <= D;
end if;
else
Q <= '0';
end if;
end process;
end Behavioral;

More Related Content

DOCX
Vhdl programs
PDF
HDL PROGRAMMING-3.pdf
PDF
Presentation1.pdf
PPTX
Create your first model for a simple logic circuit
PDF
VHdl lab report
PDF
5.Write the VHDL code for the state machine.library ieee;use i.pdf
DOCX
Reporte vhd10
PDF
Vhdl lab manual
Vhdl programs
HDL PROGRAMMING-3.pdf
Presentation1.pdf
Create your first model for a simple logic circuit
VHdl lab report
5.Write the VHDL code for the state machine.library ieee;use i.pdf
Reporte vhd10
Vhdl lab manual

Similar to Write complete VHDL codes for the following schematic. Solution.pdf (20)

PDF
Programs of VHDL
DOCX
vhdll.docx
PPT
W8_2: Inside the UoS Educational Processor
DOCX
Reporte vhdl9
PDF
VHDL Programs
PPTX
Very high speed HDL Presentation FOR KIET.pptx
ODP
Fpga creating counter with internal clock
DOCX
ME LAB1.docx
PDF
Dsdlab 120528004329-phpapp01
PDF
Digital System Design Lab Report - VHDL ECE
PPTX
Vhdl basic unit-2
PPTX
Building Hierarchy
PDF
VHDL CODE
PDF
Session 02 _rtl_design_with_vhdl 101
PPTX
Synthesis Examples
DOCX
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
PDF
Digital system design lab manual
PDF
VHDL Coding Syntax
PPT
dokumen.tips_vhdl-0-introduction-to-vhdl.ppt
Programs of VHDL
vhdll.docx
W8_2: Inside the UoS Educational Processor
Reporte vhdl9
VHDL Programs
Very high speed HDL Presentation FOR KIET.pptx
Fpga creating counter with internal clock
ME LAB1.docx
Dsdlab 120528004329-phpapp01
Digital System Design Lab Report - VHDL ECE
Vhdl basic unit-2
Building Hierarchy
VHDL CODE
Session 02 _rtl_design_with_vhdl 101
Synthesis Examples
Prilimanary Concepts of VHDL by Dr.R.Prakash Rao
Digital system design lab manual
VHDL Coding Syntax
dokumen.tips_vhdl-0-introduction-to-vhdl.ppt
Ad

More from arjuncollection (20)

PDF
In the negative feedback control system of the papillary light refle.pdf
PDF
images of a Hindu deity such as Shiva, Vishnu, Kali, Ganesh, or any .pdf
PDF
Identify each of the enzymes involved in DNA replication and whether.pdf
PDF
How and what do sea stars eatSolutionSea Star eat clams, oyste.pdf
PDF
Estimate the time needed for the Point in Polyhedron test for a poly.pdf
PDF
Discuss the binary representation of Char strings. What makes th.pdf
PDF
Describe a possible difference in the DNA content of chromosome 1.pdf
PDF
Consider the following function. Find the inverse function State the.pdf
PDF
Compare and contrast the ideas that led to the Bohr model of the ato.pdf
PDF
Blackboard Learn Realtor Rite Aid Citizens Bank peoples CPOBIE UI.pdf
PDF
According to the Shannon-Hartley theorem, the capacity of a communic.pdf
PDF
A fellow student, one that is not as careful as you, finds the follow.pdf
PDF
2. There are special proteins (called transporters) that are able to.pdf
PDF
A bacterium that has flagella arranged as a tuft at one end of the b.pdf
PDF
11. Recessive epistasis is described by all of the following EXCEPT.pdf
PDF
Why do carrier-mediated processes become saturated (choose the best .pdf
PDF
Why is it that linked lists are better when it comes to needing freq.pdf
PDF
Which of the following isare characteristic of the parasympathetic .pdf
PDF
What statistic is often interpreted as providing an estimate of the .pdf
PDF
The waiting time X until delivery of a new component for an indus.pdf
In the negative feedback control system of the papillary light refle.pdf
images of a Hindu deity such as Shiva, Vishnu, Kali, Ganesh, or any .pdf
Identify each of the enzymes involved in DNA replication and whether.pdf
How and what do sea stars eatSolutionSea Star eat clams, oyste.pdf
Estimate the time needed for the Point in Polyhedron test for a poly.pdf
Discuss the binary representation of Char strings. What makes th.pdf
Describe a possible difference in the DNA content of chromosome 1.pdf
Consider the following function. Find the inverse function State the.pdf
Compare and contrast the ideas that led to the Bohr model of the ato.pdf
Blackboard Learn Realtor Rite Aid Citizens Bank peoples CPOBIE UI.pdf
According to the Shannon-Hartley theorem, the capacity of a communic.pdf
A fellow student, one that is not as careful as you, finds the follow.pdf
2. There are special proteins (called transporters) that are able to.pdf
A bacterium that has flagella arranged as a tuft at one end of the b.pdf
11. Recessive epistasis is described by all of the following EXCEPT.pdf
Why do carrier-mediated processes become saturated (choose the best .pdf
Why is it that linked lists are better when it comes to needing freq.pdf
Which of the following isare characteristic of the parasympathetic .pdf
What statistic is often interpreted as providing an estimate of the .pdf
The waiting time X until delivery of a new component for an indus.pdf
Ad

Recently uploaded (20)

PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Lesson notes of climatology university.
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Cell Types and Its function , kingdom of life
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
01-Introduction-to-Information-Management.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Presentation on HIE in infants and its manifestations
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Microbial diseases, their pathogenesis and prophylaxis
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
STATICS OF THE RIGID BODIES Hibbelers.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Cell Structure & Organelles in detailed.
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Computing-Curriculum for Schools in Ghana
Module 4: Burden of Disease Tutorial Slides S2 2025
Abdominal Access Techniques with Prof. Dr. R K Mishra
Final Presentation General Medicine 03-08-2024.pptx
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Lesson notes of climatology university.
Supply Chain Operations Speaking Notes -ICLT Program
Cell Types and Its function , kingdom of life
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
01-Introduction-to-Information-Management.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Presentation on HIE in infants and its manifestations
Microbial disease of the cardiovascular and lymphatic systems
Microbial diseases, their pathogenesis and prophylaxis

Write complete VHDL codes for the following schematic. Solution.pdf

  • 1. Write complete VHDL codes for the following schematic. Solution for shift reg: library IEEE; use IEEE.STD_LOGIC_1164.ALL; -- Uncomment the following library declaration if using -- arithmetic functions with Signed or Unsigned values --use IEEE.NUMERIC_STD.ALL; -- Uncomment the following library declaration if instantiating -- any Xilinx primitives in this code. --library UNISIM; --use UNISIM.VComponents.all; entity pipo is Port ( ClrN,load,clk : in STD_LOGIC; D3,D2,D1,D0 : in STD_LOGIC; Q3,Q2,Q1,Q0 : out STD_LOGIC); end pipo; architecture Behavioral of pipo is component D_ff is Port ( clock,ClrN : in STD_LOGIC; D : in STD_LOGIC; Q : out STD_LOGIC); end component; signal clock:STD_LOGIC; begin clock<= load and clk; u3:D_Ff port map(clock,ClrN,D3,Q3); u2:D_Ff port map(clock,ClrN,D2,Q2); u1:D_Ff port map(clock,ClrN,D1,Q1); U0:D_Ff port map(clock,ClrN,D0,Q0); end Behavioral; for D-Flipflop: entity D_FF is Port ( clock,ClrN : in STD_LOGIC;
  • 2. D : in STD_LOGIC; Q : out STD_LOGIC); end D_FF; architecture Behavioral of D_FF is begin process(clk,ClrN) begin if(ClrN = '0') then if(falling_edge(clk)) then Q <= D; end if; else Q <= '0'; end if; end process; end Behavioral;