-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoverage_reportV1
462 lines (462 loc) · 30.8 KB
/
Coverage_reportV1
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
vcover report ATM_TestBenc_db.ucdb -details -all
# Coverage Report by file with details
#
# =================================================================================
# === File: ATM.v
# =================================================================================
# Statement Coverage:
# Enabled Coverage Active Hits Misses % Covered
# ---------------- ------ ---- ------ ---------
# Stmts 59 52 7 88.1
#
# ================================Statement Details================================
#
# Statement Coverage for file ATM.v --
#
# 1
# 2
# 3
# 4
# 5
# 6
# 7
# 8 `timescale 1ns / 1ps
# 9 `define DELAY #2
# 10 module MainModule(
# 11 input clk,
# 12 input rst,
# 13 input [3:0] Pin,
# 14 input [5:0] Deposit_Amount,
# 15 input [5:0] WithDraw_Amount,
# 16 input [1:0] Operation,
# 17 output reg[7:0] FinalBalance, Check_balance,// ?????????
# 18 input Insert_card, Language_chosen ,exit, home_in //InsertCard,LanguageChosen,Exit
# 19 );
# 20
# 21
# 22 1 1 reg [3:0] pin_number = 4'b1111; //default pass
# 23 1 1 reg [7:0] balance = 8'd30;
# 24 reg [3:0] next_state;
# 25 reg [3:0] current_state;
# 26 1 1 reg [1:0] Counter = 2'b00;
# 27 reg [1:0] op;
# 28 1 1 reg isvalid= 1'b0,issufficent= 1'b0, Enteramount =1'b0, gohome=1'b0; //ValidPass,BalanceCheck,EnteredAmount, home
# 28 2 1
# 28 3 1
# 28 4 1
# 29
# 30 parameter IDLE = 4'b0000,
# 31 language = 4'b0001,
# 32 password = 4'b0010,
# 33 home = 4'b0011,
# 34 withdraw = 4'b0100,
# 35 deposit = 4'b0101,
# 36 updbalance = 4'b0110,
# 37 check_balance = 4'b0111,
# 38 add_balance = 4'b1000,
# 39 sub_balance = 4'b1001,
# 40 reset = 4'b1111;
# 41
# 42 1 746117 always @( posedge clk or posedge rst)
# 43 begin
# 44 if (rst)
# 45
# 46
# 47
# 48 begin
# 49 1 2 current_state <= reset;
# 50 end
# 51
# 52
# 53 1 746115 else current_state <= next_state;
# 54
# 55
# 56
# 57 end
# 58
# 59 1 1095280 always@(*)
# 60 begin
# 61
# 62 1 1095280 Check_balance = balance;
# 63
# 64 case (current_state)
# 65
# 66
# 67
# 68 IDLE: if(Insert_card)
# 69 1 1 next_state = language;
# 70 else
# 71 1 2 next_state = IDLE;
# 72
# 73
# 74
# 75
# 76 language: if(Language_chosen)
# 77 1 1 next_state = password;
# 78 else
# 79 1 1 next_state = language;
# 80
# 81
# 82
# 83
# 84 password:
# 85 begin
# 86 if(exit)
# 87 1 ***0*** next_state = reset;
# 88 else
# 89 1 2 next_state = password;
# 90 if(Pin==pin_number)
# 91 1 1 isvalid = 1'b1;
# 92 else
# 93 1 1 isvalid = 1'b0;
# 94 if(isvalid)
# 95
# 96 begin
# 97 1 1 next_state = home;
# 98 end
# 99 else
# 100 begin
# 101 1 1 Counter = Counter + 1'b1;
# 102 1 1 next_state = password; //added to be checked
# 103 if(Counter == 2'b11)
# 104 1 ***0*** next_state = reset;
# 105 end
# 106 end
# 107
# 108
# 109
# 110 home:
# 111 begin
# 112 1 416354 `DELAY
# 113 1 416354 op = Operation; //in verification force user to exit as we don't have time
# 114 1 153220 if(op == 2'b00) next_state = withdraw;
# 115 1 137612 else if(op == 2'b01) next_state = deposit;
# 116 1 125522 else if(op == 2'b10) next_state = updbalance;
# 117 1 ***0*** else next_state = reset;
# 118 end
# 119
# 120
# 121
# 122
# 123 withdraw:
# 124 begin
# 125 1 1804 if(home_in) next_state = home;
# 126 else
# 127 begin
# 128 1 181553 if(WithDraw_Amount > 0) Enteramount = 1'b1;
# 129 1 15189 else Enteramount = 1'b0;
# 130 1 181553 if(Enteramount) next_state = sub_balance;
# 131 1 15189 else next_state = withdraw;
# 132 end
# 133 end
# 134
# 135
# 136
# 137
# 138
# 139 deposit:
# 140 begin
# 141 1 161984 if(Deposit_Amount > 0) Enteramount = 1'b1;
# 142 1 11377 else Enteramount = 1'b0;
# 143 1 161984 if(Enteramount) next_state = add_balance;
# 144 1 11377 else next_state = deposit;
# 145 end
# 146
# 147
# 148
# 149
# 150
# 151 updbalance:
# 152 begin
# 153 1 84680 Check_balance = balance;
# 154 1 84680 next_state = home;
# 155 end
# 156
# 157
# 158
# 159
# 160
# 161 check_balance:
# 162 begin
# 163 1 ***0*** if(WithDraw_Amount <= balance) issufficent = 1'b1;
# 164 1 ***0*** else issufficent = 1'b0;
# 165 1 ***0*** if(issufficent) next_state = sub_balance;
# 166 1 ***0*** else next_state = balance;
# 167 end
# 168
# 169
# 170
# 171
# 172
# 173 add_balance:
# 174 begin
# 175 1 104357 balance = balance + Deposit_Amount;
# 176 1 104357 next_state = home;
# 177 end
# 178
# 179
# 180
# 181
# 182
# 183 sub_balance:
# 184 begin
# 185 1 117972 balance = balance - WithDraw_Amount;
# 186 1 117972 next_state = home; //TO BE SET TO home
# 187 end
# 188
# 189
# 190
# 191
# 192
# 193 reset:
# 194 begin
# 195 1 2 next_state = IDLE;
# 196 1 2 isvalid = 1'b0; issufficent = 1'b0; Enteramount = 1'b0; gohome = 1'b0;
# 196 2 2
# 196 3 2
# 196 4 2
# 197 1 2 Counter = 2'b00;
# 198 1 2 balance = 30;
# 199 1 2 FinalBalance = 8'b0;
# 200 end
# 201
# 202
# 203
# 204
# 205
# 206 default:
# 207 begin
# 208 1 1 next_state = reset;
# 209 1 1 FinalBalance = 8'b0;
# 210 end
# 211
# 212
# 213
# 214
# 215 endcase
# 216 end
# 217
# 218 endmodule
# 219
# 220
# 221
#
# Branch Coverage:
# Enabled Coverage Active Hits Misses % Covered
# ---------------- ------ ---- ------ ---------
# Branches 44 36 8 81.8
#
# ================================Branch Details================================
#
# Branch Coverage for file ATM.v --
#
# ------------------------------------IF Branch------------------------------------
# 44 746117 Count coming in to IF
# 44 1 2 if (rst)
# 53 1 746115 else current_state <= next_state;
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------CASE Branch------------------------------------
# 64 1095280 Count coming in to CASE
# 68 1 3 IDLE: if(Insert_card)
# 76 1 2 language: if(Language_chosen)
# 84 1 2 password:
# 110 1 416354 home:
# 123 1 198546 withdraw:
# 139 1 173361 deposit:
# 151 1 84680 updbalance:
# 161 1 ***0*** check_balance:
# 173 1 104357 add_balance:
# 183 1 117972 sub_balance:
# 193 1 2 reset:
# 206 1 1 default:
# Branch totals: 11 hits of 12 branches = 91.6%
#
# ------------------------------------IF Branch------------------------------------
# 68 3 Count coming in to IF
# 68 2 1 IDLE: if(Insert_card)
# 70 1 2 else
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 76 2 Count coming in to IF
# 76 2 1 language: if(Language_chosen)
# 78 1 1 else
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 86 2 Count coming in to IF
# 86 1 ***0*** if(exit)
# 88 1 2 else
# Branch totals: 1 hit of 2 branches = 50.0%
#
# ------------------------------------IF Branch------------------------------------
# 90 2 Count coming in to IF
# 90 1 1 if(Pin==pin_number)
# 92 1 1 else
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 94 2 Count coming in to IF
# 94 1 1 if(isvalid)
# 99 1 1 else
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 103 1 Count coming in to IF
# 103 1 ***0*** if(Counter == 2'b11)
# 1 All False Count
# Branch totals: 1 hit of 2 branches = 50.0%
#
# ------------------------------------IF Branch------------------------------------
# 114 416354 Count coming in to IF
# 114 1 153220 if(op == 2'b00) next_state = withdraw;
# 115 1 137612 else if(op == 2'b01) next_state = deposit;
# 116 1 125522 else if(op == 2'b10) next_state = updbalance;
# 117 1 ***0*** else next_state = reset;
# Branch totals: 3 hits of 4 branches = 75.0%
#
# ------------------------------------IF Branch------------------------------------
# 125 198546 Count coming in to IF
# 125 1 1804 if(home_in) next_state = home;
# 126 1 196742 else
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 128 196742 Count coming in to IF
# 128 1 181553 if(WithDraw_Amount > 0) Enteramount = 1'b1;
# 129 1 15189 else Enteramount = 1'b0;
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 130 196742 Count coming in to IF
# 130 1 181553 if(Enteramount) next_state = sub_balance;
# 131 1 15189 else next_state = withdraw;
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 141 173361 Count coming in to IF
# 141 1 161984 if(Deposit_Amount > 0) Enteramount = 1'b1;
# 142 1 11377 else Enteramount = 1'b0;
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 143 173361 Count coming in to IF
# 143 1 161984 if(Enteramount) next_state = add_balance;
# 144 1 11377 else next_state = deposit;
# Branch totals: 2 hits of 2 branches = 100.0%
#
# ------------------------------------IF Branch------------------------------------
# 163 ***0*** Count coming in to IF
# 163 1 ***0*** if(WithDraw_Amount <= balance) issufficent = 1'b1;
# 164 1 ***0*** else issufficent = 1'b0;
# Branch totals: 0 hits of 2 branches = 0.0%
#
# ------------------------------------IF Branch------------------------------------
# 165 ***0*** Count coming in to IF
# 165 1 ***0*** if(issufficent) next_state = sub_balance;
# 166 1 ***0*** else next_state = balance;
# Branch totals: 0 hits of 2 branches = 0.0%
#
#
# Condition Coverage:
# Enabled Coverage Active Covered Misses % Covered
# ---------------- ------ ---- ------ ---------
# FEC Condition Terms 0 0 0 100.0
# Expression Coverage:
# Enabled Coverage Active Covered Misses % Covered
# ---------------- ------ ---- ------ ---------
# FEC Expression Terms 0 0 0 100.0
# FSM Coverage:
# Enabled Coverage Active Hits Misses % Covered
# ---------------- ------ ---- ------ ---------
# FSMs 100.0
# States 0 0 0 100.0
# Transitions 0 0 0 100.0
# Toggle Coverage:
# Enabled Coverage Active Hits Misses % Covered
# ---------------- ------ ---- ------ ---------
# Toggle Bins 128 94 34 73.4
#
# ================================Toggle Details================================
#
# Toggle Coverage for File ATM.v --
#
# Line Node 1H->0L 0L->1H "Coverage"
# --------------------------------------------------------------------------------------
# 11 clk 1 1 100.00
# 12 rst 1 1 100.00
# 13 Pin[3] 0 1 50.00
# 13 Pin[2] 0 1 50.00
# 13 Pin[1] 0 1 50.00
# 13 Pin[0] 0 1 50.00
# 14 Deposit_Amount[5] 0 0 0.00
# 14 Deposit_Amount[4] 1 1 100.00
# 14 Deposit_Amount[3] 1 1 100.00
# 14 Deposit_Amount[2] 1 1 100.00
# 14 Deposit_Amount[1] 1 1 100.00
# 14 Deposit_Amount[0] 1 1 100.00
# 15 WithDraw_Amount[5] 1 1 100.00
# 15 WithDraw_Amount[4] 1 1 100.00
# 15 WithDraw_Amount[3] 1 1 100.00
# 15 WithDraw_Amount[2] 1 1 100.00
# 15 WithDraw_Amount[1] 1 1 100.00
# 15 WithDraw_Amount[0] 1 1 100.00
# 16 Operation[1] 1 1 100.00
# 16 Operation[0] 1 1 100.00
# 17 FinalBalance[7] 0 0 0.00
# 17 FinalBalance[6] 0 0 0.00
# 17 FinalBalance[5] 0 0 0.00
# 17 FinalBalance[4] 0 0 0.00
# 17 FinalBalance[3] 0 0 0.00
# 17 FinalBalance[2] 0 0 0.00
# 17 FinalBalance[1] 0 0 0.00
# 17 FinalBalance[0] 0 0 0.00
# 17 Check_balance[7] 1 1 100.00
# 17 Check_balance[6] 1 1 100.00
# 17 Check_balance[5] 1 1 100.00
# 17 Check_balance[4] 1 1 100.00
# 17 Check_balance[3] 1 1 100.00
# 17 Check_balance[2] 1 1 100.00
# 17 Check_balance[1] 1 1 100.00
# 17 Check_balance[0] 1 1 100.00
# 18 home_in 1 1 100.00
# 18 exit 0 0 0.00
# 18 Language_chosen 0 1 50.00
# 18 Insert_card 0 1 50.00
# 23 balance[7] 1 1 100.00
# 23 balance[6] 1 1 100.00
# 23 balance[5] 1 1 100.00
# 23 balance[4] 1 1 100.00
# 23 balance[3] 1 1 100.00
# 23 balance[2] 1 1 100.00
# 23 balance[1] 1 1 100.00
# 23 balance[0] 1 1 100.00
# 24 next_state[3] 1 1 100.00
# 24 next_state[2] 1 1 100.00
# 24 next_state[1] 1 1 100.00
# 24 next_state[0] 1 1 100.00
# 25 current_state[3] 1 1 100.00
# 25 current_state[2] 1 1 100.00
# 25 current_state[1] 1 1 100.00
# 25 current_state[0] 1 1 100.00
# 26 Counter[1] 0 0 0.00
# 26 Counter[0] 0 1 50.00
# 27 op[1] 1 1 100.00
# 27 op[0] 1 1 100.00
# 28 isvalid 0 1 50.00
# 28 issufficent 0 0 0.00
# 28 gohome 0 0 0.00
# 28 Enteramount 1 1 100.00
#
# Total Node Count = 64
# Toggled Node Count = 43
# Untoggled Node Count = 21
#
# Toggle Coverage = 73.4% (94 of 128 bins)
#
#
# Total Coverage By File (code coverage only, filtered view): 81.1%
#
# End time: 19:28:48 on Dec 12,2023, Elapsed time: 0:00:00
# Errors: 0, Warnings: 0