aboutsummaryrefslogtreecommitdiffstats
path: root/backends/smt2
diff options
context:
space:
mode:
authorKaj Tuomi <kaj.tuomi@siru.fi>2016-09-02 13:01:31 +0300
committerKaj Tuomi <kaj.tuomi@siru.fi>2016-09-02 13:01:31 +0300
commitc4ba1965fd4300cb7de48cde996bb068d951967d (patch)
tree039daebdcccb7e916b8e29357f8ca5a94e002442 /backends/smt2
parent2343dda946e5ff335573c6b047d299bb90c98b1e (diff)
downloadyosys-c4ba1965fd4300cb7de48cde996bb068d951967d.tar.gz
yosys-c4ba1965fd4300cb7de48cde996bb068d951967d.tar.bz2
yosys-c4ba1965fd4300cb7de48cde996bb068d951967d.zip
Indentation and PEP 8 fixes. CamelCase and white space after semicolon.
Diffstat (limited to 'backends/smt2')
-rw-r--r--backends/smt2/smtbmc.py8
-rw-r--r--backends/smt2/smtio.py18
2 files changed, 13 insertions, 13 deletions
diff --git a/backends/smt2/smtbmc.py b/backends/smt2/smtbmc.py
index d7f6fff24..225ca01eb 100644
--- a/backends/smt2/smtbmc.py
+++ b/backends/smt2/smtbmc.py
@@ -19,7 +19,7 @@
import os, sys, getopt, re
##yosys-sys-path##
-from smtio import smtio, smtopts, mkvcd
+from smtio import SmtIo, SmtOpts, MkVcd
from collections import defaultdict
skip_steps = 0
@@ -35,7 +35,7 @@ dumpall = False
assume_skipped = None
final_only = False
topmod = None
-so = smtopts()
+so = SmtOpts()
def usage():
@@ -274,7 +274,7 @@ def get_constr_expr(db, state, final=False, getvalues=False):
return "(and %s)" % " ".join(expr_list)
-smt = smtio(opts=so)
+smt = SmtIo(opts=so)
print("%s Solver: %s" % (smt.timestamp(), so.solver))
smt.setup("QF_AUFBV")
@@ -296,7 +296,7 @@ def write_vcd_trace(steps_start, steps_stop, index):
print("%s Writing trace to VCD file: %s" % (smt.timestamp(), filename))
with open(filename, "w") as vcd_file:
- vcd = mkvcd(vcd_file)
+ vcd = MkVcd(vcd_file)
path_list = list()
for netpath in sorted(smt.hiernets(topmod)):
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 8db283bf7..8f8dec026 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -34,7 +34,7 @@ class smtmodinfo:
self.asserts = dict()
self.anyconsts = dict()
-class smtio:
+class SmtIo:
def __init__(self, solver=None, debug_print=None, debug_file=None, timeinfo=None, opts=None):
if opts is not None:
self.solver = opts.solver
@@ -293,12 +293,12 @@ class smtio:
return v[2:]
if v.startswith("#x"):
hex_dict = {
- "0":"0000", "1":"0001", "2":"0010", "3":"0011",
- "4":"0100", "5":"0101", "6":"0110", "7":"0111",
- "8":"1000", "9":"1001", "A":"1010", "B":"1011",
- "C":"1100", "D":"1101", "E":"1110", "F":"1111",
- "a":"1010", "b":"1011", "c":"1100", "d":"1101",
- "e":"1110", "f":"1111"}
+ "0": "0000", "1": "0001", "2": "0010", "3": "0011",
+ "4": "0100", "5": "0101", "6": "0110", "7": "0111",
+ "8": "1000", "9": "1001", "A": "1010", "B": "1011",
+ "C": "1100", "D": "1101", "E": "1110", "F": "1111",
+ "a": "1010", "b": "1011", "c": "1100", "d": "1101",
+ "e": "1110", "f": "1111"}
return "".join(hex_dict.get(x) for x in v[2:])
assert False
@@ -395,7 +395,7 @@ class smtio:
self.p.wait()
-class smtopts:
+class SmtOpts:
def __init__(self):
self.shortopts = "s:v"
self.longopts = ["no-progress", "dump-smt2="]
@@ -434,7 +434,7 @@ class smtopts:
"""
-class mkvcd:
+class MkVcd:
def __init__(self, f):
self.f = f
self.t = -1