add API to turn on documentation in I2S block for interrupts

This commit is contained in:
bunnie 2020-11-17 04:55:46 +08:00
parent 3dc18efe70
commit 377794748b
1 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class I2S_FORMAT(Enum):
I2S_LEFT_JUSTIFIED = 2 I2S_LEFT_JUSTIFIED = 2
class S7I2S(Module, AutoCSR, AutoDoc): class S7I2S(Module, AutoCSR, AutoDoc):
def __init__(self, pads, fifo_depth=256, controller=False, master=False, concatenate_channels=True, sample_width=16, frame_format=I2S_FORMAT.I2S_LEFT_JUSTIFIED, lrck_ref_freq=100e6, lrck_freq=44100, bits_per_channel=28): def __init__(self, pads, fifo_depth=256, controller=False, master=False, concatenate_channels=True, sample_width=16, frame_format=I2S_FORMAT.I2S_LEFT_JUSTIFIED, lrck_ref_freq=100e6, lrck_freq=44100, bits_per_channel=28, document_interrupts=False):
if master == True: if master == True:
print("Master/slave terminology deprecated, please use controller/peripheral. Please see http://oshwa.org/a-resolution-to-redefine-spi-signal-names.") print("Master/slave terminology deprecated, please use controller/peripheral. Please see http://oshwa.org/a-resolution-to-redefine-spi-signal-names.")
controller = True controller = True
@ -198,7 +198,7 @@ class S7I2S(Module, AutoCSR, AutoDoc):
] ]
# Interrupts # Interrupts
self.submodules.ev = EventManager() self.submodules.ev = EventManager(document_fields=document_interrupts)
if hasattr(pads, 'rx'): if hasattr(pads, 'rx'):
self.ev.rx_ready = EventSourcePulse(description="Indicates FIFO is ready to read") # Rising edge triggered self.ev.rx_ready = EventSourcePulse(description="Indicates FIFO is ready to read") # Rising edge triggered
self.ev.rx_error = EventSourcePulse(description="Indicates an Rx error has happened (over/underflow)") self.ev.rx_error = EventSourcePulse(description="Indicates an Rx error has happened (over/underflow)")