Re: [hatari-devel] Hatari data cache tests |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Le 20/06/2015 00:24, Nicolas Pomarède a écrit :
I need to write some simple cache clear / fill cache / read data tests
to simulate all this.
as a quick check, I wrote a few line under devpac :
move.l $40000,d0
nop
move.l $40000,d0
nop
move.l $40000,d0
nop
this is the result with cycles when tracing cpu_all :
cpu video_cyc=127276 300@248 : 000C4EE8 2039 0004 0000 MOVE.L
$00040000,D0
cpu video_cyc=127284 308@248 : 000C4EEE 4e71 NOP
cpu video_cyc=127286 310@248 : 000C4EF0 2039 0004 0000 MOVE.L
$00040000,D0
cpu video_cyc=127292 316@248 : 000C4EF6 4e71 NOP
cpu video_cyc=127294 318@248 : 000C4EF8 2039 0004 0000 MOVE.L
$00040000,D0
cpu video_cyc=127300 324@248 : 000C4EFE 4e71 NOP
So, the first move takes 8 cycles, it's a miss since no one accessed
$40000 before. Next moves will be some hits and we see they now take 6
cycles.
At least, we see that cache has an effect on number of cycles (but I
didn't check 68030 doc, are 8 cycles for miss and 6 cycles for hit the
expected values when accessing 16 bit ram ?)
Nicolas