encoder : syntax error..help !! urgent exam knocking at the door !! :(
38 views
Skip to first unread message
pratyush
unread,
Apr 9, 2012, 1:29:02 PM4/9/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to modelsim-pe-s...@googlegroups.com
library ieee; use ieee.std_logic_1164.all; use ieee.numeric_std.all;
entity encoder is generic (n:positive); port (a:in std_logic_vector(2**n-1 downto 0); z:out std_logic_vector(n-1 downto 0); v:out std_logic); end entity encoder;
architecture exm1 of encoder is begin prc:process(a) is
v<='0'; z<=(others=>'0'); for k in a'range loop if a(k)='1' then z<=std_logic_vector(to_unsigned (k,n)); v<='1'; exit; end if; end loop; end process prc; end architecture exm1 ;
** Error: C:/Modeltech_pe_edu_10.1a/examples/encoder.vhd(16): near "v": syntax error ** Error: C:/Modeltech_pe_edu_10.1a/examples/encoder.vhd(18): near "in": expecting ':'
these are compilation erros i cannot find anything wrong ..plzz help!! i