3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-30 19:22:31 +00:00

Added test cases

This commit is contained in:
Miodrag Milanovic 2022-02-15 09:35:53 +01:00
parent fb22d7cdc4
commit 271ac28b41
39 changed files with 897 additions and 0 deletions

73
tests/sim/tb/tb_aldff.v Executable file
View file

@ -0,0 +1,73 @@
`timescale 1ns/1ns
module tb_aldff();
reg clk = 0;
reg aload = 0;
reg [0:3] d = 4'b0000;
reg [0:3] ad = 4'b1010;
wire [0:3] q;
aldff uut(.clk(clk),.d(d),.ad(ad),.aload(aload),.q(q));
always
#(5) clk <= !clk;
initial
begin
$dumpfile("tb_aldff");
$dumpvars(0,tb_aldff);
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
aload = 1;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
aload = 0;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
aload = 1;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
aload = 0;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
d = 4'b1100;
#10
d = 4'b0011;
#10
$finish;
end
endmodule