Skip to content

Commit

Permalink
Add option to specify solver in nmigen.test.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Donald Sebastian Leung authored and sbourdeauducq committed Aug 19, 2020
1 parent 8f5a253 commit 40f7f12
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nmigen/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def assertWarns(self, category, msg=None):
if msg is not None:
self.assertEqual(str(warns[0].message), msg)

def assertFormal(self, spec, mode="bmc", depth=1):
def assertFormal(self, spec, mode="bmc", depth=1, engine="smtbmc"):
caller, *_ = traceback.extract_stack(limit=2)
spec_root, _ = os.path.splitext(caller.filename)
spec_dir = os.path.dirname(spec_root)
Expand All @@ -80,7 +80,7 @@ def assertFormal(self, spec, mode="bmc", depth=1):
wait on
[engines]
smtbmc
{engine}
[script]
read_ilang top.il
Expand All @@ -92,6 +92,7 @@ def assertFormal(self, spec, mode="bmc", depth=1):
""").format(
mode=mode,
depth=depth,
engine=engine,
script=script,
rtlil=rtlil.convert(Fragment.get(spec, platform="formal"))
)
Expand Down

0 comments on commit 40f7f12

Please sign in to comment.