如下一段程序我用来实现正弦查找表的功能,可是在编译的时候总会出现编译错误,ERROR:HDLParsers:163 - "C:/Xilinx/rom/rom_vhdl.vhd" Line 43. Unexpected symbol read: ¡.请问这是什么原因?应该怎么样解决?谢谢!
library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity rom_chdl is port(Q:in std_logic_vector(7 downto 0); DD:out integer range 255 downto 0); end rom_chdl;
architecture Behavioral of rom_chdl is signal D:integer range 255 downto 0;
begin process(Q) begin case Q is when"00000000"=> D<=255; when"00000001"=> D<=254; when"00000010"=> D<=252; when"00000011"=> D<=249; when"00000100"=>D<=245; when"00000101" =>D<=239; when"00000110"=>D<=233; when"00000111" =>D<=225; when "00001000"=>D<=217; when"00001001"=>D<= 207; when "00001010" =>D<= 197; when "00001011"=>D< = 186; when "00001100" =>D<= 174; when "00001101" =>D<= 162; when "00001110"=>D<= 150; when "00001111" =>D<= 137; when "00010000" =>D<= 124; when "00010001" =>D<= 112; when "00010010" =>D<= 99; when "00010011" =>D<= 87; when "00010100"=>D<= 75; when "00010101" =>D<= 64; when "00010110"=>D<= 53; when "00010111" =>D<= 43; when "00011000" =>D<= 34; when "00011001"=>D<= 26; when "00011010" =>D<= 19; when "00011011"=>D<= 13; when "00011100"=>D<= 8; when "00011101" =>D<= 4; when "00011110" =>D<= 1; when "00011111"=>D<= 0; when "00100000" =>D<= 0; when "00100001" =>D<= 1; when "00100010" =>D<= 4; when "00100011"=>D<= 8; when "00100100" =>D<= 13; when "00100101" =>D<= 19; when "00100110" =>D<= 26; when "00100111"=>D<= 34; when "00101000" =>D<= 43; when "00101001" =>D<= 53; when "00101010" =>D<= 64; when "00101011"=>D<= 75; when "00101100" =>D<= 87; when "00101101"=>D<= 99; when "00101110" =>D<= 112; when "00101111" =>D<= 124; when "00110000" =>D<= 137; when "00110001"=>D<= 150; when "00110010" =>D<= 162; when "00110011" =>D<= 174; when "00110100"=>D<= 186; when "00110101" =>D<= 197; when "00110110" =>D<= 207; when "00110111" =>D<= 217; when "00111000" =>D<= 225; when "00111001" =>D<= 233; when "00111010" =>D<= 239; when "00111010" =>D<= 245; when "00111011"=>D<= 249; when "00111100"=>D<= 252; when "00111101" =>D<= 254; when "00111110" =>D<= 255; when others = > null; end case; end process; DD<=D; END Behavioral;
|