From: Sebastien Bourdeauducq Date: Sat, 12 Sep 2015 11:40:29 +0000 (+0800) Subject: genlib: remove reverse_bytes, FlipFlop, Counter X-Git-Tag: 24jan2021_ls180~2099^2~3^2~93 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eb921fb9579858f8a0e7b6522bc2ccdd0cd6ea05;p=litex.git genlib: remove reverse_bytes, FlipFlop, Counter --- diff --git a/migen/genlib/misc.py b/migen/genlib/misc.py index effdd16e..812869dd 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()