New Hardware Git

This commit is contained in:
e2hang
2025-12-31 19:35:06 +08:00
commit aca5a8aab8
621 changed files with 254727 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
`timescale 10ns/1ns
module and_door (
input a,
input b,
output c
);
assign c = a&b;
endmodule
module tb_;
reg a,b;
wire c;
and_door test(
.a (a),
.b (b),
.c (c)
);
initial begin
$dumpfile("tb_.vcd");
$dumpvars(0, tb_);
end
initial begin
a = 1'b0;
b = 1'b0;
#1;
$display("%d",c);
a = 1'b0;
b = 1'b1;
#1;
$display("%d",c);
a = 1'b1;
b = 1'b0;
#1;
$display("%d",c);
a = 1'b1;
b = 1'b1;
#1;
$display("%d",c);
end
endmodule