Altera_Forum
Honored Contributor
15 years agoError 10500: Syntax error
Hi all :) , plz any one can till me where is the two errors :( :( in this package code" for circual Shifting Lift", the first message error is:
"Error (10500): VHDL syntax error at modm.vhd(10) near text "begin"; expecting "end", or a declaration statement". and the second one is: "Error (10500): VHDL syntax error at modm.vhd(33) near text "begin"; expecting "end", or a declaration statement". ---------------------------------------------------------------------- library ieee; use IEEE.std_logic_1164.all; use IEEE.std_logic_unsigned.all; use IEEE.std_logic_arith.all; package crll is function crl(s1:std_logic_vector;index:integer) return std_logic_vector; end crll; package body crll is begin process function crl(s1:std_logic_vector;index:integer) return std_logic_vector is variable z : std_logic_vector(s1'high downto s1'low); begin if(index >= s1'length) then assert false report "crl: rotate index is greater than variable length can't rotate" severity error; end if; if(index < 0) then assert false report "crl: rotate index is negative,can't rotate" severity error; end if; if(index = 0) then z:=s1; else for jj in 1 to s1'high loop z:= s1(s1'high-jj downto 0) & s1(s1'high downto s1'high-jj+1); if(jj = index) then exit; end if; end loop; end if; return z; end crl; begin crl; end process; end crll; -----------------------------------------------------------------