Rename init-0.4th..init-9.4th to workload-0.4th..workload-9.4th; fix stale WL-HI/WL-LO doc
These are alternate boot personality capsules, not files doe.4th dispatches from -- confirmed by reading doe.4th itself (it generates its own synthetic workload internally, DOE-WORK) and mkcapsule.c (only the exact filename "init.4th" is special-cased as the active MAMA_INIT capsule). "workload-N.4th" names them for what they are without colliding with that reserved name. Renamed the 10 files (git mv, preserving history) and their own self-referential header comments (also fixed a pre-existing typo, "init-4.th" -> "workload-4.4th"), updated capsules/README.md, capsules/MANIFEST.md (21 references), .claude/CLAUDE.md, and a tools/mkcapsule.c comment. Also fixed experiments/bare_metal/README.md's "Adding a Custom Workload Capsule" section, discovered stale while doing this rename: it documented a WL-HI/WL-LO dispatch table and a wl_id CSV column that don't exist anywhere in the current capsules/ tree or doe.4th's own CSV header -- corrected to describe what's actually there (no pluggable workload dispatch; a custom workload is run by substituting it in as the boot's own init.4th). Verified: mkcapsule --lint clean (35 files, 0 violations), all 3 architectures build with zero new warnings, amd64 boots to zuse)ok> with an unchanged dict_hash/capsule_hash from every prior boot this session (0xc8f4b09e36f4fc4a / 0x1ef4939ed32ec1e6) and zero faults. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EXieurDfDSsDFdnSyusuWo
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
71bcb72a59
commit
5c1b31669e
@@ -0,0 +1,98 @@
|
||||
|
||||
Block 4606
|
||||
|
||||
( SINUSOIDAL WAVE WORKLOAD - Smooth oscillation )
|
||||
( Approximated via lookup table with random modulation )
|
||||
( Randomized amplitude and frequency )
|
||||
|
||||
: COMPUTE ( n -- )
|
||||
0 SWAP 0 DO I 7 * + LOOP DROP ;
|
||||
|
||||
Block 4615
|
||||
( Sine lookup: 16 steps per quarter wave via CASE )
|
||||
( sin: 0,10,20,31,41,50,59,67,74,81,87,91,95,98,99,100 )
|
||||
: SIN-STEP ( phase -- intensity )
|
||||
15 AND CASE
|
||||
0 OF 0 ENDOF 1 OF 10 ENDOF
|
||||
2 OF 20 ENDOF 3 OF 31 ENDOF
|
||||
4 OF 41 ENDOF 5 OF 50 ENDOF
|
||||
6 OF 59 ENDOF 7 OF 67 ENDOF
|
||||
8 OF 74 ENDOF 9 OF 81 ENDOF
|
||||
10 OF 87 ENDOF 11 OF 91 ENDOF
|
||||
12 OF 95 ENDOF 13 OF 98 ENDOF
|
||||
14 OF 99 ENDOF 15 OF 100 ENDOF
|
||||
ENDCASE ;
|
||||
|
||||
Block 4625
|
||||
|
||||
( Full sine wave via quarter-wave symmetry )
|
||||
|
||||
: FULL-SIN ( phase -- intensity )
|
||||
63 AND
|
||||
DUP 16 < IF SIN-STEP EXIT THEN
|
||||
DUP 32 < IF 31 SWAP - SIN-STEP EXIT THEN
|
||||
DUP 48 < IF 32 - SIN-STEP EXIT THEN
|
||||
63 SWAP - SIN-STEP ;
|
||||
|
||||
Block 4635
|
||||
( Sinusoidal wave with random amplitude/frequency modulation )
|
||||
42 SEED
|
||||
: SINE-PULSE ( phase amplitude -- )
|
||||
SWAP FULL-SIN * 100 / 1+
|
||||
COMPUTE ;
|
||||
: SINE-CYCLE ( steps base-amp base-wait -- )
|
||||
ROT 0 DO
|
||||
I
|
||||
2 PICK 80 120 RANDOM 100 */
|
||||
SINE-PULSE
|
||||
DUP 80 120 RANDOM 100 */ WAIT
|
||||
LOOP 2DROP ;
|
||||
|
||||
Block 4645
|
||||
|
||||
( Main sinusoidal wave generator )
|
||||
|
||||
: SINE-WAVE ( cycles -- )
|
||||
0 DO
|
||||
64 ( 64 steps = full wave )
|
||||
70 130 RANDOM ( randomize amplitude 70-130% )
|
||||
40 80 RANDOM ( randomize base wait 40-80ms )
|
||||
SINE-CYCLE
|
||||
100 200 RANDOM WAIT ( inter-cycle pause )
|
||||
LOOP ;
|
||||
|
||||
3 SINE-WAVE
|
||||
|
||||
Block 4655
|
||||
|
||||
( Phase-shifted dual sine - interference pattern )
|
||||
|
||||
98765 SEED
|
||||
|
||||
: DUAL-SINE ( -- )
|
||||
32 0 DO
|
||||
I FULL-SIN 80 120 RANDOM 100 */
|
||||
I 16 + FULL-SIN 80 120 RANDOM 100 */
|
||||
+ 2 / 1+ COMPUTE
|
||||
60 100 RANDOM WAIT
|
||||
LOOP ;
|
||||
|
||||
: RUN-DUAL 4 0 DO DUAL-SINE LOOP ;
|
||||
RUN-DUAL
|
||||
|
||||
Block 4665
|
||||
( Damped sine - decaying amplitude )
|
||||
11111 SEED
|
||||
: DAMPED-SINE ( cycles -- )
|
||||
100 SWAP ( starting amplitude )
|
||||
0 DO
|
||||
64 0 DO
|
||||
I OVER FULL-SIN * 100 / 1+
|
||||
85 115 RANDOM 100 */ COMPUTE
|
||||
50 80 RANDOM WAIT
|
||||
LOOP
|
||||
85 * 100 / ( decay by 15% each cycle )
|
||||
DUP 10 < IF DROP 10 THEN
|
||||
LOOP DROP ;
|
||||
|
||||
3 DAMPED-SINE
|
||||
Reference in New Issue
Block a user