SmtRoundingMode, ROUND_TOWARD_POSITIVE, ROUND_TOWARD_NEGATIVE
from ieee754.fpcommon.fpbase import FPRoundingMode
from ieee754.pipeline import PipelineSpec
+import os
+
+ENABLE_FADD_F32_FORMAL = os.getenv("ENABLE_FADD_F32_FORMAL") is not None
class TestFAddFSubFormal(FHDLTestCase):
def test_fadd_f16_rne_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RNE, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rne_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RNE, False)
def test_fadd_f16_rtz_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTZ, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rtz_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTZ, False)
def test_fadd_f16_rtp_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTP, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rtp_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTP, False)
def test_fadd_f16_rtn_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTN, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rtn_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTN, False)
def test_fadd_f16_rna_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RNA, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rna_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RNA, False)
def test_fadd_f16_rtop_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTOP, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rtop_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTOP, False)
def test_fadd_f16_rton_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTON, False)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fadd_f32_rton_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTON, False)
def test_fsub_f16_rne_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RNE, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rne_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RNE, True)
def test_fsub_f16_rtz_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTZ, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rtz_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTZ, True)
def test_fsub_f16_rtp_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTP, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rtp_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTP, True)
def test_fsub_f16_rtn_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTN, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rtn_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTN, True)
def test_fsub_f16_rna_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RNA, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rna_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RNA, True)
def test_fsub_f16_rtop_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTOP, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rtop_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTOP, True)
def test_fsub_f16_rton_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat16(), FPRoundingMode.RTON, True)
+ @unittest.skipUnless(ENABLE_FADD_F32_FORMAL,
+ "ENABLE_FADD_F32_FORMAL not in environ")
def test_fsub_f32_rton_formal(self):
self.tst_fadd_fsub_formal(SmtSortFloat32(), FPRoundingMode.RTON, True)