opentitan
opentitan copied to clipboard
[kmac] Change fifo_empty interrupt type to status
This resolves #21049.
Note that this PR currently contains a cherry-picked commit from @msfschaffner . In addition, some automated TLT sequence needs to be adjusted as well for this PR to pass CI. I am mainly creating now for the sake of visilbility.
Since this change is software visible, one could argue to create a new version of the IP for this which would also require to go back to D1/V1. However, it seems that the current software only uses the untouched Done and Err interrupts but not the FIFO_Empty interrupt changed with this PR. For example:
- Grepping for
KMAC_INTR_ENABLE_FIFO_EMPTY, i.e. the bit offset for enabling the interrupt in software yields nothing. - Grepping for
KMAC_INTR_STATE_FIFO_EMPTYgives one hit insidesw/device/silicon_creator/lib/drivers/kmac_unittest.cconly. - Grepping for
KMAC_INTR_TEST_FIFO_EMPTYjust gives the SV parameter definition for the reset value of this bit inkmac_reg_pkg.sv(auto-generated). - Grepping for
KMAC_INTR_COMMON_FIFO_EMPTYgives one functionkmac_get_irq_bit_index()insidesw/device/lib/dif/autogen/dif_kmac_autogen.c. This function is called from withindif_kmac_irq_is_pending()dif_kmac_irq_acknowledge()dif_kmac_irq_force()dif_kmac_irq_set_enabled()dif_kmac_irq_set_enabled()None of these functions are called withkDifKmacIrqFifoEmptyas argument.
Most likely, FIFO empty interrupt is not used because it's not very usable as long as it's of type "event". I thus suggest avoid the hassle and not introduce a new version and remain at D2S/V2S if possible.