打印

请教!高手请进!

[复制链接]
2346|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
hont124|  楼主 | 2008-3-28 14:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
如下一段程序我用来实现正弦查找表的功能,可是在编译的时候总会出现编译错误,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;     

相关帖子

沙发
hont124|  楼主 | 2008-3-28 14:17 | 只看该作者

补充下

我用的是ise软件编译的,

使用特权

评论回复
板凳
风中的舞者| | 2008-3-28 14:41 | 只看该作者

你的程序有问题

可能是由于程序里原来有汉字  但是你删除的时候没有删除干净造成的  我建议你不要复制代码  手动输入代码后再尝试编译。。。。。。。。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

4

主题

6

帖子

0

粉丝