From 159d9a619617c9a02239ffd02b164d30fde8122c Mon Sep 17 00:00:00 2001 From: Pagerd <1172482284@qq.com> Date: Fri, 20 Sep 2024 10:22:12 +0800 Subject: [PATCH] fix prefix bug --- riscv_isac/fp_dataset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'