Friday, August 24, 2018

74x139 Using when – else statement in data flow model



74x139     Using when – else statement in data flow model


library IEEE;
use IEEE.std_logic_1164.all;
entity dec74x139 is
port (     G_L: in STD_LOGIC;
                                A, B: in STD_LOGIC;
                                Y0_L, Y1_L, Y2_L, Y3_L: out STD_LOGIC);
end dec74x139;
architecture arch2 of dec74x139 is
begin
                Y0_L <= ‘0’ when G_L & A & B = “000” else
                                ‘1’;
                Y1_L <= ‘0’ when G_L & A & B = “001” else
                                ‘1’;
                Y2_L <= ‘0’ when G_L & A & B = “010” else
                                ‘1’;
                Y3_L <= ‘0’ when G_L & A & B = “011” else
                                ‘1’;
end arch2;


No comments:

Post a Comment