查看: 1142|回复: 0
打印 上一主题 下一主题

Verilog一道小题,有点意思

[复制链接]
跳转到指定楼层
沙发
发表于 2016-5-31 19:11:21 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
适合我这样的新手
题目:
The example below models a flip-flop with asynchronous set/reset logic (active low).  
The model synthesizes correctly, but there is a corner case where simulation results are incorrect.  
What is the corner case?

always_ff @(   posedge clk
            or negedge rst_n     // active-low reset
            or negedge set_n     // active-low set
           )
  if (!rst_n)           // reset has priority over set
    q_out <= ’0;        // reset all bits to zero
  else if (!set_n)
    q_out <= ’1;        // set all bits to one
  else
    q_out <= data_in;   // d input assignment


来自:http://www.sutherland-hdl.com/    (题目就在主页上 2011年5月19日)
答案:http://www.sutherland-hdl.com/quiz-and-tips.php
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 加入因仑

本版积分规则

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