I have the following code
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.all;
entity LUT is
Port ( LUTin : in STD_LOGIC_VECTOR (15 downto 0);
LUTout : out STD_LOGIC_VECTOR (15 downto 0));
end LUT;
architecture Behavioral of LUT is
signal fullout : std_logic_vector(15 downto 0);
signal tophalf : std_logic_vector(7 downto 0);
signal secondnibble, firstnibble : std_logic_vector(3 downto 0); --break the LSH into 2 nibbles
begin
tophalf(7 downto 0) <= LUTin(15 downto 8);
secondnibble(3 downto 0) <= LUTin(7 downto 4);
firstnibble(3 downto 0) <= LUTin(3 downto 0);
fullout(15 downto 8) <= tophalf(7 downto 0);
--fullout(7 downto 4) <= "0001";
fullout(3 downto 0) <= firstnibble(3 downto 0);
p1: process
begin
case secondnibble is
when "0000" => --0 Sbox1
fullout(7 downto 4) <= "0001";
when others =>
end case;
end process;
end Behavioral;
I can comment the case statement out from p1:process to the end process and comment in the fullout(7 downto 4) <= "0001"; and it will put 0001 in the 7 to 4 bits in fullout. what I want to do is to give it 0001 when LUTin(7 downto 4) <= "0000";. so I need to put the case statement and the p1:process as it is above. but this means the fullout(7 downto 4) is left as 'U'. How does it work when its not in the case statement and left as U in the case statement? I will be doing the same for the full range of secondnibble. this is just a slimmed down case statement so I can figure out how to do it