litex/miscope/miio.py
Florent Kermarrec f4e6cebab2 clean up
2014-08-03 11:44:27 +02:00

17 lines
352 B
Python

from migen.fhdl.structure import *
from migen.bank.description import *
class MiIo(Module, AutoCSR):
def __init__(self, width):
self.width = width
self.i = Signal(width)
self.o = Signal(width)
self._r_i = CSRStatus(width)
self._r_o = CSRStorage(width)
self.sync += [
self._r_i.status.eq(self.i),
self.o.eq(self._r_o.storage)
]