opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[kmac] Change fifo_empty interrupt type to status

Open vogelpi opened this issue 1 year ago • 0 comments

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_EMPTY gives one hit inside sw/device/silicon_creator/lib/drivers/kmac_unittest.cc only.
  • Grepping for KMAC_INTR_TEST_FIFO_EMPTY just gives the SV parameter definition for the reset value of this bit in kmac_reg_pkg.sv (auto-generated).
  • Grepping for KMAC_INTR_COMMON_FIFO_EMPTY gives one function kmac_get_irq_bit_index() inside sw/device/lib/dif/autogen/dif_kmac_autogen.c. This function is called from within
    • dif_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 with kDifKmacIrqFifoEmpty as 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.

vogelpi avatar Feb 23 '24 22:02 vogelpi