p1 ED
p1 ED
use IEEE.STD_LOGIC_1164.ALL;
entity hex_7seg is
end hex_7seg;
begin
A<= a & b & c & d & dp;
with A select
segmentos<= "00000011" when "0000" --0--
"10011111" when "0001" --1--
"00100101" when "0010" --2--
"00001101" when "0011" --3--
"10011001" when "0100" --4--
"01001001" when "0101" --5--
"01000001" when "0110" --6--
"00011111" when "0111" --7--
"00000001" when "1000" --8--
"00011001" when "1001" --9--
"00010001" when "1010" --A--
"11000001" when "1011" --B--
"11100101" when "1100" --C--
"10000101" when "1101" --D--
"01100001" when "1110" --E--
"01110001" when "1111" --F--
"11111110" when others;
-- a completar
end Behavioral;
P2
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity deco1_4 is
end deco1_4;
begin
with I select
O<= "1110" when "00" AND E='1';
"1101" when "01" AND E='1';
"1011" when "10" AND E='1';
"0111" when "11" AND E='1';
"1111" when others;
-- a completar
end Behavioral;
EP3
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity quadMux4x4 is
with S select
end quadMux4x4;
-- a completar
end Behavioral;