-
Notifications
You must be signed in to change notification settings - Fork 792
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
[prim_ram_1p] Ram tiling for sram_ctrl and prim_ram_1p #25625
base: master
Are you sure you want to change the base?
Conversation
474c469
to
e0ea37d
Compare
@@ -158,6 +162,8 @@ module top_earlgrey #( | |||
output lc_ctrl_pkg::lc_tx_t ast_lc_dft_en_o, | |||
input ast_pkg::ast_obs_ctrl_t obs_ctrl_i, | |||
input prim_ram_1p_pkg::ram_1p_cfg_t ram_1p_cfg_i, | |||
input prim_ram_1p_pkg::ram_1p_cfg_t [SramCtrlMainNumRamInst-1:0] sram_ctrl_main_cfg_i, | |||
input prim_ram_1p_pkg::ram_1p_cfg_t [SramCtrlMainNumRamInst-1:0] sram_ctrl_ret_aon_cfg_i, |
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.
That seems to be a bug in the generator.
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.
Fixed in #25665
This makes for interesting questions for prims in general:
I'm not sure which route is going to be better, but it might be worth thinking about and discussing. |
This is a good question. One reason for this parameter to be an instance level rather than a global package was in general to implement tiling one level higher even. I do not see a reason why tiling should be implemented in the tech prim rather than in the generic primitive. This would make backdoor loading much easier as it supports tiling as a first class citizen, e.g., when there is no tiling, there is only one loop iteration of the tiling loop. |
Thx @Razer6 and @a-will for proposing this change and raising relevant questions. Also looping in @matutem -- it would be great to get your perspective also on DV aspects. Other questions that come to my mind:
|
That's totally doable, though I wanted to start with sram_ctrl's memory first, as tiling might be used there first (bigger memory).
In general, I am raising the question of whether 2D tiling should be implemented in prim_ram_1p_adv. That way, the backdoor loading could be much more constant across different integrators. In general, I am a fan of passing arrays rather than a common type, which would need to be the common denominator supporting all possible tiling configs of the system, which leaves a lot of unused signals... |
I think the tiling information must be propagated via the parameter information as its dimensions are instance-dependent. Different instances have different dimensions, yielding different wide DFT signals. This cannot be determined at instance level via a a function. |
f7f26ef
to
7fd52d4
Compare
local: "false" | ||
expose: "true" | ||
}, | ||
{ name: "NumRamInst", |
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.
Why using this parameter if it can be derived from others? Seems redundant.
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.
Technically no need for that. Unfortunately, the topgen tooling cannot yet deal with the computed number of RAM instances. I'll file an issue on that, for a later improvement.
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.
Could this just be a localparam in the individual module holding the RAMs?
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.
Unfortunately no. This parameter is used as a dimension for the DFT signals, which depends on the number of RAM instances.
I think @a-will comment about other configs is regarding FPGA tiling? Also @Razer6 case is similar to the foundry concerns. In any case I think both cases are important and orthogonal, as they suggest tiling along rows or columns. As for the DV concerns, they probably mostly concern mem_bkdr_util, scrambling, and the such. My understanding is that those utils need to access individual arrays, so we may need to create multiple arrays in mem_bkdr per high level RAM using the configuration; that way the interface exposed by mem_bkdr for each high-level memory would be simpler. I assume row tiling will use tile 0 for the lowest addresses. Column tiling has to decide on endian-ness... fun :) The FPGA flows don't use mem_bkdr_util, and we currently splice the memory contents into the bitstream, yet I assume we need to scramble and generate ECC for them. Also, perhaps backdoor RAM access is possible for other FPGA vendors? Can we try to zoom into config in terms of rows and columns and then tackle mem_bkdr in one shot. WDYT? |
We have aligned here. We would seek to model tiling with parameters along both dimensions. This affects the number of RAM macro instances, which affects the size of the tech lib-specific ports in the port list. Thus, we need the parameter to flow from the top level, so it's available to the entire hierarchy for those ports. 🙂
No, no endianness ambiguity, please. The bit indices and the macro instance indices must always grow in the same direction. Endianness only affects how an image represented as a sequence of bytes gets laid out, and that is an orthogonal issue to tiling.
Backdoor access is generally only available if you build the logic yourself, hehe. At run time, that can get complicated, but it's interesting. For splicing specifically, yes, ECC and scrambling and such must be accommodated in the image construction. We have the utilities for this for flash_ctrl already, it turns out. |
f146b84
to
9cf4b18
Compare
44473e6
to
625e839
Compare
Signed-off-by: Robert Schilling <[email protected]> Signed-off-by: Robert Schilling <[email protected]>
CHANGE AUTHORIZED: hw/ip/otbn/rtl/otbn.sv This PR adds depth tiling parameters for |
No description provided.