diff --git a/riscv_isac/fp_dataset.py b/riscv_isac/fp_dataset.py index 6a4a63f..d08f89d 100644 --- a/riscv_isac/fp_dataset.py +++ b/riscv_isac/fp_dataset.py @@ -50,11 +50,11 @@ sanitise_cvpt = lambda rm,x,iflen,flen,c,inxFlg: x + ' fcsr == '+hex(rm<<5) + ' and rm_val == 7 ' \ + ('' if iflen == flen or inxFlg else ''.join([' and rs'+str(x)+'_nan_prefix == 0x' \ - + 'f'*int((flen-iflen)/4) for x in range(1,c+1)])) + + 'f'*int(abs((flen-iflen))/4) for x in range(1,c+1)])) sanitise_norm = lambda rm,x,iflen,flen,c,inxFlg: x + ' fcsr == 0'\ + ('' if iflen == flen or inxFlg else ''.join([' and rs'+str(x)+'_nan_prefix == 0x' \ - + 'f'*int((flen-iflen)/4) for x in range(1,c+1)])) + + 'f'*int((abs(flen-iflen))/4) for x in range(1,c+1)])) sanitise_norm_nopref = lambda rm,x,iflen,flen,c,inxFlg: x + ' fcsr == 0' sanitise_nopref = lambda rm,x,iflen,flen,c,inxFlg: x + ' fcsr == 0 and rm_val == 7'