-
Notifications
You must be signed in to change notification settings - Fork 0
/
tb_Boundary_Scan_Cell.sv
99 lines (82 loc) · 1.56 KB
/
tb_Boundary_Scan_Cell.sv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/********************************************************************
* *
* tb_Boundary_Scan_Cell: *
* test case 1: EXTEST=0, Bypass, TDO <= data_in *
* test case 2: EXTEST=1, TDO <= TDI, data_out <= TDI *
* *
* *
* *
* *
* *
* *
* *
* *
********************************************************************/
`timescale 1ns/100ps
module tb_Boundary_Scan_Cell();
parameter size = 8;
reg [size-1 : 0] data_in;
wire [size-1 : 0] data_out;
reg scan_in;
wire scan_out;
//clock
reg ClockDR;
//Control Signal
reg ShiftDR, UpdateDR, mode;
Boundary_Scan_Cell
#(
.size(8)
)
bsc
(
.data_in(data_in),
.data_out(data_out),
.scan_in(scan_in),
.scan_out(scan_out),
.ClockDR(ClockDR),
.ShiftDR(ShiftDR),
.UpdateDR(UpdateDR),
.mode(mode)
);
initial begin
//waveform
$fsdbDumpfile("test_cell.fsdb");
$fsdbDumpvars;
end
initial #520 $finish;
initial begin
data_in = 8'HAA;
scan_in = 0;
#50 scan_in = 1;
end
initial fork
mode = 0;
#350 mode = 1;
#400 mode = 0;
ShiftDR = 0;
ClockDR = 0;
UpdateDR = 0;
#50 ClockDR = 1;
#60 ClockDR = 0;
#90 UpdateDR = 1;
#100 UpdateDR = 0;
join
initial fork
#120 ShiftDR = 1;
#130
initial
repeat (8) begin
#10 ClockDR = 1;
#10 ClockDR = 0;
end
#5 ShiftDR = 0;
end
join
initial fork
UpdateDR = 0;
#330 UpdateDR = 1;
#340 UpdateDR = 0;
#440 ClockDR = 1;
#450 ClockDR = 0;
join
endmodule