bitreverse: fhdl/tools -> genlib/misc
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 30 May 2013 16:44:37 +0000 (18:44 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Thu, 30 May 2013 16:44:37 +0000 (18:44 +0200)
migen/fhdl/tools.py
migen/genlib/misc.py

index 2d739077fed3dc091c899147078be936667d87ac..fd55034d87c2d104f31c4f2effca5fda748539ff 100644 (file)
@@ -5,11 +5,6 @@ from migen.fhdl.structure import _Slice, _Assign
 from migen.fhdl.visit import NodeVisitor, NodeTransformer
 from migen.fhdl.size import value_bits_sign
 
-def bitreverse(s):
-       length, signed = value_bits_sign(s)
-       l = [s[i] for i in reversed(range(length))]
-       return Cat(*l)
-
 def flat_iteration(l):
        for element in l:
                if isinstance(element, collections.Iterable):
index 97d0be0e07aa6bdd749a3aef7e7c3c167ba2d38a..0e20cab96ffd8c28803aef1e611635a12c033aac 100644 (file)
@@ -1,6 +1,11 @@
 from migen.fhdl.std import *
 from migen.fhdl.structure import _Operator
 
+def bitreverse(s):
+       length, signed = value_bits_sign(s)
+       l = [s[i] for i in reversed(range(length))]
+       return Cat(*l)
+
 def optree(op, operands, lb=None, ub=None, default=None):
        if lb is None:
                lb = 0