You are on page 1of 1

Date: December 15, 2022 Compterendu.

vhd Project: Compterendu

1 library ieee;
2 use ieee.std_logic_1164 .all;
3
4 entity compterendu is
5 port (
6 x : in std_logic_vector (3 downto 0);
7 Y : out std_logic_vector (6 downto 0)
8 );
9 end compterendu ;
10 Architecture bcd of compterendu is
11 begin
12 process (x)
13 begin
14 case x is
15 when "0000" =>Y<="0000001" ;
16 When "0001" =>Y<="1001111" ;
17 when "0010" =>Y<="0010010" ;
18 when "0011" =>Y<="0000110" ;
19 when "0100" =>Y<="1001100" ;
20 when "0101" =>Y<="0100100" ;
21 when "0110" =>Y<="0100000" ;
22 when "0111" =>Y<="0001111" ;
23 when "1000" =>Y<="0000000" ;
24 when "1001" =>Y<="0000100" ;
25 when others =>Y<="1111111" ;
26 end case ;
27 end process;
28 end bcd;
29

Page 1 of 1 Revision: Compterendu

You might also like