Overclock.net › Forums › Graphics Cards › AMD/ATI › R_Timings - Encode/Decode RX/R9 Memory Straps
New Posts  All Forums:Forum Nav:

R_Timings - Encode/Decode RX/R9 Memory Straps

post #1 of 39
Thread Starter 
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:
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
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

Edited by Vento041 - 5/7/17 at 10:56pm
post #2 of 39
Vento,

Throw this sucker up in a GitHub repository!

Great work!
post #3 of 39
Thread Starter 
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
post #4 of 39
Awesome job. I use a 290 strap with my 285 and even though it now clocks less, performance is greater.
Gaming Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel 7700K ASRock Z270 K6 Gaming Fatality R9 285 TridentZ 3600 15-15-35 
Hard DriveCoolingOSMonitor
Samsung EVO 850 Corsair H115i Windows 10 Nixeus NX-Vue24a 
KeyboardPowerCaseMouse
Corsair K70 Rapidfire  Corsair RM850X Corsair 600Q Logitech G303 
Mouse PadAudio
Steelseries Qck+ Integrated  
  hide details  
Reply
Gaming Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel 7700K ASRock Z270 K6 Gaming Fatality R9 285 TridentZ 3600 15-15-35 
Hard DriveCoolingOSMonitor
Samsung EVO 850 Corsair H115i Windows 10 Nixeus NX-Vue24a 
KeyboardPowerCaseMouse
Corsair K70 Rapidfire  Corsair RM850X Corsair 600Q Logitech G303 
Mouse PadAudio
Steelseries Qck+ Integrated  
  hide details  
Reply
post #5 of 39
Thread Starter 
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
post #6 of 39
never mind I think I made a mistake while decoding smile.gif Awesome tool testing...
Edited by twofreckles - 5/2/17 at 12:59am
post #7 of 39
Thread Starter 
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?
post #8 of 39
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
post #9 of 39
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!!!
post #10 of 39
Thread Starter 
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 (http://www.overclock.net/t/1561372/hawaii-bios-editing-290-290x-295x2-390-390x). Btw memory timings modding is not always that easy.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: AMD/ATI
Overclock.net › Forums › Graphics Cards › AMD/ATI › R_Timings - Encode/Decode RX/R9 Memory Straps