R_Timings - Encode/Decode RX/R9 Memory Straps - Overclock.net - An Overclocking Community

Forum Jump: 

R_Timings - Encode/Decode RX/R9 Memory Straps

Reply
 
Thread Tools
post #1 of 70 (permalink) Old 05-01-2017, 09:13 AM - Thread Starter
AMD BIOS Alchemist
 
Vento041's Avatar
 
Join Date: Feb 2016
Location: Italy
Posts: 385
Rep: 46
Based on OhGodADecode v1.01 by "OhGodACompany - @OhGodAGirl & OhGodAPet (@wolf9466)"
(I'm using a modified version of "ohgodadecode.h" from OhGodADecode code)

R_Timings is an easier way to manipulate timings straps (decode, edit, encode and even generate from scratch if you want).

This archive contains the sources (it should compile everywhere) and 2 windows binary (compiled for 32bit), one that works with RX timings strap and the other with R9 timings strap (R9 version is completely untested).
Download: R_Timing1.03.zip 239k .zip file

What's a memory strap? (Click to show)
If you ever explored the world of bios modding your GPU you might had faced something like this:
Code:
777000000000000022CC1C0031F67E57F05711183FCFB60D006C070124081420FA8900A0030000001E123A46DB354019
That's a timings strap ("encoded"), it's a string that describes how a GPU memory behave, precisely that string describes which timings my Sapphire RX 480 Nitro+ OC will use at 2000 MHz.

Usually higher memory frequency = more performance, but when you can't raise your frequency anymore, you try to lower your timings. Modifying directly a memory strap is hard that's why i created this tool.
How can I read/edit the timings of my card? (Click to show)
With my tool you can easily decode/encode any memory strap belonging to an AMD RX or R9 series GPU.
Code:
Decode with:
   R_Timings_RX.exe <96-char hex string> <output_file generated from an RX strap>
   R_Timings_R9.exe <96-char hex string> <output_file generated from an R9 strap>
Encode with:
   R_Timings_RX.exe <input_file generated from an RX strap>
   R_Timings_R9.exe <input_file generated from an R9 strap>

Yes, you can decode timings strap (like OhGodADecode did but with more timings shown), save them to a file, edit that file and generate a new timing strap from that file.

When you decode a timings strap the generated file will have this syntax/structure:
Code:
####<SECTION NAME>####
TIMING_NAME_#1 = VALUE
TIMING_NAME_#2 = VALUE
TIMING_NAME_#3 = VALUE
TIMING_NAME_#4 = VALUE
....
What timing should I change? (Click to show)
There still no complete guide about timing mods, usually lower timings = more performance but for now I'll write just here some infos that I got from others and by reading bios edit threads:
  • TRCDR & TRCDRA should always be equal
  • TRC = a limit for your memory clock, raising it will give you more stable higher memory clocks, lower it and you will get more performance (if you do not change your frequency) but memory could become unstable
  • Here https://docs.google.com/document/d/1CB8AtN0LhfR-kH0hi4pm6eMJfE3CNLLHB2bYt-nGpHI/edit there are some infos collected by @generaleramon when OhGodADecode was the only tool available
  • Common DDR timing knowledge is always good (most timing name are common)
  • PA2WDATA, PA2RDATA Debug only (so = 0 = good!)
  • Follow JDEC GDDR5 Standards (registration is free): https://www.jedec.org/sites/default/files/docs/JESD212C.pdf
  • I found this 49716_e6460_ds_nda_1.07.pdf and this AMD_RV710_ds_nda_1.01b.pdf, it seems that there are some infos about what each timing do
  • All the pdf linked on this post aren't really a guide to Polaris timings since they talk about older AMD architecture or about the GDDR5 standard in general, I've linked them because is useful to have at least a description on how the timing should work (since things probably didn't change too much from standard or previous AMD architectures)
Decoded file syntax rules! Follow these rules if you do not want to mess up your encoded strap! (Click to show)
Remember that the syntax is really strict (I've no time for beautiful user input parsing):
  • There must be a space before and after the '=' character!
  • Every TIMING_NAME is just there for you to easily understand what you are modifying, there must be only one space after it
  • Every VALUE is unsigned and there must be only one space before it and no space after it
  • Inside "ohgodadecode.h" you can find how many bits are allocated for each timing (so you can know the maximum value: 2^bit - 1)
  • Remember to double check when you encode! After you edited a file and got the encoded strap from it, try to decode that strap to see if the new file is the same as the original with your mods
Usage Example (Click to show)
I get my memory timings from my bios dump, I've an RX 480 so in this example I'll use R_Timings compiled with RX strap support (R_Timings_RX.exe if you get it from my archive).
This is my current modded (encoded) 2000 Mhz timing strap:
Code:
777000000000000022CC1C00CE616C41C0570F16B00B450A0068C70014051420FA8900A003000000100E3034A42A3116
To decode it, and save it in a file (let's called it "decoded.txt") I run (from a command prompt/terminal):
Code:
R_Timings_RX 777000000000000022CC1C00CE616C41C0570F16B00B450A0068C70014051420FA8900A003000000100E3034A42A3116 decoded.txt
Now a "decoded.txt" is created, I can open it ad change every value that I want, the generated file should have this structure: decoded.txt (Click to show)
####SEQ_WR_CTL_D1####
DAT_DLY = 7
DQS_DLY = 7
DQS_XTR = 0
DAT_2Y_DLY = 0
ADR_2Y_DLY = 0
CMD_2Y_DLY = 0
OEN_DLY = 7
OEN_EXT = 0
OEN_SEL = 0
ODT_DLY = 0
ODT_EXT = 0
ADR_DLY = 0
CMD_DLY = 0
####SEQ_WR_CTL_2####
DAT_DLY_H_D0 = 0
DQS_DLY_H_D0 = 0
OEN_DLY_H_D0 = 0
DAT_DLY_H_D1 = 0
DQS_DLY_H_D1 = 0
OEN_DLY_H_D1 = 0
WCDR_EN = 0
####SEQ_PMG_TIMING####
TCKSRE = 2
TCKSRX = 2
TCKE_PULSE = 12
TCKE = 12
SEQ_IDLE = 7
TCKE_PULSE_MSB = 0
SEQ_IDLE_SS = 0
####SEQ_RAS_TIMING####
TRCDW = 14
TRCDWA = 14
TRCDR = 24
TRCDRA = 24
TRRD = 6
TRC = 65
####SEQ_CAS_TIMING####
TNOPW = 0
TNOPR = 0
TR2W = 28
TCCDL = 3
TR2R = 5
TW2R = 15
TCL = 22
####SEQ_MISC_TIMING####
TRP_WRA = 48
TRP_RDA = 23
TRP = 20
TRFC = 164
####SEQ_MISC_TIMING2####
PA2RDATA = 0
PA2WDATA = 0
TFAW = 8
TCRCRL = 3
TCRCWL = 7
TFAW32 = 6
TWDATATR = 0
####ARB_DRAM_TIMING####
ACTRD = 16
ACTWR = 14
RASMACTRD = 48
RASMACTWR = 52
####ARB_DRAM_TIMING2####
RAS2RAS = 164
RP = 42
WRPLUSRP = 49
BUS_TURN = 22
####MC_SEQ_MISC####
MC_SEQ_MISC1 = 0x20140514
MC_SEQ_MISC3 = 0xA00089FA
MC_SEQ_MISC8 = 0x00000003
One I'm done editing my file (keep in mind all the syntax rules or the encoded string are going to be messed up for sure) I can encode it again with:
Code:
R_Timings_RX decoded.txt
The encoded timing strap will be shown in the terminal.

I did some testing and it seems to work, but I'd like more help from you guys (I need to be sure that every strap is decoded/encoded properly).

I tried to maintain the R9 strap compatibility but you have to try it for yourself (I do not have an R9).

Troubleshooting: Why R_Timings shows different values from OhGodADecode? (Click to show)
Respect the input file syntax and be sure to use the correct strap with the proper tool! Both R_Timings and OhGodADecode support RX and R9 straps, but if you need the support for R9 you must explicitly compile it with R9 support!

Use the right binary when you run these tools... Just to avoid any error I compiled OhGodADecode 1.01 again for both RX (ohgodadecode_RX.exe) and R9 (ohgodadecode_R9.exe) straps: OhGodADecode.zip 215k .zip file

When you generate a timing strap with R_Timing double check it with OhGodADecode. Just follow these steps:
  1. Select a timing strap as base
  2. Decode your base strap with R_Timing
  3. Edit the file created by R_Timing
  4. Encode the file with R_Timing to generate the new strap
  5. Decode the new strap with both R_Timings (save it to a new file) and OhGodADecode
  6. The 2 files (the new one and the one that you edited) should be equals and OhGodADecode should show the same values
Extremely short guide on how to OC and EDC Errors (Click to show) Memory OC - EDC Errors monitoring using HWiNFO - How to konow if your modded timings is working well (Click to show)
Download HWiNFO


The value is shown as "GPU Memory Errors", it counts errors only when the GPU is under load(3D).

When you overclock your memory and/or edit timings you always have to find the sweet spot between high-frequency, high-voltages, lower-timing and memory-errors... Long story short you can't simply crank up your frequencies, set your timings as low as possible and get free performance from it, your GPU will get unstable (or even crash) and as result the error detection and correction system will raise your timings to stabilize your card.

Every GPU have different sweet spot, my card perform well at 2100 MHz (with 0 errors), I could raise my frequencies up to 2150 MHz and, even if I get a few errors, I can still gain some performance but I like more the error counter to stay still at 0... There are multiple way to mod your timings, you could even raise them to allow higher frequencies to be used, there is no simple way to handle this, you must try multiple times every changes, even the smaller ones, running your benchmarks/games more and more times just to be sure that your memory is stable...
Changelog (Click to show)
  • v1.01 - Fixed typos
  • v1.02 - RX/R9 Mode now written on help screen (run program without arguments)
  • v1.03 - Changed "tR2R" to "tCDDS" and "tFAW32" to "t32AW", since these names are used in the JEDEC official standard

Off Topic:
// PROGRAMMER POINT OF VIEW

I wrote this is my free time, I know that there are better way to write this, I'll later update this project if needed. Any type of comment is appreciated.
How to compile R_Timings by yourself (Click to show)
Extract the archive and go inside "src" folder, run:
Code:
gcc R_Timings.c
if you need R9 strap support run:
Code:
gcc R_Timings.c -DSTRAP_R9=1

Zephyr R.B.R.T. (Red BIOS Rebellion Team)
(*) ATOMTableResize (*) R_Timings - Encode/Decode RX/R9 Memory Straps
(*) Sapphire RX 480 Nitro+ OC - Better Custom BIOS (*) SimpleBiosDiff
(*) Extremely short guide on EDC errors (*) jYABE - Yet Another Bios Editor (early stage of development)
"I want an XFX RX 590 Fatboy " cit. me


Vento041 is offline  
Sponsored Links
Advertisement
 
post #2 of 70 (permalink) Old 05-01-2017, 09:46 AM
New to Overclock.net
 
Apneal's Avatar
 
Join Date: Nov 2016
Posts: 12
Rep: 1
Vento,

Throw this sucker up in a GitHub repository!

Great work!
Apneal is offline  
post #3 of 70 (permalink) Old 05-01-2017, 10:17 AM - Thread Starter
AMD BIOS Alchemist
 
Vento041's Avatar
 
Join Date: Feb 2016
Location: Italy
Posts: 385
Rep: 46
Quote:
Originally Posted by Apneal View Post

Vento,

Throw this sucker up in a GitHub repository!

Great work!

Surces are located inside the zip, but I'll put them in a repo soon biggrin.gif

Zephyr R.B.R.T. (Red BIOS Rebellion Team)
(*) ATOMTableResize (*) R_Timings - Encode/Decode RX/R9 Memory Straps
(*) Sapphire RX 480 Nitro+ OC - Better Custom BIOS (*) SimpleBiosDiff
(*) Extremely short guide on EDC errors (*) jYABE - Yet Another Bios Editor (early stage of development)
"I want an XFX RX 590 Fatboy " cit. me


Vento041 is offline  
Sponsored Links
Advertisement
 
post #4 of 70 (permalink) Old 05-01-2017, 06:09 PM
New to Overclock.net
 
ducegt's Avatar
 
Join Date: Jul 2015
Posts: 746
Rep: 36
Awesome job. I use a 290 strap with my 285 and even though it now clocks less, performance is greater.

ducegt is offline  
post #5 of 70 (permalink) Old 05-01-2017, 11:48 PM - Thread Starter
AMD BIOS Alchemist
 
Vento041's Avatar
 
Join Date: Feb 2016
Location: Italy
Posts: 385
Rep: 46
Quote:
Originally Posted by ducegt View Post

Awesome job. I use a 290 strap with my 285 and even though it now clocks less, performance is greater.

Always be sure that your memory is stable! Read the "Memory OC - EDC Errors monitoring using HWiNFO" section, it could be useful smile.gif

Zephyr R.B.R.T. (Red BIOS Rebellion Team)
(*) ATOMTableResize (*) R_Timings - Encode/Decode RX/R9 Memory Straps
(*) Sapphire RX 480 Nitro+ OC - Better Custom BIOS (*) SimpleBiosDiff
(*) Extremely short guide on EDC errors (*) jYABE - Yet Another Bios Editor (early stage of development)
"I want an XFX RX 590 Fatboy " cit. me


Vento041 is offline  
post #6 of 70 (permalink) Old 05-02-2017, 01:49 AM
New to Overclock.net
 
twofreckles's Avatar
 
Join Date: Nov 2016
Posts: 20
Rep: 0
never mind I think I made a mistake while decoding smile.gif Awesome tool testing...
twofreckles is offline  
post #7 of 70 (permalink) Old 05-02-2017, 02:05 AM - Thread Starter
AMD BIOS Alchemist
 
Vento041's Avatar
 
Join Date: Feb 2016
Location: Italy
Posts: 385
Rep: 46
Quote:
Originally Posted by twofreckles View Post

never mind I think I made a mistake while decoding smile.gif Awesome tool testing...

Just to know biggrin.gif
That strap comes from an R9 or an RX gpu?
Did you used my binaries (if yes, which one?) or you recompiled them (if yes, how?)?
Which version of OhGodADecode did you use? You recompiled it?

Zephyr R.B.R.T. (Red BIOS Rebellion Team)
(*) ATOMTableResize (*) R_Timings - Encode/Decode RX/R9 Memory Straps
(*) Sapphire RX 480 Nitro+ OC - Better Custom BIOS (*) SimpleBiosDiff
(*) Extremely short guide on EDC errors (*) jYABE - Yet Another Bios Editor (early stage of development)
"I want an XFX RX 590 Fatboy " cit. me


Vento041 is offline  
post #8 of 70 (permalink) Old 05-02-2017, 02:17 AM
New to Overclock.net
 
twofreckles's Avatar
 
Join Date: Nov 2016
Posts: 20
Rep: 0
Yee I used your r9 instead of RX, which gives obviously different results compering to Wolfs code. When did it right output is same... smile.gif
twofreckles is offline  
post #9 of 70 (permalink) Old 05-02-2017, 02:23 AM
New to Overclock.net
 
Join Date: Jul 2012
Location: Louisiana
Posts: 1,431
Rep: 65
https://www.techpowerup.com/vgabios/157203/asus-r9290x-4096-140407

Anyone want to put the the 1250-1374 memory straps to the 1375-1499 for me? thumb.gif (don't worry about it if it isn't easy)


+rep to OP!!!
boot318 is offline  
post #10 of 70 (permalink) Old 05-02-2017, 02:31 AM - Thread Starter
AMD BIOS Alchemist
 
Vento041's Avatar
 
Join Date: Feb 2016
Location: Italy
Posts: 385
Rep: 46
Quote:
Originally Posted by boot318 View Post

https://www.techpowerup.com/vgabios/157203/asus-r9290x-4096-140407

Anyone want to put the the 1250-1374 memory straps to the 1375-1499 for me? thumb.gif (don't worry about it if it isn't easy)


+rep to OP!!!

You should ask about bios modding in the bios edit thread for your card (https://www.overclock.net/t/1561372/hawaii-bios-editing-290-290x-295x2-390-390x). Btw memory timings modding is not always that easy.

Zephyr R.B.R.T. (Red BIOS Rebellion Team)
(*) ATOMTableResize (*) R_Timings - Encode/Decode RX/R9 Memory Straps
(*) Sapphire RX 480 Nitro+ OC - Better Custom BIOS (*) SimpleBiosDiff
(*) Extremely short guide on EDC errors (*) jYABE - Yet Another Bios Editor (early stage of development)
"I want an XFX RX 590 Fatboy " cit. me


Vento041 is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the Overclock.net - An Overclocking Community forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off