Closed TheAnimatrix closed 2 years ago
I've simulated it with a ddr3 model i got from micron.
The standalone core needs you to manually run the initialization sequence.
How do i do that ?
The initialization is usually done by software running on a softcore. The code that does it is here: https://github.com/enjoy-digital/litex/blob/master/litex/soc/software/liblitedram/sdram.c
If i were to initialize with the vexriscV cpu, how would i simulate the same ? Would it be automatic provided i load the litedram_core_rom.init into the cpu ?
I'm assuming litedram_core_rom.init is sdram.c but compiled
I'm attempting to try and do the minimal required to properly initialize this and finding documentation has been really difficult :(
Unfortunately I have never simulated the core so I can't really answer how to do it. If I were you I would try to understand the unit tests: https://github.com/enjoy-digital/litedram/tree/master/test
They do simulate the core so it's definitely possible.
How do i generate a core with the smallest processor (serv?) just for calibrating the dram and then obtain control of the dram's interface for the actual read/write's from my custom logic. I generated a build from litex-boards/arty-s7.py but it doesn't seem to expose the dram's interface, just the ports for external constraints.
The dram seems to generate 2 ports, one wishbone by default and another based on requirement that can be native, axi or wishbone. If i'm right the first port is to program the controller's registers for calibration and the second port is for the actual usage right ?
For those who have similar beginner issues, feel free to contact me -> frustratymous@gmail.com
@TheAnimatrix Could you please share your findings, I am facing the same issue and I am stuck, it would be great if you share how you managed to carry out the init_seq manually. Thanks in advance!
I've generated a DDR3 core with
litedram_gen examples/arty.yml
my arty.yml is as follows
I find that when i simulate the output module litedram_core.v with vivado and a simple testbench which just deasserts reset after 1000ns, that init_done and init_error are never asserted.
I've simulated 600us and all the module does is Precharge and Refresh every 7-8us. Where is the mode register initialization ? ZQ Calibration etc ? Do i need to generate a cpu for this ? How can i do it without a cpu ?
Am i missing something ? I'm very new here so i'm still trying to figure stuff out, help is appreciated. Thanks.