mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
fixed bug in intdivrem test vector extraction
This commit is contained in:
parent
36e45a00a7
commit
d790a88277
@ -116,6 +116,11 @@ def create_vectors(my_config):
|
|||||||
if "op1val" in line:
|
if "op1val" in line:
|
||||||
# print("det2")
|
# print("det2")
|
||||||
# parse line
|
# parse line
|
||||||
|
|
||||||
|
# handle special case where destination register is hardwired to zero
|
||||||
|
if "dest:x0" in line:
|
||||||
|
answer = "x" * len(answer)
|
||||||
|
|
||||||
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
||||||
if my_config.op != "fsqrt": # sqrt doesn't have two input vals
|
if my_config.op != "fsqrt": # sqrt doesn't have two input vals
|
||||||
op2val = line.split("op2val")[1].split("x")[1].strip()
|
op2val = line.split("op2val")[1].split("x")[1].strip()
|
||||||
@ -158,6 +163,9 @@ def create_vectors(my_config):
|
|||||||
if "op1val" in line:
|
if "op1val" in line:
|
||||||
# print("det2")
|
# print("det2")
|
||||||
# parse line
|
# parse line
|
||||||
|
# handle special case where destination register is hardwired to zero
|
||||||
|
if "dest:x0" in line:
|
||||||
|
answer = "x" * len(answer)
|
||||||
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
||||||
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
||||||
op1val = twos_comp(my_config.bits, op1val)
|
op1val = twos_comp(my_config.bits, op1val)
|
||||||
@ -201,6 +209,11 @@ def create_vectors(my_config):
|
|||||||
if "op1val" in line:
|
if "op1val" in line:
|
||||||
# print("det2")
|
# print("det2")
|
||||||
# parse line
|
# parse line
|
||||||
|
# handle special case where destination register is hardwired to zero
|
||||||
|
if "dest:x0" in line:
|
||||||
|
answer = "x" * len(answer)
|
||||||
|
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
||||||
|
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
||||||
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
||||||
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
||||||
op1val = twos_comp(my_config.bits, op1val)
|
op1val = twos_comp(my_config.bits, op1val)
|
||||||
@ -243,6 +256,11 @@ def create_vectors(my_config):
|
|||||||
if "op1val" in line:
|
if "op1val" in line:
|
||||||
# print("det2")
|
# print("det2")
|
||||||
# parse line
|
# parse line
|
||||||
|
|
||||||
|
# handle special case where destination register is hardwired to zero
|
||||||
|
if "dest:x0" in line:
|
||||||
|
answer = "x" * len(answer)
|
||||||
|
|
||||||
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
op1val = line.split("op1val")[1].split("x")[1].split(";")[0]
|
||||||
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
if "-" in line.split("op1val")[1].split("x")[0]: # neg sign handling
|
||||||
op1val = twos_comp(my_config.bits, op1val)
|
op1val = twos_comp(my_config.bits, op1val)
|
||||||
|
Loading…
Reference in New Issue
Block a user