0
次のIF文に違いはありますか?Verilog if-statement using register
reg SRR_read;
1に:
if (SRR_read == 1'b1) begin
....
end
2:
if (SRR_read) begin
....
end
次のIF文に違いはありますか?Verilog if-statement using register
reg SRR_read;
1に:
if (SRR_read == 1'b1) begin
....
end
2:
if (SRR_read) begin
....
end
いいえ、両方の構築物が同等です。
同じ方法:
if (!inword)
...
と等価である。いくつかの場合において
if (inword == 0)
...
、第1の構成物は、第二のものよりもコードを読む人に、より理にかなっています。 (1800-2012 - IEEE Standard for SystemVerilog、ch11.4.7)
いいえ、この場合には違いはありません。 – Serge