diff --git a/Makefile b/Makefile index 28f05657..fd66497d 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,8 @@ else sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < sbysrc/sby.py > $(DESTDIR)$(PREFIX)/bin/sby chmod +x $(DESTDIR)$(PREFIX)/bin/sby endif + cp tools/btor2aig_yw/btor2aig_yw.py $(DESTDIR)$(PREFIX)/bin/btor2aig_yw + chmod +x $(DESTDIR)$(PREFIX)/bin/btor2aig_yw .PHONY: check_cad_suite run_ci diff --git a/sbysrc/sby_core.py b/sbysrc/sby_core.py index e6802610..f2fc55ba 100644 --- a/sbysrc/sby_core.py +++ b/sbysrc/sby_core.py @@ -1154,14 +1154,12 @@ def instance_hierarchy_error_callback(retcode): return [proc] if model_name == "aig" and self.opt_btor_aig: - #TODO: aiw2yw doesn't know what to do with the latches btor_model = "btor_nomem" proc = SbyProc( self, "btor_aig", self.model(btor_model), - #TODO: fix hardcoded path - f"cd {self.workdir}/model; python3 ~/sby/tools/btor2aig_yw/btor2aig_yw.py design_{btor_model}.btor" + f"cd {self.workdir}/model; btor2aig_yw design_{btor_model}.btor" ) proc.checkretcode = True diff --git a/tools/btor2aig_yw/btor2aig_yw.py b/tools/btor2aig_yw/btor2aig_yw.py index 19fc7b6e..98ad1240 100644 --- a/tools/btor2aig_yw/btor2aig_yw.py +++ b/tools/btor2aig_yw/btor2aig_yw.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from __future__ import annotations import argparse