UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer imb29
Observer
936 Views
Registered: ‎02-14-2018

SDK library/command to adjust refresh rate of SDRAM

Hi all, 

 

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! 

0 Kudos
11 Replies
Moderator
Moderator
913 Views
Registered: ‎11-28-2016

Re: SDK library/command to adjust refresh rate of SDRAM

Hello @imb29,

 

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:

custom_part_refresh.PNG

 

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.

Observer imb29
Observer
870 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@ryana

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. 

0 Kudos
Moderator
Moderator
854 Views
Registered: ‎02-11-2014

Re: SDK library/command to adjust refresh rate of SDRAM

Hello @imb29,

 

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.

 

ddr2_trefi.PNG

 

Thanks,

Cory

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Observer imb29
Observer
850 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@coryb

 

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. 

0 Kudos
Moderator
Moderator
847 Views
Registered: ‎02-11-2014

Re: SDK library/command to adjust refresh rate of SDRAM

Hello @imb29,

 

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.

 

Thanks,

Cory

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Observer imb29
Observer
842 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@coryb

 

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? 

0 Kudos
Moderator
Moderator
827 Views
Registered: ‎02-11-2014

Re: SDK library/command to adjust refresh rate of SDRAM

Hello @imb29,

 

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.

 

Thanks,

Cory

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Observer imb29
Observer
823 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@coryb

 

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. 

0 Kudos
Moderator
Moderator
820 Views
Registered: ‎02-11-2014

Re: SDK library/command to adjust refresh rate of SDRAM

Hello @imb29,

 

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.

 

Thanks,

Cory

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Observer imb29
Observer
762 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@coryb

 

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? 

0 Kudos
Highlighted
Observer imb29
Observer
736 Views
Registered: ‎02-14-2018

Re: SDK library/command to adjust refresh rate of SDRAM

@coryb

 

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? 

0 Kudos