New Hardware Git
This commit is contained in:
38
Verilog/ez1/ez.v
Normal file
38
Verilog/ez1/ez.v
Normal file
@@ -0,0 +1,38 @@
|
||||
`timescale 10ns/1ns
|
||||
module orDoor (
|
||||
input a,
|
||||
input b,
|
||||
output c
|
||||
);
|
||||
|
||||
assign c = a || b;
|
||||
|
||||
endmodule
|
||||
|
||||
module test;
|
||||
reg a , b;
|
||||
wire c;
|
||||
orDoor nnt(
|
||||
.a(a),
|
||||
.b(b),
|
||||
.c(c)
|
||||
);
|
||||
|
||||
initial begin
|
||||
$dumpfile("ez.vcd");
|
||||
$dumpvars(0 , test);
|
||||
|
||||
#10 a = 0;b = 0;
|
||||
#10 $display("%d %d %d", a , b , c);
|
||||
|
||||
#10 a = 0;b = 1;
|
||||
#10 $display("%d %d %d", a , b , c);
|
||||
#10
|
||||
a = 1;b = 0;
|
||||
#10 $display("%d %d %d", a , b , c);
|
||||
#10
|
||||
a = 1;b = 1;
|
||||
#10 $display("%d %d %d", a , b , c);
|
||||
end
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user