decorators: remove deprecated semantics
This commit is contained in:
parent
8798ee8d73
commit
25e4d2a2db
|
@ -2,8 +2,8 @@ from migen.fhdl.std import *
|
|||
from migen.fhdl import verilog
|
||||
from migen.genlib import divider
|
||||
|
||||
@DecorateModule(InsertReset)
|
||||
@DecorateModule(InsertCE)
|
||||
@ResetInserter()
|
||||
@CEInserter()
|
||||
class Example(Module):
|
||||
def __init__(self, width):
|
||||
d1 = divider.Divider(width)
|
||||
|
|
|
@ -158,7 +158,7 @@ class AsyncFIFO(Module, _FIFOInterface):
|
|||
"""Asynchronous FIFO (first in, first out)
|
||||
|
||||
Read and write interfaces are accessed from different clock domains,
|
||||
named `read` and `write`. Use `RenameClockDomains` to rename to
|
||||
named `read` and `write`. Use `ClockDomainsRenamer` to rename to
|
||||
other names.
|
||||
|
||||
{interface}
|
||||
|
@ -172,8 +172,8 @@ class AsyncFIFO(Module, _FIFOInterface):
|
|||
|
||||
depth_bits = log2_int(depth, True)
|
||||
|
||||
produce = RenameClockDomains(GrayCounter(depth_bits+1), "write")
|
||||
consume = RenameClockDomains(GrayCounter(depth_bits+1), "read")
|
||||
produce = ClockDomainsRenamer("write")(GrayCounter(depth_bits+1))
|
||||
consume = ClockDomainsRenamer("read")(GrayCounter(depth_bits+1))
|
||||
self.submodules += produce, consume
|
||||
self.comb += [
|
||||
produce.ce.eq(self.writable & self.we),
|
||||
|
|
|
@ -86,24 +86,24 @@ def timeline(trigger, events):
|
|||
sync.append(counterlogic)
|
||||
return sync
|
||||
|
||||
@DecorateModule(InsertReset)
|
||||
@DecorateModule(InsertCE)
|
||||
@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)
|
||||
|
||||
@DecorateModule(InsertReset)
|
||||
@DecorateModule(InsertCE)
|
||||
@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)
|
||||
|
||||
@DecorateModule(InsertReset)
|
||||
@DecorateModule(InsertCE)
|
||||
@ResetInserter()
|
||||
@CEInserter()
|
||||
class Timeout(Module):
|
||||
def __init__(self, length):
|
||||
self.reached = Signal()
|
||||
|
|
Loading…
Reference in New Issue