Question

b. Suppose you are provided with a 4-bit ripple carry adder. It has the following entity declaration and schematic representa

0 0
Add a comment Improve this question Transcribed image text
Answer #1

library ieee;
use ieee.std_logic_1164.all;

entity adder_circuit is
   port (   A, B, C, D, E, F   : in std_logic_vector(3 downto 0);
       Cin           : in std_logic;
       CinA, CinB, CinC   : in std_logic;
       Out1, Out2       : out std_logic_vector(3 downto 0)
   );
end adder_circuit;

ARCHITECTURE behavior OF adder_circuit IS

   COMPONENT fourbitFA
       port (   A, B   : in std_logic_vector(3 downto 0);
           Cin   : in std_logic;
           S   : out std_logic_vector(3 downto 0);
           Cout   : out std_logic
       );
   END COMPONENT;

   signal Cout1 : std_logic;
   signal sum2, sum3 : std_logic_vector(3 downto 0);

BEGIN

   UUT0 : fourbitFA port map (A, B, CinA, Out1, Cout1);
   UUT1 : fourbitFA port map (C, D, CinB, sum2, open);
   UUT2 : fourbitFA port map (E, F, CinC, sum3, open);
   Out2 <= sum3 when (Cout1 = '0') else sum2;

END;

Add a comment
Know the answer?
Add Answer to:
b. Suppose you are provided with a 4-bit ripple carry adder. It has the following entity...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 18 (5 points) LIBRARY ece USE ieee.std logic 1164.all ENTITY prob6 21 IS PORT (w...

    Question 18 (5 points) LIBRARY ece USE ieee.std logic 1164.all ENTITY prob6 21 IS PORT (w IN STD LOGIC VECTOR(3 DOWNTO 0) y: OUT STD LOGIC VECTOR(I DOWNTO 0)); END prob6 21 ARCHITECTURE Behavior OF prob6 21 IS BEGIN WITH w SELECT y <= "O0" WHEN "0001" ..01.. WHEN "O010", "10" WHEN 0100" 11" WHEN OTHERS END Behavior What type of circuit does the VHDL code represents? 4-bit shifter a 4-to-2 binary encoder A two bit multiplier None of the...

  • Please Write it in VHDL and complete the following code Create an entity called "regs" where...

    Please Write it in VHDL and complete the following code Create an entity called "regs" where you infer a true dual port (both ports can independently either read or write to any location) memory consisting of 32 16-bit words (64 Bytes). It should have the following black box interface and behavior: entity regs is port clk, en, rst in std_logic; İdl, İd2 : in std logic vector (4 downto 0); __ Addresses wr_enl, wr_ en2 in std logic dinl, din2...

  • QUESTION 1 Complete the following peice of VHDL code with the necessary VHDL statements for a...

    QUESTION 1 Complete the following peice of VHDL code with the necessary VHDL statements for a counter that counts through this sequence(0,9,17,15,4,26) repeatedly. library IEEE use IEEE.STD_LOGIC_1164 ALL entity GCC is Port ( systemClock, reset in STD_LOGIC end GCC architecture Behavioral of GCC is stateOutput out STD LOGIC_ VECTOR (4 downto 0)) component FreqDivider is Port (systemClock in STD_LOGIC; slowClock: out STD LOGIC); end component, signal nextState, presentState: std_logic_vector(5 downto 0) := "00000"; signal slowClock: std_logic begin FD0: FreqDivider port...

  • Question a to d please. QUESTION 3 Datapaths (25 Marks) You are provided with a logic...

    Question a to d please. QUESTION 3 Datapaths (25 Marks) You are provided with a logic circuit that performs the following: if C 1 or X>Y, Out a) otherwise Out-0. You can assume the inputs X, Y and C and the output Out are each 1- bit wires. It has the following symbol and entity declaration 1; X Y C entity greater than is X, Y Out in std logic out std_logic) port Out end greater_than; Draw a schematic that...

  • Problem 2 (15 points) wo components, component A 4 and component B, are declared as follows...

    Problem 2 (15 points) wo components, component A 4 and component B, are declared as follows COMPONENT A IS PORT(clk, rst: IN std logic; END COMPONENT COMPONENT B IS rst m: OUT std_logic vector 1 DOWNTO 0)); PORT(d: IN std logic; END COMPONENT Write a complete VHDL program that implements the circuit shown below. Use good style, especially f: OUT std logic vector(1 DOWNTO 0)): f(0) indenting. (Note that this time, it needs to be a complete program.) y(2) 0

  • Find the propagation delays for a 20 bit ripple carry adder Given the following propagation delays...

    Find the propagation delays for a 20 bit ripple carry adder Given the following propagation delays Component AND Propagation Delay 9 OR 8 XOR 7 And that each full adder is implemented as A x1 A BlX1 B Cin Sum Cinx1(cin Cin x1 Cout Hint Draw out at least a 4-bit ripple carry adder before trying to answer this question.

  • Please fully answer BOTH parts of the question (a) and (b). a) Draw the high level...

    Please fully answer BOTH parts of the question (a) and (b). a) Draw the high level synthesized diagram of the following VHDL code. What does the following circuit do? Write the sequence of output generated by this circuit. library ieee; use ieee.std_logic_1164.all; entity sequence is port ( cout :out std_logic_vector (3 downto 0); clk :in std_logic; reset :in std_logic ); end entity; architecture rtl of sequence is signal count :std_logic_vector (3 downto 0); begin process (clk) begin if (rising_edge(clk)) then...

  • Construct the 8-bit ripple-carry adder/subtractor for signed integers. Negative numbers are in th...

    Construct the 8-bit ripple-carry adder/subtractor for signed integers. Negative numbers are in the 2's complement form. The circuit has inputs X(7:0), Y(7:0), CO, M and outputs S(7:0), carry-out of MSB C8, OFL (OFL 1 when it occurs). The circuit should perform addition and subtraction of 8-bit signed numbers 2. with M-1 and M-0, respectively. a) Obtain the schematic for the 8-bit adder/subtractor with two 4-bit adder/subtractors from problem 1 as building blocks. X, Y, A, B, S can be shown...

  • Write the source code for a 16-bit adder using the ‘+’ operator. Use the following information...

    Write the source code for a 16-bit adder using the ‘+’ operator. Use the following information as a guide: a. Use the names in the Adder Symbol/diagram above to name your block and its ports (all lower-case). For example dataa[15:0] signal name in VHDL would be dataa : in unsiged (15 downto 0); b. All inputs and outputs should be declared as type UNSIGNED vs STD_LOGIC_VECTOR. c. Do not worry about rollover with this adder. This adder is already wide...

  • 8.(5 points).There is an error in following VHDL code. Find the error and correct (only that...

    8.(5 points).There is an error in following VHDL code. Find the error and correct (only that line of code). LIBRARY ieee; USE ieee.std_logic_1164.all; ENTITY dec2to4 IS PORT (i IN STD LOGIC VECTOR (1 DOWNTO 0); : En IN STD_LOGIC; d OUT STD LOGIC); END dec2to4; ARCHITECTURE dataflow OF dec2to4 IS BEGIN SIGNAL Eni: STD_LOGIC_VECTOR(2 DOWNTO 0); Eni <= En & i; -concatenate signals WITH Eni SELECT d <"0001" WHEN "100" "0010" WHEN "101", "0100" WHEN "110", "1000" WHEN "111", 0000"...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT