-
Notifications
You must be signed in to change notification settings - Fork 828
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
[sram_ctrl] Add readback feature #23212
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6270e58
to
72e0d3d
Compare
8c4c146
to
de3b69f
Compare
When enabled with the SRAM_CTRL.READBACK CSR, the SRAM readback mode checks each read and write to the SRAM. On a read, the readback mode issues a second read to the same address to check, whether the correct data was fetched from memory. On a write, the readback mode issues a read to check, whether the data was actually written into the memory. To avoid that the holding register is read, the readback is delayed by one cycle. On a mismatch, a fatal error is triggered and the STATUS.READBACK_ERROR register is set. To avoid RTL changes as much as possible, the readback mode is implemented in the tlul_sram_byte module. In this module, after the initial read or write was executed, the bus interface to the host is stalled and the readback is performed. Due to the bus stalling, a performance impact is expected. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org> Co-authored-by: Greg Chadwick <gac@lowrisc.org>
vogelpi
approved these changes
May 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for addressing the additional feedback. This looks great!
The one failing CI check (CW310 Test ROM) seems to be unrelated to this PR; all other checks passed --> merging |
nasahlpa
added a commit
to nasahlpa/ibex
that referenced
this pull request
May 28, 2024
This commit updates the RAM ports inside ibex_top to reflect recent changes introduced with lowRISC/opentitan#23212 (SRAM readback mode). Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This was referenced May 28, 2024
nasahlpa
added a commit
to nasahlpa/opentitan
that referenced
this pull request
May 30, 2024
This commit adds the DIF functions for the readback mode (c.f. lowRISC#23212)and a basic test. Closes lowRISC#23365 Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
nasahlpa
added a commit
to nasahlpa/opentitan
that referenced
this pull request
May 30, 2024
This commit adds the DIF functions for the readback mode (c.f. lowRISC#23212) and a basic test. Closes lowRISC#23365 Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
nasahlpa
added a commit
to nasahlpa/opentitan
that referenced
this pull request
May 30, 2024
This commit adds the DIF functions for the readback mode (c.f. lowRISC#23212) and a basic test. Closes lowRISC#23365 Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This was referenced Jun 3, 2024
nasahlpa
added a commit
to nasahlpa/ibex
that referenced
this pull request
Jun 4, 2024
This commit updates the RAM ports inside ibex_top to reflect recent changes introduced with lowRISC/opentitan#23212 (SRAM readback mode). Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
GregAC
pushed a commit
to lowRISC/ibex
that referenced
this pull request
Jun 6, 2024
This commit updates the RAM ports inside ibex_top to reflect recent changes introduced with lowRISC/opentitan#23212 (SRAM readback mode). Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Closed
nasahlpa
added a commit
to nasahlpa/opentitan
that referenced
this pull request
Dec 10, 2024
With the introduction of the SRAM readback mode (c.f., lowRISC#23212) memory requests can be delayed. The sram_ctrl_passthru_mem_tl_intg_err failed occasionally because the integrity alert was expected to arrive without any delay. This commit increases the max_delay parameter for the expected alert to take the readback mode delay into account. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
nasahlpa
added a commit
to nasahlpa/opentitan
that referenced
this pull request
Dec 10, 2024
With the introduction of the SRAM readback mode (c.f., lowRISC#23212) memory requests can be delayed. The SRAM DV tests are adapted such that the readback feature can be disabled or enabled anytime during a test. The sram_ctrl_passthru_mem_tl_intg_err failed occasionally because the integrity alert was expected to arrive without any delay. This commit increases the max_delay parameter for the expected alert to take the readback mode delay as well as a potential enabling or disabling of the feature into account. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
nasahlpa
added a commit
that referenced
this pull request
Dec 11, 2024
With the introduction of the SRAM readback mode (c.f., #23212) memory requests can be delayed. The SRAM DV tests are adapted such that the readback feature can be disabled or enabled anytime during a test. The sram_ctrl_passthru_mem_tl_intg_err failed occasionally because the integrity alert was expected to arrive without any delay. This commit increases the max_delay parameter for the expected alert to take the readback mode delay as well as a potential enabling or disabling of the feature into account. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Razer6
pushed a commit
to Razer6/opentitan
that referenced
this pull request
Jan 2, 2025
With the introduction of the SRAM readback mode (c.f., lowRISC#23212) memory requests can be delayed. The SRAM DV tests are adapted such that the readback feature can be disabled or enabled anytime during a test. The sram_ctrl_passthru_mem_tl_intg_err failed occasionally because the integrity alert was expected to arrive without any delay. This commit increases the max_delay parameter for the expected alert to take the readback mode delay as well as a potential enabling or disabling of the feature into account. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When enabled with the SRAM_CTRL.READBACK CSR, the SRAM readback mode checks each read and write to the SRAM.
On a read, the readback mode issues a second read to the same address to check, whether the correct data was fetched from memory. On a write, the readback mode issues a read to check, whether the data was actually written into the memory. To avoid that the holding register is read, the readback is delayed by one cycle.
On a mismatch, a fatal error is triggered and the STATUS.READBACK_ERROR register is set.
To avoid RTL changes as much as possible, the readback mode is implemented in the tlul_sram_byte module. In this module, after the initial read or write was executed, the bus interface to the host is stalled and the readback is performed. Due to the bus stalling, a performance impact is expected.