Question: You will implement your ALU in behavioral VHDL using the Quartus II software. This file is what you will then use later in the semester

You will implement your ALU in behavioral VHDL using the Quartus II software. This file is what you will then use later in the semester when you need an ALU for your processor. You should create one VHDL (alu32.vhd) that has exactly the same format as follows. library ieee; use IEEE.STD_LOGIC_1164.all; use IEEE.std_logic_misc.all; use IEEE.std_logic_arith.all; entity alu32 is port( a, b : in STD_LOGIC_VECTOR(31 downto 0); ALUControl : in STD_LOGIC_VECTOR(1 downto 0); Result : buffer STD_LOGIC_VECTOR(31 downto 0); ALUFlags : out STD_LOGIC_VECTOR(3 downto 0) ); end alu32; You need to finish the following architecture of the above entity. Please finish the following lines with ???. Read the comments and add the missing operations. architecture behavioral of alu32 is signal condinvb: STD_LOGIC_VECTOR(31 downto 0); signal sum: STD_LOGIC_VECTOR(32 downto 0); signal neg, zero, carry, overflow: STD_LOGIC; begin begin condinvb <= not b when (ALUControl(0) = '1') else b; sum <= unsigned('0' & a) + unsigned('0' & condinvb) + ALUControl(0); process(a, b, sum, ALUControl) case ALUControl(1 downto 0) is when "00" => Result <= sum(31 downto 0); when "01" => Result <= sum(31 downto 0); when "10" => result <= a and b; -- Logic or ??? when others => result <= (others => '-'); end case; end process; neg <= ????; zero <= '1' when (Result = x"00000000") else '0'; carry <= ????; overflow <= ????; ALUFlags <= (neg, zero, carry, overflow); end;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!