Based on <a class="bbcode_url" href="https://github.com/OhGodACompany/OhGodADecode" target="_blank">OhGodADecode</a> v1.01 by "OhGodACompany - <a data-huddler-embed="href" href="/u/535739/OhGodAGirl">@OhGodAGirl</a> & OhGodAPet (<a data-huddler-embed="href" href="/u/363639/wolf9466">@wolf9466</a>)"<br>

(I'm using a modified version of "ohgodadecode.h" from OhGodADecode code)<br><br><b>R_Timings</b> is an easier way to manipulate timings straps (<span style="text-decoration:underline;">decode</span>, <span style="text-decoration:underline;">edit</span>, <span style="text-decoration:underline;">encode</span> and even <span style="text-decoration:underline;">generate from scratch</span> if you want).<br><br>

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).<br><b>Download:</b>

<span huddler_attributes="{"plugin":"attachment","params":{"id":"47806","name":"R_Timing1.03.zip","description":"","size":239,"type":"zip"}}" huddler_plugin="attachment">

<a

class="attachment " href="/attachments/47806" title=""><span class="file zip">R_Timing1.03.zip <span class="details">239k .zip file</span></span>

</a></span><br><br><a class="spoiler-link H-spoiler-toggle" href="#"><strong>What's a memory strap?</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">If you ever explored the world of bios modding your GPU you might had faced something like this:

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>777000000000000022CC1C0031F67E57F05711183FCFB60D006C070124081420FA8900A0030000001E123A46DB354019</code>

</pre></div>

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

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.</div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>How can I read/edit the timings of my card?</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">You need to use a bios editor compatible for your card or hex edit your bios directly:

<ul class="bbcode_list"><li><a class="bbcode_url" href="http://www.overclock.net/t/1604567/polaris-bios-editing-rx5xx-rx4xx">Polaris Bios Editing ( RX5xx / RX4xx )</a></li>

<li><a class="bbcode_url" href="http://www.overclock.net/t/1592384/fiji-bios-editing-fury-fury-x-nano-radeon-pro-duo">Fiji Bios Editing ( Fury / Fury X / Nano / Radeon Pro Duo )</a></li>

<li><a class="bbcode_url" href="http://www.overclock.net/t/1561372/hawaii-bios-editing-290-290x-295x2-390-390x">Hawaii Bios Editing ( 290 / 290X / 295X2 / 390 / 390X )</a></li>

</ul></div>

<br>

With my tool you can easily decode/encode any memory strap belonging to an AMD RX or R9 series GPU.<br><div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<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></code>

</pre></div>

<br>

Yes, you can decode timings strap (like OhGodADecode did but with more timings shown), save them to a file, <span style="text-decoration:underline;">edit that file and generate a new timing strap from that file.</span><br><br>

When you decode a timings strap the generated file will have this syntax/structure:<br><div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>####<SECTION NAME>####

TIMING_NAME_#1 = VALUE

TIMING_NAME_#2 = VALUE

TIMING_NAME_#3 = VALUE

TIMING_NAME_#4 = VALUE

....</code>

</pre></div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>What timing should I change?</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">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:

<ul class="bbcode_list"><li>TRCDR & TRCDRA should always be equal</li>

<li>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</li>

<li>Here <a class="bbcode_url" href="https://docs.google.com/document/d/1CB8AtN0LhfR-kH0hi4pm6eMJfE3CNLLHB2bYt-nGpHI/edit" target="_blank">https://docs.google.com/document/d/1CB8AtN0LhfR-kH0hi4pm6eMJfE3CNLLHB2bYt-nGpHI/edit</a> there are some infos collected by <a data-huddler-embed="href" href="/u/473363/generaleramon">@generaleramon</a> when OhGodADecode was the only tool available</li>

<li>Common DDR timing knowledge is always good (most timing name are common)</li>

<li>PA2WDATA, PA2RDATA Debug only (so = 0 = good!)</li>

<li>Follow JDEC GDDR5 Standards (registration is free): <a class="bbcode_url" href="https://www.jedec.org/sites/default/files/docs/JESD212C.pdf" target="_blank">https://www.jedec.org/sites/default/files/docs/JESD212C.pdf</a></li>

