EmbDev.net

Forum: FPGA, VHDL & Verilog Error in VHDL


von vhdl n. (Company: none) (pranoy)


Rate this post
useful
not useful
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?

von Klappskalli (Guest)


Rate this post
useful
not useful
end of entity is missing

von vhdl n. (Company: none) (pranoy)


Rate this post
useful
not useful
thanks

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.