Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Decodificador BCD para display de 7 segmentos
- -- Autores: João Vitor e Marcos Meira
- -- Portas:
- -- bcd - Vetor de Entrada com 4 posições, ligadas aos switches do devkit
- -- HEX0 - Vetor de Saída com 7 posições, relacionadas aos segmentos do display
- library IEEE;
- use ieee.std_logic_1164.all;
- entity decod_with_select is
- port (bcd: in std_logic_vector (3 downto 0);
- HEX0: out std_logic_vector (0 to 6));
- end decod_with_select;
- architecture dataflow of decod_with_select is
- begin
- with bcd select
- HEX0 <= NOT "1111110" when "0000",
- NOT "0110000" when "0001",
- NOT "1101101" when "0010",
- NOT "1111001" when "0011",
- NOT "0110011" when "0100",
- NOT "1011011" when "0101",
- NOT "1011111" when "0110",
- NOT "1110000" when "0111",
- NOT "1111111" when "1000",
- NOT "1110011" when "1001",
- NOT "0000001" when others;
- end dataflow;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement