[sram_ctrl] Add support non-power-of-2 memory sizes - #30960
Open
vogelpi wants to merge 4 commits into
Open
Conversation
This parameter got added in 6b1b90c and to support non-power-of-2 memory sizes in SRAM_CTRL, it needs to be forwarded through the racl variant of this module. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit extends the RTL and the DV of SRAM_CTRL to support non-power-of-2 memory sizes. The RTL changes are minimal, most of the changes have already been done as part of prim_ram_1p_scr, see commit 071e0be. Most of the DV changes are related to: 1. Specifying the memory size as number of bytes rather than by defining the number of address bits, 2. correcting the prediction for accesses to unimplemented addresses in in the range [MemDepth * 4 : 2 ** AddrWidth - 1), 3. not triggering accesses to unimplemented addresses for throughput tests as they have a different timing which is harder to predict, 4. extending the minimal a_valid length before retracting a request for the access_during_key_req sequence to avoid signaling delayed out-of-range-access errors. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This configurations is suitable for checking non-power-of-2 sized SRAM_CTRL configurations. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
Since we taped out Earlgrey-PROD and later signed of SRAM_CTRL at D3 in lowRISC#22654, this block experienced some changes which should be reflected in the version number. While some changes are transparent to software (switch to wider internal LFSR, support for RAM tiling), others are software visible but backwards compatible (parameterizable support for RACL, parameterizable support for correcting single-bit ECC errors, support for parameterizing the number of outstanding TLUL transactions, support for non-power-of-2 memory sizes incl. address and data scrambling). This justifies a minor version increase and we may need further changes before the next signoff. Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
vogelpi
requested review from
andreaskurth,
hcallahan-lowrisc,
nasahlpa,
rswarbrick and
thommythomaso
and removed request for
a team and
hcallahan-lowrisc
August 7, 2026 14:43
Contributor
Author
|
CHANGE AUTHORIZED: hw/ip/sram_ctrl/data/sram_ctrl.hjson Version increase to reflect implemented changes since the last tapeout and signoff. CHANGE AUTHORIZED: hw/ip/sram_ctrl/rtl/sram_ctrl.sv Minimal RTL change to pass through an SV parameter for the tlul_adapter_sram module. |
thommythomaso
approved these changes
Aug 10, 2026
This file contains hidden or 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
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.
Commit 071e0be already added support for non-power-of-2 memory sizes to the scrambling primitive (prim_ram_1p_scr) and commit 912cedf added the same feature to ROM_CTRL. This now enables it for SRAM_CTRL.
We'll need this for the CHERIoT Memory Subsystem HWIP for Gen2.