Wiz Ram Timings Test


notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
After some discussion with Exophase I've decided to try out various settings and managed to get some results. On emulators I tested (gpSP and PicoDrive) there is visible improvement, something like 2-10% depending on emulator and game. It works similar to GP2X RAM timings, only that it's less effective (GP2X has silly values set by default, so it helps a lot more there, Wiz default values are mostly sane).

So I want you (yes You, if you have a Wiz) to test this out and see if works for you. It works for me, but my Wiz is only prototype and has a different RAM part than retail ones. What might happen are some stability issues or complete crashes/hangs (should be back to normal after restart).

Here is gpSP with RAM timings, and here is the timing setup program. You can add it to any program with wrapper script (see gpsp.gpe for example). You basically add
Code:
./pollux_set 'ram_timings=2,9,4,1,1,1,1'
Format is <CAS,tRC,tRAS,tWR,tMRD,tRP,tRCD>, defaults are 2,9,5,3,2,3,3 .

BTW, pollux_set can also setup LCD timings and CPU clock, example:
Code:
./pollux_set 'lcd_timings=397,1,37,277,341,0,17,337;dpc_clkdiv0=9;cpuclk=700;ram_timings=2,9,4,1,1,1,1'
 
Last edited by a moderator:
Great! I can confirm that the program works. It seem to be stable too. I tested Quake 2 with this and I get 0.4 fps more with the timedemo at 800 MHz. Not the world but we know that Quake 2 isn't so much affected from the memory bottleneck. I will try more programs...

Notaz, I asked this already in another thread: Is it possible to overclock the RAM or is it already at the limit?



[Edit:] I get 0,6 fps more with Quake 2 @533 Mhz. The settings are stable during 1 hour Quake2 demo loop @750 MHz.
GpSP works stable, too.

Regards,
Stephan
 
Someone try in Temper too, please? :C With fast forward on, although that's not really a totally accurate depiction since that frameskips. Best to run in "benchmark mode" but you'd have to do that from the command line.
 
Best to run in "benchmark mode" but you'd have to do that from the command line.


What's the exact synatx?


Could this method also improve the Amiga emulator?

Sure. Will try that later. (Or try it out yourself)
 
sbock said:
What's the exact synatx?

Make a savestate to slot 0 for where you want to benchmark, then run:

temper.gpe <rom_path> -b

I think the benchmark will last 300 frames, or 5 seconds. I can't remember if I've changed it or not.

Oh yeah, and if you don't have a console to get output from you should pipe the results to a file.
 
Last edited by a moderator:
Dragon Spirit, Start demonstration Level 1, 533 MHz without RAM tweaks

Code:
benchmark took 5000 ms (5.000000 ms per frame)
Code:
benchmark took 5148 ms (5.148000 ms per frame)
Code:
benchmark took 5188 ms (5.188000 ms per frame)

Dragon Spirit, Start demonstration Level 1, 533 MHz with RAM Tweaks

Code:
benchmark took 4689 ms (4.689000 ms per frame)
Code:
benchmark took 4720 ms (4.720000 ms per frame)
Code:
benchmark took 4830 ms (4.830000 ms per frame)

I don't know, how exact/plausible these values are. They seem to vary a little bit on each run. Maybe the savestate is not very meaningful...
Sometimes the video output fail with RAM tweak. I try to investigate further...
 
Yeah, I don't know why the values fluctuate as much as they do. It looks like the speedup isn't bad, though. Thanks for testing.

.. also, looks like it's 1000 frames now, haha. I guess I changed it since it's a lot faster than gpSP on GP2X (where I was first using 300, as far as I can recall)
 
sbock said:
Notaz, I asked this already in another thread: Is it possible to overclock the RAM or is it already at the limit?
The problem is that RAM is clocked using the system clock, which also drives almost everything except the CPU (sound, display, SD card cotroller, timers, etc). If you change system clock I'd expect to see all kinds of breakage, but I'll try that sometime just for fun.
 
Last edited by a moderator:
Sounds interesting. Looking forward to the results. We need that firmware source so this stuff could be implemented by default :)
 
Default RAM timings in the CAANOO:

memregs[0x14802>>1]=0x2f22
memregs[0x14804>>1]=0x3843

If i'm not wrong:
ram_timings[0]=3
ram_timings[1]=8
ram_timings[2]=4
ram_timings[3]=3
ram_timings[4]=2
ram_timings[5]=2
ram_timings[6]=2
This means: 3,10,6,3,2,2,2.

They seem too high values compared to the WIZ ones: 2,9,5,3,2,3,3.

I have tried to put 2,9,4,1,1,1,1 and the CAANOO crashes.
This setting seems to work: 3,9,4,1,1,1,1.

Does it means the CAANOO RAM is worse than WIZ one or i miss something?
 
From ED's teardown, Caanoo is using 2x NT5DS64M8BS-5T: http://www.nanya.com/NanyaAdmin/GetFiles.ashx?ID=128 (so they used 2 8-bit DDRs presumably splitting the 16-bit data-bus, instead of using 2 16-bit DDRs with two chip selects or selected by an address bit, which probably makes more sense from a layout point of view)

Since GPH got the worse "5T" chip was used CAS 2 is not available. But CAS 2.5 is, so you should try again with the first value set to 2.5 (notaz's program accepts floats for this parameter).

For 133MHz system clock the datasheet says these values (cycles @ 133MHz):
CAS latency: 2.5 cycles
tRC: 55ns (8 cycles)
tRAS: 40ns (6 cycles)
tWR: 15ns (2 cycles)
tMRD: ???
tRP: 15ns (2 cycles)
tRCD: 15ns (2 cycles)

So you can (kind of) see where they got the values from, although CL 3 is just bad, unless they're running the system clock at 166 or 200MHz now.
 
Thanks for the information, Exophase.

I have tried but it doesn't run :( :
"ram_timings=2.5,8,6,2,2,2,2"
"ram_timings=2.5,10,8,2,2,2,2"
 
Back
Top