具有多个输入的原始非门

Primitive not gate with more than one input

我在阅读 Verilog article 时发现了这个示例,其中讨论了带有两个输入的 not 门。 有谁能解释一下这是什么意思吗?

module buf_not_gates (input a, b, output c, d);
  buf (c, a, b); // c is the output, a and b are inputs
  not (d, a, b); // d is the output, a and b are inputs
endmodule

module buf_not_gates_tb;
  reg a, b;
  wire c, d;
  buf_not_gates Instance0 (a, b, c,d);
  initial begin
    a = 0; b = 0;
    #1 a = 0; b = 1; 
    #1 a = 1; b = 0;
    #1 a = 1; b = 1;
  end
  initial begin
    $monitor ("T=%t| a=%b |b=%b| c(buf)=%b |d(not)=%b", $time, a, b, c, d);
  end
endmodule

该代码中的注释不正确。 not 门没有 2 个输入; buf 也没有。根据 IEEE Std 1800-2017,第 28.5 节 buf 而不是 gates:

These two logic gates shall have one input and one or more outputs. The last terminal in the terminal list shall connect to the input of the logic gate, and the other terminals shall connect to the outputs of the logic gate.

在这行代码中:

buf (c, a, b);

bbuf 实例的唯一输入; ca 是输出。

文章作者似乎错误地复制了 bufif_notif_gates 示例中的代码。