- Joined
- Mar 26, 2007
- Messages
- 1
- Reaction score
- 0
I am trying to design a 3 to 8 decoder and while compiling I am getting error
Expecting Identifier.
Can Anyone tell from following code what is the problem?
library ieee;
use ieee.std_logic_1164.all;
entity 3X8decoder is
port (s : in bit_vector(2 downto 0);
d : out bit_vector(7 downto 0));
end 3X8decoder ;
architecture decoder_behav of 3X8decoder is
begin
process (s)
begin
case (s) is
when "000" =>
d <= "00000001";
when "001" =>
d <= "00000010";
when "010" =>
d <= "00000100";
when "011" =>
d <= "00001000";
when "100" =>
d <= "00010000";
when "101" =>
d <= "00100000";
when "110" =>
d <= "01000000";
when "111" =>
d <= "10000000";
end case;
end process;
end decoder_behav;
Expecting Identifier.
Can Anyone tell from following code what is the problem?
library ieee;
use ieee.std_logic_1164.all;
entity 3X8decoder is
port (s : in bit_vector(2 downto 0);
d : out bit_vector(7 downto 0));
end 3X8decoder ;
architecture decoder_behav of 3X8decoder is
begin
process (s)
begin
case (s) is
when "000" =>
d <= "00000001";
when "001" =>
d <= "00000010";
when "010" =>
d <= "00000100";
when "011" =>
d <= "00001000";
when "100" =>
d <= "00010000";
when "101" =>
d <= "00100000";
when "110" =>
d <= "01000000";
when "111" =>
d <= "10000000";
end case;
end process;
end decoder_behav;