ARCHITECTURE rtl OF dx200decoder_8_32_a29 IS SIGNAL temp_datain : STD_LOGIC_VECTOR ( 7 DOWNTO 0 ) ; BEGIN temp_datain <= B1 & B2 & B3 & B4 & B5 & B6 & B7 ; PROCESS ( B1,B2,B3,B4,B5,B6,B7,B8,G1N,G2N ) BEGIN IF ( G1N = '0' AND G2N ='0') THEN -- 译码器的选通信号低电平有效 -- 采用CASE语句描述8-32译码电路 CASE temp_datain IS -- CASE语句的条件表达式是位矢量 temp_datain WHEN "00000000" => q <= "00000000000000000000000000000000" ; WHEN "00000001" => q <= "00000000000000000000000000000001" ; WHEN "00000010" => q <= "00000000000000000000000000000011" ; WHEN "00000011" => q <= "00000000000000000000000000000111" ; WHEN "00000100" => q <= "00000000000000000000000000001111" ; WHEN "00000101" => q <= "00000000000000000000000000011111" ; WHEN "00000110" => q <= "00000000000000000000000000111111" ; WHEN "00000111" => q <= "00000000000000000000000001111111" ; WHEN "00001000" => q <= "00000000000000000000000011111111" ; WHEN "00001001" => q <= "00000000000000000000000111111111" ; WHEN "00001010" => q <= "00000000000000000000001111111111" ; WHEN "00001011" => q <= "00000000000000000000011111111111" ; WHEN "00001100" => q <= "00000000000000000000111111111111" ; WHEN "00001101" => q <= "00000000000000000001111111111111" ; WHEN "00001110" => q <= "00000000000000000011111111111111" ; WHEN "00001111" => q <= "00000000000000000111111111111111" ; WHEN "00010000" => q <= "00000000000000001111111111111111" ; WHEN "00010001" => q <= "00000000000000011111111111111111" ; WHEN "00010010" => q <= "00000000000000111111111111111111" ; WHEN "00010011" => q <= "00000000000001111111111111111111" ; WHEN "00010100" => q <= "00000000000011111111111111111111" ; WHEN "00010101" => q <= "00000000000111111111111111111111" ; WHEN "00010110" => q <= "00000000001111111111111111111111" ; WHEN "00010111" => q <= "00000000011111111111111111111111" ; WHEN "00011000" => q <= "00000000111111111111111111111111" ; WHEN "00011001" => q <= "00000001111111111111111111111111" ; WHEN "00011010" => q <= "00000011111111111111111111111111" ; WHEN "00011011" => q <= "00000111111111111111111111111111" ; WHEN "00011100" => q <= "00001111111111111111111111111111" ; WHEN "00011101" => q <= "00011111111111111111111111111111" ; WHEN "00011110" => q <= "00111111111111111111111111111111" ; WHEN "00011111" => q <= "01111111111111111111111111111111" ; WHEN "00100000" => q <= "11111111111111111111111111111111" ;--32 WHEN "00100001" => q <= "11111111111111111111111111111111" ;-->32=1 WHEN "00100010" => q <= "11111111111111111111111111111111" ; WHEN "00100011" => q <= "11111111111111111111111111111111" ; WHEN "00100100" => q <= "11111111111111111111111111111111" ; WHEN "00100101" => q <= "11111111111111111111111111111111" ; WHEN "00100110" => q <= "11111111111111111111111111111111" ; WHEN "00100111" => q <= "11111111111111111111111111111111" ; WHEN "00101000" => q <= "11111111111111111111111111111111" ; WHEN "00101001" => q <= "11111111111111111111111111111111" ; WHEN "00101010" => q <= "11111111111111111111111111111111" ; WHEN "00101011" => q <= "11111111111111111111111111111111" ; WHEN "00101100" => q <= "11111111111111111111111111111111" ; WHEN "00101101" => q <= "11111111111111111111111111111111" ; WHEN "00101110" => q <= "11111111111111111111111111111111" ; WHEN "00101111" => q <= "11111111111111111111111111111111" ; WHEN "00110000" => q <= "11111111111111111111111111111111" ; WHEN "00110001" => q <= "11111111111111111111111111111111" ; WHEN "00110010" => q <= "11111111111111111111111111111111" ; WHEN "00110011" => q <= "11111111111111111111111111111111" ; WHEN "00110100" => q <= "11111111111111111111111111111111" ; WHEN "00110101" => q <= "11111111111111111111111111111111" ; WHEN "00110110" => q <= "11111111111111111111111111111111" ; WHEN "00110111" => q <= "11111111111111111111111111111111" ; WHEN "00111000" => q <= "11111111111111111111111111111111" ; WHEN "00111001" => q <= "11111111111111111111111111111111" ; WHEN "00111010" => q <= "11111111111111111111111111111111" ; WHEN "00111011" => q <= "11111111111111111111111111111111" ; WHEN "00111100" => q <= "11111111111111111111111111111111" ; WHEN "00111101" => q <= "11111111111111111111111111111111" ; WHEN "00111110" => q <= "11111111111111111111111111111111" ; WHEN "00111111" => q <= "11111111111111111111111111111111" ; WHEN "01000000" => q <= "11111111111111111111111111111111" ;
END CASE ; ELSE q <= "00000000000000000000000000000000" ; END IF ; END PROCESS ; END ARCHITECTURE rtl ;
|