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

DelayLine: PSRAM zeroing needed post-configuration #53

Open
vk2seb opened this issue Oct 9, 2024 · 1 comment
Open

DelayLine: PSRAM zeroing needed post-configuration #53

vk2seb opened this issue Oct 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vk2seb
Copy link
Member

vk2seb commented Oct 9, 2024

External memory comes out of reset full of garbage. In cases where we have no SoC initializing the external memory, this means any DelayLine instance backed by external memory will emit garbage for a while.

Probably a neat solution to this would be to propagate up all the DelayLine memory regions using amaranth-soc's memory window abstraction, and have the PSRAM memory controller initialize all these sections to zero. Or, we just force each DelayLine to emit zeroes (ignoring the memory values) until the write pointer has cycled through once. Or we force DelayLine to write zeroes to itself during startup.

Alternatively, we could just have the memory controller initialize the whole memory space to zero on startup. Even with 32MByte PSRAM, we can erase at approx. maximum memory bandwidth of 240MByte/sec (60MHz base clock) or 400MByte/sec (100MHz base clock, not merged), which suggests ~100msec startup delay.

@vk2seb vk2seb added the bug Something isn't working label Oct 9, 2024
@vk2seb vk2seb changed the title DelayLine expects PSRAM initialized to zero DelayLine emits garbage when PSRAM not initialized to zero Oct 9, 2024
@vk2seb
Copy link
Member Author

vk2seb commented Oct 14, 2024

This is now fixed - for now, the strategy is that each DelayLine just initializes its own backing store. This means a lot of extra PSRAM traffic at boot, but seems to work fine.

Merged in: c500de6

Regardless, I think it might be neater (and more resource efficient) to just have the PSRAM controller zero the whole memory space at boot.

@vk2seb vk2seb changed the title DelayLine emits garbage when PSRAM not initialized to zero DelayLine: PSRAM zeroing needed post-configuration Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant