add hack to generate verilog with AsyncResetSynchronizer (FIXME)
This commit is contained in:
parent
fb7864c2b9
commit
261469814f
|
@ -1,4 +1,6 @@
|
|||
from migen.fhdl.std import *
|
||||
from migen.fhdl.specials import Special
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
from migen.fhdl import verilog
|
||||
from migen.bank.description import *
|
||||
from migen.actorlib.fifo import AsyncFIFO
|
||||
|
@ -84,7 +86,25 @@ class LiteScopeLA(Module, AutoCSR):
|
|||
self.comb += sink.connect(recorder.dat_sink)
|
||||
|
||||
def export(self, design, layout, filename):
|
||||
ret, ns = verilog.convert(design, return_ns=True)
|
||||
# XXX FIXME
|
||||
class SimAsyncResetSynchronizer(Special):
|
||||
def __init__(self, cd, async_reset):
|
||||
Special.__init__(self)
|
||||
self.cd = cd
|
||||
self.async_reset = async_reset
|
||||
|
||||
def iter_expressions(self):
|
||||
yield self.cd, "clk", SPECIAL_INPUT
|
||||
yield self.cd, "rst", SPECIAL_OUTPUT
|
||||
yield self, "async_reset", SPECIAL_INPUT
|
||||
|
||||
@staticmethod
|
||||
def lower(dr):
|
||||
return Module()
|
||||
so = {
|
||||
AsyncResetSynchronizer: SimAsyncResetSynchronizer
|
||||
}
|
||||
ret, ns = verilog.convert(design, return_ns=True, special_overrides=so)
|
||||
r = ""
|
||||
def format_line(*args):
|
||||
return ",".join(args) + "\n"
|
||||
|
|
Loading…
Reference in New Issue