read proof file from any location
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 28 Jan 2020 21:27:58 +0000 (21:27 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 28 Jan 2020 21:27:58 +0000 (21:27 +0000)
src/ieee754/fpmax/formal/proof_fmax_mod.py

index 5471eee664f21fcef37d22fd02e728d998609e93..b16b5e0b9ba6be05c2fbae9d027f9106118d851c 100644 (file)
@@ -9,6 +9,7 @@ from ieee754.fpcommon.fpbase import FPNumDecode, FPNumBaseRecord
 from ieee754.fpmax.fpmax import FPMAXPipeMod
 from ieee754.pipeline import PipelineSpec
 import subprocess
+import os
 
 
 # This defines a module to drive the device under test and assert
@@ -86,7 +87,8 @@ def run_test(bits=32):
     il = rtlil.convert(m, ports=m.ports())
     with open("proof.il", "w") as f:
         f.write(il)
-    p = subprocess.Popen(['sby', '-f', 'proof.sby'],
+    dirs = os.path.split(__file__)[0]
+    p = subprocess.Popen(['sby', '-f', '%s/proof.sby' % dirs],
                          stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE)
     if p.wait() == 0: