@@ -82,9 +82,12 @@ def __init__(self, parent, top):
82
82
self .end_flg = False
83
83
self .swpath = None
84
84
self .repeat = 0
85
- self .done = 0
86
85
self .seqIdx = 0
87
86
self .tdelay = 500
87
+
88
+ self .done = 0
89
+ self .cdpass = 0
90
+ self .cdfail = 0
88
91
89
92
self .InitTopHbox ()
90
93
self .InitSeqBox ()
@@ -169,7 +172,11 @@ def executeSerial(self, incmd):
169
172
elif skey == "write" :
170
173
self .top .write_serial (incmd [skey ])
171
174
elif skey == "read" :
172
- self .top .read_serial (incmd [skey ])
175
+ res = self .top .read_serial (incmd [skey ])
176
+ if res == True :
177
+ self .cdpass = self .cdpass + 1
178
+ else :
179
+ self .cdfail = self .cdfail + 1
173
180
174
181
def executeRepeat (self , repeat ):
175
182
self .top .print_on_log ("Repeat\n " )
@@ -249,12 +256,17 @@ def runBatchSeq(self):
249
256
self .btn_start .SetLabel ("Stop" )
250
257
251
258
self .done = 0
259
+ self .cdpass = 0
260
+ self .cdfail = 0
261
+
252
262
self .seqIdx = 0
253
263
self .totSeq = len (self .finseq )
254
264
self .tdelay = 500
255
265
266
+ self .top .print_on_log ("\n ######################################" )
256
267
self .top .print_on_log ("\n Batch Mode Starting!" )
257
268
self .top .print_on_log ("\n Repeat Count: " + str (self .repeat ))
269
+ self .top .print_on_log ("\n ######################################\n \n " )
258
270
259
271
if (self .timer .IsRunning () == False ):
260
272
self .timer .Start (self .tdelay )
@@ -269,12 +281,16 @@ def TimerServ(self, evt):
269
281
if self .seqIdx >= len (self .finseq ):
270
282
self .seqIdx = 0
271
283
self .done += 1
272
- self .top .print_on_log ("Cycle Completed: " + str (self .done )+ "\n " )
284
+ resstr = "Cycle Completed: " + str (self .done )+ "; Pass: " \
285
+ + str (self .cdpass )+ "; Fail: " + str (self .cdfail )+ "\n \n "
286
+ # self.top.print_on_log("Cycle Completed: "+str(self.done)+"\n")
287
+ self .top .print_on_log (resstr )
273
288
274
289
if self .done >= self .repeat :
275
290
self .timer .Stop ()
276
291
self .StopBatch ()
277
- self .top .print_on_log ("Batch Sequence Completed!\n " )
292
+ self .top .print_on_log ("Batch Sequence Completed!" )
293
+ self .top .print_on_log ("\n ######################################\n \n " )
278
294
279
295
def executeBatchSeq (self ):
280
296
self .done = 0
0 commit comments