[kmac] Sending incorrect CmdDone resets FSM
Hi Eunchan,
I'm seeing the scenario below:

In this, I've started a KMAC hash and have already sent in CmdStart and written the entire message into the msgfifo.
Instead of sending a CmdProcess, I send a CmdDone to check the error response - as you can see the KMAC detects this error correctly, however the kmac_app FSM is currently designed to unconditionally reset to Idle state whenever it sees a CmdDone regardless of an error response or not.
Due to this incorrect reset, the KMAC will hang and cannot finish the current operation.
I think it might be good for the kmac_errchkr module to output a cmd_valid_o signal (or something along those lines) to qualify that the SW command should actually be latched by the design - wdyt?
Thanks Udi. This is indeed a bug. Your suggested solution looks good. Let me implement it and check the timing (I think only timing will matter with this solution).
adding @cindychip for visibility.