3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00
yosys/tests/sim/tb/tb_dlatch.v
Miodrag Milanovic 271ac28b41 Added test cases
2022-02-16 13:27:59 +01:00

51 lines
479 B
Verilog
Executable file

`timescale 1ns/1ns
module tb_dlatch();
reg clk = 0;
reg en = 0;
reg d = 0;
wire q;
dlatch uut(.d(d),.en(en),.q(q));
always
#(5) clk <= !clk;
initial
begin
$dumpfile("tb_dlatch");
$dumpvars(0,tb_dlatch);
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
en = 1;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
$finish;
end
endmodule