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
Support for multiple SDRAM PHYs in single SoC #411
Conversation
89a3d07
to
2b03c16
Compare
Thanks for this. This is a huge work that enhances the capabilities, but i'm also wondering if it's does not complexify too much the code for the actual use-case it's trying to cover. I suggest we discuss in #346 before going further. |
Hi @mglb, I believe this PR can be reworked to be significantly smaller and less invasive, however it is unlikely I'll get a chance to provide proper suggestions until early next week. |
@mithro like, first commit (f0ada2e) + enjoy-digital/litedram@069d89c + enjoy-digital/litedram@a9add8e? All other commits add support for multiple PHYs in BIOS or make it possible to write generic software with support for arbitrary number of PHYs. |
f045a8e
to
d389005
Compare
Closing, we'll continue the discussion in: #346. In the future I would appreciate being able to discuss these features before too much time is spent in the implementation, since here it was probably too early for the project and could probably have been worked around for the Pano Logic G2. |
Requires enjoy-digital/litedram#157
Summary:
LiteXSoC.add_sdram(...)
:main_ram
or as a fully independent region (passmain_ram = False
toadd_sdram()
).sdram_phy.h
. Each entry contains properties and pointers to functions used by BIOS code.mem.h
.CONFIG_L2_SIZE
has been replaced byCONFIG_L2
. The former was not removed for compatibility with older code.memtest
optionally takes 2 arguments: base address and size in bytes.meminfo
.sdrhw
orsdrrdbuf
) operate -currentsdramphy <phy_number>
.flush_l2_cache
flushes all L2 caches.litex_sim
with--add-sdram key=val [key=val ...]
command line argument:module
,data-width
,address
,max-size
,region-name
,verbosity
,init
.--with-sdram
(and other old sdram-related arguments) or without it.Known limitations:
Todo:
I'm testing the code with litex_sim and on Pano Logic G2 (litex-buildenv).
Example litex_sim command: