Solve the following question(s) in the Questions section of your next report. 1. a) Use the full adder vhd made in lab 5 and the xogate.vhd defined below as components to design a 4-bit adder/ subtractor using structural Modeling in VHDL. Name the entity as add subtractor. The entity should have the following ports: (A, B: in atdegis vecter (3 downte 0); M: in atd legis Sout: out atdhegis; s: out atd legis vectex (3 downta 0)); Make sure to write your name as a comment at the beginning of the VHDL file. Include a screenshot of your code. b) Use EDAPlayground and the testbench code provided below to test your code. Include a screenshot of the complete timing diagram generated using EDAPlayground. The testbench should test for the cases 3+2 and 6-1. library jeee; use worki use ieee.std_logic_1164.all; entity 9ata is Bora, b: in statis; y: out stargis) 7 end 89: architecture bebax of xoRGARA is begin y < 95 bi end bebay library IEEE; use IEEE.std_logic_1164.all; entity testbench is -- empty end testbench; architecture tb of testbench is component addok Aukexacter is Dertil in strgisvestor (3 down 0); M: in stis Sout: out storais Si out stadsgivestor (3 downta 0)); end component; signal in sout: stdtraiskestak(³ downta 0); signat Gout: staraisi constant period time := 10 ns; begin DUT: addentracter port weblada Bda Kata Soutout); SRR process begin --3+2 <= "0011"; <= "0010"; M₁ <= '0'; wait for period; 6-1 < "0110"; <= "0001"; Mt <='1'; wait for period; wait for period; --Wait indefinitely. wait; end process; end;
Solve the following question(s) in the Questions section of your next report. 1. a) Use the full adder vhd made in lab 5 and the xogate.vhd defined below as components to design a 4-bit adder/ subtractor using structural Modeling in VHDL. Name the entity as add subtractor. The entity should have the following ports: (A, B: in atdegis vecter (3 downte 0); M: in atd legis Sout: out atdhegis; s: out atd legis vectex (3 downta 0)); Make sure to write your name as a comment at the beginning of the VHDL file. Include a screenshot of your code. b) Use EDAPlayground and the testbench code provided below to test your code. Include a screenshot of the complete timing diagram generated using EDAPlayground. The testbench should test for the cases 3+2 and 6-1. library jeee; use worki use ieee.std_logic_1164.all; entity 9ata is Bora, b: in statis; y: out stargis) 7 end 89: architecture bebax of xoRGARA is begin y < 95 bi end bebay library IEEE; use IEEE.std_logic_1164.all; entity testbench is -- empty end testbench; architecture tb of testbench is component addok Aukexacter is Dertil in strgisvestor (3 down 0); M: in stis Sout: out storais Si out stadsgivestor (3 downta 0)); end component; signal in sout: stdtraiskestak(³ downta 0); signat Gout: staraisi constant period time := 10 ns; begin DUT: addentracter port weblada Bda Kata Soutout); SRR process begin --3+2 <= "0011"; <= "0010"; M₁ <= '0'; wait for period; 6-1 < "0110"; <= "0001"; Mt <='1'; wait for period; wait for period; --Wait indefinitely. wait; end process; end;
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Please solve
![Questions:
Solve the following question(s) in the Questions section of your next report.
1. a) Use the fuladder.vhd made in lab 5 and the xorgate.vhd defined below as components
to design a 4-bit adder/ subtractor using structural Modeling in VHDL. Name the entity as
add subtractor. The entity should have the following ports:
(A, B: in stdadegis.vestes (3 dewate 0) ; M: in stddegis:
Seut: out stddegis; s: out stdadegisvester (3 dewnte 0));
Make sure to write your name as a comment at the beginning of the VHDL file. Include a
screenshot of your code.
b) Use EDAPlayground and the testbench code provided below to test your code. Include a
screenshot of the complete timing diagram generated using EDAPlayground The testbench
should test for the cases 3+2 and 6-1.
library jeee:
use sorkall;
use ieee.std_logic_1164.all;
entity xorgata is
Bertla, b: in stdJogis; y: out stadogÄR) ;
end xegARR
architecture bebax of xogatA is
begin
end bebay
--
library IEEE;
use IEEE.std_logic_1164.all;
entity testbench is
-- empty
end testbench;
architecture tb of testbench is
component adderktKAster is
porth
R: in stddogifavester (3 dovatR 0); M: in stalagis;
Geut: out stddogis; S out stdlogifanecter (3 dovatR O) );
end component;
signal ain, Bda, sout: stdaiaeSEAK3 desaER 0);
constant perigdi time := 10 ns;
begin
DUT: adderAuktraster port maplain, in, Min,
StiMARARA: process begin
3+2
da = "0011";
biA <= "0010";
VdA = '0';
wait for period;
6-1
--
da = "0110";
bdA = "0001";
VdA <='1';
wait for period;
wait for period;
-- Wait indefinitely.
wait;
end process;
end;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Ff9746b73-67eb-4a56-9627-7cc6c0c55872%2F65d0cbbd-4c0b-46c7-8883-87c5220dc8c4%2Fstofn7_processed.png&w=3840&q=75)
Transcribed Image Text:Questions:
Solve the following question(s) in the Questions section of your next report.
1. a) Use the fuladder.vhd made in lab 5 and the xorgate.vhd defined below as components
to design a 4-bit adder/ subtractor using structural Modeling in VHDL. Name the entity as
add subtractor. The entity should have the following ports:
(A, B: in stdadegis.vestes (3 dewate 0) ; M: in stddegis:
Seut: out stddegis; s: out stdadegisvester (3 dewnte 0));
Make sure to write your name as a comment at the beginning of the VHDL file. Include a
screenshot of your code.
b) Use EDAPlayground and the testbench code provided below to test your code. Include a
screenshot of the complete timing diagram generated using EDAPlayground The testbench
should test for the cases 3+2 and 6-1.
library jeee:
use sorkall;
use ieee.std_logic_1164.all;
entity xorgata is
Bertla, b: in stdJogis; y: out stadogÄR) ;
end xegARR
architecture bebax of xogatA is
begin
end bebay
--
library IEEE;
use IEEE.std_logic_1164.all;
entity testbench is
-- empty
end testbench;
architecture tb of testbench is
component adderktKAster is
porth
R: in stddogifavester (3 dovatR 0); M: in stalagis;
Geut: out stddogis; S out stdlogifanecter (3 dovatR O) );
end component;
signal ain, Bda, sout: stdaiaeSEAK3 desaER 0);
constant perigdi time := 10 ns;
begin
DUT: adderAuktraster port maplain, in, Min,
StiMARARA: process begin
3+2
da = "0011";
biA <= "0010";
VdA = '0';
wait for period;
6-1
--
da = "0110";
bdA = "0001";
VdA <='1';
wait for period;
wait for period;
-- Wait indefinitely.
wait;
end process;
end;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY