Decimal to BCD Encoder in VHDL

Decimal to BCD Encoder in VHDL

Decimal to BCD Encoder

library ieee;
use ieee.std_logic_1164.all;
 entity ENCOD10_4 is
  port( D0 : in std_logic;
       D1 : in std_logic;
       D2 : in std_logic;
       D3 : in std_logic;
       D4 : in std_logic;
       D5 : in std_logic;
       D6 : in std_logic;
       D7 : in std_logic;
       D8 : in std_logic;
       D9 : in std_logic;
       A0 : out std_logic;
       A1 : out std_logic;
       A2 : out std_logic;
       A3 : out std_logic);
 end entity ENCOD10_4;
architecture ENCOD_10_4 of ENCOD10_4 is
  begin
   A0<= D1 OR D3 OR D5 OR D7 OR D9;
   A1<= D2 OR D3 OR D6 OR D7;
   A2<= D4 OR D5 OR D6 OR D7;
   A3<= D8 OR D9;
end architecture ENCOD_10_4;