@@ -71,8 +71,8 @@ def process(self, queue, window_size, addr_pairs):
7171 if (len (self .ops )> window_size or len (self .ops )> len (queue )):
7272 return
7373
74- for index in range (len (self .ops )):
75-
74+ for index in range (len (self .ops )):
75+
7676 instr = queue [index ]
7777 instr_name = instr .instr_name
7878 if addr_pairs :
@@ -119,8 +119,8 @@ def process(self, queue, window_size, addr_pairs):
119119 aq = int (instr .aq )
120120 if instr .rm is not None :
121121 rm = int (instr .rm )
122-
123- if self .ops [index ].find ('?' ) == - 1 :
122+
123+ if self .ops [index ].find ('?' ) == - 1 :
124124 # Handle instruction tuple
125125 if self .ops [index ].find ('(' ) != - 1 :
126126 check_lst = self .ops [index ].replace ('(' , '' ).replace (')' , '' ).split (',' )
@@ -135,7 +135,7 @@ def process(self, queue, window_size, addr_pairs):
135135 self .result = self .result + 1
136136 else :
137137 break
138-
138+
139139 if self .assign_lst [index ].find ('?' ) == - 1 :
140140 exec (self .assign_lst [index ], locals (), cross .BASE_REG_DICT )
141141
@@ -603,7 +603,7 @@ def compute_per_line(queue, event, cgf_queue, stats_queue, cgf, xlen, flen, addr
603603 # List to hold hit coverpoints
604604 hit_covpts = []
605605 rcgf = copy .deepcopy (cgf )
606-
606+
607607 # Enter the loop only when Event is not set or when the
608608 # instruction object queue is not empty
609609 while (event .is_set () == False ) or (queue .empty () == False ):
@@ -617,14 +617,14 @@ def compute_per_line(queue, event, cgf_queue, stats_queue, cgf, xlen, flen, addr
617617 commitvalue = instr .reg_commit
618618
619619 # assign default values to operands
620- nxf_rs1 = None
621- nxf_rs2 = None
622- nxf_rs3 = None
623- nxf_rd = None
624- rs1_type = None
625- rs2_type = None
626- rs3_type = None
627- rd_type = None
620+ nxf_rs1 = 0
621+ nxf_rs2 = 0
622+ nxf_rs3 = 0
623+ nxf_rd = 0
624+ rs1_type = 'x'
625+ rs2_type = 'x'
626+ rs3_type = 'x'
627+ rd_type = 'x'
628628
629629 csr_addr = None
630630
@@ -1017,7 +1017,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle
10171017 cgf = temp
10181018
10191019 # If cgf does not have the covergroup pertaining to the cover-label, throw error
1020- # and exit
1020+ # and exit
10211021 if not cgf :
10221022 logger .err ('Covergroup(s) for ' + str (cov_labels ) + ' not found' )
10231023 sys .exit (1 )
@@ -1124,23 +1124,24 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle
11241124 # Pass instrObjs to queues pertaining to each processes
11251125 for each in queue_list :
11261126 each .put_nowait (instrObj )
1127-
1127+
11281128 logger .debug (instrObj )
11291129 cross_cover_queue .append (instrObj )
11301130 if (len (cross_cover_queue )>= window_size ):
11311131 for (label ,coverpt ) in obj_dict .keys ():
11321132 obj_dict [(label ,coverpt )].process (cross_cover_queue , window_size ,addr_pairs )
11331133 cross_cover_queue .pop (0 )
11341134
1135- # Signal each processes that instruction list is over
1136- for each in event_list :
1137- each .set ()
1135+
11381136
11391137 # Close all instruction queues
11401138 for each in queue_list :
11411139 each .close ()
11421140 each .join_thread ()
11431141
1142+ # Signal each processes that instruction list is over
1143+ for each in event_list :
1144+ each .set ()
11441145
11451146 # Get the renewed cgfs
11461147 cgf_list = []
@@ -1169,7 +1170,7 @@ def compute(trace_file, test_name, cgf, parser_name, decoder_name, detailed, xle
11691170 for d in cgf_list :
11701171 for key , val in d .items ():
11711172 rcgf [key ] = val
1172-
1173+
11731174 ## Check for cross coverage for end instructions
11741175 ## All metric is stored in objects of obj_dict
11751176 while (len (cross_cover_queue )> 1 ):
0 commit comments