74x138 Using when – else statement in data flow
model
library IEEE;
use IEEE.std_logic_1164.all;
entity dec74x138 is
port ( G1, G2A_L, G2B_L : in STD_LOGIC;
A, B, C : in STD_LOGIC;
Y0_L, Y1_L, Y2_L, Y3_L, Y4_L, Y5_L,
Y6_L, Y7_L: out STD_LOGIC);
end dec74x138;
architecture arch2 of dec74x138 is
begin
Y0_L <= ‘0’
when G1 & G2A_L & G2B_L & A & B & C = “100000” else
‘1’;
Y1_L
<= ‘0’ when G1 & G2A_L & G2B_L & A & B & C = “100001” else
‘1’;
Y2_L <= ‘0’ when G1
& G2A_L & G2B_L & A & B & C = “100010” else
‘1’;
Y3_L <= ‘0’ when G1 & G2A_L
& G2B_L & A & B & C = “100011” else
‘1’;
Y4_L <= ‘0’
when G1 & G2A_L & G2B_L & A & B & C = “100100” else
‘1’;
Y5_L
<= ‘0’ when G1 & G2A_L & G2B_L & A & B & C = “100101” else
‘1’;
Y6_L <= ‘0’ when G1
& G2A_L & G2B_L & A & B & C = “100110” else
‘1’;
Y7_L <= ‘0’ when G1 & G2A_L
& G2B_L & A & B & C = “100111” else
‘1’;
end arch2;
No comments:
Post a Comment