psx.wiki

Generated Program Timing by Code Segment: Difference between revisions

Revision as of 05:41, 23 October 2026
RemmyLee
(Hardware tests: See also links back from 37 existing pages to the new ones)
Revision as of 05:49, 23 October 2026
RemmyLee
(Hardware tests: the last 15 test pages (timers, SPU, CPU, GPU, DMA, CD-ROM, GTE), See also links both ways; uncited clock claim removed)
Line 1:Line 1:
+---
+title: Generated Program Timing by Code Segment
+type: test
+summary: Measures the time of 53 generated CPU programs and their smaller variants, each run from KSEG0, KSEG1 and KUSEG and at each word of a cache line.
+category: Hardware tests
+info: Machine = SCPH-5501
+info: Program = s1
+---
+
+## Overview
+
+The program is a set of 1,819 small programs: 53 generated programs, named r00000 to r00519, and variants made from each of them. Each one is called eight times, the first call cold, and the line gives its code segment and the eight times twice, as run1 and run2. The output does not contain the programs themselves, so a variant can be compared only with its own parent.[^run]
+
+Table: Variant names
+
+| Suffix | Variant |
+| --- | --- |
+| none | The generated program |
+| .h1, .h2 | The second half or the first half of its operations |
+| .s0, .s1 and on | One operation alone |
+| .flat | Its branches and loops unwrapped |
+| .cfg0 | Its memory control settings put back to the values found |
+| .segk0, .segk1, .segku | The same program run from another code segment |
+| .w0 to .w3 | The timed part started at another word of its cache line |
+
+## Results
+
+In all 1,819 lines run1 and run2 hold the same eight times. The times below are the median of calls 2 to 8.[^run]
+
+Run from KUSEG, every program took within 0.4 percent of its time from KSEG0, and in 50 of the 53 within 8 counts. Run from KSEG1, the programs took 1.00 to 6.12 times as long as from KSEG0: 29 of them less than 1.2 times as long, and 16 at least twice as long. The largest ratio was that of r00497, which took 737 counts from KSEG0 and 4,507 from KSEG1.[^run]
+
+Starting the timed part at another word of its cache line changed a program's time by 0 to 45 counts. The median change was 6 counts. Putting the memory control settings back to the values found changed the time of the 38 programs that have a .cfg0 variant by -854 to +1,380 counts.[^run]
+
+## Runs
+
+### 9 October 2026
+
+[s1/S1.txt](/tests/raw/20261009T0000Z-5501a-fuzz-s1/s1/S1.txt)
+
+## References
+
+[^run]: SCPH-5501 output: [s1/S1.txt](/tests/raw/20261009T0000Z-5501a-fuzz-s1/s1/S1.txt)