打印

Q2,怎么去掉透明锁存器的警告?

[复制链接]
2830|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
aceice|  楼主 | 2010-9-14 16:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
代码如下:
input input_data;
reg uploader;

always @ (posedge clk or posedge cs or posedge  wr)
begin
    if(cs)
        ......

    else if(wr)
        ......
        uploader <= input_data;
        ......

    else
        ......
        if(counter < uploader)
            ......
        ......
  end

除了wr有效的时候更新uploader寄存器外,其它敏感变量变化时,uploader保持不变。
但是在另外的分支中需要用到uploader给另外一个寄存器赋值。
Warning (10240): Verilog HDL Always Construct warning at <modulename>(xx): inferring latch(es) for variable "uploader", which holds its previous value in one or more paths through the always construct
怎么消除这个警告?

相关帖子

沙发
ar_dong| | 2010-9-15 08:56 | 只看该作者
这个属于异步置数,如果改为同步置数是不是就解决问题了啊

使用特权

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

本版积分规则

374

主题

2182

帖子

0

粉丝