Skip to content

Commit 931f3cb

Browse files
authored
Create testbench.sv
1 parent bef67d8 commit 931f3cb

File tree

1 file changed

+31
-0
lines changed
  • LAB VII: CONSTRUCT, TEST AND INVESTIGATE THE OPERATION OF VARIOUS FLIP-FLOP CIRCUITS USING HDL/Q4

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
module testbench_TFF;
2+
reg t_s, t_r;
3+
wire t_t;
4+
circuit2 dut(t_s, t_r, t_t);
5+
6+
initial
7+
begin
8+
$dumpfile("dump.vcd");
9+
$dumpvars(0, dut);
10+
11+
#1
12+
t_s <= 0;
13+
t_r <= 0;
14+
15+
#1
16+
t_s <= 0;
17+
t_r <= 1;
18+
19+
#1
20+
t_s <= 1;
21+
t_r <= 0;
22+
23+
#1
24+
t_s <= 1;
25+
t_r <= 1;
26+
27+
#1
28+
29+
$finish();
30+
end
31+
endmodule

0 commit comments

Comments
 (0)