opentitan icon indicating copy to clipboard operation
opentitan copied to clipboard

[spi_device] Remove filter CSR

Open eunchan opened this issue 3 years ago • 4 comments

As passthrough logic filters incoming commands if they are not in the command information entries, filtering CSR usage is low. We could introduce the filter field in the CMD_INFO structure if a command needs to be processed internally but filtered in passthrough.

This way we can reduce 256bit CSR into 24 (# of CMD_INFO entries) bit.

eunchan avatar Sep 08 '22 17:09 eunchan

~~this will reduce number of internal process or passthrough commands. Without this change, we could support all 256 commands passthrough. With this, we can only have 24 commands for internal process and passthrough, plus EN4B/EX4B and WRDI/WREN. If it's not a concern, this feature SGTM~~

EDIT: Have a closer look in the scb. In order to let a command pass through, we need to set filter off and configure the opcode in one of the 24 command slots or in command CSRs - EN4B/EX4B and WRDI/WREN. So this change won't lose any capability and save the filter CSRs. It's good to have.

weicaiyang avatar Sep 12 '22 18:09 weicaiyang

Triaged for spi_device. I think this is not needed for M2.5 and properly labeled https://github.com/lowRISC/opentitan/labels/Type%3AFutureRelease.

andreaskurth avatar Feb 23 '23 16:02 andreaskurth

I'll just note that an alternative would be to assume any unfiltered command without a CMDINFO entry is of the "SingleIO" type. The CMDINFO table would then only be needed for commands that deviate from that norm.

a-will avatar Jan 31 '24 19:01 a-will

Discussed with @a-will - this would be a nice optimization but not needed from a functional perspective.

msfschaffner avatar Feb 22 '24 18:02 msfschaffner