74X138 Using with – select 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 arch3 of dec74x138 is
begin
with (G1 & G2A_L & G2B_L & A & B & C) select
Y0_L
<= ‘0’ when “100000”,
‘1’ when others;
with (G1 & G2A_L
& G2B_L & A & B & C) select
Y1_L
<= ‘0’ when “100001”,
‘1’ when others;
with (G1 & G2A_L & G2B_L & A & B & C) select
Y2_L
<= ‘0’ when “100010”,
‘1’ when others;
with (G1 & G2A_L & G2B_L & A & B & C) select
Y3_L
<= ‘0’ when “100011”,
‘1’ when others;
with (G1 & G2A_L & G2B_L & A & B & C) select
Y4_L
<= ‘0’ when “100100”,
‘1’ when others;
with (G1 & G2A_L
& G2B_L & A & B & C) select
Y5_L
<= ‘0’ when “100101”,
‘1’ when others;
with (G1 & G2A_L & G2B_L & A & B & C) select
Y6_L
<= ‘0’ when “100110”,
‘1’ when others;
with (G1 & G2A_L & G2B_L & A & B & C) select
Y7_L
<= ‘0’ when “100111”,
‘1’ when others;
end arch3;
No comments:
Post a Comment