74c74
< # instruction sequence number, (optional) pc, (optional) weight, load, store,
---
> # instruction sequence number, (optional) pc, (optional) weight, type,
80c80
< # seq_num,[pc],[weight,]load,store,[address,size,flags,]comp_delay:[rob_dep]:
---
> # seq_num,[pc],[weight,]type,[address,size,flags,]comp_delay:[rob_dep]:
82,87c82,90
< # 1,1,False,False,8500::
< # 2,1,False,False,1000:,1:
< # 3,1,True,False,831248,4,74,500:,2:
< # 4,1,False,False,0:,2:
< # 5,1,False,False,500::,4
< # 6,1,False,True,831248,4,74,1000:,3:,4,5
---
> # 1,35652,1,COMP,8500::
> # 2,35656,1,COMP,0:,1:
> # 3,35660,1,LOAD,1748752,4,74,500:,2:
> # 4,35660,1,COMP,0:,3:
> # 5,35664,1,COMP,3000::,4
> # 6,35666,1,STORE,1748752,4,74,1000:,3:,4,5
> # 7,35666,1,COMP,3000::,4
> # 8,35670,1,STORE,1748748,4,74,0:,6,3:,7
> # 9,35670,1,COMP,500::,7
108a112,113
> DepRecord = inst_dep_record_pb2.InstDepRecord
>
135a141,146
> print "Creating enum name,value lookup from proto"
> enumValues = {}
> for namestr, valdesc in DepRecord.DESCRIPTOR.enum_values_by_name.items():
> print '\t', namestr, valdesc.number
> enumValues[namestr] = valdesc.number
>
142c153
< dep_record = inst_dep_record_pb2.InstDepRecord()
---
> dep_record = DepRecord()
147,148c158,164
< dep_record.load = True if inst_info_list[3] == 'True' else False
< dep_record.store = True if inst_info_list[4] == 'True' else False
---
> # If the type is not one of the enum values, it should be a key error
> try:
> dep_record.type = enumValues[inst_info_list[3]]
> except KeyError:
> print "Seq. num", dep_record.seq_num, "has unsupported type", \
> inst_info_list[3]
> exit(-1)
149a166,169
> if dep_record.type == DepRecord.INVALID:
> print "Seq. num", dep_record.seq_num, "is of INVALID type"
> exit(-1)
>
152,153c172,173
< if dep_record.load or dep_record.store:
< addr, size, flags, comp_delay = inst_info_list[5:9]
---
> if dep_record.type in [DepRecord.LOAD, DepRecord.STORE]:
> addr, size, flags, comp_delay = inst_info_list[4:8]
158c178
< elif not dep_record.load and not dep_record.store:
---
> else:
161,163d180
< else:
< print "Fatal:", seq_num, "is both load and store"
< exit(1)