<li>I found this <a class="bbcode_url" href="https://devhub.amd.com/wp-content/uploads/Docs/49716_e6460_ds_nda_1.07.pdf" target="_blank">49716_e6460_ds_nda_1.07.pdf</a> and this <a class="bbcode_url" href="https://dev.xdevs.com/attachments/download/233/AMD_RV710_ds_nda_1.01b.pdf" target="_blank">AMD_RV710_ds_nda_1.01b.pdf</a>, it seems that there are some infos about what each timing do</li>

<li><span style="text-decoration:underline;">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)</span></li>

</ul></div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>Decoded file syntax rules! Follow these rules if you do not want to mess up your encoded strap!</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden"><span style="text-decoration:underline;">Remember that the syntax is really strict</span> (I've no time for beautiful user input parsing):

<ul class="bbcode_list"><li>There must be a space before and after the '=' character!</li>

<li>Every TIMING_NAME is just there for you to easily understand what you are modifying, there must be only one space after it</li>

<li>Every VALUE is unsigned and there must be only one space before it and no space after it</li>

<li>Inside "ohgodadecode.h" you can find how many bits are allocated for each timing (so you can know the maximum value: 2^bit - 1)</li>

<li><span style="text-decoration:underline;">Remember to double check when you encode!</span> 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</li>

</ul></div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>Usage Example</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">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).<br>

This is my current modded (encoded) 2000 Mhz timing strap:

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>777000000000000022CC1C00CE616C41C0570F16B00B450A0068C70014051420FA8900A003000000100E3034A42A3116</code>

</pre></div>

To decode it, and save it in a file (let's called it "decoded.txt") I run (from a command prompt/terminal):

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>R_Timings_RX 777000000000000022CC1C00CE616C41C0570F16B00B450A0068C70014051420FA8900A003000000100E3034A42A3116 decoded.txt</code>

</pre></div>

Now a "decoded.txt" is created, I can open it ad change every value that I want, the generated file should have this structure:

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>decoded.txt</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">####SEQ_WR_CTL_D1####<br>

DAT_DLY = 7<br>

DQS_DLY = 7<br>

DQS_XTR = 0<br>

DAT_2Y_DLY = 0<br>

ADR_2Y_DLY = 0<br>

CMD_2Y_DLY = 0<br>

OEN_DLY = 7<br>

OEN_EXT = 0<br>

OEN_SEL = 0<br>

ODT_DLY = 0<br>

ODT_EXT = 0<br>

ADR_DLY = 0<br>

CMD_DLY = 0<br>

####SEQ_WR_CTL_2####<br>

DAT_DLY_H_D0 = 0<br>

DQS_DLY_H_D0 = 0<br>

OEN_DLY_H_D0 = 0<br>

DAT_DLY_H_D1 = 0<br>

DQS_DLY_H_D1 = 0<br>

OEN_DLY_H_D1 = 0<br>

WCDR_EN = 0<br>

####SEQ_PMG_TIMING####<br>

TCKSRE = 2<br>

TCKSRX = 2<br>

TCKE_PULSE = 12<br>

TCKE = 12<br>

SEQ_IDLE = 7<br>

TCKE_PULSE_MSB = 0<br>

SEQ_IDLE_SS = 0<br>

####SEQ_RAS_TIMING####<br>

TRCDW = 14<br>

TRCDWA = 14<br>

TRCDR = 24<br>

TRCDRA = 24<br>

TRRD = 6<br>

TRC = 65<br>

####SEQ_CAS_TIMING####<br>

TNOPW = 0<br>

TNOPR = 0<br>

TR2W = 28<br>

TCCDL = 3<br>

TR2R = 5<br>

TW2R = 15<br>

TCL = 22<br>

####SEQ_MISC_TIMING####<br>

TRP_WRA = 48<br>

TRP_RDA = 23<br>

TRP = 20<br>

TRFC = 164<br>

####SEQ_MISC_TIMING2####<br>

PA2RDATA = 0<br>

PA2WDATA = 0<br>

TFAW = 8<br>

TCRCRL = 3<br>

TCRCWL = 7<br>

TFAW32 = 6<br>

TWDATATR = 0<br>

####ARB_DRAM_TIMING####<br>

ACTRD = 16<br>

ACTWR = 14<br>

RASMACTRD = 48<br>

RASMACTWR = 52<br>

####ARB_DRAM_TIMING2####<br>

RAS2RAS = 164<br>

RP = 42<br>

WRPLUSRP = 49<br>

BUS_TURN = 22<br>

####MC_SEQ_MISC####<br>

MC_SEQ_MISC1 = 0x20140514<br>

MC_SEQ_MISC3 = 0xA00089FA<br>

MC_SEQ_MISC8 = 0x00000003</div>

One I'm done editing my file (<span style="text-decoration:underline;">keep in mind all the syntax rules or the encoded string are going to be messed up for sure</span>) I can encode it again with:

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>R_Timings_RX decoded.txt</code>

</pre></div>

The encoded timing strap will be shown in the terminal.</div>

<br><span style="text-decoration:underline;">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).</span><br><br>

