psx.wiki

DMA2 Progress and Cache Line Fills: Difference between revisions

Revision as of 05:27, 23 October 2026
RemmyLee
(GTE Lighting Input Latency: split the cross-link sentence)
Revision as of 05:40, 23 October 2026
RemmyLee
(Hardware tests: 15 more test pages (CPU, DMA, SPU, GPU, MDEC, CD-ROM, bus), each with See also links to the pages that measure the same parts)
Line 1:Line 1:
+---
+title: DMA2 Progress and Cache Line Fills
+type: test
+summary: Measures how far a DMA2 list gets while the BIOS logo race path runs, what a load, store or branch adds to a cache line fill, accesses after a load's use, and how long a held timer write waits during a list.
+category: Hardware tests
+info: Machine = SCPH-5501
+info: Program = followup11
+---
+
+## Overview
+
+RPM replays the instruction path of the BIOS logo race window in four parts, cold, straight after DMA2 starts a list. At three points inside each part and once after it, the replay reads root counter 2 and the DMA2 address register, which names the node DMA2 is sending. The list is 1024 empty nodes built forward, a 1024 entry ordering table built from the top down, or that table with three GP0 NOP primitives near its end. Each shape runs three times.[^run]
+
+CLF makes one call of a routine of six cache lines. The call runs cold after a cache flush, then warm, then cold straight after a list of 1024 empty nodes starts, and the set is repeated three times. Line 0 sets up base registers and the other lines are NOPs except for the instructions of the row: a load, a halfword store or a taken BEQ at one of the four words of line 2, accesses as the last words of line 1, and a load with its use 2 words later.[^run]
+
+UAX times 100 turns of a RAM load, a NOP, an ADDU of the loaded value, 3 or 5 NOPs, and a second load of RAM or I_STAT, alone and during a list. HCL writes the root counter 2 mode, which zeroes the counter, then runs k NOPs from the cache and 256 NOPs from KSEG1 and reads the count. Each k from 8 to 512 runs alone and straight after a list of 1024 empty nodes starts.[^run]
+
+See also:
+
+- [CPU Speed During a DMA2 List](/tests/dma2-cpu-speed/)
+- [Load and Use During a DMA2 List](/tests/dma2-load-use/)
+- [BIOS Logo Race and Uncached Calls](/tests/bios-logo-race/)
+
+## Results
+
+### List Progress During the Race Path
+
+All three list shapes kept the same pace while the race path ran. DMA2 was on node 140 at about 1,840 cycles, node 423 at about 5,780 and node 944 at about 12,960, and the list had ended by the next point at about 14,150 to 14,200 cycles. The three runs of each shape differed by at most one node at any point. The three primitives near the end of the table moved the node numbers by at most one.[^run]
+
+Table: Cycles from the list's start and DMA2 node in the first run of each shape
+
+| Point | Empty list | Ordering table | Table with 3 primitives |
+| --- | --- | --- | --- |
+| 1 | 1,841 / 140 | 1,856 / 140 | 1,843 / 140 |
+| 2 | 3,290 / 245 | 3,302 / 245 | 3,293 / 245 |
+| 3 | 4,445 / 327 | 4,458 / 327 | 4,441 / 327 |
+| 4 | 5,781 / 423 | 5,792 / 423 | 5,781 / 423 |
+| 5 | 7,418 / 542 | 7,424 / 542 | 7,404 / 541 |
+| 6 | 8,669 / 636 | 8,679 / 636 | 8,665 / 635 |
+| 7 | 9,990 / 730 | 10,000 / 730 | 9,985 / 729 |
+| 8 | 11,360 / 830 | 11,380 / 830 | 11,360 / 829 |
+| 9 | 12,960 / 944 | 12,973 / 944 | 12,957 / 943 |
+| 10 | 14,155 / ended | 14,172 / ended | 14,185 / ended |
+
+### Cache Line Fills
+
+The routine of NOPs took 82 to 84 cycles cold and 33 warm. Cold during the list it took 135 to 136. Warm, a load in the routine added 2 cycles and a load with its use 2 words later added 6, while a store or a taken branch added nothing. Cold, the rows ranged from 80 to 92 cycles alone and from 130 to 148 during the list. Several rows with a halfword store, a word store or a taken branch ran faster cold during the list than the routine of NOPs did.[^run]
+
+Table: Cycles for one call over three runs
+
+| Row | Cold alone | Warm | Cold during |
+| --- | --- | --- | --- |
+| All NOPs | 82 to 84 | 33 | 135 to 136 |
+| LW at word 0 of line 2 | 84 to 90 | 35 | 147 |
+| LW at word 1 of line 2 | 84 | 35 | 142 |
+| SH at word 0 of line 2 | 85 | 33 | 130 |
+| SH at word 1 of line 2 | 89 to 90 | 33 | 135 |
+| Taken BEQ at word 2 of line 2 | 80 | 33 | 130 |
+| Taken BEQ at word 3 of line 2 | 88 to 89 | 33 | 135 |
+| SW as line 1's last word | 85 | 33 | 130 |
+| Two SH as line 1's last words | 91 to 92 | 33 | 148 |
+| LW and its use 2 words later | 91 to 92 | 39 | 146 to 148 |
+| SH at word 3 of lines 1 and 2 | 90 | 33 | 143 |
+
+### Accesses After a Use
+
+With 3 NOPs after the ADDU, a second RAM load made the loop take about 2,065 cycles alone and 2,552 during the list. With 5 NOPs it took about 2,270 alone and about 3,530 during the list. The two NOPs more therefore cost about 200 cycles alone and about 980 during the list. A second load of I_STAT behaved the same way at about 200 cycles less: 1,865 and 2,344 cycles with 3 NOPs, and 2,057 and 3,315 with 5.[^run]
+
+### Held Timer Write
+
+Alone the count rose from 1,581 at k 8 to 2,089 at k 512, which is about one cycle a NOP. During the list the count was 8 at k 8 in both runs and at k 12 in the first run, so the counter was zeroed only shortly before it was read. At k 12 in the second run and at every k from 16 on, the count of 3,158 to 3,831 was about 1,570 to 1,750 cycles more than alone.[^run]
+
+Table: Root counter 2 count after the mode write
+
+| k | Alone | During the list |
+| --- | --- | --- |
+| 8 | 1,581 | 8 |
+| 12 | 1,587 | 8 and 3,160 |
+| 16 | 1,589 | 3,158 |
+| 32 | 1,605 | 3,171 |
+| 128 | 1,705 | 3,262 |
+| 512 | 2,089 | 3,831 |
+
+## Runs
+
+### 3 October 2026
+
+[00RUN.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/00RUN.txt)
+
+```
+===== 00 RUN | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+4 tests
+A chain program, linked at 80100000
+Saved on the card in slot 2, from image 1
+COP0 at start: BPC 00000000 BDA 00000000 TAR 80016128 DCIC 00000000 BadVaddr 00000480 BDAM 00000000
+BPCM 00000000 SR 00000000 Cause 00000020 EPC 80016C84 PRId 00000002
+```
+
+[01RPM.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/01RPM.txt)
+
+```
+===== 01 RPM F11 RACE PROGRESS | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+BadVaddr as the group starts: 00000480
+The race window's path, cold, during a list: timer 2 from the list's start / the node
+DMA2 is on, at three points in each part and after it (E ended, P a prim). Three runs.
+empty list: 1841/140 3290/245 4445/327 5781/423 7418/542 8669/636 9990/730 11360/830 12960/944 14155/E 14923/E 15662/E 16502/E 17249/E 18075/E 19018/E; list done at 19096
+OT: 1856/140 3302/245 4458/327 5792/423 7424/542 8679/636 10000/730 11380/830 12973/944 14172/E 14940/E 15675/E 16516/E 17266/E 18096/E 19041/E; list done at 19119
+OT with 3 prims: 1843/140 3293/245 4441/327 5781/423 7404/541 8665/635 9985/729 11360/829 12957/943 14185/E 14952/E 15692/E 16539/E 17287/E 18117/E 19055/E; list done at 19138
+empty list: 1841/140 3293/245 4443/327 5785/423 7408/541 8669/635 9989/729 11364/829 12961/943 14151/E 14921/E 15662/E 16500/E 17244/E 18078/E 19016/E; list done at 19094
+OT: 1847/140 3300/245 4448/327 5783/423 7420/542 8681/636 10000/730 11373/830 12965/944 14158/E 14922/E 15661/E 16502/E 17249/E 18075/E 19010/E; list done at 19088
+OT with 3 prims: 1841/140 3293/245 4443/327 5784/423 7418/542 8677/636 9996/730 11373/830 12967/944 14200/E 14968/E 15702/E 16553/E 17305/E 18141/E 19086/E; list done at 19164
+empty list: 1837/140 3288/245 4444/327 5781/423 7411/542 8674/636 9994/730 11370/830 12962/944 14161/E 14931/E 15666/E 16511/E 17263/E 18099/E 19044/E; list done at 19122
+OT: 1851/140 3305/245 4459/327 5798/423 7431/542 8685/636 10004/730 11381/830 12974/944 14174/E 14939/E 15673/E 16515/E 17267/E 18098/E 19033/E; list done at 19113
+OT with 3 prims: 1839/140 3285/245 4439/327 5774/423 7414/542 8678/636 9999/730 11372/830 12965/944 14197/E 14961/E 15700/E 16541/E 17292/E 18116/E 19067/E; list done at 19145
+Done.
+```
+
+[02CLF.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/02CLF.txt)
+
+```
+===== 02 CLF F11 LINE FILLS | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+BadVaddr as the group starts: 00000480
+One call of six cache lines: cold (FlushCache first) / warm alone / cold during a list of
+1024 empty nodes, three times. Line 0 sets the bases, lines 1 to 5 are NOPs but the row's.
+all NOPs: 84/33/136 82/33/135 82/33/135
+lw at word 0 of line 2: 90/35/147 88/35/147 84/35/147
+lw at word 1 of line 2: 84/35/142 84/35/142 84/35/142
+lw at word 2 of line 2: 84/35/142 84/35/142 84/35/147
+lw at word 3 of line 2: 88/35/147 88/35/147 84/35/147
+sh at word 0 of line 2: 85/33/130 85/33/130 85/33/130
+sh at word 1 of line 2: 89/33/135 90/33/135 90/33/135
+sh at word 2 of line 2: 85/33/130 85/33/130 85/33/130
+sh at word 3 of line 2: 85/33/130 85/33/130 85/33/130
+taken beq at word 0 of line 2: 83/33/130 83/33/130 83/33/130
+taken beq at word 1 of line 2: 86/33/135 84/33/134 84/33/134
+taken beq at word 2 of line 2: 80/33/130 80/33/130 80/33/130
+taken beq at word 3 of line 2: 88/33/135 89/33/135 88/33/135
+lw at word 0 of line 3 (4 after line 2's start): 84/35/146 84/35/146 84/35/142
+lw as line 1's last word: 84/35/142 84/35/147 89/35/148
+sh as line 1's last word: 90/33/135 89/33/135 85/33/134
+sw as line 1's last word: 85/33/130 85/33/130 85/33/130
+two sh as line 1's last words: 91/33/148 92/33/148 92/33/148
+lw at word 0 and its use at word 2 of line 2: 91/39/147 92/39/146 92/39/148
+sh at word 3 of lines 1 and 2: 90/33/143 90/33/143 90/33/143
+Done.
+```
+
+[03UAX.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/03UAX.txt)
+
+```
+===== 03 UAX F11 AFTER THE USE | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+BadVaddr as the group starts: 00000480
+100 turns of a RAM lw, a NOP, an addu of it, a NOPs, then a second access, alone and
+during a list of 1024 empty nodes (followup8 UAX ran a 0, 1, 2, 4, 6).
+RAM lw, 3 after the use: alone 2069, during 2552, list done at 10940; alone 2064, during 2551, list done at 10898;
+RAM lw, 5 after the use: alone 2277, during 3531, list done at 10960; alone 2266, during 3528, list done at 10907;
+I_STAT lw, 3 after the use: alone 1865, during 2344, list done at 10735; alone 1864, during 2337, list done at 10691;
+I_STAT lw, 5 after the use: alone 2057, during 3315, list done at 10704; alone 2057, during 3327, list done at 10671;
+Done.
+```
+
+[04HCL.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/04HCL.txt)
+
+```
+===== 04 HCL F11 HELD WRITE | BIOS 19951204 System ROM Version 3.0 11/18/96 A
+BadVaddr as the group starts: 00000480
+A timer 2 mode write (which zeroes it), k NOPs from the cache, 256 NOPs from KSEG1, then
+the count: alone, and straight after a DMA2 list of 1024 empty nodes starts (k 0-8: HCR).
+k 8: alone 1581, during 8; alone 1582, during 8;
+k 12: alone 1587, during 8; alone 1585, during 3160;
+k 16: alone 1589, during 3158; alone 1589, during 3160;
+k 24: alone 1601, during 3163; alone 1597, during 3166;
+k 32: alone 1605, during 3171; alone 1607, during 3164;
+k 64: alone 1639, during 3202; alone 1637, during 3202;
+k 128: alone 1705, during 3262; alone 1701, during 3262;
+k 256: alone 1829, during 3388; alone 1833, during 3395;
+k 512: alone 2089, during 3831; alone 2085, during 3831;
+Done.
+```
+
+## References
+
+[^run]: SCPH-5501 output: [followup11/00RUN.txt](/tests/raw/20261003T0000Z-5501a-card-o/followup11/00RUN.txt) and the files beside it.