3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-06 03:10:26 +00:00

test dlatchsr and adlatch

This commit is contained in:
Miodrag Milanovic 2022-02-16 13:58:51 +01:00
parent 271ac28b41
commit 21baf48e04
4 changed files with 94 additions and 4 deletions

65
tests/sim/tb/tb_dlatchsr.v Executable file
View file

@ -0,0 +1,65 @@
`timescale 1ns/1ns
module tb_dlatchsr();
reg d = 0;
reg set = 0;
reg clr = 0;
wire q;
dlatchsr uut(.d(d),.set(set),.clr(clr),.q(q));
initial
begin
$dumpfile("tb_dlatchsr");
$dumpvars(0,tb_dlatchsr);
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
clr = 1;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
clr = 0;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
set = 1;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
set = 0;
#10
d = 1;
#10
d = 0;
#10
d = 1;
#10
d = 0;
#10
$finish;
end
endmodule