I tried to maintain the R9 strap compatibility but you have to try it for yourself (I do not have an R9).<br><br><a class="spoiler-link H-spoiler-toggle" href="#"><strong>Troubleshooting: Why R_Timings shows different values from OhGodADecode?</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden"><span style="text-decoration:underline;">Respect the input file syntax</span> and <span style="text-decoration:underline;">be sure to use the correct strap with the proper tool</span>! 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!<br><br>

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:

<span huddler_attributes="{"plugin":"attachment","params":{"id":"47719","name":"OhGodADecode.zip","description":"","size":215,"type":"zip"}}" huddler_plugin="attachment">

<a

class="attachment " href="/attachments/47719" title=""><span class="file zip">OhGodADecode.zip <span class="details">215k .zip file</span></span>

</a></span><br><br>

When you generate a timing strap with R_Timing double check it with OhGodADecode. Just follow these steps:

<ol class="bbcode_list"><li>Select a timing strap as base</li>

<li>Decode your base strap with R_Timing</li>

<li>Edit the file created by R_Timing</li>

<li>Encode the file with R_Timing to generate the new strap</li>

<li>Decode the new strap with both R_Timings (save it to a new file) and OhGodADecode</li>

<li>The 2 files (the new one and the one that you edited) should be equals and OhGodADecode should show the same values</li>

</ol></div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>Extremely short guide on how to OC and EDC Errors</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden"><a class="bbcode_url" href="http://www.overclock.net/t/1604567/polaris-bios-editing-rx5xx-rx4xx/4210#post_26294392">http://www.overclock.net/t/1604567/polaris-bios-editing-rx5xx-rx4xx/4210#post_26294392</a></div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>Memory OC - EDC Errors monitoring using HWiNFO - How to konow if your modded timings is working well</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden"><a class="bbcode_url" href="https://www.hwinfo.com/download.php" target="_blank"><b>Download HWiNFO</b></a><br><a class="H-lightbox-open" href="http://www.overclock.net/content/type/61/id/2879091/"><img alt="" class="lightbox-enabled" data-id="2879091" data-type="61" src="http://www.overclock.net/content/type/61/id/2879091/width/500/height/1000/flags/LL" style="; width: 500px; height: 313px"></a><br><br>

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

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... <b>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</b>.<br><br>

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...</div>

<a class="spoiler-link H-spoiler-toggle" href="#"><strong>Changelog</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">

<ul class="bbcode_list"><li>v1.01 - Fixed typos</li>

<li>v1.02 - RX/R9 Mode now written on help screen (run program without arguments)</li>

<li>v1.03 - Changed "tR2R" to "tCDDS" and "tFAW32" to "t32AW", since these names are used in the JEDEC official standard</li>

</ul></div>

<br><b>Off Topic:<br>

// PROGRAMMER POINT OF VIEW</b><br><span style="text-decoration:underline;">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.</span><br><a class="spoiler-link H-spoiler-toggle" href="#"><strong>How to compile R_Timings by yourself</strong> <span class="spoiler-help">(Click to show)</span></a><div class="spoiler-hidden">Extract the archive and go inside "src" folder, run:

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>gcc R_Timings.c</code>

</pre></div>

if you need R9 strap support run:

<div class="bbcode_code">

<div class="bbcode_code_head">Code:</div>

<pre>

<code>gcc R_Timings.c -DSTRAP_R9=1</code>

</pre></div>

</div>