Permalink
Browse files

Use double quotes for all strings

  • Loading branch information...
1 parent e11d9b9 commit 0c214b484ec4b342e6338fc6b66d655b3c06f06a @sbourdeauducq sbourdeauducq committed Feb 14, 2012
View
@@ -3,7 +3,7 @@
from migen.corelogic.fsm import FSM
s = Signal()
-myfsm = FSM('FOO', 'BAR')
+myfsm = FSM("FOO", "BAR")
myfsm.act(myfsm.FOO, s.eq(1), myfsm.next_state(myfsm.BAR))
myfsm.act(myfsm.BAR, s.eq(0), myfsm.next_state(myfsm.FOO))
print(verilog.convert(myfsm.get_fragment(), {s}))
@@ -59,6 +59,6 @@ def get_fragment(self):
# IRQ
irqs = [self.pending.w[i] & field.r for i, field in enumerate(self.enable.fields)]
- comb.append(self.irq.eq(optree('|', irqs)))
+ comb.append(self.irq.eq(optree("|", irqs)))
return Fragment(comb, sync)
View
@@ -14,7 +14,7 @@ def get_sig_name(signal, slave):
class Simple():
def __init__(self, desc, slave):
for signal in desc:
- modules = self.__module__.split('.')
+ modules = self.__module__.split(".")
busname = modules[len(modules)-1]
signame = get_sig_name(signal, slave)
setattr(self, signame, Signal(BV(signal[2]), busname + "_" + signame))
@@ -116,12 +116,12 @@ def get_fragment(self):
i += 1
# generate master ack (resp. err) by ORing all slave acks (resp. errs)
- comb.append(self.master.ack_i.eq(optree('|', [slave[1].ack_o for slave in self.slaves])))
- comb.append(self.master.err_i.eq(optree('|', [slave[1].err_o for slave in self.slaves])))
+ comb.append(self.master.ack_i.eq(optree("|", [slave[1].ack_o for slave in self.slaves])))
+ comb.append(self.master.err_i.eq(optree("|", [slave[1].err_o for slave in self.slaves])))
# mux (1-hot) slave data return
masked = [Replicate(slave_sel_r[i], self.master.dat_i.bv.width) & self.slaves[i][1].dat_o for i in range(len(self.slaves))]
- comb.append(self.master.dat_i.eq(optree('|', masked)))
+ comb.append(self.master.dat_i.eq(optree("|", masked)))
return Fragment(comb, sync)
@@ -45,7 +45,7 @@ def get_alignment(self, name):
def subrecord(self, *descr):
fields = []
for item in descr:
- path = item.split('/')
+ path = item.split("/")
last = path.pop()
pos_self = self
pos_fields = fields
View
@@ -92,7 +92,7 @@ def _control_fragment_pipe(latency, stb_i, ack_o, stb_o, ack_i, busy, pipe_ce):
pipe_ce.eq(ack_i | ~last_valid),
ack_o.eq(pipe_ce),
stb_o.eq(last_valid),
- busy.eq(optree('|', [valid[i] for i in range(latency)]))
+ busy.eq(optree("|", [valid[i] for i in range(latency)]))
]
return Fragment(comb, sync)
View
@@ -9,8 +9,8 @@ def __init__(self, op, bv_op, bv_r):
self.op = op
Actor.__init__(self,
SchedulingModel(SchedulingModel.COMBINATORIAL),
- ("operands", Sink, [('a', bv_op), ('b', bv_op)]),
- ("result", Source, [('r', bv_r)]))
+ ("operands", Sink, [("a", bv_op), ("b", bv_op)]),
+ ("result", Source, [("r", bv_r)]))
def get_process_fragment(self):
return Fragment([
@@ -20,43 +20,43 @@ def get_process_fragment(self):
class Add(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '+', bv, BV(bv.width+1, bv.signed))
+ _SimpleBinary.__init__(self, "+", bv, BV(bv.width+1, bv.signed))
class Sub(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '-', bv, BV(bv.width+1, bv.signed))
+ _SimpleBinary.__init__(self, "-", bv, BV(bv.width+1, bv.signed))
class Mul(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '*', bv, BV(2*bv.width, bv.signed))
+ _SimpleBinary.__init__(self, "*", bv, BV(2*bv.width, bv.signed))
class And(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '&', bv, bv)
+ _SimpleBinary.__init__(self, "&", bv, bv)
class Xor(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '^', bv, bv)
+ _SimpleBinary.__init__(self, "^", bv, bv)
class Or(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '|', bv, bv)
+ _SimpleBinary.__init__(self, "|", bv, bv)
class LT(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '<', bv, BV(1))
+ _SimpleBinary.__init__(self, "<", bv, BV(1))
class LE(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '<=', bv, BV(1))
+ _SimpleBinary.__init__(self, "<=", bv, BV(1))
class EQ(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '==', bv, BV(1))
+ _SimpleBinary.__init__(self, "==", bv, BV(1))
class NE(_SimpleBinary):
def __init__(self, bv):
- _SimpleBinary.__init__(self, '!=', bv, BV(1))
+ _SimpleBinary.__init__(self, "!=", bv, BV(1))
class DivMod(Actor):
def __init__(self, width):
@@ -15,7 +15,7 @@ def get_fragment(self):
for x in self.dfg.edges(data=True)]
this = sum(this_fragments, Fragment())
others = sum([node.get_fragment() for node in self.dfg], Fragment())
- busy = Fragment([self.busy.eq(optree('|', [node.busy for node in self.dfg]))])
+ busy = Fragment([self.busy.eq(optree("|", [node.busy for node in self.dfg]))])
return this + others + busy
def add_connection(dfg, source_node, sink_node, source_ep=None, sink_ep=None):
@@ -31,7 +31,7 @@ def get_fragment(self):
source = self.endpoints["source"]
sinks = [self.endpoints["sink{0}".format(n)]
for n in range(len(self.endpoints)-1)]
- comb = [source.stb.eq(optree('&', [sink.stb for sink in sinks]))]
+ comb = [source.stb.eq(optree("&", [sink.stb for sink in sinks]))]
comb += [sink.ack.eq(source.ack & source.stb) for sink in sinks]
return Fragment(comb)
View
@@ -13,14 +13,14 @@
raise SystemExit("migen requires python {0} or greater".format(
".".join(map(str, required_version))))
-packages = ['migen']
+packages = ["migen"]
packages_dir = os.path.sep.join((here, packages[0]))
for entry in os.listdir(packages_dir):
if (os.path.isdir(os.path.sep.join((packages_dir, entry))) and
- os.path.isfile(os.path.sep.join((packages_dir, entry, '__init__.py')))):
- packages.append('.'.join((packages[0], entry)))
+ os.path.isfile(os.path.sep.join((packages_dir, entry, "__init__.py")))):
+ packages.append(".".join((packages[0], entry)))
-packages_dir={'': 'migen'}
+packages_dir={"": "migen"}
setup(
name="migen",
version="unknown",

0 comments on commit 0c214b4

Please sign in to comment.