def cat(i):
""" flattens a compound structure recursively using Cat
"""
- from nmigen.tools import flatten
+ from nmigen._utils import flatten
#res = list(flatten(i)) # works (as of nmigen commit f22106e5) HOWEVER...
res = list(Visitor().iterate(i)) # needed because input may be a sequence
return Cat(*res)
# MODIFICATIONS.
from nmigen import Module, Signal, Memory, Mux, Elaboratable
-from nmigen.tools import bits_for
+from nmigen.utils import bits_for
from nmigen.cli import main
from nmigen.lib.fifo import FIFOInterface