3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-14 21:08:47 +00:00

Indentation and PEP 8 fixes. CamelCase and white space after semicolon.

This commit is contained in:
Kaj Tuomi 2016-09-02 13:01:31 +03:00
parent 2343dda946
commit c4ba1965fd
2 changed files with 13 additions and 13 deletions

View file

@ -19,7 +19,7 @@
import os, sys, getopt, re import os, sys, getopt, re
##yosys-sys-path## ##yosys-sys-path##
from smtio import smtio, smtopts, mkvcd from smtio import SmtIo, SmtOpts, MkVcd
from collections import defaultdict from collections import defaultdict
skip_steps = 0 skip_steps = 0
@ -35,7 +35,7 @@ dumpall = False
assume_skipped = None assume_skipped = None
final_only = False final_only = False
topmod = None topmod = None
so = smtopts() so = SmtOpts()
def usage(): def usage():
@ -274,7 +274,7 @@ def get_constr_expr(db, state, final=False, getvalues=False):
return "(and %s)" % " ".join(expr_list) return "(and %s)" % " ".join(expr_list)
smt = smtio(opts=so) smt = SmtIo(opts=so)
print("%s Solver: %s" % (smt.timestamp(), so.solver)) print("%s Solver: %s" % (smt.timestamp(), so.solver))
smt.setup("QF_AUFBV") 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)) print("%s Writing trace to VCD file: %s" % (smt.timestamp(), filename))
with open(filename, "w") as vcd_file: with open(filename, "w") as vcd_file:
vcd = mkvcd(vcd_file) vcd = MkVcd(vcd_file)
path_list = list() path_list = list()
for netpath in sorted(smt.hiernets(topmod)): for netpath in sorted(smt.hiernets(topmod)):

View file

@ -34,7 +34,7 @@ class smtmodinfo:
self.asserts = dict() self.asserts = dict()
self.anyconsts = dict() self.anyconsts = dict()
class smtio: class SmtIo:
def __init__(self, solver=None, debug_print=None, debug_file=None, timeinfo=None, opts=None): def __init__(self, solver=None, debug_print=None, debug_file=None, timeinfo=None, opts=None):
if opts is not None: if opts is not None:
self.solver = opts.solver self.solver = opts.solver
@ -395,7 +395,7 @@ class smtio:
self.p.wait() self.p.wait()
class smtopts: class SmtOpts:
def __init__(self): def __init__(self):
self.shortopts = "s:v" self.shortopts = "s:v"
self.longopts = ["no-progress", "dump-smt2="] self.longopts = ["no-progress", "dump-smt2="]
@ -434,7 +434,7 @@ class smtopts:
""" """
class mkvcd: class MkVcd:
def __init__(self, f): def __init__(self, f):
self.f = f self.f = f
self.t = -1 self.t = -1