次のコード例では、ビルトイン モジュールの各インスタンスに
a_inv
、b_inv
、out
などの固有のインスタンス名が指定されています。module build_xor (a, b, c);
input a, b;
output c;
wire c, a_not, b_not;
not a_inv (a_not, a);not b_inv (b_not, b);and a1 (x, a_not, b);and a2 (y, b_not, a);or out (c, x, y);
endmodule