From eb921fb9579858f8a0e7b6522bc2ccdd0cd6ea05 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 12 Sep 2015 19:40:29 +0800 Subject: [PATCH] genlib: remove reverse_bytes, FlipFlop, Counter --- migen/genlib/misc.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/migen/genlib/misc.py b/migen/genlib/misc.py index effdd16ea..812869dda 100644 --- a/migen/genlib/misc.py +++ b/migen/genlib/misc.py @@ -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()