mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
17 lines
No EOL
350 B
Python
17 lines
No EOL
350 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)
|
|
] |