集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 1595|回复: 0

新手急求!!!!!望高手给与解答,跪求,高手给指点迷津!!!!!!!!!!!

[复制链接]
郝鑫 发表于 2011-5-7 19:58:33 | 显示全部楼层 |阅读模式
新手急求!!!!!望高手给与解答,跪求,高手给指点迷津!!!!!!!!!!!
erilog, 警告
新手急求!!!!!望高手给与解答
module count10a(outa,couta,en,clk,rst);
output [3:0]outa;
output couta;
reg[3:0]countb;
reg couta;
assign outa=countb;
input clk,rst,en;
always@(*)
if(!rst)        begin
                countb<=4'b0;
                couta<=1'b0;
                 end
else
        if(en)
                begin
                        if(countb==9)
                                begin
                                        countb<=4'b0;
                                        couta<=~couta;
                                end
                        else
                                begin
                                        countb<=countb+1;
                                end
                end
        else
                begin
                        countb<=4'b0;
                        couta<=1'b0;
                end
endmodule
在用quartus编译的时候出现这个警告:Warning: Verilog HDL Always Construct warning at count10a.v(9): variable "couta" may not be assigned a new value in every possible path through the Always Construct.  Variable "couta" holds its previous value in every path with no new value assignment, which may create a combinational loop in the current design.希望高手给与解决的方案,警告出现在红字上面
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

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

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2025-5-1 07:28 , Processed in 0.060117 second(s), 24 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表