mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-03 00:28:08 +00:00
Added test cases
This commit is contained in:
parent
fb22d7cdc4
commit
271ac28b41
39 changed files with 897 additions and 0 deletions
48
tests/sim/tb/tb_sdff.v
Executable file
48
tests/sim/tb/tb_sdff.v
Executable file
|
@ -0,0 +1,48 @@
|
|||
`timescale 1ns/1ns
|
||||
module tb_sdff();
|
||||
reg clk = 0;
|
||||
reg rst = 0;
|
||||
reg d = 0;
|
||||
wire q;
|
||||
|
||||
sdff uut(.clk(clk),.d(d),.rst(rst),.q(q));
|
||||
|
||||
always
|
||||
#(5) clk <= !clk;
|
||||
|
||||
initial
|
||||
begin
|
||||
$dumpfile("tb_sdff");
|
||||
$dumpvars(0,tb_sdff);
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
rst = 1;
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
rst = 0;
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
d = 1;
|
||||
#10
|
||||
d = 0;
|
||||
#10
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
Loading…
Add table
Add a link
Reference in a new issue