10-19-2018 10:09 AM
Currently I am working on a project that involves reading/writing to the DDR2 SDRAM of a Nexys4 DDR board. I have been looking for a way to adjust the refresh rate from a function call within the SDK. Does anyone know of a library that might have said function calls? I am looking to extend the refresh rate for at least a second or so. Any help would be greatly appreciated!
10-19-2018 03:33 PM
There are only a few ways you can adjust the refresh rate for the DDR2 on the board and most likely none of them have a path in SDK.
The first is to recustomize the MIG IP, target the part on the board (as indicated by Nexus), then create a custom part for that board, then specify a different refresh rate:
The other path is to enable User Refresh in the IP and then generate logic to control the app_ref_req signal driven on the app_interface on the controller. Take a look at UG586 in the User Refresh section starting on page 170. The configuration GUI doesn't have an option to turn on the user refresh feature so you have to change the USER_REFRESH parameter in the top level of the IP to "ON". There you can control the app_ref_req signal to do the same thing.
A link to UG586 is in my signature.
10-22-2018 12:19 PM
Thanks for the reply! I have looked into the create a custom part option and it appears that the refresh I am targeting is trefi. Is there any way to have it go longer than the specified range 3.9-7.8 uS for me? I need to atleast stop the refresh on it for a solid second.
10-23-2018 07:41 AM
The range is defined by the DDR2 JEDEC spec and is also dependent on the temperature that you will be running at. If you divy outside of these values then you will be violating the spec.
10-23-2018 07:59 AM
Thanks for that information. I am wondering where you were able to reference that information? It has two notes at the bottom saying it is an optional feature and can be done. I would like to read further into that option if possible.
10-23-2018 08:06 AM
The Table is found in the DDR2 JEDEC document here: https://www.jedec.org/standards-documents/docs/jesd-79-2e
The Note2 is stating that the 3.9us refresh rate for 85C to 95C is optionally supported with a call out to section 3.10 in the same document for clarification.
10-23-2018 08:13 AM - edited 10-23-2018 08:32 AM
Thanks for that, I was able to find the documentation. I also realized that that "optional feature" is just for some DRAM to let it operate up to 95 C. But from the way NOTE 1 sounds it seems like there is still a way to "violate" the refresh time. Does that imply that I can extend it to the ranges that I am looking for like mili seconds or seconds?
10-23-2018 09:59 AM
Yes you can modify it to whatever you like, but as NOTE1 states if you run into data corruption you must re-write valid data before a valid READ an be executed. We really do not recommend violating this parameter.
10-23-2018 10:28 AM
This is great news! I want to see which bits flip due to capacitor decay over time in the SDRAM. Is there any documentation how I can go about violating this parameter. I am able to access the design_1_mig_7series_0_1.v file with the trefi but vivado says it is read only.. would I be able to edit it to a write and read and change this value to "violate" the parameter.
10-23-2018 10:34 AM
You have to make the modifications to the file outside of Vivado. Keep in mind anytime you reset and regenerate your files using Vivado, the changes will be lost.
10-23-2018 12:01 PM
Again thanks for the reply! Is there any possible way that I can be sure that the value of trefi is being implemented properly. I have re generated the bitstream and am launching SDK to run some code for reading and writing to the memory. Any way that I can verify in sdk or after bitstream generation?
10-25-2018 10:07 AM
I have tried time and time again. I have edited the .v file to have trefi be longer than it should be such as 1 second or even 10. It does not seem to be affecting anything. Is it somehow being over ridden and defaulting the values back within the default range?