Build a Top Schematic to Test on the Basys 3 Board As with o
Solution
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 myALU_top is
Port ( SW : in STD_LOGIC_VECTOR (15 downto 0);
LED : out STD_LOGIC_VECTOR (15 downto 0));
end myALU_top;
architecture Behavioral of myALU_top is
component myALU
port(A,B: in STD_LOGIC_VECTOR (3 downto 0);
Operand: in STD_LOGIC_VECTOR (1 downto 0);
Zero,Overflow,Negative,Carryout:out STD_LOGIC;
Dataout:out STD_LOGIC_VECTOR (3 downto 0));
end component;
begin
U1:myALU port map(
A => SW(15 downto 12),
B => SW(11 downto 8),
Operand => SW(2 downto 0),
Zero => LED(7),
Overflow => LED(6),
Negative => LED(5),
Carryout => LED(4),
Dataout => LED(3 downto 0));
LED(15 downto 12)<=SW(15 downto 12);
LED(11 downto 8)<=SW(11 downto 8);
end Behavioral;
