SlideShare a Scribd company logo
1 of 2
Download to read offline
Based on the following schematic with 3 D flip-flops, Write complete VHDL codes with clock
as input, and A, B, C are outputs
Solution
entity count is
Port ( Clock : in STD_LOGIC;
A,B,C : inout STD_LOGIC);
end count;
architecture Behavioral of count is
component DFF
Port ( Clock : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC);
end component;
signal DA,DB,DC:STD_LOGIC;
begin
DA<=(A xor '1');
DB<=(A xor B);
DC<=(A and B)xor C;
uA: DFF(Clock,DA,A);
uB: DFF(Clock,DB,B);
uC: DFF(Clock,DC,C);
end Behavioral;
//code for D Fliflop
entity DFF is
Port ( Clock : in STD_LOGIC;
D : in STD_LOGIC;
Q : out STD_LOGIC);
end DFF;
architecture Behavioral of DFF is
begin
process(clk,D)
begin
if(rising_edge(clk)) then
Q <= D;
end if;
end process;
end Behavioral;

More Related Content

More from dbrienmhompsonkath75

Please provide a detailed answer Explain the purpose and function of.pdf
Please provide a detailed answer Explain the purpose and function of.pdfPlease provide a detailed answer Explain the purpose and function of.pdf
Please provide a detailed answer Explain the purpose and function of.pdf
dbrienmhompsonkath75
 
State the prognosis for a person with stage one and stage IV Hodg.pdf
State the prognosis for a person with stage one and stage IV Hodg.pdfState the prognosis for a person with stage one and stage IV Hodg.pdf
State the prognosis for a person with stage one and stage IV Hodg.pdf
dbrienmhompsonkath75
 
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdf
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdfSally was making marinated shish-kabobs to grill for dinner. She mad.pdf
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdf
dbrienmhompsonkath75
 

More from dbrienmhompsonkath75 (20)

You are installing a KVM switch for a small business customer so tha.pdf
You are installing a KVM switch for a small business customer so tha.pdfYou are installing a KVM switch for a small business customer so tha.pdf
You are installing a KVM switch for a small business customer so tha.pdf
 
Why is metabolism important for physiological processesSolution.pdf
Why is metabolism important for physiological processesSolution.pdfWhy is metabolism important for physiological processesSolution.pdf
Why is metabolism important for physiological processesSolution.pdf
 
Which macromolecule is primarily responsible for producing the pheno.pdf
Which macromolecule is primarily responsible for producing the pheno.pdfWhich macromolecule is primarily responsible for producing the pheno.pdf
Which macromolecule is primarily responsible for producing the pheno.pdf
 
which invertebrate phylum is considered the most evolutionarily succe.pdf
which invertebrate phylum is considered the most evolutionarily succe.pdfwhich invertebrate phylum is considered the most evolutionarily succe.pdf
which invertebrate phylum is considered the most evolutionarily succe.pdf
 
What suggestions would you offer to parents and teachers who want to.pdf
What suggestions would you offer to parents and teachers who want to.pdfWhat suggestions would you offer to parents and teachers who want to.pdf
What suggestions would you offer to parents and teachers who want to.pdf
 
What is the F2 generation when the F1 generation of +++y cv f is cr.pdf
What is the F2 generation when the F1 generation of +++y cv f is cr.pdfWhat is the F2 generation when the F1 generation of +++y cv f is cr.pdf
What is the F2 generation when the F1 generation of +++y cv f is cr.pdf
 
What features on the plasmid allows it to replicate independent o.pdf
What features on the plasmid allows it to replicate independent o.pdfWhat features on the plasmid allows it to replicate independent o.pdf
What features on the plasmid allows it to replicate independent o.pdf
 
What are the use of Fibonacci numbers or the Golden Ratio in nature,.pdf
What are the use of Fibonacci numbers or the Golden Ratio in nature,.pdfWhat are the use of Fibonacci numbers or the Golden Ratio in nature,.pdf
What are the use of Fibonacci numbers or the Golden Ratio in nature,.pdf
 
