在线咨询
eetop公众号 创芯大讲堂 创芯人才网
切换到宽版

EETOP 创芯网论坛 (原名:电子顶级开发网)

手机号码,快捷登录

手机号码,快捷登录

找回密码

  登录   注册  

快捷导航
搜帖子
查看: 9076|回复: 5

[求助] verilog 一个简单程序 报错,求解

[复制链接]
发表于 2013-7-13 13:00:52 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?注册

x
按照时钟 控制abcd四个量的输出,但是map 时出错:
Pack:198 - NCD was not produced.  All logic was removed from the design.
   This is usually due to having no input or output PAD connections in the
   design and no nets or symbols marked as 'SAVE'.  You can either add PADs or
   'SAVE' attributes to the design, or run 'map -u' to disable logic trimming in
   the mapper.  For more information on trimming issues search the Xilinx
   Answers database for "ERRORack:198" and read the Master Answer Record for
   MAP Trimming Issues.
请教
module LCD(a,b,c,d,clk
    );
output a,b,c,d;
input clk;
reg [25:0] count;
reg a,b,c,d;
// 初始化
initial
begin

a=1;b=1;c=1;d=1;

count=0;

end
// 通过系统时钟控制变量count


always @(posedge clk)
begin

count<=count+1;
   end
//通过count 计数,实现abcd四个变量的取反


always @(count [25:21])
begin

a<=~a;b<=~b;c<=~c;d<=~d;

end
endmodule
发表于 2013-7-14 09:06:37 | 显示全部楼层
楼上正解。lz好像没有太多的硬件概念,可综合的代码和可仿真的代码是不一样的,
发表于 2013-7-14 21:01:46 | 显示全部楼层
initial 是不可以综合的语言,在设计中使用复位信号给电路初始值
发表于 2013-7-15 09:48:40 | 显示全部楼层
楼上各位都指出问题所在了。

使用always对电路进行建模,建议lz遵循一个原则:
时序逻辑用非阻塞赋值方式;组合逻辑使用阻塞赋值方式。
发表于 2013-7-15 10:04:43 | 显示全部楼层
受教了,谢谢
发表于 2013-7-19 13:52:10 | 显示全部楼层
楼上的代码中是不可综合的, 仅供仿真, 建议加强verilog语言的学习
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

站长推荐 上一条 /2 下一条

小黑屋| 手机版| 关于我们| 联系我们| 在线咨询| 隐私声明| EETOP 创芯网
( 京ICP备:10050787号 京公网安备:11010502037710 )

GMT+8, 2024-9-20 20:26 , Processed in 0.019588 second(s), 10 queries , Gzip On, Redis On.

eetop公众号 创芯大讲堂 创芯人才网
快速回复 返回顶部 返回列表