Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[spi_device] fifo2sram_adapter enhancement #12054

Closed
eunchan opened this issue Apr 12, 2022 · 3 comments
Closed

[spi_device] fifo2sram_adapter enhancement #12054

eunchan opened this issue Apr 12, 2022 · 3 comments
Labels
Component:RTL Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones IP:spi_device Priority:P4 Priority: propose to move to backlog Type:FutureRelease Not relevant to currently planned releases/milestones
Milestone

Comments

@eunchan
Copy link
Contributor

eunchan commented Apr 12, 2022

#12053 revises the spid_upload module to create an overflow event and to track the pointer of the FIFO.

It would be easier if spid_fifo2sram_adapter (eventually prim_fifo2sram_adapter) provides the overflow event at the same cycle when the producer side pushes an entry when the FIFO is full.

Issue here is:

  • fifo2sram only writes data to SRAM no way to track the consumer side.
  • SPI_DEVICE upload logic requires to keep update the data in SRAM even in full case.

Plan:

  • At lease, for now, adds clear port to reset the pointer (currently rst_ni does that)
  • Make the module configurable to be able to write when full (currently this is the default behavior)
@eunchan eunchan added Priority:P2 Priority: medium Component:RTL IP:spi_device Type:FutureRelease Not relevant to currently planned releases/milestones labels Apr 12, 2022
@eunchan eunchan self-assigned this Apr 12, 2022
@andreaskurth
Copy link
Contributor

Triaged for spi_device. I think this is not relevant for this release because we have a mechanism that works, though this issue proposes a cleaner implementation IIUC. Thus keeping Type:FutureRelease Not relevant to currently planned releases/milestones .

@msfschaffner msfschaffner added the Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones label Oct 6, 2023
@msfschaffner
Copy link
Contributor

CC @a-will

@msfschaffner msfschaffner added this to the Earlgrey-PROD.M2 milestone Nov 7, 2023
@msfschaffner msfschaffner added the Priority:P3 Priority: low label Dec 4, 2023
@msfschaffner msfschaffner removed the Priority:P2 Priority: medium label Dec 21, 2023
@msfschaffner msfschaffner added Priority:P4 Priority: propose to move to backlog and removed Priority:P3 Priority: low labels Dec 21, 2023
@msfschaffner msfschaffner added Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones and removed Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones labels Jan 13, 2024
@a-will
Copy link
Contributor

a-will commented Mar 2, 2024

Currently, spid_fifo2sram_adapter is only used in contexts where SPI-side overflow is not possible. For flash, wrapping is the correct behavior, and for TPM, we stop writing once the requested amount of data has been received.

For the TPM Read FIFO, overflow would cause bizarre behavior, but software has an explicit length that only lasts for the current command. We probably don't need to go the extra mile to protect software from this specific case.

Closing, as there is no planned use case. Please re-open if I've made an error.

@a-will a-will closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL Earlgrey-PROD Triaged Temporary label to triage issues into Earlgrey-PROD Milestones IP:spi_device Priority:P4 Priority: propose to move to backlog Type:FutureRelease Not relevant to currently planned releases/milestones
Projects
None yet
Development

No branches or pull requests

4 participants