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

Carrying out the LiteDRAM standalone core initialization manually, through wishbone ctrl interface #327

Open
dinaabdelbaky opened this issue Feb 28, 2023 · 5 comments

Comments

@dinaabdelbaky
Copy link

dinaabdelbaky commented Feb 28, 2023

image
Hi,
I am new to the liteDRAM. I generated the core in a standalone mode, targeting Artix device, I also generated the corr. csv containing the csr addresses. I am using the core with Micron DDR3 model and a testbench to carryout some simulations and explorations of memory operations.
I checked out the generated sdram_phy.h it includes init_sequence, I tried to carry out the above sequence by writing to the corresponding csr registers. However, I didn't see anything happening on the DFI interface or the memory interface.
Please point out what I am missing.
P.S: I have seen some similar questions, and some of the answers points out to writing data from an init file, but I don't really understand it, so please explain how to correctly initialize the core and the memory device.
Thanks in advance!

@dinaabdelbaky
Copy link
Author

dinaabdelbaky commented Feb 28, 2023

Hi,
I am new to the liteDRAM. I generated the core in a standalone mode, targeting Artix device, I also generated the corr. csv containing the csr addresses. I am using the core with Micron DDR3 model and a testbench to carryout some simulations and explorations of memory operations.
I checked out the generated sdram_phy.h it includes init_sequence, I tried to carry out the above sequence by writing to the corresponding csr registers. However, I didn't see anything happening on the DFI interface or the memory interface.
Please point out what I am missing.
P.S: I have seen some similar questions, and some of the answers points out to writing data from an init file, but I don't really understand it, so please explain how to correctly initialize the core and the memory device.
Thanks in advance!

@yyx32
Copy link

yyx32 commented May 16, 2023

Hi @dinaabdelbaky ,are you generated core with gen.py script?
Can you tell me how to get corr.csv and sdram_phy.h ?

@dinaabdelbaky
Copy link
Author

Hi @yyx32 Yes, I generated the core following those steps:
The addresses of the registers would be in the csv file.
The sdram_phy.h is generated under "output_drisoftware\include\generated"
image

@dinaabdelbaky
Copy link
Author

dinaabdelbaky commented May 18, 2023

And I have worked out the issue I have mentioned above, the problem was not the sequence, I didn't notice that the addresses in the CSV were 32 bit wide and the wishbone interface was less wide. A simple fix to that is to take the address of the csr register in the generated csv and do right bit shifts, the amount of bit shift is equivalent 32-wishbone width.

@yyx32
Copy link

yyx32 commented May 24, 2023

I will try it.Thanks bro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants