forked from XS-MLVP/UnityChipForXiangShan
jalr test complete
This commit is contained in:
parent
3cad0d6bd0
commit
f44db511d1
|
|
@ -70,6 +70,11 @@ class PredCheckerModel(Model):
|
|||
self.fixedRange[i] = 1
|
||||
for i in range(PREDICT_WIDTH):
|
||||
self.fixedTaken[i] = 0
|
||||
if(pds[cfi_idx[0]][BRTYPE_LABEL] == 3) and (not pds[cfi_idx[0]][RET_LABEL]):
|
||||
for i in range(PREDICT_WIDTH):
|
||||
if(instrRange[i]):
|
||||
self.fixedRange[i] = 1
|
||||
self.fixedTaken[cfi_idx[0]] = 1
|
||||
if not ftqValid:
|
||||
self.fixedRange = [1 for _ in range(cfi_idx[0] + 1)]
|
||||
self.fixedRange.extend([0 for _ in range(PREDICT_WIDTH - cfi_idx[0] - 1)])
|
||||
|
|
|
|||
|
|
@ -184,12 +184,10 @@ class pred_checker_sqr:
|
|||
#print("Case 3.2.2: generate test vector")
|
||||
pc_0 = random.randint(0, 2**50 - 2**6)
|
||||
ftqValid = True
|
||||
ftqOffBits = 10
|
||||
randOffset = 12
|
||||
#ftqOffBits = random.randint(1, 15)
|
||||
#randOffset = random.randint(0, 14)
|
||||
#while randOffset >= ftqOffBits:
|
||||
# randOffset = random.randint(0, 14)
|
||||
ftqOffBits = random.randint(1, 15)
|
||||
randOffset = random.randint(0, 14)
|
||||
while randOffset >= ftqOffBits:
|
||||
randOffset = random.randint(0, 14)
|
||||
pds = [{RVC_LABEL: False, RET_LABEL: False, BRTYPE_LABEL: 0 } for i in range(PREDICT_WIDTH)]
|
||||
pds[randOffset] = {RVC_LABEL: False, RET_LABEL: False, BRTYPE_LABEL: 3}
|
||||
instrRange = [True for _ in range(PREDICT_WIDTH)]
|
||||
|
|
|
|||
Loading…
Reference in New Issue