Although O_2 does not participate directly in the reactions of the TC.pdf
Although O_2 does not participate directly in the reactions of the TC.pdfAlthough O_2 does not participate directly in the reactions of the TC.pdf
Although O_2 does not participate directly in the reactions of the TC.pdf
 
8. Which of the following is NOT a transcriptionally repressed genom.pdf
8. Which of the following is NOT a transcriptionally repressed genom.pdf8. Which of the following is NOT a transcriptionally repressed genom.pdf
8. Which of the following is NOT a transcriptionally repressed genom.pdf
 
49. Autonomic nervous system function is influenced by A) cerebral co.pdf
49. Autonomic nervous system function is influenced by A) cerebral co.pdf49. Autonomic nervous system function is influenced by A) cerebral co.pdf
49. Autonomic nervous system function is influenced by A) cerebral co.pdf
 
Think about the structure of a root tip. In which region would you e.pdf
Think about the structure of a root tip. In which region would you e.pdfThink about the structure of a root tip. In which region would you e.pdf
Think about the structure of a root tip. In which region would you e.pdf
 
The systemic circuit delivers oxygenated blood to _ and rectums blood.pdf
The systemic circuit delivers oxygenated blood to _ and rectums blood.pdfThe systemic circuit delivers oxygenated blood to _ and rectums blood.pdf
The systemic circuit delivers oxygenated blood to _ and rectums blood.pdf
 
Please provide a detailed answer Explain the purpose and function of.pdf
Please provide a detailed answer Explain the purpose and function of.pdfPlease provide a detailed answer Explain the purpose and function of.pdf
Please provide a detailed answer Explain the purpose and function of.pdf
 
(5)Determine the location of the poles of the function 1cos(z). Calc.pdf
(5)Determine the location of the poles of the function 1cos(z). Calc.pdf(5)Determine the location of the poles of the function 1cos(z). Calc.pdf
(5)Determine the location of the poles of the function 1cos(z). Calc.pdf
 
Problem 4S-15 Planetary Communications, Inc., intends to launch a sat.pdf
Problem 4S-15 Planetary Communications, Inc., intends to launch a sat.pdfProblem 4S-15 Planetary Communications, Inc., intends to launch a sat.pdf
Problem 4S-15 Planetary Communications, Inc., intends to launch a sat.pdf
 
State the prognosis for a person with stage one and stage IV Hodg.pdf
State the prognosis for a person with stage one and stage IV Hodg.pdfState the prognosis for a person with stage one and stage IV Hodg.pdf
State the prognosis for a person with stage one and stage IV Hodg.pdf
 
So its sample or population So its sample or population .pdf
So its sample or population So its sample or population .pdfSo its sample or population So its sample or population .pdf
So its sample or population So its sample or population .pdf
 
Savannah baboons are the only nocturnal monkeys. are extremely soli.pdf
Savannah baboons  are the only nocturnal monkeys.  are extremely soli.pdfSavannah baboons  are the only nocturnal monkeys.  are extremely soli.pdf
Savannah baboons are the only nocturnal monkeys. are extremely soli.pdf
 
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdf
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdfSally was making marinated shish-kabobs to grill for dinner. She mad.pdf
Sally was making marinated shish-kabobs to grill for dinner. She mad.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 

Based on the following schematic with 3 D flip-flops, Write complete .pdf

  • 1. Based on the following schematic with 3 D flip-flops, Write complete VHDL codes with clock as input, and A, B, C are outputs Solution entity count is Port ( Clock : in STD_LOGIC; A,B,C : inout STD_LOGIC); end count; architecture Behavioral of count is component DFF Port ( Clock : in STD_LOGIC; D : in STD_LOGIC; Q : out STD_LOGIC); end component; signal DA,DB,DC:STD_LOGIC; begin DA<=(A xor '1'); DB<=(A xor B); DC<=(A and B)xor C; uA: DFF(Clock,DA,A); uB: DFF(Clock,DB,B); uC: DFF(Clock,DC,C); end Behavioral; //code for D Fliflop entity DFF is Port ( Clock : in STD_LOGIC; D : in STD_LOGIC; Q : out STD_LOGIC); end DFF; architecture Behavioral of DFF is begin process(clk,D) begin if(rising_edge(clk)) then Q <= D;