在 cmd 中,它向我展示了 y = z 如何修复它。我的代码是什么?我想得到 a = 1 b = 1 y = 什么?不是 z。
见下面的屏幕:
这是我的密码
module or2(input a, b, output y);
nmos(wire1,a,b);
pmos(wire1,0,b);
pmos(y,a,b);
endmodule
module OR_tb();
reg a,b;
wire y;
or2 dut(a, b, y);
initial
begin
$monitor("a = %b b = %b y = %b",a,b,y);
a=0;
b=0;
#1; b=1;
#1; a=1; b=0;
#1; b=1;
#1;
$finish;
end
endmodule
or2
模块错误。这是or2
模块。
module or2(input a, b, output y);
wire wire1, temp_out;
// 2 Bit NOR Gate
nmos(temp_out, 1'b0, a);
nmos(temp_out, 1'b0, b);
pmos(wire1, 1'b1, a);
pmos(temp_out, wire1, b);
// 1 Bit Inverter
nmos(out, 1'b0, temp_out);
pmos(out, 1'b1, temp_out);
endmodule
本站系公益性非盈利分享网址,本文来自用户投稿,不代表边看边学立场,如若转载,请注明出处
评论列表(53条)