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