genlib: remove reverse_bytes, FlipFlop, Counter
authorSebastien Bourdeauducq <sb@m-labs.hk>
Sat, 12 Sep 2015 11:40:29 +0000 (19:40 +0800)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Sat, 12 Sep 2015 11:40:29 +0000 (19:40 +0800)
migen/genlib/misc.py

index effdd16eafcf82267dc340e835f13b3c1f5d9eb8..812869dda699c4590633b530de346fb34cadb969 100644 (file)
@@ -44,14 +44,6 @@ def chooser(signal, shift, output, n=None, reverse=False):
     return Case(shift, cases).makedefault()
 
 
-def reverse_bytes(signal):
-    n = (flen(signal)+7)//8
-    r = []
-    for i in reversed(range(n)):
-        r.append(signal[i*8:min((i+1)*8, flen(signal))])
-    return Cat(iter(r))
-
-
 def timeline(trigger, events):
     lastevent = max([e[0] for e in events])
     counter = Signal(max=lastevent+1)
@@ -80,24 +72,6 @@ def timeline(trigger, events):
     return sync
 
 
-@ResetInserter()
-@CEInserter()
-class FlipFlop(Module):
-    def __init__(self, *args, **kwargs):
-        self.d = Signal(*args, **kwargs)
-        self.q = Signal(*args, **kwargs)
-        self.sync += self.q.eq(self.d)
-
-
-@ResetInserter()
-@CEInserter()
-class Counter(Module):
-    def __init__(self, *args, increment=1, **kwargs):
-        self.value = Signal(*args, **kwargs)
-        self.width = flen(self.value)
-        self.sync += self.value.eq(self.value+increment)
-
-
 class WaitTimer(Module):
     def __init__(self, t):
         self.wait = Signal()