Overclock.net banner

1 - 20 of 70 Posts

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #1
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


If you ever explored the world of bios modding your GPU you might had faced something like this:

Code:

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.

With my tool you can easily decode/encode any memory strap belonging to an AMD RX or R9 series GPU.

Code:

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:

Code:
########
TIMING_NAME_#1 = VALUE
TIMING_NAME_#2 = VALUE
TIMING_NAME_#3 = VALUE
TIMING_NAME_#4 = VALUE
....
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)
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
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:

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:

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:
####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:

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).

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
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...
  • 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.
Extract the archive and go inside "src" folder, run:

Code:

Code:
gcc R_Timings.c
if you need R9 strap support run:

Code:

Code:
gcc R_Timings.c -DSTRAP_R9=1
 

Attachments

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #3
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
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #5
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
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #7
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?
 

·
Registered
Joined
·
20 Posts
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
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #10

·
Registered
Joined
·
479 Posts
what is the procedure to use ohgodadecode for R9 290 bios I see diffrent timings when I compare ohgodadecode and R_Timings_R9

ohgodadecode - FFF1332000000000AD495930705509102D23E9030068C30022AA1C08640F1420BA8980A7000007C01914262B512E3E13

TRCDW=16 TRCDWA=11 TRCDR=21 TRCDRA=18 TRRD=0 TRC=16 Pad0=0

TNOPW=1 TNOPR=3 TR2W=18 TCCDL=1 TR2R=2 TW2R=9 Pad0=7 TCL=3 Pad1=0

TRP_WRA=0 TRP_RDA=80 TRP=13 TRFC=12 Pad0=0

PA2RDATA=2 Pad0=0 PA2WDATA=2 Pad1=0 TFAW=10 TCRCRL=5 TCRCWL=28 TFAW32=0

MC_SEQ_MISC1: 0x20140F64
MC_SEQ_MISC3: 0xA78089BA
MC_SEQ_MISC8: 0xC0070000

ACTRD=25 ACTWR=20 RASMACTRD=38 RASMACTWR=43

RAS2RAS=81 RP=46 WRPLUSRP=62 BUS_TURN=19

####SEQ_WR_CTL_D1####
DAT_DLY = 15
DQS_DLY = 15
DQS_XTR = 1
DAT_2Y_DLY = 0
ADR_2Y_DLY = 0
CMD_2Y_DLY = 0
OEN_DLY = 15
OEN_EXT = 3
OEN_SEL = 3
ODT_DLY = 0
ODT_EXT = 0
ADR_DLY = 1
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 = 10
TCKE = 10
SEQ_IDLE = 7
TCKE_PULSE_MSB = 0
SEQ_IDLE_SS = 8
####SEQ_RAS_TIMING####
TRCDW = 13
TRCDWA = 13
TRCDR = 18
TRCDRA = 18
TRRD = 5
TRC = 48
####SEQ_CAS_TIMING####
TNOPW = 0
TNOPR = 0
TR2W = 23
TCCDL = 2
TR2R = 5
TW2R = 9
TCL = 16
####SEQ_MISC_TIMING####
TRP_WRA = 45
TRP_RDA = 35
TRP = 18
TRFC = 62
####SEQ_MISC_TIMING2####
PA2RDATA = 0
PA2WDATA = 0
TFAW = 8
TCRCRL = 3
TCRCWL = 3
TFAW32 = 6
TWDATATR = 0
####ARB_DRAM_TIMING####
ACTRD = 25
ACTWR = 20
RASMACTRD = 38
RASMACTWR = 43
####ARB_DRAM_TIMING2####
RAS2RAS = 81
RP = 46
WRPLUSRP = 62
BUS_TURN = 19
####MC_SEQ_MISC####
MC_SEQ_MISC1 = 0x20140F64
MC_SEQ_MISC3 = 0xA78089BA
MC_SEQ_MISC8 = 0xC0070000
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #12
Quote:
Originally Posted by mirzet1976 View Post

what is the procedure to use ohgodadecode for R9 290 bios I see diffrent timings when I compare ohgodadecode and R_Timings_R9

ohgodadecode - FFF1332000000000AD495930705509102D23E9030068C30022AA1C08640F1420BA8980A7000007C01914262B512E3E13
Did you use win or linux? Did you compiled your ohgodadecode ? If not which binary are you using?
 

·
Registered
Joined
·
479 Posts

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #14

·
Registered
Joined
·
479 Posts
OK, and now how to use it for the R9 series GPU, can you write the procedure.
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #16
Quote:
Originally Posted by mirzet1976 View Post

OK, and now how to use it for the R9 series GPU, can you write the procedure.
Multiple solutions:
- Use this tool instead
- Compile OhGodADecode with R9 strap support (add -DSTRAP_R9=1 when you compile it)
- Wait for me to go home and I'll compile it for youy
 

·
Registered
Joined
·
479 Posts
I'll wait for you , thank U.
thumb.gif
 

·
AMD BIOS Alchemist
Joined
·
404 Posts
Discussion Starter #19
Quote:
Originally Posted by bardacuda View Post

You mention "OhGodAPet" in the OP. I could be wrong, but believe you might mean @wolf9466
I copied the "OhGodACompany - OhGodAGirl & OhGodAPet" from the source, if @wolf9466 is OhGodAPet i'll change the first post
biggrin.gif
@OhGodAGirl can you confirm?
 
1 - 20 of 70 Posts
Top