library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity Decoder is
port (
Coder_In:in std_logic_vector(4 downto 0);
Code_out:out std_logic_vector(31 downto 0)
);
end;
architecture behavioral of Decoder is
begin
process (Coder_In)
begin
case Coder_In is
WHEN "00000" =>Code_out<="11111111111111111111111111111110";
WHEN "00001" =>Code_out<="11111111111111111111111111111101";
WHEN "00010" =>Code_out<="11111111111111111111111111111011";
WHEN "00011" =>Code_out<="11111111111111111111111111110111";
WHEN "00100" =>Code_out<="11111111111111111111111111101111";
WHEN "00101" =>Code_out<="11111111111111111111111111011111";
WHEN "00110" =>Code_out<="11111111111111111111111110111111";
WHEN "00111" =>Code_out<="11111111111111111111111101111111";
WHEN "01000" =>Code_out<="11111111111111111111111011111111";
WHEN "01001" =>Code_out<="11111111111111111111110111111111";
WHEN "01010" =>Code_out<="11111111111111111111101111111111";
WHEN "01011" =>Code_out<="11111111111111111111011111111111";
WHEN "01100" =>Code_out<="11111111111111111110111111111111";
WHEN "01101" =>Code_out<="11111111111111111101111111111111";
WHEN "01110" =>Code_out<="11111111111111111011111111111111";
WHEN "01111" =>Code_out<="11111111111111110111111111111111";
WHEN "10000" =>Code_out<="11111111111111101111111111111111";
WHEN "10001" =>Code_out<="11111111111111011111111111111111";
WHEN "10010" =>Code_out<="11111111111110111111111111111111";
WHEN "10011" =>Code_out<="11111111111101111111111111111111";
WHEN "10100" =>Code_out<="11111111111011111111111111111111";
WHEN "10101" =>Code_out<="11111111110111111111111111111111";
WHEN "10110" =>Code_out<="11111111101111111111111111111111";
WHEN "10111" =>Code_out<="11111111011111111111111111111111";
WHEN "11000" =>Code_out<="11111110111111111111111111111111";
WHEN "11001" =>Code_out<="11111101111111111111111111111111";
WHEN "11010" =>Code_out<="11111011111111111111111111111111";
WHEN "11011" =>Code_out<="11110111111111111111111111111111";
WHEN "11100" =>Code_out<="11101111111111111111111111111111";
WHEN "11101" =>Code_out<="11011111111111111111111111111111";
WHEN "11110" =>Code_out<="10111111111111111111111111111111";
WHEN "11111" =>Code_out<="01111111111111111111111111111111";
WHEN others =>Code_out<="11111111111111111111111111111111";
end case;
end process;
end;
编译后结果是
所有输出端口 stuck at GND ,如
。。。
Warning: Pin "Rev_Sel_22" stuck at GND
。。。
输入无效,如:
。。。
Warning: No output dependent on input pin "Send_Grp_Dr[4]"
其中Rev_Sel_22和Send_Grp_Dr都是接在模块上的输出输入端口,咋回事啊,百思不得其解
。。。 |