首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

各位大哥大姐帮我看看那个地方错了!谢谢!

似乎挺合理的,我也是初学者,给你提两个注意的地方:
1、变量、信号的定义是否合理,load、carry等好像是变量吧?
2、carry是不是一个不可用的关键字。
小弟希望得到各位智者的帮助!
if load='1'then
else
if carry'event and carry='1' then
两个条件并不矛盾。这样描述就有错误了。
天天的进步
我给你用QuartusII编译了一下,没有问题,可以编译通过。 不知道你的工具用的是什么? 下面的这段话中,有些问题,reg10(9 downto 0)<=regin(9 downto 0); 最好再设置一个中间变量,将regin的数据锁存,不要reg10(8 downto 0)<=reg10(9 downto 1); 呵呵 process(load,carry) begin if load='1'then reg10(9 downto 0)<=regin(9 downto 0); else if carry'event and carry='1' then din<=reg10(0); reg10(8 downto 0)<=reg10(9 downto 1); end if; end if; end process; 运行时说我句法错误!用VHDL语言在CPLD上实现异步串行通信
我新飞翔

各位大哥大姐帮我看看那个地方错了!谢谢!

process(carry) begin if carry'event and carry='1'then if counter40="100111"then load<='1'; counter40<="000000"; else counter40<=counter40+1; load<='0'; end if; end if; end process; process(clk) begin if clk'event and clk='1'then if counter4="0011"then counter4<="0000"; carry<='1'; else counter4<=counter4+1; carry<='0'; end if; end if; end process; process(load,carry) begin if load='1'then reg10(9 downto 0)<=regin(9 downto 0); else if carry'event and carry='1' then din<=reg10(0); reg10(8 downto 0)<=reg10(9 downto 1); end if; end if; end process; 运行时说我句法错误!用VHDL语言在CPLD上实现异步串行通信
counter40<=counter40+1是不是要改成 counter40<=counter40+'1'呀,我对你前面的程序不了解!
我是天堂的使者,向我倾诉吧
返回列表