//フリップフロップ (非同期リセット) module Flip_Flop( input CLK, input RESET, input D, output Q ); reg ff; //レジスタ宣言 assign Q = ff; always@(posedge CLK or posedge RESET) //always文 begin if (RESET) //if文 ff <= 0; //ノンブロッキング代入文 else ff <=D; end endmodule