Tweaking Barcelona via WPCREDIT.
This is an English version of the article. Russian version is available
In this article I would like to tell about one of the most important applications of WPCREDIT - tweaking integrated A64 controllers and Barcelona in particular. Due that Intel desktop chipsets are using PCI-E registers, we can ask about whether the usage of WPCREDIT is actual in nowadays, what has been done in the discussion of my previous article about
. But there are AMD processors that have the north bridge, integrated into the CPU. One of the most important components of the north bridge is the memory controller (DCT). And all of his settings are just inside the PCI registers of the north bridge (0,0,0).
So what interesting innovations are represented in the new AMD microarchitecture? First of all, it’s the two memory controllers, each with a 64-bit bus working with its own memory channel. This means, we can set different timings for different memory channels, but the memory frequency must be the same. The processor may be configured to behave as a single dual-channel DCT; this is called ganged mode; or to behave as two single-channel DCTs; this is called unganged mode. The ganged mode is similar to the behavior of the K8 processor memory controller. I want to mention, that according to AMD terminology: a DRAM channel is the group of the DRAM interface pins that connect to one series of DIMMs. The processor supports two DDR channels. The processor includes two DCTs. Each DCT controls one 64-bit DDR DIMM channel (
BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h Processors
, p.60). We can get a clue about the influence of the number and type of memory modules on the maximum supported frequency from the picture:
Let's move to the tweaking itself. You should download the
with the registers description. Open WPCREDIT and select the device with the DevID-VendorID 1202-1022. I want to mention that the description of the registers is in 32-bit view, so, maybe it would be better to switch WPCREDIT into an appropriate view. There won’t be problems with the numeration then. Let’s have a look on a list of the most interesting, in my opinion, settings:
MaxRdLatency: maximum read latency
EarlyArbEn: early arbitration enable
Trdrd[3:2]: read to read timing
Twrwr[3:2]: write to write timing
Twrrd[3:2]: write to read DIMM termination turnaround
Tcwl: CAS write latency
Twr: write recovery
MemClkDis: MEMCLK disable
Trrd: row to row delay (or RAS to RAS delay)
Twr: write recovery time.
Trc: row cycle time.
Tras: row active strobe
Trtp: read to precharge time
Trp: row precharge time
Trcd: RAS to CAS delay
Tcl: CAS latency
Trfc3: auto-refresh row cycle time for logical DIMM 3
Trfc2: auto-refresh row cycle time for logical DIMM 2
Trfc1: auto-refresh row cycle time for logical DIMM 1
Trfc0: auto-refresh row cycle time for logical DIMM 0
Tref: refresh rate
Trdrd[1:0]: read to read timing
Twrwr[1:0]: write to write timing
Twrrd[1:0]: write to read DIMM termination turnaround
Twtr: internal DRAM write to read command delay
TrwtTO: read to write turnaround for data, DQS contention
TrwtWB: read to write turnaround for opportunistic write bursting
IdleCycLowLimit: idle cycle low limit
DynPageCloseEn: dynamic page close enable
Width128: width of DRAM interface in 128-bit mode
FourActWindow[3:0]: four bank activate window
DcqBypassMax: DRAM controller queue bypass maximum
SlowAccessMode: slow access mode (a.k.a. 2T mode)
DcqArbBypassEn: DRAM controller arbiter bypass enable
MemClkFreq: memory clock frequency
The full list is much bigger and can be found in the datasheet. Let's see, how to work with them. For example, let's set timings to 3-3-3-12 1T for DDR2-667. Select register 88. Look on the register description:
Set 88[3:0]=0010. So the value should be set to "1" in bit 1, and "0" for the rest (3,2,0) of them. As a result the register will look as following: 88[9:0]=0000000010. By making this, we will have 3-3-3. Then set 88[15:12]=1001. This will give us 3-3-3-12. And, finally, set 94=0. We have got the "formula" 3-3-3-12 1T. To change it to 4-4-4-12 1T, we should change register 88 as 88[9:0]=0100010011. The same way, by following the registers description in the datasheet, we can set all
that we want and not only them.
I hope, this article will help those people, who are working hard on researching the work of A64 memory controllers and those, who want to set it up on maximum performance.
You can leave your feedback