0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Verilogのassignステートメントとは

Last updated at Posted at 2024-01-19

assignは、通常、assignはワイヤー(ネット型)に使用。
例えば、論理ゲートを使用して2つの入力信号aとbの論理積を計算してcに格納する場合、assignが必要です。

assignを使用するケース:

wire a, b, c;
assign c = a & b; // cにaとbの論理積を代入

assignを使用しないケース:

module ModuleA(output wire c);
    // ここでcの計算を行う必要はない
endmodule

module ModuleB(input a, input b, output c);
    // ModuleA内で計算されたcを利用
    ModuleA u1 (.c(c));
endmodule

間違えたポイント

assign A = B は連結という解説をよく見るが、実際は右辺を左辺に代入という意味である。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?