Verilog 中总是跟在 #(...) 磅后面的是什么意思? [英] What is always followed by #(...) pound mean in Verilog?
本文介绍了Verilog 中总是跟在 #(...) 磅后面的是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在一个简单的时钟发生器示例中,我看到以下代码:
In a simple clock generator example, I see the following code:
always #(cycle/2) clk ~= clk;
我以前总是看到@(*) 但没有看到英镑(#).我试图在文档中找到它,但我只能找到一些对实值端口"的引用,没有进一步详细说明.
I've seen always @(*) before but not pound (#). I tried to find it in the documentation, but all I could find was some reference to "real-valued ports" with no further elaboration.
推荐答案
这是一个延迟操作.它基本上只是读取
It's a delay operation. It essentially just reads
always begin
#(cycle/2) //wait for cycle/2 time
clk ~= clk;
end
有时您可能会看到它与原始值一起使用,例如 #5 或 #10,这意味着等待 5 或 10 个单位的时间刻度.
You might sometimes see this used with raw values, like #5 or #10, which means to wait 5 or 10 units of your timescale.
这篇关于Verilog 中总是跟在 #(...) 磅后面的是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文