stffrdhrn / sdram-controller

Verilog SDRAM memory controller

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some addresses are not accessable

parkhalov opened this issue · comments

It seems sdram-controller cannot provide access to address spaces 0x0200-0x03FF, 0x0600-0x07FF, 0x0A00-0x0BFF etc. It looks like controller cannot process less significant bit of the row address. To check this bug firstly run DE0_Nano_ControlPanel software
control_panel and zeroize 0x2000 words writing (sequental write) this file
const_0000_sz_2000.zip
Then press disconnect button and program board with this project
my_dram_tester.zip
This project contains last version of sdram_controller.v and files from dram_tester with following changes in tester_ctrl.v:
//---------------------------------------
WR_INC:
//if (&addr_o) /* Address has overflowed go to RD */
// next = RD;
if (addr_o>='h800)
next = PASS;
//---------------------------------------
to provide just writing of 0x800 words of data.
After programming is done press "connect" button on the DE0_Nano_ControlPanel and read 0x2000 words with sequental read button.
I've got the following dump
rd-ramtester.zip
Thanks.

sorry, i havent had time to look at this. i you or anyone else has a patch or a testbench where this can be reproduced in simulation it would be best. I dont use the de0 nano control panel.

commented

I have created a test of this sdram-controller that runs on a Terasic DE0-Nano board. It tests all 32MB as fast as possible at a clock rate of 100Mz. Basically it fills all locations with randomish looking data once and then repeatedly reads and verifies the contents.

So far everything has been working correctly. No unreachable address spaces found.

If anyone wants to run it and look it over it is here: https://github.com/ZiCog/sodor-spinal/tree/master/quartus/sdram_controller_tb

This is destined to be the main RAM of my home brew RISC V core. Which is written in SpinalHDL. So the test was actually generated by SpinalHDL from Scala code, as you will find in that repository if you are interested.

Thanks for this nice piece of work!

Thanks for testing this! I did know of one person using this controller in production with a CPU and I hadn't heard of any such issues. This helps.