@(posedge Clk) 之间的区别;a<=1'b1;和@(posedge Clk) a&lt;= 1'b1; [英] Difference between @(posedge Clk); a&lt;= 1&#39;b1; and @(posedge Clk) a&lt;= 1&#39;b1;

查看:41
本文介绍了@(posedge Clk) 之间的区别;a<=1'b1;和@(posedge Clk) a&lt;= 1'b1;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么区别吗

@(posedge Clk);
   a<= 1'b1;

@(posedge Clk)
   a<= 1'b1;

注意 Clk 后面的分号.我在浏览测试平台时遇到了类似的代码行.我做了一些简单的实验,在模拟过程中我找不到任何差异.由于分号的存在/不存在,这些行后面的代码的执行顺序是否会发生任何变化?

Note the semicolon after Clk. I came across similar lines of code when I was browsing through a testbench. I did some simple experiments and I could not find any differences during simulation. Will the sequence of execution for the code following these lines change in any way due to the presence/absence of the semicolon?

推荐答案

你说得对 - 没有行为差异.

You're correct -there's no behavioural difference.

分号版本是:等等.做这个.非分号版本是:等待然后执行此操作.您有时会在单行中看到这种形式:

The semicolon version is: Wait. Do this. The non-semicolon version is: Wait then do this. You'll sometimes see this form used in one-liners:

@(posedge Clk) a<= 1'b1;

这篇关于@(posedge Clk) 之间的区别;a<=1'b1;和@(posedge Clk) a&lt;= 1'b1;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