Error in VHDL

OP (Company: none) #3311484
1
library ieee;
2
    use ieee.std_logic_1164.all;
3
    entity enc_ent is
4
        port(enable:in std_logic;
5
            d:in std_logic_vector(7 downto 0);
6
            y:out std_logic_vector(2 downto 0)
7
            );
8
            
9
        architecture enc_arc of enc_ent is
10
             begin
11
             process(enable,d)
12
             begin
13
            if(enable='1') then
14
            case d is
15
            when "00000001"=> y<="000";
16
            when "00000010"=> y<="001";
17
            when "00000100"=> y<="010";
18
            when "00001000"=> y<="011";
19
            when "00010000"=> y<="100";
20
            when "00100000"=> y<="101";
21
            when "01000000"=> y<="110";
22
            when others=> y<="111";
23
            end case;
24
                else 
25
                y<="UUU";
26
            end if;
27
            end process;
28
     end enc_arc;

this is my code

but i get this error message.

encoder.vhd(9): near "architecture": expecting: END


can u tell what is the problem?

Reply

A question of your own? This thread is over 13 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

Formatting
  • [c]C-Code[/c]
  • [vhdl]VHDL-Code[/vhdl]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.