Home › Packages › cpu

Package cpu

This package contains 270 source unit(s) defining 277 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

build-your-executor #sleela 2.5 (lib/cpu/components/examples/build-your-executor.sleela)

BuildYourExecutorExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
resultint resultNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

ddr5-as-ddr2-cadence #sleela 2.5 (lib/cpu/components/examples/ddr5-as-ddr2-cadence.sleela)

Ddr5AsDdr2CadenceExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

dma-and-gpu-options #sleela 2.5 (lib/cpu/examples/dma-and-gpu-options.sleela)

DmaAndGpuOptionsExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
movedint movedNo description in source.
gpuOutint gpuOutNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

epyc-with-ddr2-settings #sleela 2.5 (lib/cpu/amd-epyc/examples/epyc-with-ddr2-settings.sleela)

EpycWithDdr2Settings class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
resultint resultNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.
dispatchvoid dispatch(SLExecutorBuild build, SLProgram prog, SLMemoryTierPolicy policy, SLVMMethod m)Resolve a method's effective tier against the document default and bind it to the real physical module (usualmem->DDR2, accuratemem->DDR5).

extensible-network-access #sleela 2.5 (lib/cpu/examples/extensible-network-access.sleela)

ExtensibleNetworkAccessExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

memory-tiers-dispatch #sleela 2.5 (lib/cpu/examples/memory-tiers-dispatch.sleela)

MemoryTiersDispatchExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.
dispatchvoid dispatch(SLExecutorBuild build, SLProgram prog, SLMemoryTierPolicy policy, SLVMMethod m)No description in source.

run-workloads-on-cpus #sleela 2.5 (lib/cpu/examples/run-workloads-on-cpus.sleela)

RunWorkloadsExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
cOutint cOutNo description in source.
sleelaOutint sleelaOutNo description in source.
crossArchOutint crossArchOutNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

SL6502CPU #sleela 2.5 (lib/cpu/6502/SL6502CPU.sleela)

SL6502CPU class extends SLCPURuntime

Defines SL6502CPU — a runnable model of the MOS 6502: an 8-bit accumulator machine with X/Y index registers, a stack pointer, and the N V - B D I Z C status flags. It extends SLCPURuntime, so register storage, memory, the ALU, and the fetch-decode-execute loop are inherited; this file supplies the 6502's registers and an instruction decoder. Instruction model (one word per instruction: op in bits 8..15, operand in bits 0..7) — a compact teaching encoding, not the byte-exact 6502 opcode map, sufficient to run the CPU as a CPU and as a model for further .sleela inputs: LDA#imm, LDX#imm, LDY#imm, STA abs, LDA abs, ADC#imm, SBC#imm, INX, INY, TAX, TAY, JMP abs, BEQ rel, BNE rel, BRK(halt), NOP. decode() routes arithmetic through the inherited ALU (so flags are real) and can also lower the stream onto the secondary VM via the inherited emit*(). Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0Register file indices (into the inherited SLRAM register store). accumulator
R_Xstatic final int R_X = 1X index
R_Ystatic final int R_Y = 2Y index
R_SPstatic final int R_SP = 3stack pointer
R_Pstatic final int R_P = 4processor status
LDA_IMMstatic final int LDA_IMM = 1Opcodes in the compact model encoding (high byte of the instruction word).
LDX_IMMstatic final int LDX_IMM = 2No description in source.
LDY_IMMstatic final int LDY_IMM = 3No description in source.
STA_ABSstatic final int STA_ABS = 4No description in source.
LDA_ABSstatic final int LDA_ABS = 5No description in source.
ADC_IMMstatic final int ADC_IMM = 6No description in source.
SBC_IMMstatic final int SBC_IMM = 7No description in source.
INXstatic final int INX = 8No description in source.
INYstatic final int INY = 9No description in source.
TAXstatic final int TAX = 10No description in source.
TAYstatic final int TAY = 11No description in source.
JMP_ABSstatic final int JMP_ABS = 12No description in source.
BEQ_RELstatic final int BEQ_REL = 13No description in source.
BNE_RELstatic final int BNE_REL = 14No description in source.
BRKstatic final int BRK = 15No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
opOfint opOf(int word)No description in source.
operandOfint operandOf(int word)No description in source.
decodevoid decode(int word)No description in source.
signedint signed(int b)Treat the low byte as a signed relative offset for branches.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int operand)Assembler helper: pack an instruction word for loadProgramWord().
accumulatorint accumulator()No description in source.
indexXint indexX()No description in source.
indexYint indexY()No description in source.
opcodeObservableint opcodeObservable()The 6502 leaves a computation's result in the accumulator, so the opcode path's observable (used by the inherited runs-by-both basis check) is A.

SL65C816CPU #sleela 2.5 (lib/cpu/wdc-65c816/SL65C816CPU.sleela)

SL65C816CPU class extends SLCPURuntime

Defines SL65C816CPU — a runnable model of the WDC 65C816. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the WDC 65C816 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL68000CPU #sleela 2.5 (lib/cpu/motorola-68000/SL68000CPU.sleela)

SL68000CPU class extends SLCPURuntime

Defines SL68000CPU — a runnable model of the Motorola 68000: a 16/32-bit CISC with eight data registers D0..D7 and eight address registers A0..A7 (A7 is the stack pointer), plus the X N Z V C condition codes. It extends SLCPURuntime and adds the 68000 register set, a decoder, and the effective-address / bus-arbitration hooks the skeleton named. Instruction model (op in high byte, then a 4-bit dst and 4-bit src selector or an immediate in the low byte): MOVE Dn,Dm / MOVEQ #imm,Dn / MOVE Dn,(An) / MOVE (An),Dn / ADD Dn,Dm / SUB Dn,Dm / ADDQ #imm,Dn / LEA #imm,An / JMP abs / BEQ / BNE / RTS(halt) / NOP. Compact teaching encoding, enough to run the CPU and model further .sleela inputs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
D0static final int D0 = 0D0..D7 => 0..7, A0..A7 => 8..15 (A7 == stack pointer).
A0static final int A0 = 8No description in source.
SPstatic final int SP = 15A7
MOVE_RRstatic final int MOVE_RR = 1MOVE Dsrc,Ddst
MOVEQstatic final int MOVEQ = 2MOVEQ #imm,Dn
MOVE_RMstatic final int MOVE_RM = 3MOVE Dn,(An)
MOVE_MRstatic final int MOVE_MR = 4MOVE (An),Dn
ADD_RRstatic final int ADD_RR = 5No description in source.
SUB_RRstatic final int SUB_RR = 6No description in source.
ADDQstatic final int ADDQ = 7ADDQ #imm,Dn
LEA_IMMstatic final int LEA_IMM = 8LEA #imm,An
JMP_ABSstatic final int JMP_ABS = 9No description in source.
BEQstatic final int BEQ = 10No description in source.
BNEstatic final int BNE = 11No description in source.
RTSstatic final int RTS = 12No description in source.
busHeldint busHeldbus-arbitration state (BR/BG)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)high nibble of low byte
srcOfint srcOf(int w)low nibble
immOfint immOf(int w)No description in source.
decodevoid decode(int word)No description in source.
effectiveAddressint effectiveAddress(int operand)Effective-address computation hook (immediate/absolute in this model).
busRequestvoid busRequest()Bus arbitration hooks the skeleton named (BR / BG handshake).
busGrantvoid busGrant()No description in source.
busBusyboolean busBusy()No description in source.
signedint signed(int b)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dstReg, int srcReg)No description in source.
encodeImmint encodeImm(int opcode, int dstReg, int imm)No description in source.
dataRegisterint dataRegister(int n)No description in source.
addressRegisterint addressRegister(int n)No description in source.

SL6800CPU #sleela 2.5 (lib/cpu/motorola-6800/SL6800CPU.sleela)

SL6800CPU class extends SLCPURuntime

Defines SL6800CPU — a runnable model of the Motorola 6800. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 6800 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL68020CPU #sleela 2.5 (lib/cpu/68020/SL68020CPU.sleela)

SL68020CPU class extends SLCPURuntime

Defines SL68020CPU — a runnable model of the Motorola 68020. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 68020 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL68030CPU #sleela 2.5 (lib/cpu/68030/SL68030CPU.sleela)

SL68030CPU class extends SLCPURuntime

Defines SL68030CPU — a runnable model of the Motorola 68030. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 68030 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL68040CPU #sleela 2.5 (lib/cpu/68040/SL68040CPU.sleela)

SL68040CPU class extends SLCPURuntime

Defines SL68040CPU — a runnable model of the Motorola 68040. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 68040 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL68060CPU #sleela 2.5 (lib/cpu/68060/SL68060CPU.sleela)

SL68060CPU class extends SLCPURuntime

Defines SL68060CPU — a runnable model of the Motorola 68060. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 68060 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SL6809CPU #sleela 2.5 (lib/cpu/6809/SL6809CPU.sleela)

SL6809CPU class extends SLCPURuntime

Defines SL6809CPU — a runnable model of the Motorola 6809. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 6809 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAccessManifest #sleela 2.5 (lib/cpu/SLAccessManifest.sleela)

SLAccessManifest class

Defines SLAccessManifest — the compact, serializable record of a

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAGICstatic final int MAGIC = 5214--- magic / identity --- "SL-ACCESS" marker word (SL-TIMING is 5213)
versionint versionNo description in source.
exposedCountint exposedCount--- per-role member counts (how the image's surface divides up) --- public members: network-exposed hops
localCountint localCountprivate members: local/admin/safety/security/backup
guardedCountint guardedCountprotected members: integrity-guarded connections
hopChainLengthint hopChainLength--- ordered public hop chain (doc 1 -> doc 2 -> doc 3 ...) --- number of ordered hops the public surface forms
orderedFlagint orderedFlag1 = the public members communicate in a defined order
exposeComponentsint exposeComponents--- default backdrop bundles (ids from SLAccessSemantics) --- default EXPOSE_* the public surface is stood up with
localConcernsint localConcernsdefault LOCAL_* the private surface declares
guardControlsint guardControlsdefault GUARD_* the protected surface enforces
competentFlagint competentFlag--- sealed summary --- 1 = the stated backdrop is complete enough to realize
surfaceTotalint surfaceTotalexposed + local + guarded (the classified member total)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
setCountsvoid setCounts(int exposed, int local, int guarded)No description in source.
setHopChainvoid setHopChain(int length, boolean ordered)No description in source.
setBackdropvoid setBackdrop(int expose, int concerns, int guards)No description in source.
sealvoid seal(boolean competent)No description in source.
validboolean valid()No description in source.
competentboolean competent()No description in source.
exposedint exposed()No description in source.
localint local()No description in source.
guardedint guarded()No description in source.
hopsint hops()No description in source.
orderedboolean ordered()No description in source.
exposeBundleint exposeBundle()No description in source.
concernBundleint concernBundle()No description in source.
guardBundleint guardBundle()No description in source.
classifiedTotalint classifiedTotal()No description in source.
writeHeaderint writeHeader(SLRAM mem, int at)Serialize into a caller-provided SLRAM header region at `at`; returns the next free word. Stored ahead of the instruction stream, exactly as SLTimingManifest.writeHeader is.
headerWordsint headerWords()No description in source.
readHeaderboolean readHeader(SLRAM mem, int at)No description in source.

SLAccessSemantics #sleela 2.5 (lib/cpu/SLAccessSemantics.sleela)

SLAccessSemantics class

Defines SLAccessSemantics — the authoritative, enumerated meaning

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
ROLE_NONEstatic final int ROLE_NONE = 0--- the three roles (one per access modifier) -------------------------
ROLE_EXPOSEDstatic final int ROLE_EXPOSED = 1public : REST-exposed hop / hop controller
ROLE_LOCALstatic final int ROLE_LOCAL = 2private : local system / admin / safety / backup
ROLE_GUARDEDstatic final int ROLE_GUARDED = 3protected : integrity-checked connection
MOD_PUBLICstatic final int MOD_PUBLIC = 1Map the frontend modifier (mirrors impl/frontend/ast.h JavaModifier bits) to the role this interpretation assigns it. JavaPublic (1u<<0)
MOD_PROTECTEDstatic final int MOD_PROTECTED = 2JavaProtected (1u<<1)
MOD_PRIVATEstatic final int MOD_PRIVATE = 4JavaPrivate (1u<<2)
EXPOSE_REST_ENDPOINTstatic final int EXPOSE_REST_ENDPOINT = 1--- PUBLIC role: network-exposed hop ---------------------------------- The transport/exposure components a public member is stood up with. exposed like a REST API endpoint
EXPOSE_HOP_CONTROLLERstatic final int EXPOSE_HOP_CONTROLLER = 2acts as a hop controller for a System
EXPOSE_ORDERED_CHAINstatic final int EXPOSE_ORDERED_CHAIN = 3participates in ordered doc1->doc2->doc3 flow
EXPOSE_SERVICE_MEMBERstatic final int EXPOSE_SERVICE_MEMBER = 4a member of a System's service set
EXPOSE_HEALTH_PROBEstatic final int EXPOSE_HEALTH_PROBE = 5reachability/health advertised to the network
LOCAL_SYSTEM_INTERNALstatic final int LOCAL_SYSTEM_INTERNAL = 1--- PRIVATE role: local / admin / safety / security / backup ---------- relates to the local System itself
LOCAL_ADMINstatic final int LOCAL_ADMIN = 2admin concern
LOCAL_SAFETYstatic final int LOCAL_SAFETY = 3safety concern
LOCAL_SECURITYstatic final int LOCAL_SECURITY = 4security concern
LOCAL_DATA_BACKUPstatic final int LOCAL_DATA_BACKUP = 5data-backup concern
LOCAL_AUDITstatic final int LOCAL_AUDIT = 6local audit/log concern
LOCAL_CONFIGstatic final int LOCAL_CONFIG = 7local configuration/secrets
GUARD_DOUBLE_INPUTstatic final int GUARD_DOUBLE_INPUT = 1--- PROTECTED role: integrity controls -------------------------------- The named checks a protected connection applies before proceeding. double the input to confirm correctness
GUARD_VIRUS_SCANstatic final int GUARD_VIRUS_SCAN = 2run a virus scanner over the inputs
GUARD_SYSTEM_INTEGRITYstatic final int GUARD_SYSTEM_INTEGRITY = 3check System integrity before continuing
GUARD_HEURISTICSstatic final int GUARD_HEURISTICS = 4heuristic plausibility checks
GUARD_ADMIN_INVOLVEDstatic final int GUARD_ADMIN_INVOLVED = 5require admin involvement/approval
GUARD_DB_INTEGRITYstatic final int GUARD_DB_INTEGRITY = 6database integrity checks
GUARD_CHECKSUMstatic final int GUARD_CHECKSUM = 7checksum/hash verification of payload
GUARD_RATE_LIMITstatic final int GUARD_RATE_LIMIT = 8throttle to resist abuse
GUARD_SCHEMA_VALIDATEstatic final int GUARD_SCHEMA_VALIDATE = 9validate input against a declared schema

Methods — the actions this unit can perform.

MethodSignatureWhat it does
roleOfModifierint roleOfModifier(int modifierBit)No description in source.
roleNameString roleName(int role)No description in source.
guardNameString guardName(int guard)Human-readable names for the control ids (used in reports/backdrops).
localConcernNameString localConcernName(int concern)No description in source.
exposeComponentNameString exposeComponentName(int component)No description in source.
defaultGuardsForGuardedint defaultGuardsForGuarded()The DEFAULT backdrop each role implies, as a representative bundle of the ids above. A program may override per member via SLAccessManifest, but the VM can stand up a competent default from the role alone. at least input doubling
defaultExposeForExposedint defaultExposeForExposed()at least a REST endpoint
defaultConcernForLocalint defaultConcernForLocal()at least system-internal

SLAdder #sleela 2.5 (lib/cpu/SLAdder.sleela)

SLAdder class

Defines SLAdder — an N-bit ripple-carry adder built from a chain of full adders. This is the arithmetic heart of the ALU: it adds two machine words bit-by-bit, propagating carry from the least significant bit to the most significant, and reports an overflow/carry-out. The ripple-carry structure is the textbook adder; faster CPUs use carry-lookahead or carry-select variants (documented in CPU.md), but the semantics are identical and this models the canonical case. Family: cpu. Composes SLFullAdder over a word width.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
widthint widthbits per word (e.g. 32 or 64)
faSLFullAdder faone reusable full-adder cell, applied bit by bit
resultint resultnumeric sum, truncated to `width` bits
carryOutint carryOutcarry out of the most significant bit

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int bits)No description in source.
bitAtint bitAt(int value, int i)No description in source.
pow2int pow2(int n)No description in source.
addint add(int a, int b)Add two words of `width` bits; ripple the carry through each full adder.
sumint sum()No description in source.
carryint carry()No description in source.
bitWidthint bitWidth()No description in source.

SLAlphaCPU #sleela 2.5 (lib/cpu/alpha/SLAlphaCPU.sleela)

SLAlphaCPU class extends SLCPURuntime

Defines SLAlphaCPU — a runnable model of the DEC Alpha 21064. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC Alpha 21064 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 31No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r31 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLALU #sleela 2.5 (lib/cpu/SLALU.sleela)

SLALU class

Defines SLALU — the Arithmetic Logic Unit. It is the CPU's calculator: given two operand words and an operation selector, it computes a result and sets condition flags (zero, negative, carry, overflow). It uses SLAdder for add/subtract (subtraction via two's-complement add) and gate-level logic for the bitwise operations. Operations: ADD, SUB, AND, OR, XOR, NOT, SHL, SHR, CMP, PASS. Flags follow the usual CPU status register convention. Family: cpu. Composes SLAdder; pure Sleela arithmetic.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
OP_ADDstatic final int OP_ADD = 0No description in source.
OP_SUBstatic final int OP_SUB = 1No description in source.
OP_ANDstatic final int OP_AND = 2No description in source.
OP_ORstatic final int OP_OR = 3No description in source.
OP_XORstatic final int OP_XOR = 4No description in source.
OP_NOTstatic final int OP_NOT = 5No description in source.
OP_SHLstatic final int OP_SHL = 6No description in source.
OP_SHRstatic final int OP_SHR = 7No description in source.
OP_CMPstatic final int OP_CMP = 8No description in source.
OP_PASSstatic final int OP_PASS= 9No description in source.
OP_MULstatic final int OP_MUL = 10No description in source.
OP_DIVstatic final int OP_DIV = 11No description in source.
OP_MODstatic final int OP_MOD = 12No description in source.
OP_NEGstatic final int OP_NEG = 13No description in source.
widthint widthNo description in source.
adderSLAdder adderNo description in source.
resultint resultNo description in source.
flagZeroint flagZeroNo description in source.
flagNegint flagNegNo description in source.
flagCarryint flagCarryNo description in source.
flagOverflowint flagOverflowNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int bits)No description in source.
pow2int pow2(int n)No description in source.
maskint mask()2^width
bitAtint bitAt(int v, int i)No description in source.
signBitint signBit(int v)No description in source.
bitwiseint bitwise(int a, int b, int op)No description in source.
setFlagsvoid setFlags(int value, int carry, int overflow)No description in source.
executeint execute(int a, int b, int op)No description in source.
outint out()No description in source.
zeroint zero()No description in source.
negativeint negative()No description in source.
carryint carry()No description in source.
overflowint overflow()No description in source.

SLAMD29KCPU #sleela 2.5 (lib/cpu/amd29k/SLAMD29KCPU.sleela)

SLAMD29KCPU class extends SLCPURuntime

Defines SLAMD29KCPU — a runnable model of the AMD Am29000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the AMD Am29000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 63No description in source.
R_LINKstatic final int R_LINK = 62No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDAthlonCPU #sleela 2.5 (lib/cpu/amd-athlon/SLAMDAthlonCPU.sleela)

SLAMDAthlonCPU class extends SLCPURuntime

Defines SLAMDAthlonCPU — a runnable model of the AMD Athlon (K7). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the AMD Athlon (K7) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDEPYC9175F #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9175F.sleela)

SLAMDEPYC9175F class extends SLAMDEPYCCPU

AMD EPYC 9175F (Zen 5 "Turin", 9005 F-series high-frequency, high per-core cache). 16 cores / 32 threads, 4.2 GHz base / 5.0 GHz max boost, 512 MB L3, 12-channel DDR5, SP5, 320 W. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9355 #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9355.sleela)

SLAMDEPYC9355 class extends SLAMDEPYCCPU

AMD EPYC 9355 (Zen 5 "Turin", 9005 series mainstream). 32 cores / 64 threads, 3.55 GHz base / 4.4 GHz max boost, 256 MB L3, 12-channel DDR5, SP5, ~280 W. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9475F #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9475F.sleela)

SLAMDEPYC9475F class extends SLAMDEPYCCPU

AMD EPYC 9475F (Zen 5 "Turin", 9005 F-series high-frequency). 48 cores / 96 threads, 3.65 GHz base / 4.8 GHz max boost, 256 MB L3, 12-channel DDR5, SP5, ~400 W. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9575F #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9575F.sleela)

SLAMDEPYC9575F class extends SLAMDEPYCCPU

AMD EPYC 9575F (Zen 5 "Turin", 9005 F-series high-frequency). 64 cores / 128 threads, 3.3 GHz base / 5.0 GHz max boost, 256 MB L3, 12-channel DDR5, SP5, ~400 W. The high-frequency GPU-host part. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9645 #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9645.sleela)

SLAMDEPYC9645 class extends SLAMDEPYCCPU

AMD EPYC 9645 (Zen 5c "Turin Dense", 9005 series). 96 cores / 192 threads, 2.3 GHz base / 3.7 GHz max boost, 256 MB L3, 12-channel DDR5, SP5. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9755 #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9755.sleela)

SLAMDEPYC9755 class extends SLAMDEPYCCPU

AMD EPYC 9755 (Zen 5 "Turin", 9005 series classic-core flagship). 128 cores / 256 threads, 2.7 GHz base / 4.1 GHz max boost, 512 MB L3, 12-channel DDR5, SP5, up to 500 W. A thin SKU subclass of SLAMDEPYCCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYC9965 #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYC9965.sleela)

SLAMDEPYC9965 class extends SLAMDEPYCCPU

AMD EPYC 9965 (Zen 5c "Turin Dense", 9005 series flagship). 192 cores / 384 threads, 2.25 GHz base / 3.7 GHz max boost, 384 MB L3, 12-channel DDR5, SP5, up to 500 W. A thin SKU subclass of SLAMDEPYCCPU: it shares the Zen x86-64 programmer model and decode(), overriding only configure() with this SKU's rated clock/label. Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDEPYCCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDEPYCCPU #sleela 2.5 (lib/cpu/amd-epyc/SLAMDEPYCCPU.sleela)

SLAMDEPYCCPU class extends SLCPURuntime

Defines SLAMDEPYCCPU — a runnable model of the AMD EPYC (Zen x86-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the AMD EPYC (Zen x86-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
bringUpModelvoid bringUpModel(String name, int ratedMHz)Shared bring-up for every EPYC SKU: all share the Zen x86-64 programmer model (64-bit data / 48-bit address / 16 register slots); a SKU differs only in its rated clock and identity label. A per-SKU subclass calls this from its own configure().
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDOpteronCPU #sleela 2.5 (lib/cpu/amd-opteron/SLAMDOpteronCPU.sleela)

SLAMDOpteronCPU class extends SLCPURuntime

Defines SLAMDOpteronCPU — a runnable model of the AMD Opteron (x86-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the AMD Opteron (x86-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDRyzenCPU #sleela 2.5 (lib/cpu/amd-ryzen/SLAMDRyzenCPU.sleela)

SLAMDRyzenCPU class extends SLCPURuntime

Defines SLAMDRyzenCPU — a runnable model of the AMD Ryzen (Zen x86-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the AMD Ryzen (Zen x86-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDThreadripper9960X #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripper9960X.sleela)

SLAMDThreadripper9960X class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper 9960X (Zen 5 "Shimada Peak", HEDT). 24 cores / 48 threads, 4.2 GHz base / 5.4 GHz max boost, 128 MB L3, 4-channel DDR5-6400, sTR5/TRX50, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripper9970X #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripper9970X.sleela)

SLAMDThreadripper9970X class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper 9970X (Zen 5 "Shimada Peak", HEDT). 32 cores / 64 threads, 4.0 GHz base / 5.4 GHz max boost, 128 MB L3, 4-channel DDR5-6400, sTR5/TRX50, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripper9980X #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripper9980X.sleela)

SLAMDThreadripper9980X class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper 9980X (Zen 5 "Shimada Peak", HEDT). 64 cores / 128 threads, ~3.2 GHz base / 5.4 GHz max boost, 256 MB L3, 4-channel DDR5-6400, sTR5/TRX50, 350 W. A thin SKU subclass of SLAMDThreadripperCPU: it shares the Zen 5 x86-64 programmer model and decode(), overriding only configure() with this SKU's rated clock/label. Core/thread/cache/TDP figures are documented in SPECIFICATION.md; the runnable model carries the rated clock. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperCPU #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperCPU.sleela)

SLAMDThreadripperCPU class extends SLCPURuntime

Defines SLAMDThreadripperCPU — a runnable model of the AMD Ryzen

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
bringUpModelvoid bringUpModel(String name, int ratedMHz)Shared bring-up for every Threadripper SKU: all share the Zen 5 x86-64 programmer model (64-bit data / 48-bit address / 16 register slots); a SKU differs only in its rated clock and identity label. A per-SKU subclass calls this from its own configure().
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAMDThreadripperPlatform #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPlatform.sleela)

SLAMDThreadripperPlatform class

Defines SLAMDThreadripperPlatform — the ancillary, board-level operating point for the AMD Ryzen Threadripper 9000 (Zen 5 "Shimada Peak") family: the DDR5-6400 memory timings, the actual Vcore / Vsoc / Vddq supply rails in millivolts, and the HEDT (TRX50, 4-channel) vs PRO WX (WRX90, 8-channel) board topology. Where SLAMDThreadripperCPU is the runnable core, this class carries the "everything around the core" the shared expert-timing layer (SLRamTiming / SLVoltageRail) needs to characterize a real rig. Nothing here is invented: DDR5's I/O rail is 1.1 V (1100 mV) and the roster runs DDR5-6400 (JEDEC ~CL46); the Zen 5 core/SoC rails use AMD's documented nominal/limit points. Each getter hands back a configured object ready to drop into an SLTimingProfile or an SLExecutorBuild. Family: cpu. Composes SLRamTiming, SLVoltageRail, SLMotherboard, SLMemoryModule (via SLComponentCatalog); partners SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
vcoreSLVoltageRail vcore()Vcore: Zen 5 core rail. Nominal ~1.20 V, safe window ~0.95–1.45 V.
vsocSLVoltageRail vsoc()Vsoc: SoC / memory-controller rail. AMD caps SoC at ~1.30 V; nominal ~1.20 V.
vddqSLVoltageRail vddq()Vddq: DDR5 I/O rail. DDR5 standard is 1.1 V (1100 mV), window ~1.067–1.166 V.
ddr5_6400TimingSLRamTiming ddr5_6400Timing(String channelName)An SLRamTiming configured for one DDR5-6400 channel at JEDEC primaries (CL46-46-46, tRAS 104, tRC 150, 2T), riding the Vddq rail. tRAS and tRC satisfy the honored() invariants (tRAS >= tRCD+CL, tRC >= tRAS+tRP).
hedtBoardSLMotherboard hedtBoard()HEDT board: sTR5 + TRX50, 4-channel DDR5, up to 88 PCIe 5.0 lanes.
proBoardSLMotherboard proBoard()Workstation board: sTR5 + WRX90, 8-channel DDR5, up to 128 PCIe 5.0 lanes.
hedtMemorySLMemoryModule hedtMemory(int capMiBPerModule)4-channel DDR5-6400 populated for the HEDT platform; capMiBPerModule is the per-DIMM capacity (e.g. 32768 for 32 GiB modules -> 128 GiB across 4).
proMemorySLMemoryModule proMemory(int capMiBPerModule)8-channel DDR5-6400 populated for the PRO WX platform.
pcie5x16SLSystemBus pcie5x16()PCIe 5.0 x16 system bus, as both Threadripper platforms carry.

SLAMDThreadripperPro9945WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9945WX.sleela)

SLAMDThreadripperPro9945WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9945WX (Zen 5 "Shimada Peak", workstation WX-Series, entry). 12 cores / 24 threads, 5.4 GHz max boost, 64 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperPro9955WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9955WX.sleela)

SLAMDThreadripperPro9955WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9955WX (Zen 5 "Shimada Peak", workstation WX-Series). 16 cores / 32 threads, 5.4 GHz max boost, 64 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperPro9965WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9965WX.sleela)

SLAMDThreadripperPro9965WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9965WX (Zen 5 "Shimada Peak", workstation WX-Series). 24 cores / 48 threads, 5.4 GHz max boost, 128 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperPro9975WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9975WX.sleela)

SLAMDThreadripperPro9975WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9975WX (Zen 5 "Shimada Peak", workstation WX-Series). 32 cores / 64 threads, 5.4 GHz max boost, 128 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperPro9985WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9985WX.sleela)

SLAMDThreadripperPro9985WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9985WX (Zen 5 "Shimada Peak", workstation WX-Series). 64 cores / 128 threads, 5.4 GHz max boost, 256 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAMDThreadripperPro9995WX #sleela 2.5 (lib/cpu/amd-threadripper/SLAMDThreadripperPro9995WX.sleela)

SLAMDThreadripperPro9995WX class extends SLAMDThreadripperCPU

AMD Ryzen Threadripper PRO 9995WX (Zen 5 "Shimada Peak", workstation WX-Series flagship). 96 cores / 192 threads, 5.4 GHz max boost, 384 MB L3, 8-channel DDR5-6400, up to 128 PCIe 5.0 lanes, sTR5/WRX90, 350 W. A thin SKU subclass of SLAMDThreadripperCPU overriding only configure(). Full figures in SPECIFICATION.md. Family: cpu. Extends SLAMDThreadripperCPU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.

SLAmpereAltraCPU #sleela 2.5 (lib/cpu/ampere-altra/SLAmpereAltraCPU.sleela)

SLAmpereAltraCPU class extends SLCPURuntime

Defines SLAmpereAltraCPU — a runnable model of the Ampere Altra (ARM64 server). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Ampere Altra (ARM64 server) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAppleASeriesCPU #sleela 2.5 (lib/cpu/apple-a-series/SLAppleASeriesCPU.sleela)

SLAppleASeriesCPU class extends SLCPURuntime

Defines SLAppleASeriesCPU — a runnable model of the Apple A-series (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Apple A-series (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAppleM1CPU #sleela 2.5 (lib/cpu/apple-m1/SLAppleM1CPU.sleela)

SLAppleM1CPU class extends SLCPURuntime

Defines SLAppleM1CPU — a runnable model of the Apple M1 (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Apple M1 (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAppleM2CPU #sleela 2.5 (lib/cpu/apple-m2/SLAppleM2CPU.sleela)

SLAppleM2CPU class extends SLCPURuntime

Defines SLAppleM2CPU — a runnable model of the Apple M2 (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Apple M2 (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAppleM3CPU #sleela 2.5 (lib/cpu/apple-m3/SLAppleM3CPU.sleela)

SLAppleM3CPU class extends SLCPURuntime

Defines SLAppleM3CPU — a runnable model of the Apple M3 (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Apple M3 (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAppleM4CPU #sleela 2.5 (lib/cpu/apple-m4/SLAppleM4CPU.sleela)

SLAppleM4CPU class extends SLCPURuntime

Defines SLAppleM4CPU — a runnable model of the Apple M4 (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Apple M4 (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLArmCortexACPU #sleela 2.5 (lib/cpu/arm-cortex-a/SLArmCortexACPU.sleela)

SLArmCortexACPU class extends SLCPURuntime

Defines SLArmCortexACPU — a runnable model of the ARM Cortex-A (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the ARM Cortex-A (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLARMCPU #sleela 2.5 (lib/cpu/arm/SLARMCPU.sleela)

SLARMCPU class extends SLCPURuntime

Defines SLARMCPU — a runnable model of a 32-bit ARM (A32-style): 16 registers R0..R15 (R13 SP, R14 LR, R15 PC) and the N Z C V flags in a CPSR. It extends SLCPURuntime and adds the ARM register set, condition-code evaluation, a decoder for a compact data-processing / load-store / branch encoding, and the exception / banked-register hooks the skeleton named. Instruction model (cond in bits 28..31, op in 20..27, rd in 16..19, rn in 12..15, operand2 in 0..11): MOV / ADD / SUB / CMP / LDR / STR / B / BL / SWI(exception+halt) / NOP. All instructions are conditionally executed via cond, as on ARM. Compact teaching encoding, enough to run the CPU and host further .sleela inputs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_SPstatic final int R_SP = 13; static final int R_LR = 14; static final int R_PC = 15No description in source.
R_CPSRstatic final int R_CPSR = 16No description in source.
COND_EQstatic final int COND_EQ = 0; static final int COND_NE = 1; static final int COND_AL = 14Condition codes.
MOVstatic final int MOV = 1; static final int ADD = 2; static final int SUB = 3Operations (bits 20..27 of the model word).
CMPstatic final int CMP = 4; static final int LDR = 5; static final int STR = 6No description in source.
Bstatic final int B = 7; static final int BL = 8; static final int SWI = 9No description in source.
securityStateint securityState0 non-secure, 1 secure (TrustZone hook)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
condOfint condOf(int w)No description in source.
opOfint opOf(int w)No description in source.
rdOfint rdOf(int w)No description in source.
rnOfint rnOf(int w)No description in source.
op2Ofint op2Of(int w)No description in source.
conditionPassesboolean conditionPasses(int cond)Evaluate the ARM condition field against current flags.
decodevoid decode(int word)No description in source.
exceptionvoid exception(int vector)Exception / banked-register entry (SWI, IRQ, etc.).
interruptvoid interrupt(int vector)No description in source.
signed12int signed12(int v)No description in source.
setNZvoid setNZ(int v)No description in source.
encodeint encode(int cond, int opcode, int rd, int rn, int op2)No description in source.
regint reg(int i)No description in source.
cpsrint cpsr()No description in source.
secureboolean secure()No description in source.

SLArmNeoverseCPU #sleela 2.5 (lib/cpu/arm-neoverse/SLArmNeoverseCPU.sleela)

SLArmNeoverseCPU class extends SLCPURuntime

Defines SLArmNeoverseCPU — a runnable model of the ARM Neoverse (ARM64 server). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the ARM Neoverse (ARM64 server) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAssembler #sleela 2.5 (lib/cpu/SLAssembler.sleela)

SLAssembler class

Defines SLAssembler — a tiny assembler that turns instruction mnemonics (from SLInstructionSet) and operands into encoded words appended to an SLProgram. It is the convenience layer programs are written through: emit(opcode, rd, rs, imm) encodes one instruction via SLInstruction. This lets a Sleela program for the Sleela CPU be authored in Sleela source, assembled into an SLProgram image, and then loaded by the OS. Family: cpu. Composes SLInstructionSet, SLInstruction, SLProgram.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
programSLProgram programNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet, SLProgram target)No description in source.
emitint emit(int opcode, int rd, int rs, int imm)Encode and append one instruction; returns the address (index) it landed at.
movint mov(int rd, int imm)Convenience emitters for the common instructions.
addint add(int rd, int rs)No description in source.
subint sub(int rd, int rs)No description in source.
cmpint cmp(int rd, int rs)No description in source.
loadint load(int rd, int addr)No description in source.
storeint store(int rs, int addr)No description in source.
jmpint jmp(int addr)No description in source.
jzint jz(int addr)No description in source.
jnzint jnz(int addr)No description in source.
syscallint syscall(int number)No description in source.
haltint halt()No description in source.
assembledSLProgram assembled()No description in source.

SLAtari2600CPU #sleela 2.5 (lib/cpu/atari-2600/SLAtari2600CPU.sleela)

SLAtari2600CPU class extends SLCPURuntime

Defines SLAtari2600CPU — a runnable model of the Atari 2600 (6507 / 6502). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari 2600 (6507 / 6502) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtari5200CPU #sleela 2.5 (lib/cpu/atari-5200/SLAtari5200CPU.sleela)

SLAtari5200CPU class extends SLCPURuntime

Defines SLAtari5200CPU — a runnable model of the Atari 5200 (6502C). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari 5200 (6502C) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtari7800CPU #sleela 2.5 (lib/cpu/atari-7800/SLAtari7800CPU.sleela)

SLAtari7800CPU class extends SLCPURuntime

Defines SLAtari7800CPU — a runnable model of the Atari 7800 (6502C). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari 7800 (6502C) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtariJaguarCDCPU #sleela 2.5 (lib/cpu/atari-jaguar-cd/SLAtariJaguarCDCPU.sleela)

SLAtariJaguarCDCPU class extends SLCPURuntime

Defines SLAtariJaguarCDCPU — a runnable model of the Atari Jaguar CD (68000 + Tom/Jerry RISC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari Jaguar CD (68000 + Tom/Jerry RISC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtariJaguarCPU #sleela 2.5 (lib/cpu/atari-jaguar/SLAtariJaguarCPU.sleela)

SLAtariJaguarCPU class extends SLCPURuntime

Defines SLAtariJaguarCPU — a runnable model of the Atari Jaguar (68000 + Tom/Jerry RISC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari Jaguar (68000 + Tom/Jerry RISC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtariLynxCPU #sleela 2.5 (lib/cpu/atari-lynx/SLAtariLynxCPU.sleela)

SLAtariLynxCPU class extends SLCPURuntime

Defines SLAtariLynxCPU — a runnable model of the Atari Lynx (65C02 / Mikey). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari Lynx (65C02 / Mikey) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtariVCSCPU #sleela 2.5 (lib/cpu/atari-vcs/SLAtariVCSCPU.sleela)

SLAtariVCSCPU class extends SLCPURuntime

Defines SLAtariVCSCPU — a runnable model of the Atari VCS (x86-64 AMD Ryzen). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari VCS (x86-64 AMD Ryzen) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLAtariXEGSCPU #sleela 2.5 (lib/cpu/atari-xegs/SLAtariXEGSCPU.sleela)

SLAtariXEGSCPU class extends SLCPURuntime

Defines SLAtariXEGSCPU — a runnable model of the Atari XEGS (6502C). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Atari XEGS (6502C) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLBootloader #sleela 2.5 (lib/cpu/SLBootloader.sleela)

SLBootloader class

Defines SLBootloader — the firmware/boot sequence that runs on the CPU's boot core after power-on. It reads the kernel image from the boot disk into main memory, sets the boot core's entry point to the kernel, and hands off control. This is the bridge from bare hardware (SLCPU) to the OS (SLKernel). Family: cpu. Composes SLCPU, SLDiskDriver, SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
cpuSLCPU cpuNo description in source.
bootSLDiskDriver bootNo description in source.
memorySLRAM memoryNo description in source.
kernelLoadAddrint kernelLoadAddrNo description in source.
kernelBlocksint kernelBlocksNo description in source.
bootedint bootedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLCPU processor, SLDiskDriver bootDisk, SLRAM ram)No description in source.
postboolean post()POST: minimal power-on self test — confirm core 0 and memory are present.
loadKernelint loadKernel(int fromBlock, int blocks, int loadAddr)Load `blocks` of the kernel image starting at disk block `fromBlock` into memory at `loadAddr`, then point the boot core at it.
handedOffboolean handedOff()No description in source.
entryPointint entryPoint()No description in source.

SLBus #sleela 2.5 (lib/cpu/SLBus.sleela)

SLBus class

Defines SLBus — the shared wiring that moves words between CPU components (registers, ALU, memory, I/O). A bus has an address lane, a data lane, and a control lane, plus a width. It models a single in-flight transfer and counts traffic; arbitration between masters is handled by the control unit that drives it. Family: cpu. Pure Sleela interconnect.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CTRL_IDLEstatic final int CTRL_IDLE = 0No description in source.
CTRL_READstatic final int CTRL_READ = 1No description in source.
CTRL_WRITEstatic final int CTRL_WRITE = 2No description in source.
nameString nameNo description in source.
widthint widthNo description in source.
addressLaneint addressLaneNo description in source.
dataLaneint dataLaneNo description in source.
controlLaneint controlLaneNo description in source.
transfersint transfersNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String busName, int bits)No description in source.
driveAddressvoid driveAddress(int addr)No description in source.
driveDatavoid driveData(int data)No description in source.
driveControlvoid driveControl(int ctrl)No description in source.
transferint transfer()Complete the current transfer; returns the data lane value.
addressint address()No description in source.
dataint data()No description in source.
controlint control()No description in source.
transferCountint transferCount()No description in source.
busNameString busName()No description in source.

SLBusTiming #sleela 2.5 (lib/cpu/SLBusTiming.sleela)

SLBusTiming class

Defines SLBusTiming — the careful, nameful timing + variable clock speed of one interconnect (front-side / memory / peripheral bus). A bus here is not assumed to "just work" at a frequency: its clock is a VARIABLE speed with a floor and a ceiling the operator may dial between, and three named SLTiming budgets (address, data, control) are checked against the period that frequency implies. Bus timing is given special care — this is the class the thesis "timing issues for buses shall be careful and nameful" lives in — so the data-strobe path carries its own name and reason and the whole bus reports whether it is honored at the dialed speed. It rides on an SLVoltageRail: the achievable clock ceiling scales with the rail's effective (settled, under-load) voltage, so under-volting a bus lowers the speed it can be trusted at rather than silently corrupting it. Family: cpu. Composes SLTiming and SLVoltageRail; partners SLBus/SLClock.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString namenameful bus: "FSB", "MemBus", "PCIe", "IOBus", ...
minMHzint minMHzlowest clock the operator may dial the bus to
maxMHzint maxMHzhighest clock the bus is validated for
currentMHzint currentMHzthe variable clock the bus is presently run at
widthBitsint widthBitstransfer width (for bandwidth reporting)
transfersPerClkint transfersPerClk1 = SDR, 2 = DDR, 4 = QDR; the data-rate multiplier
railSLVoltageRail railthe supply this interconnect sits on
mvPerMHzint mvPerMHzhow much settled voltage one extra MHz of ceiling needs
addrPathSLTiming addrPathaddress-lane budget
dataPathSLTiming dataPathdata-strobe budget (the carefully-named one)
ctrlPathSLTiming ctrlPathcontrol/handshake budget

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String busName, int floorMHz, int ceilingMHz, int bits, int perClock)Configure a bus: name, dialing range, width, and data-rate multiplier.
attachRailvoid attachRail(SLVoltageRail supply, int millivoltsPerMHz)Bind the supply rail and the volts-per-MHz the ceiling needs.
periodPsAtint periodPsAt(int mhz)The clock period in picoseconds for a given MHz: 1e6 ps / MHz.
strobePeriodPsint strobePeriodPs()The data strobe period: the clock period divided by transfers-per-clock (DDR halves the eye the data must settle inside, QDR quarters it).
setClockint setClock(int mhz)Dial the variable bus clock. The request is clamped into [min,max] AND into whatever the settled rail voltage can support — so a brown-out rail caps the trustworthy speed instead of letting the bus run unverified.
voltageCeilingMHzint voltageCeilingMHz()The highest MHz the present settled voltage justifies. With no rail or no volts-per-MHz declared, the datasheet ceiling stands.
retimevoid retime()Re-stamp every budget's period after a clock change so checks reflect the speed the bus is actually dialed to.
setAddressPathvoid setAddressPath(int propagationPs, int setupPs, int holdPs)State the physical path lengths (ps). These are the measured flight/settle times the budgets are checked against — quality over control.
setDataPathvoid setDataPath(int propagationPs, int setupPs, int holdPs, int jitterPs)No description in source.
setControlPathvoid setControlPath(int propagationPs, int setupPs, int holdPs)No description in source.
honoredboolean honored()Is every lane honored at the dialed clock AND is the rail in limits? Bus timing is treated with care: all three named paths must pass together.
bandwidthMBsint bandwidthMBs()Peak bandwidth in megabytes/sec at the dialed clock: MHz * transfers/clk * (width/8) bytes.
worstSlackPsint worstSlackPs()The tightest (smallest) setup slack across the three lanes — the lane that will fail first if the clock is pushed. Names the quality margin left.
busNameString busName()No description in source.
clockint clock()No description in source.
floorMHzint floorMHz()No description in source.
ceilingMHzint ceilingMHz()No description in source.
addressBudgetSLTiming addressBudget()No description in source.
dataBudgetSLTiming dataBudget()No description in source.
controlBudgetSLTiming controlBudget()No description in source.

SLCache #sleela 2.5 (lib/cpu/SLCache.sleela)

SLCache class

Defines SLCache — a CPU cache level (L1/L2/L3) sitting between a core and main memory. It models the properties that matter for behavior: total size, line size, associativity, and the hit/miss statistics that drive the memory hierarchy. On a miss it falls through to a backing SLRAM (or a slower cache level). This is a behavioral model: it tracks a modeled hit rate and forwards misses; the exact line contents live in the backing SLRAM below the bridge. Family: cpu. Composes SLRAM as its backing store.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
levelString level"L1", "L2", "L3"
sizeBytesint sizeBytesNo description in source.
lineBytesint lineBytesNo description in source.
associativityint associativityways
backingSLRAM backingnext level down (main memory or a lower cache)
accessesint accessesNo description in source.
hitsint hitsNo description in source.
missesint missesNo description in source.
warmLinesint warmLinesmodeled count of resident lines

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String cacheLevel, int size, int line, int ways)No description in source.
attachBackingvoid attachBacking(SLRAM ram)No description in source.
lineCountint lineCount()No description in source.
lineOfint lineOf(int addr)No description in source.
accessint access(int addr)Access a word address. A line already warm is a hit; otherwise a miss that warms the line (bounded by the cache's line capacity) and reads from the backing store.
accessCountint accessCount()No description in source.
hitCountint hitCount()No description in source.
missCountint missCount()No description in source.
hitRatePercentint hitRatePercent()hit rate in percent (0..100), integer
levelNameString levelName()No description in source.

SLCadenceConnector #sleela 2.5 (lib/cpu/components/SLCadenceConnector.sleela)

SLCadenceConnector class

Defines SLCadenceConnector — a Dynamite Connector for a memory

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TECH_SRAMstatic final int TECH_SRAM = 0Generation ids mirror SLMemoryModule.TECH_* / SLMemoryInterface.TECH_*.
TECH_DRAMstatic final int TECH_DRAM = 1No description in source.
TECH_SDRAMstatic final int TECH_SDRAM = 2No description in source.
TECH_DDRstatic final int TECH_DDR = 3No description in source.
TECH_DDR2static final int TECH_DDR2 = 4No description in source.
TECH_DDR3static final int TECH_DDR3 = 5No description in source.
TECH_DDR4static final int TECH_DDR4 = 6No description in source.
TECH_DDR5static final int TECH_DDR5 = 7No description in source.
referenceNameString referenceName--- Dynamite Connector contract fields --- the cadence being connected, e.g. "DDR2"
configurationString configurationfree-form config note
statusString statuslifecycle: imported -> resolved -> [deferred] -> loaded
techint tech--- resolved payload (the cadence this connector binds) --- target generation id (or -1 for a custom profile)
tREFI_nsint tREFI_nsresolved refresh interval
tRFC_nsint tRFC_nsresolved refresh command time
resolvedint resolved1 once resolve()/resolveCustom() has run

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initializevoid initialize(int cadenceTech, String config)Begin the connector for a named DDR generation. Fail-closed: it carries no usable cadence until resolve() runs and load() confirms it.
resolveString resolve()Resolve the reference name into its representative refresh timings. These are the representative per-generation refresh timings a connected slot binds into SLMemoryInterface.
resolveCustomString resolveCustom(String label, int refreshIntervalNs, int refreshTimeNs)Resolve to a genuinely special-purpose profile instead of a named gen.
deferConstructionString deferConstruction()Defer: keep the connector staged but not yet active (the slot stays empty until a later load()). Part of the Dynamite Connector contract.
loadboolean load()Load: confirm the resolved cadence is ready to be read by the interface. Fail-closed — a connector that was never resolved cannot be loaded.
readyboolean ready()No description in source.
referenceIdString referenceId()No description in source.
cadenceTechint cadenceTech()No description in source.
refreshIntervalNsint refreshIntervalNs()No description in source.
refreshTimeNsint refreshTimeNs()No description in source.
stateString state()No description in source.
equalsStrboolean equalsStr(String a, String b)Tiny string equality helper (status is set only to the literals above).
genNameString genName(int t)No description in source.

SLCircuit #sleela 2.5 (lib/cpu/SLCircuit.sleela)

SLCircuit class

Defines SLCircuit, a named combinational circuit built from gates. It is the organizing abstraction one level above SLGate: a circuit has a name, a declared gate/transistor budget, and tracks propagation so higher components (adders, decoders, the ALU) can describe themselves as circuits. Modern CPUs are hierarchies of circuits (standard cells -> functional blocks -> units -> cores). This class models that hierarchy at the Sleela-source layer: it counts constituent gates and composes sub-circuits, which lets the whole design report a transistor-order estimate. Family: cpu. Pure Sleela structure.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
gateCountint gateCountgates directly in this circuit
subCircuitCountint subCircuitCountnested sub-circuits
inputsint inputsNo description in source.
outputsint outputsNo description in source.
propagationUnitsint propagationUnitsmodeled gate-delay depth (critical path)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String circuitName, int in, int out)No description in source.
addGatevoid addGate()No description in source.
addGatesvoid addGates(int n)No description in source.
addSubCircuitvoid addSubCircuit(SLCircuit c)No description in source.
setCriticalPathvoid setCriticalPath(int depth)No description in source.
totalGatesint totalGates()No description in source.
criticalPathint criticalPath()No description in source.
transistorEstimateint transistorEstimate()CMOS rule of thumb: a 2-input gate is ~4 transistors; report an estimate.
circuitNameString circuitName()No description in source.

SLClipperCPU #sleela 2.5 (lib/cpu/clipper/SLClipperCPU.sleela)

SLClipperCPU class extends SLCPURuntime

Defines SLClipperCPU — a runnable model of the Fairchild Clipper. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Fairchild Clipper register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLClock #sleela 2.5 (lib/cpu/SLClock.sleela)

SLClock class

Defines SLClock — the oscillator that drives synchronous logic. It produces alternating low/high levels (ticks); every rising edge advances the CPU by one cycle. Frequency is modeled in MHz, and the clock counts the cycles it has issued (the basis for performance accounting). Family: cpu. Pure Sleela timing source.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
frequencyMHzint frequencyMHzNo description in source.
levelint levelcurrent clock level, 0 or 1
cyclesint cyclescompleted cycles (rising edges issued)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int mhz)No description in source.
toggleint toggle()One half-step: toggle the level. A full cycle is two toggles; a rising edge (0 -> 1) increments the cycle counter.
tickint tick()Issue a full cycle (low then high) and return the new cycle count.
currentLevelint currentLevel()No description in source.
cycleCountint cycleCount()No description in source.
frequencyint frequency()No description in source.

SLClockPolicy #sleela 2.5 (lib/cpu/SLClockPolicy.sleela)

SLClockPolicy class

Defines SLClockPolicy — how fast a Sleela CPU model runs. It carries the CPU's own spec clock (its rated MHz), a base-clock × multiplier decomposition (as real CPUs expose for overclocking), and a stability ceiling. A model runs at its spec clock by default; a user may overclock it by raising the multiplier or the base clock, up to the rated stability limit — beyond which the policy reports it as unstable. The effective MHz feeds performance accounting (how many model cycles a workload's instruction budget corresponds to) and the PERFECT.CONSEQUENCE speed/feasibility model: overclocking raises effective throughput linearly with the clock until the stability ceiling. Family: cpu. Composed by SLCPURuntime; refines SLClock.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
baseClockMHzint baseClockMHzreference/base clock (e.g. FSB/BCLK), MHz
multiplierint multiplierclock multiplier (effective = base × multiplier)
specMHzint specMHzthe CPU's rated/spec frequency, MHz
maxStableMHzint maxStableMHzhighest frequency the model treats as stable
overclockedint overclocked1 once pushed above spec
unstableint unstable1 when effective exceeds maxStableMHz

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configureSpecvoid configureSpec(int ratedMHz)Configure from a spec frequency. We factor it into a conventional base × multiplier (100 MHz base is the common modern reference; small/old parts fall back to a base of 1 so the spec is representable exactly).
setStabilityCeilingvoid setStabilityCeiling(int ceilingMHz)Set the stability ceiling explicitly (e.g. a model known to be a poor/strong overclocker). Must be at least the spec clock.
setMultipliervoid setMultiplier(int m)Overclock by raising the multiplier (classic unlocked-multiplier OC).
setBaseClockvoid setBaseClock(int mhz)Overclock by raising the base clock (BCLK/FSB OC).
overclockTovoid overclockTo(int targetMHz)Overclock directly to a target effective frequency.
resetToSpecvoid resetToSpec()Return to the rated spec clock.
reassessvoid reassess()No description in source.
effectiveMHzint effectiveMHz()No description in source.
ratingint rating()No description in source.
baseint base()No description in source.
multint mult()No description in source.
ceilingint ceiling()No description in source.
isOverclockedboolean isOverclocked()No description in source.
isStableboolean isStable()No description in source.
speedRatioMilliint speedRatioMilli()Effective speed as a ratio of spec, ×1000 (integer; 1000 = at spec, 1600 = +60%). Lets callers scale throughput without floating point.

SLColdFireCPU #sleela 2.5 (lib/cpu/coldfire/SLColdFireCPU.sleela)

SLColdFireCPU class extends SLCPURuntime

Defines SLColdFireCPU — a runnable model of the Motorola ColdFire. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola ColdFire register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLCompilerDriver #sleela 2.5 (lib/cpu/SLCompilerDriver.sleela)

SLCompilerDriver class

Defines SLCompilerDriver — the multi-language compiler driver. It selects the right frontend for a source language (C, C++, Java, Sleela), runs frontend -> SLIR -> SLLowering, and returns a runnable SLProgram for the Sleela CPU. This is the single entry point that makes the ISA accept all four languages: one driver, one IR, one backend. source(.c/.cpp/.java/.sleela) -> SLFrontend{C,Cpp,Java,Sleela}.lower() -> SLIR -> SLLowering.lower() -> SLProgram (SLInstructionSet machine code) Family: cpu. Composes the frontend hierarchy, SLIR, SLLowering, SLProgram.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
lastLanguageint lastLanguageNo description in source.
profileSLTimingProfile profilethe operating point stamped into compiled output

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet)No description in source.
useTimingProfilevoid useTimingProfile(SLTimingProfile p)Give the driver a timing/voltage/expertise profile. Every program it compiles from here on carries that profile's sealed manifest, so the VM and loader operate the STATED timings rather than guessing hardware quality. Without a profile, output compiles exactly as before (no header).
frontendForSLFrontend frontendFor(int langId, String path)Build the appropriate frontend for a language id.
languageOfint languageOf(String path)Infer the language from a file extension.
endsWithboolean endsWith(String s, String suffix)No description in source.
lengthint length(String s)No description in source.
substringString substring(String s, int a, int b)No description in source.
compileSLProgram compile(String path, int langId, String programName)Compile a source file in the given language into a runnable SLProgram.
compileFileSLProgram compileFile(String path, String programName)Convenience: infer language from the path extension.
languageint language()No description in source.

SLComponentCatalog #sleela 2.5 (lib/cpu/components/SLComponentCatalog.sleela)

SLComponentCatalog class

Defines SLComponentCatalog — the parts bin. It hands back ready-configured, real-world-spec'd components a user picks to build a Sleela executor: memory modules (DRAM through DDR5), storage (floppy, MFM HDD, SATA SSD, NVMe), optical drives (CD/DVD/Blu-ray), and system buses (ISA/PCI/AGP/PCIe). Each preset carries authentic speeds, timings, and capacities so a chosen configuration behaves like the real part. This is the user-facing selection surface: build an executor by naming parts (e.g. ddr4_3200(), nvmeGen3(), bluRay()), not by filling in raw numbers. Family: cpu.components. Produces SLMemoryModule, SLMemoryInterface, SLCadenceConnector, SLStorageDevice, SLOpticalDrive, SLSystemBus, SLMotherboard.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
memSLMemoryModule mem(String name, int tech, int capMiB, int bus, int clk, int cl, int ddr)---------------- Memory presets ----------------
sram_fastSLMemoryModule sram_fast(int capKiB)No description in source.
dram_fpmSLMemoryModule dram_fpm(int capMiB)No description in source.
sdram_pc100SLMemoryModule sdram_pc100(int capMiB)No description in source.
ddr_400SLMemoryModule ddr_400(int capMiB)No description in source.
ddr2_800SLMemoryModule ddr2_800(int capMiB)No description in source.
ddr3_1600SLMemoryModule ddr3_1600(int capMiB)No description in source.
ddr4_3200SLMemoryModule ddr4_3200(int capMiB)No description in source.
ddr5_6000SLMemoryModule ddr5_6000(int capMiB)No description in source.
ddr5_6400SLMemoryModule ddr5_6400(int capMiB)No description in source.
memChannelsSLMemoryModule memChannels(String name, int tech, int capMiB, int bus, int clk, int cl, int ddr, int channels)Channel-aware memory: same DIMM spec populated across N channels. `capMiB` is the per-module capacity; the module reports N× capacity and N× aggregate bandwidth. These match the AMD Threadripper 9000 platforms directly.
ddr5_6400_quadChannelSLMemoryModule ddr5_6400_quadChannel(int capMiBPerModule)DDR5-6400 on a 4-channel HEDT board (Threadripper 9980X/9970X/9960X, TRX50).
ddr5_6400_octaChannelSLMemoryModule ddr5_6400_octaChannel(int capMiBPerModule)DDR5-6400 on an 8-channel workstation board (Threadripper PRO WX, WRX90).
memInterfaceSLMemoryInterface memInterface(String name, SLMemoryModule realModule, int cadenceTech)---------------- Memory interface (cadence overlay) presets ---------------- An OOD adapter that wraps a REAL module and makes it refresh as though it were `cadenceTech`. The module keeps its native data rate, capacity, and backing store; only the observed refresh duty cycle changes. Compose BOTH: pick a module, then wrap it with one of these.
ddrCadenceInterfaceSLMemoryInterface ddrCadenceInterface(SLMemoryModule realModule)One preset per DDR generation: present any real module with that generation's refresh cadence (the common special case: run a DDR5 module so it refreshes like DDR2). The tech ids match SLMemoryModule.TECH_* / the cadences an SLCadenceConnector resolves: DDR=3 .. DDR5=7. These convenience forms build the interface and connect the cadence connector for you; for explicit control, build an SLCadenceConnector and call iface.connect(c).
ddr2CadenceInterfaceSLMemoryInterface ddr2CadenceInterface(SLMemoryModule realModule)No description in source.
ddr3CadenceInterfaceSLMemoryInterface ddr3CadenceInterface(SLMemoryModule realModule)No description in source.
ddr4CadenceInterfaceSLMemoryInterface ddr4CadenceInterface(SLMemoryModule realModule)No description in source.
ddr5CadenceInterfaceSLMemoryInterface ddr5CadenceInterface(SLMemoryModule realModule)No description in source.
cadenceConnectorSLCadenceConnector cadenceConnector(int cadenceTech)Standalone Dynamite cadence connectors (one per DDR generation), resolved and ready to plug into a memory interface's slot via iface.connect(c). Use these when you want to stage/defer the cadence explicitly rather than let a *CadenceInterface preset build and connect it in one step.
ddrCadenceSLCadenceConnector ddrCadence()No description in source.
ddr2CadenceSLCadenceConnector ddr2Cadence()No description in source.
ddr3CadenceSLCadenceConnector ddr3Cadence()No description in source.
ddr4CadenceSLCadenceConnector ddr4Cadence()No description in source.
ddr5CadenceSLCadenceConnector ddr5Cadence()No description in source.
storeSLStorageDevice store(String name, int cls, int iface, int capMiB, int rpm, int seekUs, int mbs)---------------- Storage presets ----------------
floppy144SLStorageDevice floppy144()~1.44MB, slow
mfmHddSLStorageDevice mfmHdd()20MB, ~65ms seek
ideHddSLStorageDevice ideHdd()40GB
sataHddSLStorageDevice sataHdd()2TB
sataSsdSLStorageDevice sataSsd()1TB, ~0.1ms
nvmeGen3SLStorageDevice nvmeGen3()3.5GB/s
nvmeGen4SLStorageDevice nvmeGen4()7GB/s
tapeLtoSLStorageDevice tapeLto()huge, high latency
opticalSLOpticalDrive optical(String name, int medium, int mult, boolean write, int capMiB)---------------- Optical presets ----------------
cdrom52SLOpticalDrive cdrom52()No description in source.
cdrwSLOpticalDrive cdrw()No description in source.
dvd16SLOpticalDrive dvd16()No description in source.
dvdrwSLOpticalDrive dvdrw()No description in source.
bluRaySLOpticalDrive bluRay()No description in source.
bdxlSLOpticalDrive bdxl()No description in source.
busSLSystemBus bus(String name, int type, int clk, int width, int lanes, int laneMBs)---------------- Bus presets ----------------
isaSLSystemBus isa()No description in source.
pci33SLSystemBus pci33()No description in source.
agp8xSLSystemBus agp8x()No description in source.
pcieGen3x16SLSystemBus pcieGen3x16()No description in source.
pcieGen4x16SLSystemBus pcieGen4x16()No description in source.
pcieGen5x16SLSystemBus pcieGen5x16()No description in source.
fsbSLSystemBus fsb(int mhz)No description in source.
boardSLMotherboard board(String name, int socket, String chipset, int channels,---------------- Motherboard presets ----------------
trx50SLMotherboard trx50()AMD Threadripper 9000 HEDT: sTR5 + TRX50, 4-channel DDR5, up to 88 PCIe 5.0 lanes.
wrx90SLMotherboard wrx90()AMD Threadripper PRO 9000 WX: sTR5 + WRX90, 8-channel DDR5, up to 128 PCIe 5.0 lanes.

SLConsoleDriver #sleela 2.5 (lib/cpu/SLConsoleDriver.sleela)

SLConsoleDriver class extends SLDeviceDriver

Defines SLConsoleDriver — a character-output driver (the system console / serial tty). It extends SLDeviceDriver and writes characters out of its port; the OS's print path and the shell use it. The native side renders bytes to the host terminal across the explicit VM/OS bridge. Family: cpu. Extends SLDeviceDriver.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
charsWrittenint charsWrittenNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(SLIOBus bus, int port)No description in source.
putCharint putChar(int code)Write one character code to the console port and to the host terminal.
charCountint charCount()No description in source.

SLControlUnit #sleela 2.5 (lib/cpu/SLControlUnit.sleela)

SLControlUnit class

Defines SLControlUnit — the conductor of a CPU core. It drives the fetch-decode-execute cycle for the full SLInstructionSet: fetch the instruction at the program counter, decode it, route operands through the register file, ALU, and the hardware stack (SLStack), write results back, update the program counter (sequential, branch, call, or return), and set the status flags. This models a classic single-cycle control unit with a real call/stack protocol: CALL pushes the return address and jumps; RET pops it; PUSH/POP move words to and from the stack. That protocol is what makes the ISA a viable lowering target for compiled C/C++/Java/Sleela (function calls, locals, spills). Pipelining/out-of-order are described in CPU.md; the observable semantics here are the same. Family: cpu. Composes decoder, register file, ALU, PC, status, RAM, and stack.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
decoderSLInstructionDecoder decoderNo description in source.
regsSLRegisterFile regsNo description in source.
aluSLALU aluNo description in source.
pcSLProgramCounter pcNo description in source.
statusSLStatusRegister statusNo description in source.
memorySLRAM memoryNo description in source.
stackSLStack stackNo description in source.
haltedint haltedNo description in source.
executedint executedNo description in source.
syscallVectorint syscallVectoraddress the OS installed for SYSCALL
trapVectorint trapVectoraddress installed for TRAP (faults / guest exits)
lastSyscallint lastSyscalllast syscall number requested (for the kernel to read)
lastTrapint lastTraplast trap number requested

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet, SLInstructionDecoder dec,No description in source.
installSyscallVectorvoid installSyscallVector(int addr)No description in source.
installTrapVectorvoid installTrapVector(int addr)No description in source.
isHaltedboolean isHalted()No description in source.
instructionsRetiredint instructionsRetired()No description in source.
pendingSyscallint pendingSyscall()No description in source.
pendingTrapint pendingTrap()No description in source.
clearSyscallvoid clearSyscall()No description in source.
clearTrapvoid clearTrap()No description in source.
stepint step()Execute exactly one instruction at the current PC. Returns the opcode run, or -1 if the core is halted.
raiseTrapvoid raiseTrap(int number)Deliver a trap: record it and vector to the handler (or just advance).
toAluOpint toAluOp(int op)Map ISA arithmetic opcodes onto SLALU operation selectors.
runint run(int budget)Run until HALT or until the instruction budget is exhausted (safety bound).

SLCore #sleela 2.5 (lib/cpu/SLCore.sleela)

SLCore class

Defines SLCore — a single execution core: one control unit, its register file, ALU, program counter, status register, L1 cache, and interrupt controller, all driven by a clock. A modern CPU is several of these cores on one die; SLCPU composes them. assemble() wires the sub-units together so the core is ready to fetch from a shared RAM. tick() advances one clock cycle (one instruction in this single-cycle model). Family: cpu. Composes the Layer-0/1/2 components into a runnable core.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
idint idNo description in source.
widthint widthNo description in source.
clockSLClock clockNo description in source.
regsSLRegisterFile regsNo description in source.
aluSLALU aluNo description in source.
pcSLProgramCounter pcNo description in source.
statusSLStatusRegister statusNo description in source.
isaSLInstructionSet isaNo description in source.
decoderSLInstructionDecoder decoderNo description in source.
controlSLControlUnit controlNo description in source.
stackSLStack stackNo description in source.
l1SLCache l1No description in source.
irqSLInterruptController irqNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
assemblevoid assemble(int coreId, int bits, int clockMHz, SLRAM sharedMemory)No description in source.
loadEntryPointvoid loadEntryPoint(int addr)No description in source.
installSyscallVectorvoid installSyscallVector(int addr)No description in source.
tickint tick()Advance one clock cycle: tick the clock, execute one instruction.
timerTickvoid timerTick()Raise the timer interrupt (the OS uses this for preemptive scheduling).
haltedboolean halted()No description in source.
pendingSyscallint pendingSyscall()No description in source.
clearSyscallvoid clearSyscall()No description in source.
coreIdint coreId()No description in source.
cyclesRunint cyclesRun()No description in source.
retiredint retired()No description in source.
controlUnitSLControlUnit controlUnit()No description in source.
registersSLRegisterFile registers()No description in source.
interruptsSLInterruptController interrupts()No description in source.
hardwareStackSLStack hardwareStack()No description in source.
instructionSetSLInstructionSet instructionSet()No description in source.

SLCortexMCPU #sleela 2.5 (lib/cpu/cortex-m/SLCortexMCPU.sleela)

SLCortexMCPU class extends SLCPURuntime

Defines SLCortexMCPU — a runnable model of the ARM Cortex-M. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the ARM Cortex-M register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLCortexRCPU #sleela 2.5 (lib/cpu/cortex-r/SLCortexRCPU.sleela)

SLCortexRCPU class extends SLCPURuntime

Defines SLCortexRCPU — a runnable model of the ARM Cortex-R. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the ARM Cortex-R register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLCPU #sleela 2.5 (lib/cpu/SLCPU.sleela)

SLCPU class

Defines SLCPU — a complete multi-core processor package: a set of execution cores sharing main memory and a last-level (L3) cache, plus identifying metadata (vendor, model, core count, clock). This is the top of the hardware stack — the chip the operating system boots on. It models a typical Intel/AMD-style arrangement: N cores, private L1/L2 per core (L1 lives in SLCore), a shared L3, and one coherent main memory. Up to 8 cores are wired as fields (SLeeLa surface has no arrays). Family: cpu. Composes SLCore, SLCache, SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
vendorString vendorNo description in source.
modelString modelNo description in source.
coreCountint coreCountNo description in source.
widthint widthNo description in source.
clockMHzint clockMHzNo description in source.
memorySLRAM memoryNo description in source.
l3SLCache l3No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String cpuVendor, String cpuModel, int cores, int bits, int mhz)No description in source.
powervoid power(SLRAM mainMemory)Build the chip: allocate memory, the shared L3, and each core.
coreSLCore core(int index)No description in source.
bootCoreSLCore bootCore()The bootstrap processor (core 0) is where firmware/the OS starts.
vendorNameString vendorName()No description in source.
modelNameString modelName()No description in source.
coresint cores()No description in source.
wordWidthint wordWidth()No description in source.
clockint clock()No description in source.

SLCPUArchitecture #sleela 2.5 (lib/cpu/SLCPUArchitecture.sleela)

SLCPUArchitecture class

Defines SLCPUArchitecture — the identity and shape of an instruction-set architecture, independent of any one chip: name, data and address widths, endianness, register count, and which structural features (pipeline, cache, MMU, DMA, interrupts, I/O timing, couplers) the ISA assumes. SLCPUModel references one of these; SLCPURuntime consults it to size its register file and address space. Family: cpu. Describes the ISA an SLCPURuntime realizes.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
ENDIAN_LITTLEstatic final int ENDIAN_LITTLE = 0No description in source.
ENDIAN_BIGstatic final int ENDIAN_BIG = 1No description in source.
identityString identityISA name, e.g. "MOS 6502", "ARMv7-A"
isaString isaISA family tag, e.g. "6502", "arm", "riscv"
wordWidthint wordWidthdata path width in bits
addressWidthint addressWidthaddress bus width in bits
endianint endianNo description in source.
registerFileint registerFilearchitectural register count
pipelineint pipelineassumed pipeline depth (0 = none)
executionUnitsint executionUnitsNo description in source.
cacheHierarchyint cacheHierarchycache level count
memoryControllerint memoryController1 if a memory controller is modelled
interconnectint interconnectNo description in source.
ioTimingint ioTimingNo description in source.
dmaControllerint dmaControllerNo description in source.
mmuint mmuNo description in source.
interruptControllerint interruptControllerNo description in source.
couplersint couplersNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, String isaTag, int dataBits, int addrBits, int endianness,No description in source.
addressSpaceWordsint addressSpaceWords()Address space size in words implied by the address width (bounded for the bounded SLeeLa surface; large ISAs use a windowed subset).
nameString name()No description in source.
isaFamilyString isaFamily()No description in source.
dataWidthint dataWidth()No description in source.
addrWidthint addrWidth()No description in source.
endiannessint endianness()No description in source.
littleEndianboolean littleEndian()No description in source.
registersint registers()No description in source.
hasMmuboolean hasMmu()No description in source.

SLCPUCatalog #sleela 2.5 (lib/cpu/SLCPUCatalog.sleela)

SLCPUCatalog class

Defines SLCPUCatalog — the by-name front door to the CPU roster. Where SLHardwareRegistry catalogs memory/SSD/HDD/USB/GPU parts by name, this is the missing CPU family: a registry of the runnable SL<ARCH>CPU models so a caller can pick a processor by key (e.g. "6502", "arm", "riscv", "x86", "ps5", "xbox-series-x") instead of hard-coding `new SL6502CPU()`. Each entry records a stable key, a human label, the architecture family, the rated spec clock (MHz) and data-path width, so a fleet can be assembled from the roster and its performance accounted. The catalog hands back a configured, bring-up-ready SLCPURuntime via make(key); list()/keys() enumerate the roster for a chooser UI or a fleet runner. Family: cpu. Selects/instantiates models that extend SLCPURuntime; consumed by SLCPUFleet and any "choose a CPU" surface.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAXstatic final int MAX = 128No description in source.
keyString[] keystable selection key, e.g. "6502"
labelString[] labelhuman label, e.g. "MOS 6502"
familyString[] familyarchitecture family, e.g. "6502", "arm", "x86"
specMHzint[] specMHzrated spec clock (MHz)
widthint[] widthdata-path width (bits)
countint countNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
addvoid add(String k, String human, String fam, int mhz, int bits)Register one model in the roster.
sizeint size()No description in source.
hasboolean has(String k)No description in source.
indexOfint indexOf(String k)No description in source.
labelOfString labelOf(String k)No description in source.
familyOfString familyOf(String k)No description in source.
specOfint specOf(String k)No description in source.
widthOfint widthOf(String k)No description in source.
keyAtString keyAt(int i)No description in source.
labelAtString labelAt(int i)No description in source.
specAtint specAt(int i)No description in source.
listString list()A newline-separated listing of the roster, for a chooser or report.
makeSLCPURuntime make(String k)Instantiate and configure the model selected by key, as a runnable SLCPURuntime. Returns null if the key is unknown. The concrete model's configure() does bring-up (register set, memory, spec clock); the family switch maps a catalog key onto its SL<ARCH>CPU class.
instantiateSLCPURuntime instantiate(String fam)Map an architecture family onto its concrete runnable class. Covers the classic cores directly; console/system families reuse the CPU core they shipped (e.g. a Genesis is a 68000-class core), so the roster stays runnable without a bespoke class per SKU.
seedRostervoid seedRoster()A representative starter roster spanning eras and families. A deployment may add() more entries (every runnable SL<ARCH>CPU is eligible) without changing this class. Spec clocks are rated reference values in MHz.

SLCPUFleet #sleela 2.5 (lib/cpu/SLCPUFleet.sleela)

SLCPUFleet class

Defines SLCPUFleet — a selected roster of CPUs run as a group to produce NET RESULTS. Where SLCPURuntime.runWorkload() runs one program on one CPU and returns a single observable, a fleet selects several models from the SLCPUCatalog, runs a workload (or a workload set) across all of them, and AGGREGATES the per-CPU outcomes into a net-results scoreboard: total and effective throughput (scaled by each CPU's clock policy), admitted vs. rejected counts, the fastest/slowest member, and a per-member line. This is the "simulate a real world with net results" surface — the world is the set of heterogeneous machines, the net result is the aggregate of running real work on them. Family: cpu. Composes SLCPUCatalog + SLCPURuntime + SLWorkload/SLCPUResource.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAXstatic final int MAX = 128No description in source.
catalogSLCPUCatalog catalogNo description in source.
memberKeyString[] memberKeyselected catalog keys
memberSLCPURuntime[] memberthe configured CPUs
sizeint sizeNo description in source.
ranint ran--- net-results accumulators (reset per run) --- CPUs that produced a result
rejectedint rejectedCPUs that rejected the workload
netOutputint netOutputsum of observable outputs across the fleet
totalSpecMHzint totalSpecMHzsum of rated clocks
totalEffectiveMHzint totalEffectiveMHzsum of effective (post-overclock) clocks
totalInstructionsint totalInstructionssum of instructions retired across the fleet
memberReportString memberReportper-member lines accumulated during a run

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLCPUCatalog cat)No description in source.
selectboolean select(String key)Add one CPU by catalog key; returns true if the key resolved.
selectAllvoid selectAll()Add every model in the catalog (the whole roster).
countint count()No description in source.
atSLCPURuntime at(int i)No description in source.
keyAtString keyAt(int i)No description in source.
overclockFleetPercentvoid overclockFleetPercent(int percent)--- overclock the whole fleet (optional) --- Push every member to a percentage of its spec clock (e.g. 120 = +20%); members whose policy marks the target unstable still run but are flagged.
runAcrossint runAcross(String path, int lang, int words, int budget)Run the SAME workload spec on every member (each gets its own fresh grant, since a grant accumulates usage). `path`/`lang` name the source; `words` and `budget` size each per-CPU grant. Returns the net (summed) output.
accumulatevoid accumulate(String key, SLCPURuntime cpu, SLCPUResource grant, int out, SLWorkload job)Fold one member's outcome into the net results.
resetResultsvoid resetResults()No description in source.
fleetSizeint fleetSize()No description in source.
completedint completed()No description in source.
rejectedCountint rejectedCount()No description in source.
netint net()No description in source.
aggregateSpecMHzint aggregateSpecMHz()No description in source.
aggregateEffectiveMHzint aggregateEffectiveMHz()No description in source.
retiredInstructionsint retiredInstructions()No description in source.
fastestString fastest()No description in source.
slowestString slowest()No description in source.
fleetSpeedRatioMilliint fleetSpeedRatioMilli()Aggregate overclock headroom actually realised, ×1000 (1000 = fleet at spec, 1250 = +25% aggregate effective clock). Lets a caller score the net performance gain without floating point.
scoreboardString scoreboard()The net-results scoreboard: a world-level summary of running real work on the whole selected fleet.

SLCPUModel #sleela 2.5 (lib/cpu/SLCPUModel.sleela)

SLCPUModel class

Defines SLCPUModel — the declarative description of a specific processor: the inventory of units it is built from (architecture metadata, clock, register file, pipeline, execution units, caches, memory, I/O bus, DMA, MMU, interrupts, couplers) and a validate() contract that a concrete model satisfies. It is the specification half; SLCPURuntime is the runnable half a per-architecture model extends. Kept as populatable fields (not bare names) so a Sleela-sourced CPU can be described, validated, and then handed to SLCPURuntime to execute on top of the secondary VM. Family: cpu. Describes what SLCPURuntime runs.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
architectureString architectureNo description in source.
clockint clockNo description in source.
registersint registersregister count
widthint widthdata path width in bits
pipelineint pipelinepipeline stage count (0 = non-pipelined)
executionUnitsint executionUnitsNo description in source.
cachesint cachescache level count
memoryint memoryaddressable words
ioBusint ioBus1 if an I/O bus is present
dmaint dma1 if a DMA engine is present
mmuint mmu1 if an MMU is present
interruptsint interruptsinterrupt line count
couplersint couplersNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String arch, int clockMHz, int regCount, int bits,No description in source.
withCachesvoid withCaches(int levels)No description in source.
withIoBusvoid withIoBus()No description in source.
withDmavoid withDma()No description in source.
withMmuvoid withMmu()No description in source.
withInterruptsvoid withInterrupts(int n)No description in source.
withCouplersvoid withCouplers(int n)No description in source.
validateboolean validate()A model is valid when it names an architecture, has a positive width and register count, and a non-empty address space.
architectureNameString architectureName()No description in source.
clockMHzint clockMHz()No description in source.
registerCountint registerCount()No description in source.
dataWidthint dataWidth()No description in source.
pipelineDepthint pipelineDepth()No description in source.
unitsint units()No description in source.
cacheLevelsint cacheLevels()No description in source.
addressableWordsint addressableWords()No description in source.
hasMmuboolean hasMmu()No description in source.
hasDmaboolean hasDma()No description in source.
hasIoBusboolean hasIoBus()No description in source.
interruptLinesint interruptLines()No description in source.

SLCPUResource #sleela 2.5 (lib/cpu/SLCPUResource.sleela)

SLCPUResource class

Defines SLCPUResource — a resource grant assigned to a workload running on a CPU. It is the unit of resource assignment: how much memory (words) the workload may address, how many instructions it may retire (instruction budget / time-slice), its scheduling priority, and whether it may use I/O and privileged services. A CPU admits a workload only if its model can satisfy the grant, then enforces it while the workload runs. This is what lets many workloads share one CPU model predictably: each gets a bounded, explicit slice of the machine, and the CPU accounts usage against it. Family: cpu. Composed by SLWorkload; enforced by SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
PRIORITY_IDLEstatic final int PRIORITY_IDLE = 0Scheduling priority bands.
PRIORITY_NORMALstatic final int PRIORITY_NORMAL = 1No description in source.
PRIORITY_HIGHstatic final int PRIORITY_HIGH = 2No description in source.
PRIORITY_REALTIMEstatic final int PRIORITY_REALTIME = 3No description in source.
memoryWordsint memoryWordsaddress-space words the workload may use
instructionBudgetint instructionBudgetmax instructions it may retire this grant (time-slice)
priorityint priorityNo description in source.
ioAllowedint ioAllowed1 = may issue I/O / service opcodes
privilegedint privileged1 = may run supervisor-level services
coreAffinityint coreAffinitypreferred core index (-1 = any)
instructionsUsedint instructionsUsedAccounting (filled while running).
memoryHighWaterint memoryHighWaterhighest word index touched

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int words, int budget, int schedPriority)No description in source.
allowIovoid allowIo(boolean on)No description in source.
allowPrivilegedvoid allowPrivileged(boolean on)No description in source.
pinToCorevoid pinToCore(int index)No description in source.
chargeInstructionvoid chargeInstruction()Budget accounting, used by the CPU's run loop.
observeAddressvoid observeAddress(int addr)No description in source.
exhaustedboolean exhausted()No description in source.
withinMemoryboolean withinMemory(int addr)No description in source.
resetvoid reset()No description in source.
wordsint words()No description in source.
budgetint budget()No description in source.
schedulingPriorityint schedulingPriority()No description in source.
ioEnabledboolean ioEnabled()No description in source.
privilegedModeboolean privilegedMode()No description in source.
affinityint affinity()No description in source.
usedint used()No description in source.
peakAddressint peakAddress()No description in source.
remainingint remaining()No description in source.

SLCPURuntime #sleela 2.5 (lib/cpu/SLCPURuntime.sleela)

SLCPURuntime class

Defines SLCPURuntime — the runnable base class every specific

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
archNameString archNameNo description in source.
widthint widthdata path width in bits
addrWidthint addrWidthaddress bus width in bits
regCountint regCountarchitectural register count
regsSLRAM regsarchitectural registers (one word each)
memSLRAM memword-addressable system memory
memWordsint memWordsNo description in source.
aluSLALU aluNo description in source.
pcint pcprogram counter (word index)
haltedint haltedNo description in source.
retiredint retiredinstructions executed
clockSLClockPolicy clock--- clock: run at the model's spec, with overclock support --- spec/overclock frequency policy
specMHzint specMHzthe model's rated clock (set via setSpecClock)
substrateSLSleelaVM substrate--- secondary-VM substrate: the CPU runs its lowered form here ---
opSLSleelaOpcode opNo description in source.
loweringint lowering1 => execute by lowering to canonical opcodes
workIsaSLInstructionSet workIsa--- workload execution: run C / C++ / Sleela work on this CPU within a resource grant. The register-ISA mapping pipeline is shared across all architectures (SLCompilerDriver -> SLProgram -> SLOpcodeMap -> substrate). ---
workDecoderSLInstructionDecoder workDecoderNo description in source.
workSysSLSystemCall workSysNo description in source.
activeGrantSLCPUResource activeGrantthe grant the current workload runs within
admittedWorkloadsint admittedWorkloadsNo description in source.
completedWorkloadsint completedWorkloadsNo description in source.
attachedSubstrateSLSleelaVM attachedSubstrate--- substrate injection (nesting seam) --- When a host (the Secondary Sleela VM, SLVM) wants the CPU to run as a guest ON its substrate rather than on a private one, it attaches that substrate here. runWorkload()/mapWorkload() then target the attached substrate, so the CPU's lowered opcode stream and the host's dispatch loop operate on ONE SLSleelaVM — the true "CPU on top of the Secondary VM" nesting the docs describe. When null (the default) the CPU owns its substrate as before.
dmaOptionint dmaOption--- optional capabilities: direct DMA and native GPU access --- Off by default. A program/executor that needs them turns them on; when on, the CPU exposes a direct-memory-access engine and a GPU device it can offload to at any point. 1 when direct DMA is enabled
gpuOptionint gpuOption1 when native GPU access is enabled
dmaSLDMAController dmathe DMA engine (operates over this CPU's memory)
gpuSLGPUDevice gputhe GPU device

Methods — the actions this unit can perform.

MethodSignatureWhat it does
bringUpvoid bringUp(String name, int dataBits, int addressBits, int registers, int memoryWords)Bring the inherited machinery up once a subclass has set its widths.
enableDMAvoid enableDMA()--- optional capability: direct DMA --- Enable the direct memory-access engine over this CPU's memory. After this a program can call dmaEngine().transfer(...) / memcpy(...) / fill(...) to move bulk data without the CPU copying word by word.
disableDMAvoid disableDMA()No description in source.
dmaEnabledboolean dmaEnabled()No description in source.
dmaEngineSLDMAController dmaEngine()No description in source.
dmaCopyint dmaCopy(int src, int dst, int length)Convenience passthrough for the common bulk move (returns words moved or -1).
enableGPUvoid enableGPU()--- optional capability: native GPU access --- Enable a GPU device the CPU can offload parallel/compute kernels to. The device uses a real host GPU over the bridge when available, else a modelled SIMT engine, so GPU code always runs.
enableGPUvoid enableGPU(String name, int units, int lanes, int core, int vramMiB)No description in source.
disableGPUvoid disableGPU()No description in source.
gpuEnabledboolean gpuEnabled()No description in source.
gpuDeviceSLGPUDevice gpuDevice()No description in source.
workloadIsaSLInstructionSet workloadIsa()The register ISA used by the shared compile/map pipeline (SLWorkload.compile needs it to lower any supported language to a language-independent image).
attachSubstratevoid attachSubstrate(SLSleelaVM hostSubstrate)Host hands its substrate to the CPU so the CPU runs nested on it (SLVM).
detachSubstratevoid detachSubstrate()No description in source.
nestedboolean nested()No description in source.
setSpecClockvoid setSpecClock(int ratedMHz)--- clock / overclocking --- Set the model's rated clock (its own specification). A concrete SL<ARCH>CPU calls this in configure() so the CPU runs at spec; it may be called before or after bringUp().
overclockboolean overclock(int targetMHz)Overclock the CPU to a target effective frequency (returns false if the target exceeds the model's stability ceiling — the OC is applied but the policy reports it unstable).
setClockMultipliervoid setClockMultiplier(int m)No description in source.
setBaseClockvoid setBaseClock(int mhz)No description in source.
setStabilityCeilingvoid setStabilityCeiling(int mhz)No description in source.
resetClockvoid resetClock()No description in source.
clockPolicySLClockPolicy clockPolicy()No description in source.
specClockMHzint specClockMHz()No description in source.
effectiveMHzint effectiveMHz()No description in source.
overclockedboolean overclocked()No description in source.
clockStableboolean clockStable()No description in source.
cyclesInMicrosecondsint cyclesInMicroseconds(int us)How many model cycles the clock delivers in a given number of microseconds (lets a workload budget be expressed in time rather than raw instructions).
mapWorkloadSLSleelaVM mapWorkload(SLWorkload work, SLSleelaVM target)Compile + map a workload onto a target substrate WITHOUT running it, so a host (SLVM) can drive the resulting opcode stream itself. Returns the substrate that now carries the workload, or null if the workload was rejected. Used by SLVM.runGuestWorkload for the Creator -> SLVM -> CPU -> program stack.
admitboolean admit(SLWorkload work)--- resource assignment + workload execution --- Admission control: can this CPU satisfy the workload's resource grant? A workload is admitted only when its memory request fits the CPU's address space and (if it needs I/O/privileged services) the model provides them.
runWorkloadint runWorkload(SLWorkload work)Run a workload on this CPU within its grant. The source (C/C++/Sleela/Java) is compiled to the register ISA, mapped onto THIS CPU's canonical-opcode substrate, and executed up to the grant's instruction budget. Returns the observable output (the printed value), or -1 if the workload was rejected.
grantsAdmittedint grantsAdmitted()No description in source.
workloadsRunint workloadsRun()No description in source.
currentGrantSLCPUResource currentGrant()No description in source.
readRegint readReg(int i)--- register / memory access (what decode() uses) ---
writeRegvoid writeReg(int i, int v)No description in source.
readMemint readMem(int addr)No description in source.
writeMemvoid writeMem(int addr, int v)No description in source.
maskWordint maskWord(int v)No description in source.
aluOpint aluOp(int a, int b, int op)--- ALU surface (decode() routes arithmetic through here so flags are set) ---
enableLoweringvoid enableLowering()--- lowering surface: emit canonical opcodes onto the secondary VM ---
emitConstint emitConst(int v)No description in source.
emitLoadGlobalint emitLoadGlobal(int slot)No description in source.
emitStoreGlobalint emitStoreGlobal(int slot)No description in source.
emitAddint emitAdd()No description in source.
emitSubint emitSub()No description in source.
emitMulint emitMul()No description in source.
emitPrintint emitPrint()No description in source.
emitHaltint emitHalt()No description in source.
emitJumpint emitJump(int target)No description in source.
emitJumpIfFalseint emitJumpIfFalse(int target)No description in source.
runLoweredint runLowered(int budget)Execute the lowered program on the substrate (the "run on top of the secondary VM" path). Returns opcodes retired on the substrate.
loweredOutputint loweredOutput()No description in source.
engineSLSleelaVM engine()No description in source.
fetchint fetch()--- fetch-decode-execute lifecycle (overridable) --- Default fetch: read the instruction word at pc and advance.
decodevoid decode(int word)Subclasses override decode() to interpret one instruction word. The base treats a zero word as NOP and anything else as HALT so the loop terminates safely if a model forgets to override.
preFetchvoid preFetch()Per-instruction hook a subclass overrides for M1-cycle side effects (e.g. the Z80 memory refresh). Default does nothing.
stepint step()One instruction: pre-fetch hook, fetch, decode/execute, count.
runint run(int budget)No description in source.
resetvoid reset()No description in source.
loadProgramWordvoid loadProgramWord(int addr, int word)No description in source.
setEntryPointvoid setEntryPoint(int addr)No description in source.
interruptvoid interrupt(int vector)arch-specific; default no-op
validateboolean validate()--- introspection ---
architectureString architecture()No description in source.
programCounterint programCounter()No description in source.
instructionsRetiredint instructionsRetired()No description in source.
isHaltedboolean isHalted()No description in source.
dataWidthint dataWidth()No description in source.
registerCountint registerCount()No description in source.
zeroint zero()No description in source.
negativeint negative()No description in source.
carryint carry()No description in source.
overflowint overflow()No description in source.
runByOpcodesint runByOpcodes(int[] program, int at, int budget)(1) Run a native instruction-word program through the opcode loop. The program is an int[] of packed instruction words (as a model's assembler helper produces); it is loaded from `at`, the entry point is set, and the fetch-decode-execute loop runs within `budget`. Returns opcodes retired.
runByOpcodesint runByOpcodes(int[] program, int budget)No description in source.
runByEquivalenceint runByEquivalence(SLWorkload work)(2) Run the code of an assumed other process by function-call equivalence: the workload is compiled and mapped (SLOpcodeMap) to the equivalent opcode / service-call stream on this CPU, then executed within its grant. This is a first-class, honestly-named view of the shared workload path (runWorkload). Returns the observable output, or -1 if the workload was not admitted.
opcodeObservableint opcodeObservable()The observable result left by the OPCODE path. A native instruction loop leaves its result in architecture-defined state (a register or a memory cell), NOT on the lowering substrate -- so the base reads register 0 as the conventional result slot. A model whose result lands elsewhere (e.g. the 6502's accumulator) overrides this to name its own result location, so the basis comparison stays honest rather than assuming a fixed convention.
basisHoldsboolean basisHolds(int[] opcodeProgram, int opcodeBudget,Does this CPU run by both? The basis holds when the SAME computation, run by opcodes and by function-call equivalence, yields the SAME observable. `opcodeProgram` is the native-opcode form left in opcodeObservable(); `equivalentWork` is the assumed-other-process form whose observable is its printed output. `expected` is the agreed result both must produce (callers supply it because the two paths observe different surfaces -- a register vs. a printed value -- so equivalence means "both equal the intended result", not "both read the same physical slot"). Returns true iff both agree with it.
runsByBothboolean runsByBoth()A model advertises that running by both mechanisms is part of its basis. Always true for an SLCPURuntime-derived model: both the opcode loop and the equivalence pipeline are inherited here. Subclasses do not re-implement it; they inherit the capability by extending this runtime.

SLCpuTiming #sleela 2.5 (lib/cpu/SLCpuTiming.sleela)

SLCpuTiming class

Defines SLCpuTiming — the expert core-timing settings of a CPU: the actual core clock (variable, with floor/ceiling), the Vcore rail it runs on, and the per-stage pipeline budgets (fetch, decode, execute, writeback) stated as named SLTiming paths. Rather than assume a core "just runs" at its advertised frequency, the critical path (the slowest stage) determines the real maximum clock, and dialing above what the stage budgets and the settled Vcore can honor is refused. This is the expert surface for CPU timing: a tuner states measured stage delays and a Vcore operating point, and the class reports the honest ceiling, the critical stage by name, and whether the dialed point is honored. Family: cpu. Composes SLTiming and SLVoltageRail; partners SLCore/SLClock.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString namenameful: "core0-pipeline", ...
minMHzint minMHzlowest core clock the operator may dial
maxMHzint maxMHzdatasheet ceiling for the core clock
currentMHzint currentMHzthe variable core clock presently selected
vcoreSLVoltageRail vcorethe core supply rail
mvPerMHzint mvPerMHzsettled Vcore each extra MHz of ceiling needs
fetchSLTiming fetchfetch-stage critical path
decodeSLTiming decodedecode-stage critical path
executeSLTiming executeexecute-stage critical path (usually the long pole)
writebackSLTiming writebackwriteback-stage critical path

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String coreName, int floorMHz, int ceilingMHz)No description in source.
attachVcorevoid attachVcore(SLVoltageRail rail, int millivoltsPerMHz)No description in source.
periodPsAtint periodPsAt(int mhz)No description in source.
setFetchvoid setFetch(int propPs, int setupPs, int holdPs)State a stage's measured path (propagation + setup, with hold).
setDecodevoid setDecode(int propPs, int setupPs, int holdPs)No description in source.
setExecutevoid setExecute(int propPs, int setupPs, int holdPs)No description in source.
setWritebackvoid setWriteback(int propPs, int setupPs, int holdPs)No description in source.
setClockJittervoid setClockJitter(int jitterPs)Jitter from the clock tree applies to every stage equally.
criticalMaxMHzint criticalMaxMHz()The honest maximum core clock: the lowest per-stage max-frequency (the critical stage wins) further capped by what the settled Vcore supports.
voltageCeilingMHzint voltageCeilingMHz()No description in source.
setClockint setClock(int mhz)Dial the variable core clock, clamped into [min,max] and into the honest critical/voltage ceiling. Returns the clock actually set.
retimevoid retime()No description in source.
criticalStageString criticalStage()Which stage is the critical path, by name — nameful reporting.
honoredboolean honored()Every stage honored at the dialed clock AND Vcore in limits.
timingNameString timingName()No description in source.
clockint clock()No description in source.
floorMHzint floorMHz()No description in source.
ceilingMHzint ceilingMHz()No description in source.
executeBudgetSLTiming executeBudget()No description in source.

SLDeviceDriver #sleela 2.5 (lib/cpu/SLDeviceDriver.sleela)

SLDeviceDriver class

Defines SLDeviceDriver — the base class for all device drivers. A driver is the software contract between the OS and a hardware device: it owns the device's I/O port(s), exposes a uniform lifecycle (probe, attach, open, read/write, close, detach), and fields the device's interrupt. The kernel talks to devices only through drivers. Concrete drivers (console, disk, keyboard, network) extend this and override the transfer methods. Family: cpu. Composes SLIOBus; base of the driver hierarchy.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
STATE_UNLOADEDstatic final int STATE_UNLOADED = 0No description in source.
STATE_ATTACHEDstatic final int STATE_ATTACHED = 1No description in source.
STATE_OPENstatic final int STATE_OPEN = 2No description in source.
nameString nameNo description in source.
portNumberint portNumberNo description in source.
irqLineint irqLineNo description in source.
stateint stateNo description in source.
ioSLIOBus ioNo description in source.
opsInint opsInNo description in source.
opsOutint opsOutNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String driverName, int port, int irq, SLIOBus bus)No description in source.
probeboolean probe()Lifecycle. probe() asks whether the device is present; attach() binds it.
attachvoid attach()No description in source.
openvoid open()No description in source.
closevoid close()No description in source.
detachvoid detach()No description in source.
readint read()Default transfer: byte/word through the bound port. Concrete drivers override with device-specific framing.
writeint write(int value)No description in source.
serviceInterruptvoid serviceInterrupt()Interrupt service routine entry; concrete drivers override.
readyboolean ready()No description in source.
driverNameString driverName()No description in source.
irqint irq()No description in source.

SLDiskDriver #sleela 2.5 (lib/cpu/SLDiskDriver.sleela)

SLDiskDriver class extends SLDeviceDriver

Defines SLDiskDriver — the block-storage driver. It extends SLDeviceDriver and binds an SLHardDrive plus (optionally) an SLDMAController so the OS can read/write disk blocks, using DMA for bulk transfers and the disk IRQ for completion. The bootloader and filesystem go through it. Family: cpu. Extends SLDeviceDriver; composes SLHardDrive and SLDMAController.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
driveSLHardDrive driveNo description in source.
dmaSLDMAController dmaNo description in source.
blocksReadint blocksReadNo description in source.
blocksWrittenint blocksWrittenNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(SLIOBus bus, int port, SLHardDrive hd, SLDMAController dmaEngine)No description in source.
readBlockint readBlock(int block)No description in source.
writeBlockint writeBlock(int block, int payloadHandle)No description in source.
dmaReadIntoint dmaReadInto(int diskBlock, int memWord, int words)Bulk read via DMA directly into main memory, then the device raises its IRQ.
serviceInterruptvoid serviceInterrupt()No description in source.
readsIssuedint readsIssued()No description in source.
writesIssuedint writesIssued()No description in source.

SLDMAController #sleela 2.5 (lib/cpu/SLDMAController.sleela)

SLDMAController class

Defines SLDMAController — a direct memory access engine. When the DMA option is enabled, a program (or a device) can move a block of words between memory regions WITHOUT the CPU copying each word in its fetch-decode-execute loop: the controller does the transfer directly over SLRAM. It models independent channels, source/destination/length descriptors, a direction/mode, and completion status, like a real DMA controller (8237 / modern scatter-gather). This is the "direct DMA option": a Sleela executor that enables it can hand a bulk move to the DMA engine at any point the program needs it, freeing the CPU. Transfers are bounded by the backing SLRAM and accounted for. Family: cpu. Composes SLRAM. Enabled via the DMA option on SLCPURuntime / SLVM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MODE_MEM_TO_MEMstatic final int MODE_MEM_TO_MEM = 0Transfer modes.
MODE_MEM_TO_DEVstatic final int MODE_MEM_TO_DEV = 1No description in source.
MODE_DEV_TO_MEMstatic final int MODE_DEV_TO_MEM = 2No description in source.
CHANNELSstatic final int CHANNELS = 8No description in source.
enabledint enabled1 when the DMA option is on
memorySLRAM memorythe address space transfers operate over
busyMaskint busyMaskPer-channel descriptors (bounded: 8 channels, wired as fields). bit c set while channel c is running
completedMaskint completedMaskbit c set once channel c finished
transfersDoneint transfersDonecompleted transfers
wordsMovedint wordsMovedtotal words moved

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLRAM addressSpace)No description in source.
enablevoid enable()No description in source.
disablevoid disable()No description in source.
isEnabledboolean isEnabled()No description in source.
transferint transfer(int channel, int src, int dst, int length, int mode)Program a channel and perform a direct memory-to-memory block transfer. Returns the number of words moved, or -1 if DMA is disabled / out of range.
memcpyint memcpy(int src, int dst, int length)Convenience: a plain memory-to-memory move on channel 0.
fillint fill(int channel, int dst, int length, int value)Fill a region with a constant (memset-style) without CPU involvement.
startvoid start(int channel)No description in source.
completevoid complete(int channel)No description in source.
stopvoid stop(int channel)No description in source.
busyboolean busy(int channel)No description in source.
finishedboolean finished(int channel)No description in source.
pow2int pow2(int n)No description in source.
transfersint transfers()No description in source.
totalWordsint totalWords()No description in source.
channelsint channels()No description in source.

SLDreamcastCPU #sleela 2.5 (lib/cpu/sega-dreamcast/SLDreamcastCPU.sleela)

SLDreamcastCPU class extends SLCPURuntime

Defines SLDreamcastCPU — a runnable model of the Sega Dreamcast (SH-4). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Dreamcast (SH-4) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLDriverManager #sleela 2.5 (lib/cpu/SLDriverManager.sleela)

SLDriverManager class

Defines SLDriverManager — the OS subsystem that registers, probes, and dispatches device drivers. It holds the installed drivers, binds each to its interrupt line, and routes an incoming interrupt to the driver that owns that line. The kernel installs drivers here at boot. Holds the standard four drivers (console, disk, keyboard, network); more can be added by extension. Family: cpu. Composes the SLDeviceDriver hierarchy.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
consoleSLConsoleDriver consoleNo description in source.
diskSLDiskDriver diskNo description in source.
keyboardSLKeyboardDriver keyboardNo description in source.
netSLNetworkDriver netNo description in source.
installedint installedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
installConsolevoid installConsole(SLConsoleDriver d)No description in source.
installDiskvoid installDisk(SLDiskDriver d)No description in source.
installKeyboardvoid installKeyboard(SLKeyboardDriver d)No description in source.
installNetworkvoid installNetwork(SLNetworkDriver d)No description in source.
dispatchInterruptvoid dispatchInterrupt(int line)Route an interrupt line to the driver that owns it (ISR dispatch).
consoleDriverSLConsoleDriver consoleDriver()No description in source.
diskDriverSLDiskDriver diskDriver()No description in source.
keyboardDriverSLKeyboardDriver keyboardDriver()No description in source.
networkDriverSLNetworkDriver networkDriver()No description in source.
driverCountint driverCount()No description in source.

SLDSP56000CPU #sleela 2.5 (lib/cpu/dsp56000/SLDSP56000CPU.sleela)

SLDSP56000CPU class extends SLCPURuntime

Defines SLDSP56000CPU — a runnable model of the Motorola DSP56000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola DSP56000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLdsPICCPU #sleela 2.5 (lib/cpu/dspic/SLdsPICCPU.sleela)

SLdsPICCPU class extends SLCPURuntime

Defines SLdsPICCPU — a runnable model of the Microchip dsPIC. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Microchip dsPIC register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLESAS390CPU #sleela 2.5 (lib/cpu/system-390/SLESAS390CPU.sleela)

SLESAS390CPU class extends SLCPURuntime

Defines SLESAS390CPU — a runnable model of the IBM ESA/390. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM ESA/390 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLExecutorBuild #sleela 2.5 (lib/cpu/components/SLExecutorBuild.sleela)

SLExecutorBuild class

Defines SLExecutorBuild — a user-assembled Sleela executor: a CPU model (SLCPURuntime / SL<ARCH>CPU) running at its spec clock (or overclocked) plus the components the user picked from SLComponentCatalog — a motherboard, a memory module, a primary storage device, an optional optical drive, and a system bus. It wires the memory module's backing store into the CPU and exposes the assembled machine so the Creator/SLVM can host it and run C/C++/Java/Sleela workloads on it. This is the "build your own machine" surface: pick a CPU, set its clock, choose RAM/storage/optical/bus, and get a configured executor whose performance reflects every choice. Family: cpu.components. Composes SLCPURuntime, SLMotherboard, SLMemoryModule, SLMemoryInterface, SLStorageDevice, SLOpticalDrive, SLSystemBus.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
buildNameString buildNameNo description in source.
cpuSLCPURuntime cpuNo description in source.
boardSLMotherboard boardNo description in source.
memorySLMemoryModule memoryNo description in source.
memInterfaceSLMemoryInterface memInterfaceoptional OOD cadence-overlay over `memory`
tiersSLMemoryTierRouter tiersoptional two-tier (usual/accurate) router
storageSLStorageDevice storageNo description in source.
opticalSLOpticalDrive opticalNo description in source.
busSLSystemBus busNo description in source.
assembledint assembledNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name)No description in source.
installCpuvoid installCpu(SLCPURuntime chosenCpu)Pick parts (any may be omitted; CPU and memory are required to assemble).
installBoardvoid installBoard(SLMotherboard motherboard)No description in source.
installMemoryvoid installMemory(SLMemoryModule module)No description in source.
installStoragevoid installStorage(SLStorageDevice device)No description in source.
installOpticalvoid installOptical(SLOpticalDrive drive)No description in source.
installBusvoid installBus(SLSystemBus systemBus)No description in source.
installMemoryInterfacevoid installMemoryInterface(SLMemoryInterface iface)The OOD slot for a memory interface/adapter layer: a Sleela-level overlay that imposes a target-tech refresh duty cycle on the real module (e.g. run the DDR5 so it refreshes as though it were DDR2). Composed WITH the module: install a module first, then install an interface that wraps it. The real backing store is never replaced — only the observed availability changes.
installUsualTiervoid installUsualTier(SLMemoryModule m)Designate PHYSICAL memory tiers: a usual-activities module and an accuracy/competency module, plus which is the main (document default). A function marked usualmem/accuratemem binds to the matching module; the rest inherit the main tier. The accurate tier doubles as the base `memory` the CPU mounts, so single-tier builds are unaffected.
installAccurateTiervoid installAccurateTier(SLMemoryModule m)No description in source.
setMainTiervoid setMainTier(int tier)No description in source.
enableDMAvoid enableDMA()Optional accelerators: give the build's CPU direct DMA and/or native GPU access, so a program on this executor can use them at any point.
enableGPUvoid enableGPU()No description in source.
dmaEnabledboolean dmaEnabled()No description in source.
gpuEnabledboolean gpuEnabled()No description in source.
setClockboolean setClock(int targetMHz)Run the CPU at a chosen frequency (0 = leave at spec). Overclocking returns false if the target is above the model's stability ceiling.
assembleboolean assemble()Assemble the machine: mount the chosen RAM module as the CPU's main memory. Returns true when the required parts (CPU + memory) are present.
effectiveMemoryBandwidthMBsint effectiveMemoryBandwidthMBs()The effective memory bandwidth available to the CPU is the smaller of the RAM module's effective peak and (when present) the system bus's peak — the bus can bottleneck fast RAM. When a memory interface is installed, the RAM figure is the interface's duty-scaled bandwidth (the refresh cadence overlay), not the module's raw peak.
memoryBandwidthMBsint memoryBandwidthMBs()RAM bandwidth as the system sees it: the interface's duty-scaled figure when a cadence overlay is installed, otherwise the module's raw peak.
boardFitsboolean boardFits()When a motherboard is installed, the memory module's channel count must fit the board's routed channels (an 8-channel module can't run on a 4-channel board). No board installed = no constraint. Returns true when the build's memory topology is seatable on the board.
processorSLCPURuntime processor()No description in source.
motherboardSLMotherboard motherboard()No description in source.
ramSLMemoryModule ram()No description in source.
ramInterfaceSLMemoryInterface ramInterface()No description in source.
hasMemoryInterfaceboolean hasMemoryInterface()No description in source.
tierRouterSLMemoryTierRouter tierRouter()Two-tier memory access. memoryForTier(t) returns the physical module a function with declared tier t (SLMemoryTierRouter.TIER_*) binds to; the VM dispatcher calls this per function so usualmem/accuratemem actually route.
twoTierMemoryboolean twoTierMemory()No description in source.
memoryForTierSLMemoryModule memoryForTier(int declaredTier)No description in source.
diskSLStorageDevice disk()No description in source.
opticalDriveSLOpticalDrive opticalDrive()No description in source.
systemBusSLSystemBus systemBus()No description in source.
readyboolean ready()No description in source.
nameString name()No description in source.
cpuSpecMHzint cpuSpecMHz()No description in source.
cpuEffectiveMHzint cpuEffectiveMHz()No description in source.
cpuOverclockedboolean cpuOverclocked()No description in source.
cpuStableboolean cpuStable()No description in source.

SLExtensibleNetwork #sleela 2.5 (lib/cpu/SLExtensibleNetwork.sleela)

SLExtensibleNetwork class

Defines SLExtensibleNetwork — the language feature that lets the

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
referenceNameString referenceName--- Dynamite Connector contract --- the System this network fronts
configurationString configurationfree-form config note
statusString statusimported -> resolved -> [deferred] -> loaded
semSLAccessSemantics semthe role/catalog source of truth
memberCountint memberCountRegistered members, bounded like the VM's fixed slot tables. Each member carries its modifier role and (for public) its position in the hop chain.
MAX_MEMBERSstatic final int MAX_MEMBERS = 8No description in source.
hopChainLengthint hopChainLengthNo description in source.
resolvedint resolved1 once resolve() has run

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initializevoid initialize(String systemName, String config)No description in source.
registerMemberboolean registerMember(int modifierBit)Register one member by its access modifier (SLAccessSemantics.MOD_*). The compiler calls this for each classified member of each file in the network.
setRoleAtvoid setRoleAt(int idx, int role)No description in source.
roleAtint roleAt(int idx)No description in source.
setHopAtvoid setHopAt(int idx, int order)No description in source.
hopAtint hopAt(int idx)No description in source.
resolveString resolve()Resolve: count roles and assign the ordered hop chain to public members in registration order (doc 1 -> doc 2 -> doc 3 ...). Part of the connector lifecycle; after this the backdrop is decided but not yet realized.
deferConstructionString deferConstruction()Defer realization (stage the network without standing the backdrop up yet).
loadboolean load()Load: realize the backdrop. Fail-closed — refuses if not resolved.
readyboolean ready()No description in source.
exposureBackdropint exposureBackdrop()--- backdrop the VM sets up per role (defaults from SLAccessSemantics) --- Exposure components the public hop surface is stood up with.
localBackdropint localBackdrop()Local concerns the private surface declares.
guardBackdropint guardBackdrop()Integrity controls the protected surface enforces.
competentboolean competent()Is the resolved network a competent, complete backdrop to realize? It is competent when it classified at least one member and every public member got a hop-chain position (the ordered communication is well-formed).
toManifestSLAccessManifest toManifest()Flatten the resolved network into the serializable manifest the compiled image carries and the VM reads back.
referenceIdString referenceId()No description in source.
stateString state()No description in source.
membersint members()No description in source.
exposedint exposed()No description in source.
localMembersint localMembers()No description in source.
guardedMembersint guardedMembers()No description in source.
hopCountint hopCount()No description in source.
equalsStrboolean equalsStr(String a, String b)No description in source.

SLeZ80CPU #sleela 2.5 (lib/cpu/zilog-ez80/SLeZ80CPU.sleela)

SLeZ80CPU class extends SLCPURuntime

Defines SLeZ80CPU — a runnable model of the Zilog eZ80. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Zilog eZ80 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLFileSystem #sleela 2.5 (lib/cpu/SLFileSystem.sleela)

SLFileSystem class

Defines SLFileSystem — the OS filesystem layer over the block device. It models a tiny directory of named files, each a run of disk blocks, and provides open/read/write/close by name on top of SLDiskDriver. The program loader uses it to find and read executable images. Holds up to 8 directory entries (SLeeLa surface has no arrays). This is a behavioral model of an inode table + block allocation. Family: cpu. Composes SLDiskDriver.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAX_FILESstatic final int MAX_FILES = 8No description in source.
diskSLDiskDriver diskNo description in source.
fileCountint fileCountNo description in source.
nextFreeBlockint nextFreeBlockNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLDiskDriver blockDevice, int dataStartBlock)No description in source.
createint create(String name, int blocks)Create a file occupying `blocks` contiguous blocks; returns its index.
indexOfint indexOf(String name)No description in source.
startBlockint startBlock(int idx)No description in source.
lengthBlocksint lengthBlocks(int idx)No description in source.
readFirstBlockint readFirstBlock(String name)Read the first block of a named file (loader entry; full reads loop over the file's block run).
filesint files()No description in source.

SLFlipFlop #sleela 2.5 (lib/cpu/SLFlipFlop.sleela)

SLFlipFlop class

Defines SLFlipFlop — an edge-triggered 1-bit storage element (a D flip-flop). Unlike a latch, it captures its input only on a clock edge, which is what makes synchronous CPUs possible: all registers update together on the rising edge of the clock. Built from a master/slave pair of latches. Family: cpu. Pure Sleela state; clocked.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
masterSLLatch masterNo description in source.
slaveSLLatch slaveNo description in source.
dint dsampled data input
lastClkint lastClkprevious clock level, for edge detection

Methods — the actions this unit can perform.

MethodSignatureWhat it does
buildvoid build()No description in source.
setDvoid setD(int bit)No description in source.
clockint clock(int clk)Drive the clock. On the rising edge (0 -> 1), the sampled D propagates through master then slave to the output.
readint read()No description in source.

SLFrontend #sleela 2.5 (lib/cpu/SLFrontend.sleela)

SLFrontend class

Defines SLFrontend — the base class for every language frontend. A frontend turns program source in one language into the common SLIR, which the shared backend (SLLowering) then compiles to machine code for the SLInstructionSet. Concrete frontends exist for C, C++, Java, and Sleela. The contract is deliberately the same one real toolchains use: a frontend is responsible for its language's lexing, parsing, and semantic lowering to a common IR; everything after the IR (optimization, register allocation, code emission) is language-neutral and shared. Family: cpu. Base of the frontend hierarchy; composes SLIR.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
LANG_SLEELAstatic final int LANG_SLEELA = 0No description in source.
LANG_Cstatic final int LANG_C = 1No description in source.
LANG_CPPstatic final int LANG_CPP = 2No description in source.
LANG_JAVAstatic final int LANG_JAVA = 3No description in source.
languageString languageNo description in source.
langIdint langIdNo description in source.
sourcePathString sourcePathNo description in source.
diagnosticsint diagnosticscount of errors/warnings produced
irSLIR irNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String lang, int id, String path)No description in source.
parseboolean parse()Lex + parse + semantic check. Concrete frontends override; the base reports readiness only.
lowerSLIR lower()Lower parsed source to the common IR. Concrete frontends override to emit real IR; the base emits an empty, well-formed module (HALT only).
SLIRInstructionConstint SLIRInstructionConst()Helper so subclasses can reference the IR_HALT constant without an instance.
intermediateSLIR intermediate()No description in source.
languageNameString languageName()No description in source.
languageIdint languageId()No description in source.
diagnosticCountint diagnosticCount()No description in source.

SLFrontendC #sleela 2.5 (lib/cpu/SLFrontendC.sleela)

SLFrontendC class extends SLFrontend

Defines SLFrontendC — the C-language frontend. It lowers C translation units to the common SLIR: declarations become memory/stack slots, expressions become IR temporaries and arithmetic ops, function calls become IR_PARAM/IR_CALL, and `return` becomes IR_RET. The shared backend then compiles the IR to machine code for the SLInstructionSet. SCOPE NOTE: a full C compiler (preprocessor, the entire type system, the standard library) is far beyond one class; this frontend models the real C-to-IR lowering contract and demonstrates a complete lowering for a small C function (int add3(void){ return 2+3; } then write+exit). Extending it to full C means growing parse() into a complete C parser — the IR and backend below it do not change. This mirrors how clang targets LLVM IR. Family: cpu. Extends SLFrontend.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(String path)No description in source.
lowerSLIR lower()Model lowering of the CANONICAL equivalence program: int main(void){ int x = 2 + 3; write(1, &x, 1); return 0; } Every frontend in the family lowers this same computation (x = 2 + 3, write x, exit) so that reducing all four to the Sleela opcode substrate yields the identical observable result — the operational statement of 1:1 Turing effect (see SLTuringBridge). The language-specific lowering shapes (C automatic storage, C++ objects, JVM bytecode) differ; the computed value does not.

SLFrontendCpp #sleela 2.5 (lib/cpu/SLFrontendCpp.sleela)

SLFrontendCpp class extends SLFrontendC

Defines SLFrontendCpp — the C++ frontend. It extends the C frontend's lowering with the C++-specific constructs that still reduce to the same common SLIR: an object's method call lowers to a function call whose first IR_PARAM is the `this` pointer; a constructor lowers to an allocation plus an initializer call; virtual dispatch lowers to a vtable load (IR_LOAD) followed by an indirect IR_CALL. SCOPE NOTE: templates, overload resolution, exceptions, and the STL are a full C++ front-end's job and are out of scope for one class; this models the canonical C++-to-IR lowerings (this-pointer, construction, virtual dispatch) and demonstrates one complete lowering. The IR and backend are unchanged — exactly how clang++ shares LLVM with clang. Family: cpu. Extends SLFrontendC (C++ is a superset lowering).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initCppvoid initCpp(String path)No description in source.
lowerSLIR lower()Model lowering of the CANONICAL equivalence program expressed with a C++ object (so the C++-specific lowering is exercised), computing the same value as every other frontend: struct Box { int a, b; int sum(){ return a + b; } }; int main(){ Box box{2, 3}; write(1, box.sum()); return 0; } Construction stores the fields; box.sum() is a call with `this` as the first param; the returned value is x = 2 + 3 = 5 — identical to the C, Java, and Sleela frontends, which is what makes the four 1:1 in Turing effect once reduced to the Sleela opcode substrate (SLTuringBridge).

SLFrontendJava #sleela 2.5 (lib/cpu/SLFrontendJava.sleela)

SLFrontendJava class extends SLFrontend

Defines SLFrontendJava — the Java frontend. Java is already compiled to JVM bytecode by javac, so this frontend lowers from that stack-based bytecode to the common SLIR: bytecode locals become IR temporaries, the operand stack is linearized into three-address IR, invokestatic/invokevirtual become IR_PARAM/IR_CALL, and System.out writes lower to a syscall. SCOPE NOTE: a full classfile reader (constant pool, all ~200 bytecodes, verification) is a project of its own; this models the canonical bytecode-to-IR lowering and demonstrates one complete lowering. The IR and backend are shared with the other languages. Family: cpu. Extends SLFrontend.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(String path)No description in source.
lowerSLIR lower()Model lowering of JVM bytecode for the CANONICAL equivalence program: static void main(String[] a){ int x = 2 + 3; System.out.write(x); } Bytecode: iconst_2; iconst_3; iadd; istore_1; iload_1; invokevirtual. The bytecode's operand stack is linearized into SSA temporaries; the computed value (x = 2 + 3) matches every other frontend so the languages are 1:1 in Turing effect once reduced to the Sleela opcode substrate.

SLFrontendSleela #sleela 2.5 (lib/cpu/SLFrontendSleela.sleela)

SLFrontendSleela class extends SLFrontend

Defines SLFrontendSleela — the SLeeLa-language frontend. It lowers a SLeeLa method body into the common SLIR. This is the reference frontend of the family: because SLeeLa is the system's native language and its ISA aligns with the VM ISA, this path is the most direct and is modeled end to end (expression trees -> IR temporaries -> IR ops). The method lowerArithmetic() demonstrates a complete lowering: it builds IR for an arithmetic+syscall program (compute, print, exit) that the shared backend turns into runnable machine code. Family: cpu. Extends SLFrontend.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(String path)No description in source.
lowerSLIR lower()Lower a canonical demo: t0 = 2; t1 = 3; t2 = t0 + t1; syscall WRITE t2; halt.

SLFullAdder #sleela 2.5 (lib/cpu/SLFullAdder.sleela)

SLFullAdder class

Defines SLFullAdder — adds three 1-bit inputs (a, b, carry-in), producing a sum bit and a carry-out. Built from two half adders and an OR gate, exactly as in real silicon. h1: a + b -> s1, c1 h2: s1 + carry_in -> sum, c2 carry_out = c1 OR c2 Family: cpu. Pure Sleela logic.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
h1SLHalfAdder h1No description in source.
h2SLHalfAdder h2No description in source.
orGateSLGate orGateNo description in source.
sumint sumNo description in source.
carryOutint carryOutNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
buildvoid build()No description in source.
addvoid add(int a, int b, int carryIn)No description in source.
sumBitint sumBit()No description in source.
carryBitint carryBit()No description in source.

SLGameCubeCPU #sleela 2.5 (lib/cpu/nintendo-gamecube/SLGameCubeCPU.sleela)

SLGameCubeCPU class extends SLCPURuntime

Defines SLGameCubeCPU — a runnable model of the Nintendo GameCube (Gekko / PowerPC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo GameCube (Gekko / PowerPC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLGameGearCPU #sleela 2.5 (lib/cpu/sega-game-gear/SLGameGearCPU.sleela)

SLGameGearCPU class extends SLCPURuntime

Defines SLGameGearCPU — a runnable model of the Sega Game Gear (Z80). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Game Gear (Z80) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLGate #sleela 2.5 (lib/cpu/SLGate.sleela)

SLGate class

Defines SLGate, a single Boolean logic gate — the foundational primitive of the SLeeLa CPU. Every circuit, adder, register, and ALU is ultimately composed from gates, so the whole CPU is Sleela source that bottoms out here. A gate takes one or two 1-bit inputs (0 or 1) and produces one 1-bit output according to its kind. Kinds: AND, OR, NOT, NAND, NOR, XOR, XNOR, BUF. NAND/NOR are universal — any logic can be built from them alone — which is why real silicon favors them; this class exposes them directly. Family: cpu. Pure Sleela logic; no native bridge needed at this layer.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
ANDstatic final int AND = 0No description in source.
ORstatic final int OR = 1No description in source.
NOTstatic final int NOT = 2No description in source.
NANDstatic final int NAND = 3No description in source.
NORstatic final int NOR = 4No description in source.
XORstatic final int XOR = 5No description in source.
XNORstatic final int XNOR = 6No description in source.
BUFstatic final int BUF = 7No description in source.
kindint kindone of the constants above
lastOutputint lastOutputmost recent evaluated output bit
evaluationsint evaluationshow many times this gate has been evaluated

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int gateKind)No description in source.
clampBitint clampBit(int v)No description in source.
evalint eval(int a, int b)Evaluate the gate for the given input bits. For unary gates (NOT, BUF), only `a` is used.
outputint output()No description in source.
kindOfint kindOf()No description in source.

SLGenesisCPU #sleela 2.5 (lib/cpu/sega-genesis/SLGenesisCPU.sleela)

SLGenesisCPU class extends SLCPURuntime

Defines SLGenesisCPU — a runnable model of the Sega Genesis (68000). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Genesis (68000) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLGPUDevice #sleela 2.5 (lib/cpu/SLGPUDevice.sleela)

SLGPUDevice class

Defines SLGPUDevice — a graphics/compute processor a Sleela executor can offload work to when the GPU option is enabled. It models the real spec that matters for compute: a number of compute units each running many lanes (SIMT), a core clock, and a block of VRAM (its own SLRAM). A kernel is a canonical-opcode program dispatched across a grid of lanes; the device executes it against VRAM. A native-access path (nativeDispatch) crosses the explicit bridge to a real host GPU (CUDA/OpenCL/Metal/Vulkan) when available, mirroring the native engine's bridge discipline. This is the "native GPU access" option: a program that needs the GPU — SIMD math, large parallel maps — asks the device to run a kernel, rather than grinding it on the scalar CPU. Family: cpu. Composes SLRAM (VRAM) and SLSleelaVM (per-lane kernel engine). Enabled via the GPU option on SLCPURuntime / SLVM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
modelString modele.g. "SLeeLa Compute GPU"
computeUnitsint computeUnitsnumber of parallel compute units
lanesPerUnitint lanesPerUnitSIMT lanes per unit (warp/wavefront width)
clockMHzint clockMHzcore clock
vramMiBint vramMiBVRAM capacity
enabledint enabled1 when the GPU option is on
nativeAvailableint nativeAvailable1 if a real host GPU is reachable over the bridge
vramSLRAM vramdevice memory
kernelVMSLSleelaVM kernelVMexecutes a kernel's canonical opcodes (per-lane model)
opSLSleelaOpcode opNo description in source.
kernelsRunint kernelsRunNo description in source.
lastResultint lastResultobservable output of the last kernel

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int units, int lanes, int core, int vramMegabytes)No description in source.
enablevoid enable()No description in source.
disablevoid disable()No description in source.
isEnabledboolean isEnabled()No description in source.
totalLanesint totalLanes()Total parallel lanes across the device.
probeNativevoid probeNative()Ask the host whether a real GPU is present (bridge). Falls back to the modelled SIMT engine when none is available, so GPU code always runs.
nativeAccessboolean nativeAccess()No description in source.
writeVramvoid writeVram(int addr, int value)--- VRAM access (host<->device copies are typically via DMA) ---
readVramint readVram(int addr)No description in source.
deviceMemorySLRAM deviceMemory()No description in source.
emitKernelint emitKernel(int opcode, int arg)Build a kernel into the device's kernel engine (canonical opcodes).
dispatchint dispatch(int gridLanes, int budget)Dispatch the built kernel across `gridLanes` lanes. In the modelled path the kernel engine runs the opcode stream (per-lane state would be SIMT-expanded by the native path); the native path offloads to the host GPU.
kernelEngineSLSleelaVM kernelEngine()No description in source.
kernelCountint kernelCount()No description in source.
resultint result()No description in source.
nameString name()No description in source.
unitsint units()No description in source.
lanesint lanes()No description in source.
clockint clock()No description in source.
vramCapacityint vramCapacity()No description in source.

SLGuestBlockDevice #sleela 2.5 (lib/cpu/SLGuestBlockDevice.sleela)

SLGuestBlockDevice class extends SLGuestDevice

Defines SLGuestBlockDevice — a virtual block storage device (virtio-blk-style) backed by a host SLHardDrive. The guest kernel programs a block number and buffer address, issues a read or write, and the device performs the transfer and raises its IRQ on completion. This is how a guest OS loads its root filesystem and pages to/from disk. MMIO registers: 0 = block number, 1 = guest buffer address, 2 = command (1 read, 2 write), 3 = status (RO). Completion raises the device IRQ. Family: cpu. Extends SLGuestDevice; composes SLHardDrive.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
backingSLHardDrive backingNo description in source.
blockNoint blockNoNo description in source.
bufAddrint bufAddrNo description in source.
statusint status0 idle, 1 busy, 2 done
readsint readsNo description in source.
writesint writesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(int base, int irq, SLHardDrive drive)No description in source.
readint read(int addr)No description in source.
writevoid write(int addr, int value)No description in source.
commandvoid command(int cmd)Execute a block command and signal completion.
readCountint readCount()No description in source.
writeCountint writeCount()No description in source.

SLGuestConsole #sleela 2.5 (lib/cpu/SLGuestConsole.sleela)

SLGuestConsole class extends SLGuestDevice

Defines SLGuestConsole — a virtual console/serial device for the guest. Writing a character to its data register emits it (the guest's dmesg / stdout path); it is how a guest kernel prints its boot log. The hypervisor forwards characters to the host console across the explicit VM/OS bridge. MMIO registers: 0 = data (write a char code), 1 = status (RO, ready). Family: cpu. Extends SLGuestDevice.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
charsOutint charsOutNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(int base)No description in source.
readint read(int addr)No description in source.
writevoid write(int addr, int value)No description in source.
emitvoid emit(int code)No description in source.
charsWrittenint charsWritten()No description in source.

SLGuestDevice #sleela 2.5 (lib/cpu/SLGuestDevice.sleela)

SLGuestDevice class

Defines SLGuestDevice — the base class for virtual devices the hypervisor exposes to a guest VM. A guest kernel talks to these through memory-mapped registers (guest MMIO addresses); a register access that falls in a device's window is a VM-exit the hypervisor routes to the device model. This is step 3 of the OS-VM roadmap: the minimum device surface a guest OS expects (timer, interrupt controller, console, block device). Each device owns an MMIO base/size and read()/write() register handlers plus an optional interrupt line it can raise into the guest. Family: cpu. Base of the guest device hierarchy.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
mmioBaseint mmioBaseNo description in source.
mmioSizeint mmioSizeNo description in source.
irqLineint irqLineguest IRQ this device raises, or -1
irqPendingint irqPendingNo description in source.
accessesint accessesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String deviceName, int base, int size, int irq)No description in source.
ownsboolean owns(int addr)No description in source.
registerOfint registerOf(int addr)No description in source.
readint read(int addr)Default MMIO handlers; concrete devices override.
writevoid write(int addr, int value)No description in source.
raiseIRQvoid raiseIRQ()Interrupt protocol: a device raises its line; the guest's interrupt controller later acknowledges it.
irqRaisedboolean irqRaised()No description in source.
clearIRQvoid clearIRQ()No description in source.
irqint irq()No description in source.
deviceNameString deviceName()No description in source.
accessCountint accessCount()No description in source.

SLGuestDeviceBus #sleela 2.5 (lib/cpu/SLGuestDeviceBus.sleela)

SLGuestDeviceBus class

Defines SLGuestDeviceBus — the virtual device bus the hypervisor presents to a guest VM. It holds the guest's devices (timer, console, block device), routes a guest MMIO access to the device that owns the address, and aggregates device interrupts into the guest's interrupt controller. This is the "chipset" of the guest machine (step 3 of the OS-VM roadmap). MMIO dispatch: a guest read/write to a device-owned address is a VM-exit the hypervisor services by calling the owning device's register handler. IRQ aggregation: after a tick, any device with a raised line is posted to the guest interrupt controller for the guest kernel to service. Family: cpu. Composes SLGuestTimer/Console/BlockDevice and SLInterruptController.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
timerSLGuestTimer timerNo description in source.
consoleSLGuestConsole consoleNo description in source.
blkSLGuestBlockDevice blkNo description in source.
picSLInterruptController picguest interrupt controller
mmioAccessesint mmioAccessesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestTimer t, SLGuestConsole c, SLGuestBlockDevice b, SLInterruptController controller)No description in source.
mmioReadint mmioRead(int addr)Route a guest MMIO read to the owning device.
mmioWritevoid mmioWrite(int addr, int value)Route a guest MMIO write to the owning device.
tickvoid tick()Advance device time by one tick and post any raised interrupts into the guest interrupt controller.
pendingInterruptint pendingInterrupt()The guest kernel's ISR dispatch asks for the highest-priority pending IRQ.
acknowledgevoid acknowledge(int line)No description in source.
hasConsoleboolean hasConsole()Console convenience for the hypervisor's VM-exit router: write one char to the guest console device's data register.
consoleWritevoid consoleWrite(int code)No description in source.
programTimervoid programTimer(int reload)Program and enable the guest timer (reload value + enable) so its expiries drive the guest scheduler. Convenience for the guest kernel bring-up.
timerDeviceSLGuestTimer timerDevice()No description in source.
blockDeviceSLGuestBlockDevice blockDevice()No description in source.
mmioCountint mmioCount()No description in source.
interruptControllerSLInterruptController interruptController()No description in source.

SLGuestExecutable #sleela 2.5 (lib/cpu/SLGuestExecutable.sleela)

SLGuestExecutable class

Defines SLGuestExecutable — a simple on-disk executable format for guest programs (a miniature ELF). It has a fixed header (magic, version, entry offset, opcode count) followed by an opcode section (op+arg pairs). A compiled SLGuestProgram can be *serialized* to this format and written to the guest filesystem; the loader can later *read it back from disk* and load it into the guest substrate — so programs come from storage, not only from inline compilation. On-disk layout (one word per slot in the backing store): [0] magic 0x5345584c ("SEXL") [1] version [2] entry [3] opcode-count [4..] interleaved op,arg,op,arg,... Family: cpu. Composes SLRAM (image bytes), SLGuestFileSystem (storage), SLSleelaVM (load target).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAGICstatic final int MAGIC = 13971139320x5345584C 'SEXL'
HDR_WORDSstatic final int HDR_WORDS = 4No description in source.
storeSLRAM storethe serialized image
wordsint wordstotal words written
opcodeCountint opcodeCountNo description in source.
entryint entryNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int capacity)No description in source.
putint put(int w)No description in source.
serializevoid serialize(SLGuestProgram prog, int entryOffset)Serialize a compiled program (op/arg stream) into the executable format.
validboolean valid()Validate the header: correct magic and a sane opcode count.
headerEntryint headerEntry()No description in source.
headerOpcodeCountint headerOpcodeCount()No description in source.
loadIntoint loadInto(SLSleelaVM vm)Load the executable into a guest substrate: validate the header, then emit each op/arg pair. Returns the load base (substrate index), or -1 if the image is invalid.
writeToFileint writeToFile(SLGuestFileSystem fs, int fileId)Write this image to the guest filesystem under integer file id `fileId`, one byte-per-word through the file's byte stream (so it persists on the block device and can be read back by another boot/loader).
imageWordsint imageWords()No description in source.
entryPointint entryPoint()No description in source.

SLGuestFileSystem #sleela 2.5 (lib/cpu/SLGuestFileSystem.sleela)

SLGuestFileSystem class

Defines SLGuestFileSystem — a minimal in-guest filesystem over the guest block device. It presents named files (a flat directory) backed by block storage, with an open-file table of descriptors supporting sequential read/write by byte. The guest kernel's syscall layer (SLGuestSyscall) uses it for open/read/write/close; the loader can read program images from it. This is a guest-side analogue of the host SLFileSystem but scoped to a guest VM and reached through the guest block device (SLGuestBlockDevice). Files are identified by an integer name/handle (the guest passes an interned id) to fit the integer-only syscall ABI; a small fixed directory (8 files) and fd table (8 descriptors) are modeled (SLeeLa surface has no arrays). Family: cpu. Composes SLGuestBlockDevice.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAX_FILESstatic final int MAX_FILES = 8No description in source.
MAX_FDSstatic final int MAX_FDS = 8No description in source.
blkSLGuestBlockDevice blkNo description in source.
fileCountint fileCountNo description in source.
nextBlockint nextBlockNo description in source.
openCountint openCountNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestBlockDevice blockDevice, int dataStartBlock)No description in source.
createint create(int fileId, int blocks)Create a file (by integer id) occupying `blocks` blocks; returns its index.
indexOfIdint indexOfId(int fileId)No description in source.
startBlockint startBlock(int idx)No description in source.
openByNameint openByName(int fileId)Open a file by id; returns a file descriptor (0..3) or -1.
fdValidboolean fdValid(int fd)No description in source.
writeByteint writeByte(int fd, int value)Write one byte to an open fd (append semantics, block-device backed); returns 1 on success.
readByteint readByte(int fd)Read one byte from an open fd; returns the byte or -1 at EOF/error.
bumpLengthvoid bumpLength(int fidx)No description in source.
closeint close(int fd)No description in source.
filesint files()No description in source.
openFilesint openFiles()No description in source.

SLGuestInit #sleela 2.5 (lib/cpu/SLGuestInit.sleela)

SLGuestInit class

Defines SLGuestInit — the guest's init process (PID 1). After the guest kernel boots, init loads user programs (SLGuestProgram) into the guest substrate and hands each to the guest scheduler as a task (SLGuestTask). This is how a guest OS goes from "kernel running" to "running user processes": init is the first task and the parent of the rest. Models the Unix init contract: PID 1 is spawned by the kernel, then spawns the system's initial programs; the timer-driven scheduler multitasks them. Family: cpu. Composes SLGuestLinux, SLGuestProgram, SLGuestTask, SLSleelaVM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
kernelSLGuestLinux kernelNo description in source.
substrateSLSleelaVM substrateNo description in source.
nextPidint nextPidNo description in source.
spawnedint spawnedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestLinux guestKernel, SLSleelaVM guestSubstrate)No description in source.
allocPidint allocPid()Single pid allocator for the whole guest: init-spawned programs and fork()'d children both draw from this counter so pids never collide.
spawnSLGuestTask spawn(SLGuestProgram program)Load a user program into the guest substrate and admit it as a task. The program's load base becomes the task's entry/resume IP.
execSLGuestTask exec(String name, String sourcePath, int langId)Compile a program from source and spawn it (exec-style convenience).
execFromImageSLGuestTask execFromImage(String name, SLGuestExecutable image)Load a program FROM DISK: given a prepared executable image, load it into the guest substrate and admit it as a task. This is the "run a program from the filesystem" path (as opposed to inline compilation via exec()).
installAndExecSLGuestTask installAndExec(String name, String sourcePath, int langId, int fileId)Compile a program, serialize it to the on-disk executable format, write it to the guest filesystem under `fileId`, then load it back from disk and spawn it — the full compile -> install -> load-from-disk -> run cycle.
execIntoint execInto(SLGuestTask task, int progId, int srcId, int langId)execve support: replace an EXISTING task's image with a freshly compiled program, loaded into the shared guest substrate, and repoint that task's resume IP at the new image's entry. Unlike spawn()/exec(), this does NOT create a new task — the caller keeps its tid and scheduling slot but now runs different code, exactly as Unix execve() replaces the process image in place. The program is resolved through the same toolchain; progId/srcId are modeled identifiers the kernel maps to a source path/name. Returns the new entry index, or -1 on failure.
execNameString execName(int progId)Map a modeled program/source identifier to a name/path. Kept trivial and deterministic so the exec path is reproducible in the model; a real kernel would resolve these from the execve() argument vector.
execSourcePathString execSourcePath(int srcId)No description in source.
launchShellSLGuestShell launchShell()Launch the guest shell as init's first child: build a shell bound to the kernel's syscall table and admit it as a task (the first interactive user program after boot). Returns the shell object so a driver can feed it commands.
forkExecWaitDemoint forkExecWaitDemo(int childLang)Demonstrate the full process-creation cycle through the real syscall ABI: spawn a base task, then from that task's context fork a child, execve the child onto a freshly compiled image, let the child exit, and wait() to reap it. Returns the reaped child's tid (>0) on success, or a negative error. This is the end-to-end fork/exec/wait path a Unix shell relies on.
pidint pid()No description in source.
childrenSpawnedint childrenSpawned()No description in source.

SLGuestKernelBuilder #sleela 2.5 (lib/cpu/SLGuestKernelBuilder.sleela)

SLGuestKernelBuilder class

Defines SLGuestKernelBuilder — builds a bootable guest kernel image by running kernel source through the real toolchain: a language frontend (SLCompilerDriver) lowers it to the register ISA, SLOpcodeMap reduces that to canonical SLeeLa opcodes, and the result is packaged as an SLGuestKernelImage. This is step 4 of the OS-VM roadmap: the guest boots a GENUINELY COMPILED kernel instead of a hand-written opcode stub. Because the kernel is compiled through the same frontend/IR/opcode pipeline as user programs, the guest kernel can in principle be written in any of the supported languages (C/C++/Java/Sleela) — a direct consequence of the 1:1 Turing-effect mapping (SLTuringBridge). SCOPE NOTE: this builds a small CUSTOM kernel, not upstream Linux. Family: cpu. Composes SLCompilerDriver, SLOpcodeMap, SLSleelaVM, SLInstructionSet, SLSystemCall, SLGuestKernelImage.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
decoderSLInstructionDecoder decoderNo description in source.
sysSLSystemCall sysNo description in source.
builtint builtNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
buildSLGuestKernelImage build(String sourcePath, int langId, String name, String version)Compile a guest kernel from source in the given language into a bootable opcode image. langId: 0 Sleela, 1 C, 2 C++, 3 Java.
buildCountint buildCount()No description in source.

SLGuestKernelImage #sleela 2.5 (lib/cpu/SLGuestKernelImage.sleela)

SLGuestKernelImage class

Defines SLGuestKernelImage — a bootable guest kernel image: a stream of canonical SLeeLa opcodes (the compiled kernel text), an entry point, and metadata (name, version). This is what the guest VM's substrate loads and executes. Unlike the earlier inline opcode stub, an image is produced by the real toolchain (SLGuestKernelBuilder compiles kernel source through SLCompilerDriver -> register ISA -> SLOpcodeMap -> opcodes), so the guest boots a GENUINELY COMPILED kernel (OS-VM roadmap step 4). SCOPE NOTE: this is a small CUSTOM kernel compiled by our own toolchain, not the upstream Linux kernel. Booting real Linux remains a separate, much larger effort (see EXECUTION.md). The point of step 4 is that the guest image is compiler output, not a hand-written opcode stub. Family: cpu. Composes SLSleelaVM (the opcode store it loads into).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
versionString versionNo description in source.
opsSLRAM opsopcode stream: op per word
argsSLRAM argspaired immediate per word
lengthint lengthNo description in source.
entryint entryNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String kernelName, String kernelVersion, int capacity)No description in source.
appendint append(int opcode, int arg)Append one compiled opcode to the image.
opcodeAtint opcodeAt(int i)No description in source.
argAtint argAt(int i)No description in source.
loadIntovoid loadInto(SLSleelaVM vm)Load this image into a guest VM's substrate for execution.
setEntryvoid setEntry(int e)No description in source.
entryPointint entryPoint()No description in source.
sizeint size()No description in source.
kernelNameString kernelName()No description in source.
kernelVersionString kernelVersion()No description in source.

SLGuestLinux #sleela 2.5 (lib/cpu/SLGuestLinux.sleela)

SLGuestLinux class

Defines SLGuestLinux — a Linux-style guest operating system that boots inside an SLGuestVM on the Sleela CPU. It models the Linux boot and runtime surface the hypervisor must support: a boot protocol (load kernel image + initrd into the guest window and jump to the entry), a Linux-style syscall ABI (write/read/open/close/exit/mmap/fork/execve as numbers), and the init handoff (PID 1). SCOPE NOTE — important: this is an ARCHITECTURAL MODEL of running a Linux-like guest, not the real Linux kernel. It defines the boot sequence, the syscall numbers the guest issues, and how those become VM-exits the hypervisor emulates. Running the actual upstream Linux kernel would require a full hardware-virtualization CPU and device model (far beyond this library). The value here is a faithful, composable model of the layering: SLCPU -> SleelaOS -> SLHypervisor -> SLGuestVM -> SLGuestLinux -> guest programs. Family: cpu. Composes SLGuestVM; booted by SLHypervisor.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
LINUX_READstatic final int LINUX_READ = 0A small, Linux-like syscall ABI (numbers chosen for the model).
LINUX_WRITEstatic final int LINUX_WRITE = 1No description in source.
LINUX_OPENstatic final int LINUX_OPEN = 2No description in source.
LINUX_CLOSEstatic final int LINUX_CLOSE = 3No description in source.
LINUX_MMAPstatic final int LINUX_MMAP = 9No description in source.
LINUX_EXITstatic final int LINUX_EXIT = 60No description in source.
LINUX_FORKstatic final int LINUX_FORK = 57No description in source.
LINUX_WAITstatic final int LINUX_WAIT = 61No description in source.
LINUX_EXECVEstatic final int LINUX_EXECVE = 59No description in source.
distroString distroNo description in source.
vmSLGuestVM vmNo description in source.
kernelImageSLGuestKernelImage kernelImagecompiled kernel image (step 4), if built
schedulerSLGuestScheduler schedulerguest task scheduler, timer-driven (step 6)
filesystemSLGuestFileSystem filesystemin-guest filesystem over the block device
syscalls2SLGuestSyscall syscalls2guest syscall ABI dispatcher (lazy)
kernelEntryint kernelEntryNo description in source.
initEntryint initEntryNo description in source.
bootedint bootedNo description in source.
syscallsint syscallsNo description in source.
timerTicksint timerTicksNo description in source.
GUEST_EMULATEDstatic final int GUEST_EMULATED = 100Translate a guest Linux syscall number to the host SleelaOS syscall the hypervisor emulates it with (the VM-exit handler's job). Host-syscall mapping constants (SLSystemCall surface: write/read/open/close/ exit/spawn/yield = 0..6). Process creation is modeled thus: a guest fork() leans on the host's SYS_SPAWN primitive, while execve()/wait() have no host equivalent and are serviced entirely in-guest (SLGuestSyscall against the guest scheduler/process table). The actual in-guest routing happens in SLGuestVM.handleExit() off the OP_SPAWN/OP_JOINALL service opcodes; emulateSyscall() is the ABI-classification view, so it returns the GUEST_EMULATED tag (not a host syscall number) for those two to make the "no host delegate" distinction explicit to callers that classify a syscall.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String distroName, SLGuestVM guest)No description in source.
fileSystemSLGuestFileSystem fileSystem()No description in source.
deliverSignalsvoid deliverSignals()Deliver any pending signal to the currently-running task's slot. Called at scheduling points so signals (e.g. SIGKILL/SIGTERM) take effect.
syscallTableSLGuestSyscall syscallTable()The guest syscall dispatcher, wired to this guest's devices, filesystem, and scheduler. Lazily built on first use.
spawnTaskSLGuestTask spawnTask(int tid, String name, int entryIndex)Create and admit a guest task (a guest thread). The guest init process (PID 1) spawns these; the timer then schedules them preemptively.
startSchedulingvoid startScheduling(int reload)Program the guest timer and start preemptive scheduling: set the timer reload and enable it so each expiry drives scheduler.onTimerTick().
onTimerInterruptSLGuestTask onTimerInterrupt(int currentIP)The guest timer-IRQ handler (the preemption point): advance the scheduler, save the current task's resume IP, and select the next task to run.
taskSchedulerSLGuestScheduler taskScheduler()No description in source.
timerTickCountint timerTickCount()No description in source.
startInitSLGuestInit startInit()Start the guest init process (PID 1), which loads and spawns user programs. Returns the init object so the caller can exec() programs on it.
installKernelImagevoid installKernelImage(SLGuestKernelImage image)Install a genuinely-compiled kernel image to boot (step 4). When set, boot() loads this image into the guest substrate instead of the inline stub.
buildKernelvoid buildKernel(String sourcePath, int langId)Build and install a compiled guest kernel from source in any supported language, via the real toolchain (SLGuestKernelBuilder).
bootint boot(int kernelImageEntry, int initImageEntry)Boot protocol: load a minimal guest-kernel opcode image into the guest VM's substrate, record the entry points, and enter the guest. The image is a real stream of canonical SLeeLa opcodes that the substrate executes (step 1): the "kernel" computes a value and prints it (its init banner), then halts — a stand-in for a real kernel image until step 4 loads a compiled guest kernel. A real boot copies bzImage + initrd into guest memory.
loadKernelImagevoid loadKernelImage()Load the guest kernel into the substrate. If a compiled image was installed (step 4), load that genuinely-compiled kernel; otherwise fall back to a minimal inline opcode heartbeat so an unconfigured guest still boots.
isGuestEmulatedboolean isGuestEmulated(int linuxNumber)True if the given guest Linux syscall is serviced in-guest (no host delegate): execve/wait are emulated against the guest process table rather than mapped to a host SleelaOS syscall. (A pure predicate — unlike emulateSyscall(), it does not count the call.)
emulateSyscallint emulateSyscall(int linuxNumber)No description in source.
isBootedboolean isBooted()No description in source.
syscallsEmulatedint syscallsEmulated()No description in source.
distributionString distribution()No description in source.

SLGuestPipe #sleela 2.5 (lib/cpu/SLGuestPipe.sleela)

SLGuestPipe class

Defines SLGuestPipe — a unidirectional byte FIFO between guest tasks, the classic Unix pipe. One task writes bytes to the write end; another reads them from the read end in order. A read on an empty pipe signals "would block" (the kernel can block the reader); a write to a full pipe signals back-pressure. This is the first inter-process communication primitive for the guest OS. Backed by a ring buffer over SLRAM so the capacity is configurable. The guest syscall layer exposes pipe()/read()/write()/close() over these. Family: cpu. Composes SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
bufferSLRAM bufferNo description in source.
capacityint capacityNo description in source.
headint headread index
tailint tailwrite index
sizeint sizebytes currently buffered
readerClosedint readerClosedNo description in source.
writerClosedint writerClosedNo description in source.
totalWrittenint totalWrittenNo description in source.
totalReadint totalReadNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int cap)No description in source.
emptyboolean empty()No description in source.
fullboolean full()No description in source.
writeByteint writeByte(int value)Write one byte; returns 1 on success, 0 if full (back-pressure), -1 if the read end is closed (broken pipe).
readByteint readByte()Read one byte; returns the byte (>=0), -1 at end-of-stream (writer closed and empty), or -2 if empty but still open ("would block").
closeReadervoid closeReader()No description in source.
closeWritervoid closeWriter()No description in source.
readableboolean readable()No description in source.
availableint available()No description in source.
writtenint written()No description in source.
readint read()No description in source.

SLGuestProgram #sleela 2.5 (lib/cpu/SLGuestProgram.sleela)

SLGuestProgram class

Defines SLGuestProgram — a loadable guest *user* program: a compiled opcode image (like SLGuestKernelImage) plus the base address at which it is loaded into the guest substrate's code store. Where SLGuestKernelImage is the kernel, SLGuestProgram is an application the guest kernel loads as a task and the scheduler runs. Programs are built from source in any supported language through the same toolchain, so a guest user program can be C/C++/Java/Sleela. loadInto() appends the program's opcodes to the guest substrate and returns the entry index (its base), which becomes the task's entry point. Family: cpu. Composes SLSleelaVM, SLGuestKernelBuilder (shared compile path).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
opsSLRAM opsNo description in source.
argsSLRAM argsNo description in source.
lengthint lengthNo description in source.
baseint basesubstrate code index where this program was loaded

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String programName, int capacity)No description in source.
appendint append(int opcode, int arg)No description in source.
buildFromvoid buildFrom(String sourcePath, int langId)Build a guest program from source via the shared toolchain, copying the compiled opcode image out of a scratch kernel-image build.
loadIntoint loadInto(SLSleelaVM vm)Load the program into the guest substrate at the current end of its code store; returns the entry index (base) for the task.
opcodeAtint opcodeAt(int i)Op/arg accessors so a program can be serialized to an on-disk executable.
argAtint argAt(int i)No description in source.
entryBaseint entryBase()No description in source.
sizeint size()No description in source.
programNameString programName()No description in source.

SLGuestScheduler #sleela 2.5 (lib/cpu/SLGuestScheduler.sleela)

SLGuestScheduler class

Defines SLGuestScheduler — the GUEST kernel's task scheduler, driven by the guest timer device. It holds the guest's runnable tasks and, on each timer IRQ (the preemption source), rotates the CPU to the next ready task (round-robin). This is what gives the guest OS preemptive multitasking on its own virtual hardware: the SLGuestTimer heartbeat is the scheduler tick. Up to 8 guest tasks (SLeeLa surface has no arrays). The scheduler is a guest- side analogue of the host SLScheduler, but it runs inside the VM and is clocked by the guest timer rather than the host timer. Family: cpu. Composes SLGuestTask; clocked by SLGuestTimer via the device bus.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAXstatic final int MAX = 8No description in source.
countint countNo description in source.
currentint currentNo description in source.
quantumint quantumtimer ticks per slice
tickAccumint tickAccumticks since the last switch
switchesint switchesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int timerTicksPerSlice)No description in source.
putAtvoid putAt(int idx, SLGuestTask t)Place a task into a specific slot (no bookkeeping beyond the slot write).
freeReapedSlotint freeReapedSlot()Find a slot occupied by a reaped-and-DONE task (a zombie a parent has already collected) that can be recycled for a new task, or -1 if none. The scheduler's current running slot is never recycled, so reusing a slot can't leave `current` pointing at a fresh task that never went RUNNING.
admitint admit(SLGuestTask t)No description in source.
atSLGuestTask at(int idx)No description in source.
slotOfTidint slotOfTid(int tid)Find the scheduler slot holding the task with the given tid, or -1.
forkSLGuestTask fork(SLGuestTask parent, int childTid)fork(): clone a running parent task into a fresh ready task that resumes at the SAME guest instruction pointer as the parent (classic Unix fork — both parent and child return from the syscall at the same point, distinguished only by the return value the kernel pushes to each). Because the guest substrate is a shared single code store, parent and child share text and resume IP; the child gets its own TCB, tid, and scheduling slot. Returns the admitted child task, or null if the task table is full.
reapChildSLGuestTask reapChild(int parentTid)wait()-style reap: find a finished-but-unreaped (zombie) child of the given parent tid, reap it, and return it so the kernel can hand the parent the child's tid + exit status. Matches any zombie whose parent is the given tid (models wait(NULL) — reap whichever child is ready). Returns null if the parent has no reapable child yet (the parent would block / retry).
hasLiveChildboolean hasLiveChild(int parentTid)True if the given parent still has at least one live (not-yet-DONE) child — i.e. a wait() could still eventually succeed.
pickNextint pickNext()No description in source.
onTimerTickSLGuestTask onTimerTick()Called on each guest timer IRQ. Charge the running task; when its quantum expires, preempt it and switch to the next ready task. Returns the task now selected to run (or null if none).
markRunningSlotvoid markRunningSlot(int slot)Force the running slot to a specific task (used to model a deterministic context switch between a parent and its fork()'d child when demonstrating the fork/exec/wait cycle outside the timer-driven path). Marks the selected task RUNNING and the previously-running task READY.
taskCountint taskCount()No description in source.
contextSwitchesint contextSwitches()No description in source.
quantumTicksint quantumTicks()No description in source.
currentSlotint currentSlot()No description in source.
runningSLGuestTask running()No description in source.

SLGuestShell #sleela 2.5 (lib/cpu/SLGuestShell.sleela)

SLGuestShell class

Defines SLGuestShell — a minimal interactive shell for the guest OS, spawned by init (SLGuestInit) as its first child. It reads a command line, parses the leading word as a builtin, and executes it through the guest syscall ABI: writing output to the console, reading files from the guest filesystem, listing/inspecting tasks via the scheduler. This is the guest's first real user program — the thing a person "sees" after boot. Builtins: help, echo, ls, cat, ps, exit. Commands are issued as guest syscalls (write/read/open/close/getpid/exit), so the shell exercises the full user->kernel boundary built in the previous steps. Family: cpu. Composes SLGuestSyscall (its only kernel interface).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CMD_UNKNOWNstatic final int CMD_UNKNOWN = 0No description in source.
CMD_HELPstatic final int CMD_HELP = 1No description in source.
CMD_ECHOstatic final int CMD_ECHO = 2No description in source.
CMD_LSstatic final int CMD_LS = 3No description in source.
CMD_CATstatic final int CMD_CAT = 4No description in source.
CMD_PSstatic final int CMD_PS = 5No description in source.
CMD_EXITstatic final int CMD_EXIT = 6No description in source.
sysSLGuestSyscall sysNo description in source.
commandsRunint commandsRunNo description in source.
runningint runningNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestSyscall syscalls)No description in source.
putcvoid putc(int ch)Write a string (as a sequence of char codes carried in a small helper) to stdout via SYS_WRITE. The caller passes already-encoded bytes; here we expose a single-char and a terminator convenience.
newlinevoid newline()No description in source.
classifyint classify(int leadChar)Classify a command word given its leading char code (a compact dispatch sufficient for the builtin set: h/e/l/c/p/x).
runint run(int leadChar, int arg)Run one command, identified by its leading char and a single integer argument (a file id for cat, a char for echo). Returns the command code.
isRunningboolean isRunning()No description in source.
commandCountint commandCount()No description in source.

SLGuestSignal #sleela 2.5 (lib/cpu/SLGuestSignal.sleela)

SLGuestSignal class

Defines SLGuestSignal — asynchronous signal delivery to guest tasks (the Unix signal model). A task (or the kernel) raises a signal number against a target task; the target has a pending-signal set and a per-signal disposition (default, ignore, or a handler entry point). On the next scheduling point the kernel delivers the highest-priority pending signal: it either applies the default action (e.g. terminate on KILL/TERM), ignores it, or vectors the task to its handler. Models up to 16 signal numbers with a pending bitset and dispositions held per target task id (a small fixed table; SLeeLa surface has no arrays). Family: cpu. Composes SLGuestScheduler for delivery/termination effects.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
SIG_LINESstatic final int SIG_LINES = 16No description in source.
SIGKILLstatic final int SIGKILL = 9No description in source.
SIGTERMstatic final int SIGTERM = 15No description in source.
SIGUSR1static final int SIGUSR1 = 10No description in source.
SIGCHLDstatic final int SIGCHLD = 17No description in source.
DISP_DEFAULTstatic final int DISP_DEFAULT = 0No description in source.
DISP_IGNOREstatic final int DISP_IGNORE = 1No description in source.
DISP_HANDLEstatic final int DISP_HANDLE = 2No description in source.
schedulerSLGuestScheduler schedulerNo description in source.
deliveredint deliveredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestScheduler sched)No description in source.
pow2int pow2(int n)No description in source.
bitSetboolean bitSet(int mask,int sig)No description in source.
pendOfint pendOf(int slot)No description in source.
setPendvoid setPend(int slot,int mask)No description in source.
raisevoid raise(int slot, int sig)Raise a signal against the task in scheduler slot `slot`.
hasPendingboolean hasPending(int slot)No description in source.
nextPendingint nextPending(int slot)Lowest-numbered pending signal for a slot, or -1.
deliverint deliver(int slot)Deliver one pending signal to the task in `slot`. Default action for KILL/ TERM finishes the task; otherwise the signal is cleared (handler/ignore are modeled as consumed). Returns the delivered signal number, or -1.
deliveredCountint deliveredCount()No description in source.

SLGuestSyscall #sleela 2.5 (lib/cpu/SLGuestSyscall.sleela)

SLGuestSyscall class

Defines SLGuestSyscall — the guest kernel's system-call ABI and dispatcher. When a guest user program issues a syscall, the substrate takes a VM-exit; SLGuestVM routes it here, and this class emulates the requested service against the guest's devices (console), filesystem, scheduler, and task table, then returns a result the guest resumes with. This is the controlled user->kernel boundary a real OS exposes. ABI: a guest syscall carries a number plus up to three integer arguments (modeled as the exit payload + operand-stack values). The dispatcher returns an integer result (or a negative errno-style code), and reports control effects (exit/yield) so SLGuestVM can act on them. Family: cpu. Composes SLGuestDeviceBus, SLGuestFileSystem, SLGuestScheduler.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
SYS_READstatic final int SYS_READ = 0Linux-like syscall numbers (a small, representative subset).
SYS_WRITEstatic final int SYS_WRITE = 1No description in source.
SYS_OPENstatic final int SYS_OPEN = 2No description in source.
SYS_CLOSEstatic final int SYS_CLOSE = 3No description in source.
SYS_BRKstatic final int SYS_BRK = 12No description in source.
SYS_PIPEstatic final int SYS_PIPE = 22create a pipe (returns a pipe handle)
SYS_YIELDstatic final int SYS_YIELD = 24sched_yield
SYS_GETPIDstatic final int SYS_GETPID = 39No description in source.
SYS_KILLstatic final int SYS_KILL = 62send a signal to a task slot
SYS_EXITstatic final int SYS_EXIT = 60No description in source.
SYS_FORKstatic final int SYS_FORK = 57Process creation / lifecycle (the fork/exec/wait family). clone the caller; child shares its text
SYS_EXECVEstatic final int SYS_EXECVE = 59replace the caller's image with a new one
SYS_WAITstatic final int SYS_WAIT = 61reap a finished child, yielding its status
PIPE_FD_BASEstatic final int PIPE_FD_BASE = 100Pipe fd convention: fds >= PIPE_FD_BASE address the single modeled pipe's read (base) / write (base+1) ends.
devicesSLGuestDeviceBus devicesNo description in source.
fsSLGuestFileSystem fsNo description in source.
schedulerSLGuestScheduler schedulerNo description in source.
initSLGuestInit initprocess spawner (for execve: compile/load a new image)
pipeSLGuestPipe pipeIPC: a (modeled single) pipe
signalsSLGuestSignal signalsIPC: signal delivery
brkTopint brkTopmodeled program break (heap top)
nextChildPidint nextChildPidtid allocator for fork()'d children
callsint callsNo description in source.
lastResultint lastResultNo description in source.
lastChildStatusint lastChildStatusexit status returned by the most recent wait()
WAIT_BLOCKstatic final int WAIT_BLOCK = -2wait() would block: children exist, none exited

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLGuestDeviceBus deviceBus, SLGuestFileSystem filesystem, SLGuestScheduler sched, int heapBase)No description in source.
attachInitvoid attachInit(SLGuestInit guestInit)Give the syscall layer the init process so execve can reach the shared compile->load->admit toolchain. Wired lazily by the kernel.
signalTableSLGuestSignal signalTable()No description in source.
currentPipeSLGuestPipe currentPipe()No description in source.
childStatusint childStatus()No description in source.
validboolean valid(int number)No description in source.
isPipeFdboolean isPipeFd(int fd)No description in source.
dispatchint dispatch(int number, int arg0, int arg1, int arg2)Dispatch a syscall. arg0..arg2 are the integer arguments; returns the syscall result (>=0) or a negative error. Control effects (exit/yield) are queried separately by the caller via isExit()/isYield().
doForkint doFork()fork(): clone the running task. The kernel returns the child's tid to the parent and (by convention) 0 to the child; here we model the parent's return value (the child's new tid). The child is admitted as a ready task that resumes at the same point as the parent. Returns -1 if there is no running task or the task table is full.
doExecveint doExecve(int progId, int srcId, int langId)execve(): replace the running task's program image with a newly compiled one, loaded through init's shared toolchain, and repoint the task's resume IP at the new image's entry. Models the Unix contract that a successful execve does not return to the old image. Returns the new entry index, or -1 if execve is unavailable or the running task is unknown.
doWaitint doWait()wait(): reap a finished child of the running task. Returns the reaped child's tid (and stashes its exit status in lastChildStatus for the kernel to deliver), -1 if the caller has no children at all, or SYS_WAIT_BLOCK (negative) when children exist but none has exited yet (the caller should retry — modeled as a yield).
isExitboolean isExit(int number)No description in source.
isYieldboolean isYield(int number)No description in source.
isWaitBlockedboolean isWaitBlocked(int result)No description in source.
programBreakint programBreak()No description in source.
resultint result()No description in source.
callCountint callCount()No description in source.

SLGuestTask #sleela 2.5 (lib/cpu/SLGuestTask.sleela)

SLGuestTask class

Defines SLGuestTask — a unit of execution the GUEST kernel schedules (a guest thread / task control block). It is distinct from SLProcess (which the host OS schedules): this runs inside a guest VM, with its own guest entry point, saved guest-substrate instruction pointer, and run state. The guest scheduler (SLGuestScheduler) switches between these on each timer tick. Family: cpu. Pure Sleela guest OS data structure.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
READYstatic final int READY = 0No description in source.
RUNNINGstatic final int RUNNING = 1No description in source.
BLOCKEDstatic final int BLOCKED = 2No description in source.
DONEstatic final int DONE = 3No description in source.
tidint tidNo description in source.
nameString nameNo description in source.
stateint stateNo description in source.
entryint entryguest-code entry (opcode index)
savedIPint savedIPsaved substrate instruction pointer (resume point)
ticksint tickstimer quanta consumed
parentTidint parentTidProcess-relationship bookkeeping (fork/wait): the parent that fork()ed this task, the exit status it finished with, and whether a parent has already reaped it. These let the kernel model the Unix process tree, not just a flat set of threads. tid of the task that fork()ed this one (0 = none / init-parented)
exitStatusint exitStatusstatus passed to exit() / left for the parent to wait() on
reapedint reaped1 once a parent has collected this task via wait()

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int id, String taskName, int entryIndex)No description in source.
markReadyvoid markReady()No description in source.
markRunningvoid markRunning()No description in source.
markBlockedvoid markBlocked()No description in source.
finishvoid finish()No description in source.
exitWithvoid exitWith(int status)finish() with an explicit exit status (the exit()/_exit() path): record the status the parent will see via wait(), then mark the task done (a zombie until reaped).
saveIPvoid saveIP(int ip)No description in source.
resumeIPint resumeIP()No description in source.
chargeTickvoid chargeTick()No description in source.
setParentvoid setParent(int ptid)Parentage: who fork()ed this task.
parentint parent()No description in source.
statusint status()Zombie / reaping protocol: a DONE-but-unreaped task is a zombie its parent can still wait() on; reap() collects it so wait() returns each child once.
zombieboolean zombie()No description in source.
reapvoid reap()No description in source.
reapedYetboolean reapedYet()No description in source.
taskIdint taskId()No description in source.
taskNameString taskName()No description in source.
taskStateint taskState()No description in source.
runnableboolean runnable()No description in source.
aliveboolean alive()No description in source.

SLGuestTimer #sleela 2.5 (lib/cpu/SLGuestTimer.sleela)

SLGuestTimer class extends SLGuestDevice

Defines SLGuestTimer — a programmable interval timer exposed to the guest. The guest kernel programs a reload value; each tick decrements a counter, and on expiry the timer raises its IRQ (the guest's scheduler tick / preemption source). This is the heartbeat a guest OS needs for timekeeping and preemptive multitasking. MMIO registers: 0 = reload value (RW), 1 = current count (RO), 2 = control (bit0 enable). IRQ fires on count reaching zero when enabled. Family: cpu. Extends SLGuestDevice.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
reloadint reloadNo description in source.
countint countNo description in source.
enabledint enabledNo description in source.
expiriesint expiriesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(int base, int irq)No description in source.
readint read(int addr)No description in source.
writevoid write(int addr, int value)No description in source.
tickvoid tick()One timer tick: decrement; on reaching zero, reload and raise the IRQ.
expiryCountint expiryCount()No description in source.

SLGuestVM #sleela 2.5 (lib/cpu/SLGuestVM.sleela)

SLGuestVM class

Defines SLGuestVM — one guest virtual machine managed by the hypervisor. It presents a virtual CPU over a window of host memory (guest-physical addressing) and, crucially, EXECUTES the guest as a stream of canonical SLeeLa opcodes on an embedded SLSleelaVM substrate. Guest code is therefore run by the same Turing-complete engine as everything else in the model (step 1 of the OS-VM roadmap): the guest is not merely ticked and counted — its opcodes are actually dispatched. A guest TRAP/SYSCALL opcode is a VM-exit: the vCPU stops at that point, the hypervisor/guest-kernel emulates the operation, and the guest resumes. VM exits are recorded so the hypervisor can account for and service them. Guest address translation uses a real MMU (SLMMU, page tables + protection) when one is attached, falling back to a single base-offset window otherwise. Family: cpu. Composes SLCore, SLSleelaVM, SLRAM, SLMMU.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
vcpuSLCore vcpuvirtual CPU (the guest's modeled hardware core)
substrateSLSleelaVM substratethe Turing-complete engine that actually runs guest code
hostMemorySLRAM hostMemoryNo description in source.
mmuSLMMU mmureal page-table translation (step 2); null => base-offset
devicesSLGuestDeviceBus devicesguest device model: timer, console, block (step 3)
kernelSLGuestLinux kernelguest kernel, for timer-driven scheduling (step 6)
windowBaseint windowBasehost-physical base of the guest's memory window
windowSizeint windowSizewords
guestEntryint guestEntryguest-physical entry point
runningint runningNo description in source.
exitsint exitsNo description in source.
guestInstrint guestInstrNo description in source.
lastExitReasonint lastExitReason0 none, 1 syscall, 2 trap, 3 halt
EXIT_NONEstatic final int EXIT_NONE = 0No description in source.
EXIT_SYSCALLstatic final int EXIT_SYSCALL = 1No description in source.
EXIT_TRAPstatic final int EXIT_TRAP = 2No description in source.
EXIT_HALTstatic final int EXIT_HALT = 3No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String vmName, SLCore core, SLRAM ram, int base, int size, int entry)No description in source.
attachMMUvoid attachMMU(SLMMU unit)Attach a real MMU for page-table translation + protection faults (step 2).
memoryUnitSLMMU memoryUnit()No description in source.
attachDevicesvoid attachDevices(SLGuestDeviceBus bus)Attach the guest device model (timer/console/block) (step 3).
deviceBusSLGuestDeviceBus deviceBus()No description in source.
attachKernelvoid attachKernel(SLGuestLinux guestKernel)Attach the guest kernel so timer interrupts drive its scheduler (step 6).
tickDevicesvoid tickDevices()Advance the guest's devices by one tick (timer heartbeat, IRQ posting).
translateint translate(int guestAddr)Guest-virtual -> host-physical translation: via the MMU when present (page tables + protection; a fault returns -1 and the hypervisor delivers a TRAP), else a single base-offset window.
inWindowboolean inWindow(int guestAddr)No description in source.
loadOpcodeint loadOpcode(int opcode, int arg)Load one guest opcode+arg into the substrate's code store (the guest kernel / loader populates this; see SLGuestLinux).
guestSubstrateSLSleelaVM guestSubstrate()No description in source.
entervoid enter()Enter the guest: put the substrate in hosted mode (service opcodes become VM-exits the hypervisor routes), record the translated entry on the vCPU.
runint run(int budget)Run the guest, driving the VM-exit loop (step 5): execute substrate opcodes until a VM-exit (a service opcode parks one) or HALT; route each exit to the device model / syscall emulation; resolve it and resume. Devices are ticked each round so the timer heartbeat advances and posts interrupts.
handleExitvoid handleExit(int opcode, int arg, int payload)Route a VM-exit from a service opcode to the guest syscall ABI (step b). Service opcodes are the guest's syscall surface: OP_PRINT is write(1, ch), and the OP_FILE* opcodes are open/read/write/close. When a kernel is attached, the exit is dispatched through its syscall table (which emulates the service against the guest console, filesystem, and scheduler); the result is pushed back for the guest to resume with. SYS_EXIT finishes the running task.
serviceOpcodeint serviceOpcode(int opcode, int arg, int payload)Route one service opcode to the guest syscall ABI and return the syscall result, applying the SYS_EXIT side effect (finish the running task). This is the shared routing used by handleExit(); exposing it lets the guest's process-creation path (OP_SPAWN fork/execve, OP_JOINALL wait) be driven and observed directly, so the opcode->syscall mapping is exercised end to end.
syscallNumberForint syscallNumberFor(int opcode, int arg, SLSleelaOpcode op, SLGuestSyscall sys)Map a service opcode to a guest syscall number. The process-creation family reuses the canonical substrate opcodes: OP_SPAWN is clone/exec (its arg selects fork vs. execve) and OP_JOINALL is wait.
syscallArg0int syscallArg0(int opcode, int arg, SLSleelaOpcode op, int payload)The first syscall argument (fd for I/O; progId for execve): OP_PRINT writes to stdout (fd 1); OP_SPAWN carries the exec program id as its stack payload, surfaced to execve as arg0.
syscallArg2int syscallArg2(int opcode, int arg, SLSleelaOpcode op)The third syscall argument (execve langId): recovered from OP_SPAWN's arg, which holds langId + 1 so that arg 0 can mean "plain fork".
deliverPendingInterruptsvoid deliverPendingInterrupts()Surface any device interrupts the guest PIC now has pending and deliver them to the guest kernel. A timer IRQ (line 0) drives the guest scheduler (step 6): the kernel preempts the running task and selects the next one, and the substrate resumes at that task's saved instruction pointer.
recordSyscallExitvoid recordSyscallExit()A guest syscall VM-exit: the guest kernel calls this when its code reaches a service point, so the hypervisor can emulate it against the host.
recordTrapExitvoid recordTrapExit()No description in source.
stopvoid stop()No description in source.
exitCountint exitCount()No description in source.
lastExitint lastExit()No description in source.
guestInstructionsint guestInstructions()No description in source.
printedint printed()observable guest output
vmNameString vmName()No description in source.
entryint entry()No description in source.

SLHalfAdder #sleela 2.5 (lib/cpu/SLHalfAdder.sleela)

SLHalfAdder class

Defines SLHalfAdder — adds two 1-bit inputs, producing a sum bit (XOR) and a carry bit (AND). The simplest arithmetic circuit; the building block of the full adder. sum = a XOR b carry = a AND b Family: cpu. Pure Sleela logic composed from SLGate semantics.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
xorGateSLGate xorGateNo description in source.
andGateSLGate andGateNo description in source.
sumint sumNo description in source.
carryint carryNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
buildvoid build()No description in source.
addvoid add(int a, int b)No description in source.
sumBitint sumBit()No description in source.
carryBitint carryBit()No description in source.

SLHardDrive #sleela 2.5 (lib/cpu/SLHardDrive.sleela)

SLHardDrive class

Defines SLHardDrive — persistent block storage (an HDD or SSD). It is the slowest, largest tier of the storage hierarchy and the device the OS boots from and loads programs out of. It presents a block interface (read/write by block number) and crosses the explicit VM/OS bridge to the native file-backed store. Models capacity in blocks, block size, media kind (spinning vs. solid-state), and I/O counters. Family: cpu. Native file-backed store via bridge.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MEDIA_HDDstatic final int MEDIA_HDD = 0rotational
MEDIA_SSDstatic final int MEDIA_SSD = 1solid-state
nameString nameNo description in source.
blockCountint blockCountNo description in source.
blockBytesint blockBytesNo description in source.
mediaint mediaNo description in source.
handleint handleNo description in source.
readsint readsNo description in source.
writesint writesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String driveName, int blocks, int bsize, int mediaKind)No description in source.
mountint mount(String path)Mount the native file-backed store, creating it if absent.
inRangeboolean inRange(int block)No description in source.
readBlockint readBlock(int block)No description in source.
writeBlockint writeBlock(int block, int payloadHandle)No description in source.
unmountvoid unmount()No description in source.
capacityBlocksint capacityBlocks()No description in source.
capacityBytesint capacityBytes()No description in source.
solidStateboolean solidState()No description in source.
driveNameString driveName()No description in source.

SLHypervisor #sleela 2.5 (lib/cpu/SLHypervisor.sleela)

SLHypervisor class

Defines SLHypervisor — a type-2 (hosted) hypervisor running on

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
hostSLCPU hostNo description in source.
hostMemorySLRAM hostMemoryNo description in source.
bootDiskSLHardDrive bootDiskhost-backed drive the guest block device uses
guestCountint guestCountNo description in source.
exitsint exitstotal VM-exits handled
currentint currentNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLCPU hostCpu, SLRAM ram)No description in source.
attachBootDiskvoid attachBootDisk(SLHardDrive drive)Optionally provide a host drive to back guests' virtual block devices.
createGuestSLGuestVM createGuest(String name, int base, int size, int guestEntry)Create a guest VM with a guest-physical window [base, base+size) in host RAM. A per-guest MMU identity-maps the window with full permissions as the boot address space (the guest kernel may install its own page tables after).
guestSLGuestVM guest(int idx)No description in source.
runGuestint runGuest(int idx, int budget)Run a guest for a bounded number of guest instructions, handling VM-exits.
guestsint guests()No description in source.
vmExitsint vmExits()No description in source.

SLI860CPU #sleela 2.5 (lib/cpu/i860/SLI860CPU.sleela)

SLI860CPU class extends SLCPURuntime

Defines SLI860CPU — a runnable model of the Intel i860. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel i860 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLI960CPU #sleela 2.5 (lib/cpu/i960/SLI960CPU.sleela)

SLI960CPU class extends SLCPURuntime

Defines SLI960CPU — a runnable model of the Intel i960. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel i960 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLiAPX432CPU #sleela 2.5 (lib/cpu/iapx432/SLiAPX432CPU.sleela)

SLiAPX432CPU class extends SLCPURuntime

Defines SLiAPX432CPU — a runnable model of the Intel iAPX 432. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel iAPX 432 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIBM801CPU #sleela 2.5 (lib/cpu/ibm801/SLIBM801CPU.sleela)

SLIBM801CPU class extends SLCPURuntime

Defines SLIBM801CPU — a runnable model of the IBM 801. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM 801 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIBMPower10CPU #sleela 2.5 (lib/cpu/ibm-power10/SLIBMPower10CPU.sleela)

SLIBMPower10CPU class extends SLCPURuntime

Defines SLIBMPower10CPU — a runnable model of the IBM POWER10. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM POWER10 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIBMPower9CPU #sleela 2.5 (lib/cpu/ibm-power9/SLIBMPower9CPU.sleela)

SLIBMPower9CPU class extends SLCPURuntime

Defines SLIBMPower9CPU — a runnable model of the IBM POWER9. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM POWER9 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLInstruction #sleela 2.5 (lib/cpu/SLInstruction.sleela)

SLInstruction class

Defines SLInstruction — one decoded machine instruction: an opcode plus up to two register operands and an immediate/address field. This is the unit the fetch stage produces and the execute stage consumes. Encoding (modeled): [opcode][rd][rs][imm]. A real ISA packs these into fixed- or variable-width words; here they are fields for clarity. Family: cpu. Pure Sleela data.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
opcodeint opcodeNo description in source.
rdint rddestination register index
rsint rssource register index
immint immimmediate value or memory/branch address

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int op, int dest, int src, int immediate)No description in source.
opint op()No description in source.
destint dest()No description in source.
srcint src()No description in source.
immediateint immediate()No description in source.
encodeint encode()Pack into a single word for storage in RAM (modeled fixed layout).

SLInstructionDecoder #sleela 2.5 (lib/cpu/SLInstructionDecoder.sleela)

SLInstructionDecoder class

Defines SLInstructionDecoder — the decode stage. It takes a raw instruction word fetched from memory and splits it into the opcode and operand fields, producing an SLInstruction the control unit can execute. This is the inverse of SLInstruction.encode(). Family: cpu. Pure Sleela decode logic.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
decodedint decodedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet)No description in source.
decodeSLInstruction decode(int word)Decode a packed word [opcode][rd][rs][imm] into an SLInstruction.
validOpcodeboolean validOpcode(int opcode)No description in source.
decodeCountint decodeCount()No description in source.

SLInstructionSet #sleela 2.5 (lib/cpu/SLInstructionSet.sleela)

SLInstructionSet class

Defines SLInstructionSet — the CPU's instruction set architecture (ISA): the catalog of operations the control unit decodes and executes. This is a RISC-style ISA broad enough to be a lowering target for compiled C, C++, Java, and Sleela: load/store (immediate, register, and indexed addressing), full integer arithmetic/logic, compare, conditional and unconditional branches, a real call/return and stack protocol, I/O, system calls, and halt. It aligns with the canonical SLeeLa VM ISA in lib/vm/InstructionSet.sleela (OP_ADD, OP_JMP, OP_CALL, OP_RET, OP_HALT, ...). The multi-language frontends (SLFrontendC, SLFrontendCpp, SLFrontendJava, SLFrontendSleela) lower to the common IR (SLIR) which emits these opcodes. Each mnemonic has a stable numeric opcode; mnemonic<->code lookup is provided. Family: cpu. Pure Sleela ISA registry.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
NOPstatic final int NOP = 0--- control / misc ---
HALTstatic final int HALT = 1No description in source.
MOVstatic final int MOV = 2--- data movement --- rd <- imm (load immediate)
MOVRstatic final int MOVR = 3rd <- rs (register copy)
LOADstatic final int LOAD = 4rd <- mem[imm] (absolute)
LOADRstatic final int LOADR = 5rd <- mem[rs] (register-indirect)
LOADXstatic final int LOADX = 6rd <- mem[rs + imm] (indexed / struct field, array)
STOREstatic final int STORE = 7mem[imm] <- rs (absolute)
STORERstatic final int STORER= 8mem[rd] <- rs (register-indirect)
STOREXstatic final int STOREX= 9mem[rd + imm] <- rs (indexed)
ADDstatic final int ADD = 10--- integer arithmetic ---
SUBstatic final int SUB = 11No description in source.
MULstatic final int MUL = 12No description in source.
DIVstatic final int DIV = 13No description in source.
MODstatic final int MOD = 14No description in source.
NEGstatic final int NEG = 15No description in source.
ANDstatic final int AND = 16--- bitwise / shift ---
ORstatic final int OR = 17No description in source.
XORstatic final int XOR = 18No description in source.
NOTstatic final int NOT = 19No description in source.
SHLstatic final int SHL = 20No description in source.
SHRstatic final int SHR = 21No description in source.
CMPstatic final int CMP = 22--- compare + branch ---
JMPstatic final int JMP = 23unconditional
JZstatic final int JZ = 24branch if zero flag
JNZstatic final int JNZ = 25branch if not zero
JLTstatic final int JLT = 26branch if negative flag (less-than after CMP)
JGEstatic final int JGE = 27branch if not negative (>=)
CALLstatic final int CALL = 28--- call / stack --- push return addr; jump to imm
RETstatic final int RET = 29pop return addr; jump to it
PUSHstatic final int PUSH = 30push rs
POPstatic final int POP = 31pop into rd
INstatic final int IN = 32--- i/o + system --- rd <- port[imm]
OUTstatic final int OUT = 33port[imm] <- rs
SYSCALLstatic final int SYSCALL = 34No description in source.
TRAPstatic final int TRAP = 35software interrupt (fault/debug/guest-exit)
OPCODE_COUNTstatic final int OPCODE_COUNT = 36No description in source.
definedint definedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
validboolean valid(int opcode)No description in source.
isBranchboolean isBranch(int opcode)No description in source.
isMemoryboolean isMemory(int opcode)No description in source.
isArithmeticboolean isArithmetic(int opcode)No description in source.
isStackboolean isStack(int opcode)No description in source.
isIOboolean isIO(int opcode)No description in source.
isSystemboolean isSystem(int opcode)No description in source.
mnemonicString mnemonic(int opcode)No description in source.
opcodeCountint opcodeCount()No description in source.

SLIntel4004CPU #sleela 2.5 (lib/cpu/intel4004/SLIntel4004CPU.sleela)

SLIntel4004CPU class extends SLCPURuntime

Defines SLIntel4004CPU — a runnable model of the Intel 4004. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 4004 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntel80286CPU #sleela 2.5 (lib/cpu/intel-80286/SLIntel80286CPU.sleela)

SLIntel80286CPU class extends SLCPURuntime

Defines SLIntel80286CPU — a runnable model of the Intel 80286. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 80286 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntel80386CPU #sleela 2.5 (lib/cpu/intel-80386/SLIntel80386CPU.sleela)

SLIntel80386CPU class extends SLCPURuntime

Defines SLIntel80386CPU — a runnable model of the Intel 80386. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 80386 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntel80486CPU #sleela 2.5 (lib/cpu/intel-80486/SLIntel80486CPU.sleela)

SLIntel80486CPU class extends SLCPURuntime

Defines SLIntel80486CPU — a runnable model of the Intel 80486. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 80486 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntel8080CPU #sleela 2.5 (lib/cpu/intel-8080/SLIntel8080CPU.sleela)

SLIntel8080CPU class extends SLCPURuntime

Defines SLIntel8080CPU — a runnable model of the Intel 8080. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 8080 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntel8086CPU #sleela 2.5 (lib/cpu/intel-8086/SLIntel8086CPU.sleela)

SLIntel8086CPU class extends SLCPURuntime

Defines SLIntel8086CPU — a runnable model of the Intel 8086. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel 8086 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntelCeleronCPU #sleela 2.5 (lib/cpu/intel-celeron/SLIntelCeleronCPU.sleela)

SLIntelCeleronCPU class extends SLCPURuntime

Defines SLIntelCeleronCPU — a runnable model of the Intel Celeron. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel Celeron register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntelCoreCPU #sleela 2.5 (lib/cpu/intel-core/SLIntelCoreCPU.sleela)

SLIntelCoreCPU class extends SLCPURuntime

Defines SLIntelCoreCPU — a runnable model of the Intel Core (x86-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel Core (x86-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntelPentiumCPU #sleela 2.5 (lib/cpu/intel-pentium/SLIntelPentiumCPU.sleela)

SLIntelPentiumCPU class extends SLCPURuntime

Defines SLIntelPentiumCPU — a runnable model of the Intel Pentium. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel Pentium register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLIntelXeonCPU #sleela 2.5 (lib/cpu/intel-xeon/SLIntelXeonCPU.sleela)

SLIntelXeonCPU class extends SLCPURuntime

Defines SLIntelXeonCPU — a runnable model of the Intel Xeon (x86-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel Xeon (x86-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLInterruptController #sleela 2.5 (lib/cpu/SLInterruptController.sleela)

SLInterruptController class

Defines SLInterruptController — the unit that fields hardware and software interrupts (timer, I/O completion, faults, syscalls) and tells the core where to jump to service them. It holds an interrupt vector base, masks, and a pending set. This is how the OS regains control from a running program (preemption via the timer interrupt). Models up to 16 interrupt lines (IRQ0..IRQ15). Family: cpu. Pure Sleela controller.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
LINESstatic final int LINES = 16No description in source.
IRQ_TIMERstatic final int IRQ_TIMER = 0No description in source.
IRQ_KEYBOARDstatic final int IRQ_KEYBOARD = 1No description in source.
IRQ_DISKstatic final int IRQ_DISK = 2No description in source.
IRQ_NETWORKstatic final int IRQ_NETWORK = 3No description in source.
vectorBaseint vectorBasebase address of the interrupt vector table
pendingMaskint pendingMaskbitset of raised-but-unserviced lines
enableMaskint enableMaskbitset of enabled lines
servicedint servicedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int base)No description in source.
pow2int pow2(int n)No description in source.
bitSetboolean bitSet(int mask, int line)No description in source.
enablevoid enable(int line)No description in source.
raisevoid raise(int line)No description in source.
hasPendingboolean hasPending()No description in source.
highestPriorityPendingint highestPriorityPending()Return the lowest-numbered pending line (highest priority), or -1 if none.
acknowledgeint acknowledge(int line)Acknowledge a line: clear it and return its handler address.
servicedCountint servicedCount()No description in source.

SLIOBus #sleela 2.5 (lib/cpu/SLIOBus.sleela)

SLIOBus class

Defines SLIOBus — the I/O interconnect (modeling PCIe / the peripheral bus). It owns a set of I/O ports and routes CPU IN/OUT accesses to the right port by number. Devices register their ports here; drivers reach their device through the bus. Up to 16 ports are wired as fields (SLeeLa surface has no arrays); this is ample for a modeled machine (console, disk, keyboard, timer, NIC, ...). Family: cpu. Composes SLIOPort.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAX_PORTSstatic final int MAX_PORTS = 16No description in source.
registeredint registeredNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
registerPortvoid registerPort(int number, SLIOPort port)No description in source.
portSLIOPort port(int number)No description in source.
inint in(int number)CPU-side IN/OUT routed through the bus.
outvoid out(int number, int value)No description in source.
portsRegisteredint portsRegistered()No description in source.

SLIOPort #sleela 2.5 (lib/cpu/SLIOPort.sleela)

SLIOPort class

Defines SLIOPort — a single port-mapped I/O register through which the CPU talks to a device. The IN instruction reads a port; the OUT instruction writes one. Each port has a number, a direction, and a latched value; devices and drivers sit on the far side. Family: cpu. Pure Sleela I/O element.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
DIR_INstatic final int DIR_IN = 0No description in source.
DIR_OUTstatic final int DIR_OUT = 1No description in source.
DIR_INOUTstatic final int DIR_INOUT = 2No description in source.
portNumberint portNumberNo description in source.
directionint directionNo description in source.
latchedint latchedNo description in source.
readCountint readCountNo description in source.
writeCountint writeCountNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int number, int dir)No description in source.
inint in()No description in source.
outvoid out(int value)No description in source.
deviceDepositvoid deviceDeposit(int value)Device side: a device deposits a value for the CPU to read.
numberint number()No description in source.
dirint dir()No description in source.

SLIOTiming #sleela 2.5 (lib/cpu/SLIOTiming.sleela)

SLIOTiming class

Defines SLIOTiming — the expert timing settings for CONTROL of I/O: the handshake and transfer timing of a peripheral/port link. I/O is given the same careful, nameful treatment buses get, because an I/O link mixes an asynchronous device clock domain with the CPU's: the class states the link clock (variable), the setup/hold of the request/acknowledge handshake, the turnaround (bus direction reversal) time, and a recovery gap between transactions — each a named SLTiming budget. It also models the synchronizer latency crossing the device clock domain into the CPU domain, so I/O control timing is accounted honestly rather than assumed instant. The thesis "expert timings for control of I/O shall be careful and nameful" lives here: handshake, turnaround, and recovery each carry a name and reason, and the link reports whether a transaction is honored at the dialed speed. Family: cpu. Composes SLTiming and SLVoltageRail; partners SLIOBus/SLIOPort.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString namenameful link: "console-port", "disk-link", ...
minMHzint minMHzlowest link clock the operator may dial
maxMHzint maxMHzhighest validated link clock
currentMHzint currentMHzthe variable link clock presently selected
syncStagesint syncStagesflip-flops in the clock-domain-crossing synchronizer
vioSLVoltageRail viothe I/O ring supply rail
mvPerMHzint mvPerMHzsettled Vio each extra MHz of ceiling needs
handshakeSLTiming handshakereq -> ack named budget
turnaroundSLTiming turnaroundbus direction reversal named budget
recoverySLTiming recoveryinter-transaction recovery gap named budget

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String linkName, int floorMHz, int ceilingMHz, int synchronizerStages)No description in source.
attachViovoid attachVio(SLVoltageRail rail, int millivoltsPerMHz)No description in source.
periodPsAtint periodPsAt(int mhz)No description in source.
setHandshakevoid setHandshake(int propPs, int setupPs, int holdPs)State the measured path (propagation + setup, with hold) of each phase.
setTurnaroundvoid setTurnaround(int propPs, int setupPs, int holdPs)No description in source.
setRecoveryvoid setRecovery(int propPs, int setupPs, int holdPs)No description in source.
setJittervoid setJitter(int jitterPs)No description in source.
setClockint setClock(int mhz)Dial the variable link clock, clamped into [min,max] and the voltage ceiling.
voltageCeilingMHzint voltageCeilingMHz()No description in source.
retimevoid retime()No description in source.
synchronizerLatencyPsint synchronizerLatencyPs()Latency (ps) to cross the device clock domain into the CPU domain: each synchronizer stage costs up to one link period. I/O control is not instant.
transactionLatencyPsint transactionLatencyPs()Total control latency of one transaction in ps: synchronizer + handshake + turnaround + recovery consumed times.
honoredboolean honored()Every phase honored at the dialed clock AND Vio in limits.
linkNameString linkName()No description in source.
clockint clock()No description in source.
synchronizerStagesint synchronizerStages()No description in source.
handshakeBudgetSLTiming handshakeBudget()No description in source.

SLIR #sleela 2.5 (lib/cpu/SLIR.sleela)

SLIR class

Defines SLIR — a module of common intermediate representation: an ordered sequence of SLIRInstruction nodes plus a temporary-allocation counter and a label counter. Every language frontend (C, C++, Java, Sleela) produces an SLIR; the shared backend SLLowering consumes it. This is the single convergence point that makes the ISA genuinely multi-language. Backed by SLRAM for the node stream (SLeeLa surface has no arrays); nodes are stored by index and the lowering pass walks them in order. Family: cpu. Composes SLIRInstruction; the IR container.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
languageString language"sleela" | "c" | "cpp" | "java" (provenance only)
nodeStoreSLRAM nodeStoreencoded IR nodes, one per word-group (modeled)
countint countnumber of IR instructions
nextTempint nextTempSSA-ish temporary allocator
nextLabelint nextLabellabel id allocator

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String lang, int capacity)No description in source.
allocTempint allocTemp()No description in source.
allocLabelint allocLabel()No description in source.
emitint emit(int op, int dst, int a, int b, int imm)Append an IR instruction; returns its index.
markImmediateAvoid markImmediateA(int index)No description in source.
atSLIRInstruction at(int index)Read a node back as an SLIRInstruction.
sizeint size()No description in source.
langString lang()No description in source.
tempCountint tempCount()No description in source.
labelCountint labelCount()No description in source.

SLIRInstruction #sleela 2.5 (lib/cpu/SLIRInstruction.sleela)

SLIRInstruction class

Defines SLIRInstruction — one instruction of the common intermediate representation (IR) that every language frontend lowers to. The IR is a small, language-neutral three-address form: an operation plus a destination temporary and up to two source operands (temporaries or immediates). SLLowering turns a stream of these into real machine code for the SLInstructionSet. A single IR shared by C, C++, Java, and Sleela is exactly how real multi- language toolchains work (e.g. LLVM IR behind clang/clang++/other frontends; a bytecode IR behind javac). This models that convergence point. Family: cpu. Pure Sleela IR node.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
IR_CONSTstatic final int IR_CONST = 0Language-neutral IR operations. dst = imm
IR_MOVEstatic final int IR_MOVE = 1dst = a
IR_ADDstatic final int IR_ADD = 2dst = a + b
IR_SUBstatic final int IR_SUB = 3No description in source.
IR_MULstatic final int IR_MUL = 4No description in source.
IR_DIVstatic final int IR_DIV = 5No description in source.
IR_MODstatic final int IR_MOD = 6No description in source.
IR_ANDstatic final int IR_AND = 7No description in source.
IR_ORstatic final int IR_OR = 8No description in source.
IR_XORstatic final int IR_XOR = 9No description in source.
IR_CMPstatic final int IR_CMP = 10compare a, b (sets condition)
IR_LABELstatic final int IR_LABEL = 11branch target marker (imm = label id)
IR_JUMPstatic final int IR_JUMP = 12goto label imm
IR_JZstatic final int IR_JZ = 13if last compare == 0 goto label imm
IR_JNZstatic final int IR_JNZ = 14No description in source.
IR_LOADstatic final int IR_LOAD = 15dst = mem[a]
IR_STOREstatic final int IR_STORE = 16mem[a] = b
IR_PARAMstatic final int IR_PARAM = 17stage argument a for the next call
IR_CALLstatic final int IR_CALL = 18dst = call label imm (function entry)
IR_RETstatic final int IR_RET = 19return a
IR_SYSCALLstatic final int IR_SYSCALL= 20dst = syscall imm with arg a
IR_HALTstatic final int IR_HALT = 21No description in source.
opint opNo description in source.
dstint dstdestination temporary id (-1 if none)
aint afirst source temporary id (-1 if none)
bint bsecond source temporary id (-1 if none)
immint immimmediate / label id / syscall number
aIsImmboolean aIsImmwhen true, `a` carries an immediate value, not a temp id

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int operation, int dstTemp, int srcA, int srcB, int immediate)No description in source.
markImmediateAvoid markImmediateA()No description in source.
operationint operation()No description in source.
destinationint destination()No description in source.
sourceAint sourceA()No description in source.
sourceBint sourceB()No description in source.
immediateint immediate()No description in source.
immediateAboolean immediateA()No description in source.

SLItaniumCPU #sleela 2.5 (lib/cpu/itanium/SLItaniumCPU.sleela)

SLItaniumCPU class extends SLCPURuntime

Defines SLItaniumCPU — a runnable model of the Intel Itanium (IA-64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Intel Itanium (IA-64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLKernel #sleela 2.5 (lib/cpu/SLKernel.sleela)

SLKernel class

Defines SLKernel — the heart of the operating system. It owns the scheduler, memory manager, driver manager, syscall interface, and filesystem, and it runs on the CPU that the bootloader handed off to. The kernel installs its syscall handler and interrupt handlers, services syscalls from user programs, and drives preemptive multitasking via the timer interrupt. This is the "Sleela OS equivalent": a class-driven kernel built entirely from the /lib/cpu components, running on the Sleela-source CPU. Family: cpu. Composes the whole OS layer.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
cpuSLCPU cpuNo description in source.
memorySLRAM memoryNo description in source.
schedulerSLScheduler schedulerNo description in source.
mmSLMemoryManager mmNo description in source.
driversSLDriverManager driversNo description in source.
syscallsSLSystemCall syscallsNo description in source.
fsSLFileSystem fsNo description in source.
syscallHandlerAddrint syscallHandlerAddrNo description in source.
ticksint ticksNo description in source.
runningint runningNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLCPU processor, SLRAM ram, SLScheduler sched, SLMemoryManager memMgr,No description in source.
bootvoid boot()Bring the OS up: install the syscall vector and enable the timer interrupt on the boot core, then switch the boot core to user mode once a process is dispatched.
runint run(int rounds)The kernel's main loop. Each outer iteration is one scheduling round: dispatch the next ready process, run it for a quantum, handle any syscall it made and any timer preemption, until no runnable process remains or the round budget is spent.
serviceSyscallvoid serviceSyscall(SLCore core, SLProcess proc, int number)Dispatch a user syscall by number. SYS_WRITE goes to the console driver; SYS_EXIT terminates the process; SYS_YIELD gives up the rest of the quantum.
shutdownvoid shutdown()No description in source.
tickCountint tickCount()No description in source.
isRunningboolean isRunning()No description in source.
schedSLScheduler sched()No description in source.
driverManagerSLDriverManager driverManager()No description in source.
fileSystemSLFileSystem fileSystem()No description in source.

SLKeyboardDriver #sleela 2.5 (lib/cpu/SLKeyboardDriver.sleela)

SLKeyboardDriver class extends SLDeviceDriver

Defines SLKeyboardDriver — an interrupt-driven character-input driver. A key press makes the device raise IRQ_KEYBOARD; the driver's ISR reads the scancode from its port and buffers it for the OS input layer. Family: cpu. Extends SLDeviceDriver.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
lastKeyint lastKeyNo description in source.
keysReadint keysReadNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(SLIOBus bus, int port)No description in source.
serviceInterruptvoid serviceInterrupt()ISR: pull the scancode the device deposited on the port.
getKeyint getKey()No description in source.
hasKeyboolean hasKey()No description in source.
keyCountint keyCount()No description in source.

SLLatch #sleela 2.5 (lib/cpu/SLLatch.sleela)

SLLatch class

Defines SLLatch — a level-sensitive 1-bit storage element (an SR / gated-D latch). It is the most basic memory cell: when enabled, it captures the data input; otherwise it holds its stored bit. Flip-flops, registers, and SRAM cells are built up from latches. Family: cpu. Pure Sleela state.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
qint qstored bit
enabledint enabled1 = transparent (follows D), 0 = holding

Methods — the actions this unit can perform.

MethodSignatureWhat it does
resetvoid reset()No description in source.
enablevoid enable()No description in source.
disablevoid disable()No description in source.
writeint write(int d)Gated-D behavior: capture D only while enabled, otherwise hold.
readint read()No description in source.

SLLINC8CPU #sleela 2.5 (lib/cpu/linc8/SLLINC8CPU.sleela)

SLLINC8CPU class extends SLCPURuntime

Defines SLLINC8CPU — a runnable model of the DEC LINC-8. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC LINC-8 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLLowering #sleela 2.5 (lib/cpu/SLLowering.sleela)

SLLowering class

Defines SLLowering — the shared compiler backend. It walks an SLIR module and emits real machine instructions (via SLAssembler) for the SLInstructionSet, performing a simple temporary-to-register allocation and two-pass label resolution. Because every language frontend produces the same SLIR, this one backend serves C, C++, Java, and Sleela — the ISA is multi-language because the backend is shared. Register convention: IR temporaries map to r1..r15 round-robin (r0 is the hardwired zero). Spilling to the stack for programs that exceed the register file is described in CPU.md and modeled by PUSH/POP; this pass handles the common small-function case directly. Family: cpu. Composes SLIR, SLAssembler, SLProgram, SLInstructionSet.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
asmSLAssembler asmNo description in source.
programSLProgram programNo description in source.
irSLIR irNo description in source.
labelAddrSLRAM labelAddrlabel id -> emitted instruction address
emittedint emittedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet, SLProgram target, SLIR irModule)No description in source.
regint reg(int temp)Map an IR temporary id to a machine register (r1..r15).
resolveLabelsvoid resolveLabels()Pass 1: record the address each IR_LABEL will occupy. Because every IR node lowers to a bounded number of machine ops, we pre-scan to assign label addresses; here each non-label node lowers to exactly one or two ops and we account for that when resolving.
opcodeFootprintint opcodeFootprint(SLIRInstruction n)How many machine instructions a given IR node expands to.
lowerSLProgram lower()Pass 2: emit machine code for the whole IR module.
lowerNodevoid lowerNode(SLIRInstruction n)No description in source.
emittedCountint emittedCount()No description in source.
loweredSLProgram lowered()No description in source.

SLM88KCPU #sleela 2.5 (lib/cpu/m88k/SLM88KCPU.sleela)

SLM88KCPU class extends SLCPURuntime

Defines SLM88KCPU — a runnable model of the Motorola 88000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Motorola 88000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLMachine #sleela 2.5 (lib/cpu/SLMachine.sleela)

SLMachine class

Defines SLMachine — the complete computer: it composes the entire /lib/cpu stack into one bootable system and demonstrates the full chain the library exists to express: gates -> adders/ALU -> registers/RAM/cache -> cores -> SLCPU (hardware) -> SLBootloader loads the kernel (boot) -> SLOperatingSystem / SLKernel comes up with drivers + scheduler (OS) -> SLAssembler builds a Sleela program (program) -> SLProgramLoader loads it as a process (load) -> SLKernel schedules and runs it on the Sleela CPU (run) This is the Sleela CPU built from Sleela source, booting a Sleela Class-Driven OS, which then loads and runs Sleela programs on top of it. Family: cpu. Top-level composition of the whole package.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
memorySLRAM memoryNo description in source.
driveSLHardDrive driveNo description in source.
cpuSLCPU cpuNo description in source.
bootloaderSLBootloader bootloaderNo description in source.
osSLOperatingSystem osNo description in source.
loaderSLProgramLoader loaderNo description in source.
isaSLInstructionSet isaNo description in source.
timingSLTimingProfile timingthe machine's adjustable operating point (optional)
kernelEntryint kernelEntryNo description in source.
syscallHandlerint syscallHandlerNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
buildHardwarevoid buildHardware(String vendor, String model, int cores, int bits, int mhz)Build the hardware: main memory, boot disk, and a multi-core CPU.
bootvoid boot()Boot: firmware loads the kernel image, then the OS installs and comes up.
loadLanguageProgramSLProcess loadLanguageProgram(String path, int langId, String procName, int loadAddr)Compile and load a source program in any supported language, returning the spawned process. Language ids: 0 Sleela, 1 C, 2 C++, 3 Java.
runOnSubstrateint runOnSubstrate(int langId, String path, String name)Reduce a program in any supported language to the canonical SLeeLa opcode substrate and execute it there, returning its printed result. This runs the program as a stream of the Turing-complete canonical opcodes — the common ground C/C++/Java/Sleela all share.
proveLanguageEquivalenceboolean proveLanguageEquivalence(String c, String cpp, String java, String sleela)Prove the four languages are 1:1 in Turing effect: identical observable result after each is reduced to the Sleela opcode substrate.
runLinuxGuestint runLinuxGuest(int guestEntry, int budget)Boot a Linux-style guest OS on top of this Sleela CPU via the hypervisor, and run it for a bounded number of guest instructions. Returns the guest instruction count executed. (Architectural model — see SLGuestLinux.)
runLinuxGuestFromSourceint runLinuxGuestFromSource(String kernelSourcePath, int langId, int guestEntry, int budget)Boot a Linux-style guest whose kernel is GENUINELY COMPILED from source in any supported language (C/C++/Java/Sleela) via the real toolchain (step 4), then run it. Returns the guest instruction count executed.
runLinuxGuestWithProgramsint runLinuxGuestWithPrograms(String kernelSrc, int kernelLang,Boot a guest, then have its init process (PID 1) load and spawn two user programs compiled from source (any supported language). The timer-driven scheduler then multitasks them. Returns the guest instruction count.
runLinuxGuestDiskProgramint runLinuxGuestDiskProgram(String kernelSrc, int kernelLang,Boot a guest, then compile a program, install it to the guest filesystem as an on-disk executable, load it back FROM DISK, and run it. Demonstrates the full compile -> install -> load-from-disk -> execute cycle. Returns the guest instruction count executed.
runLinuxGuestShellint runLinuxGuestShell(String kernelSrc, int kernelLang, int guestEntry)Boot a guest, launch its shell as init's first child, and run a short command script (each entry is a leading-char + arg pair). Returns the number of shell commands executed. Demonstrates boot -> init -> shell.
runLinuxGuestForkExecint runLinuxGuestForkExec(String kernelSrc, int kernelLang,Boot a guest, then exercise the full PROCESS-CREATION cycle — fork, execve, and wait — through the guest's real syscall ABI (SLGuestSyscall). init spawns a parent task, forks a child, execs the child onto a freshly compiled image, the child exits, and the parent reaps it with wait(). Returns the reaped child's tid (>0 on success). Demonstrates boot -> init -> fork/exec/wait: a Linux-style guest creating and reaping processes.
runLinuxGuestForkExecOpcodesint runLinuxGuestForkExecOpcodes(String kernelSrc, int kernelLang, int guestEntry)Same process-creation cycle, but driven through the guest's OPCODE path: the canonical service opcodes OP_SPAWN (fork) and OP_JOINALL (wait) are routed by SLGuestVM.serviceOpcode() -> syscallNumberFor() -> the syscall ABI, exactly as a guest program's VM-exits are. This exercises the opcode->syscall mapping (not just the syscall handlers). Returns the reaped child's tid (>0 on success).
buildBootDiskDriverSLDiskDriver buildBootDiskDriver()The bootloader needs a disk driver before the OS driver manager exists; build a minimal one bound to the boot drive.
loadDemoProgramSLProcess loadDemoProgram(int loadAddr)Author, assemble, load, and run a demonstration Sleela program: compute 2 + 3 into r1, print a character via SYS_WRITE, then exit.
powerOnAndRunint powerOnAndRun(int cores, int bits, int mhz, int rounds)Run the whole chain end to end: build -> boot -> load program -> run.
selectTimingSLTimingProfile selectTiming(int tier, String brandOrMedium)Select the machine's adjustable timing/voltage operating point for a given expertise tier (SLTimingClass.TIER_NOVICE/BASIC/ADVANCED/EXPERT) and brand or medium. The profile owns the actual voltages, the variable bus/core/IO clocks, and the expert CPU/RAM/I/O timings; it is sealed into a manifest that every program compiled through the loader's compiler then carries.
compileWithTimingSLProgram compileWithTiming(String path, int langId, String programName)Compile a program with the machine's selected timing profile stamped into the resulting .sleela image, so the VM/loader honor the declared operating point instead of assuming hardware quality. Returns the compiled program.
timingHonoredboolean timingHonored()Is the machine's selected operating point internally honored — every expert timing met on every rail at the dialed speeds, with the tier's headroom?
processorSLCPU processor()No description in source.
operatingSystemSLOperatingSystem operatingSystem()No description in source.
programLoaderSLProgramLoader programLoader()No description in source.
mainMemorySLRAM mainMemory()No description in source.
timingProfileSLTimingProfile timingProfile()No description in source.

SLMarkIIICPU #sleela 2.5 (lib/cpu/sega-mark-iii/SLMarkIIICPU.sleela)

SLMarkIIICPU class extends SLCPURuntime

Defines SLMarkIIICPU — a runnable model of the Sega Mark III (Z80). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Mark III (Z80) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLMasterSystemCPU #sleela 2.5 (lib/cpu/sega-master-system/SLMasterSystemCPU.sleela)

SLMasterSystemCPU class extends SLCPURuntime

Defines SLMasterSystemCPU — a runnable model of the Sega Master System (Z80). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Master System (Z80) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLMediaTekDimensityCPU #sleela 2.5 (lib/cpu/mediatek-dimensity/SLMediaTekDimensityCPU.sleela)

SLMediaTekDimensityCPU class extends SLCPURuntime

Defines SLMediaTekDimensityCPU — a runnable model of the MediaTek Dimensity (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the MediaTek Dimensity (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLMegaCDCPU #sleela 2.5 (lib/cpu/sega-mega-cd/SLMegaCDCPU.sleela)

SLMegaCDCPU class extends SLCPURuntime

Defines SLMegaCDCPU — a runnable model of the Sega Mega-CD (68000). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Mega-CD (68000) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLMemoryInterface #sleela 2.5 (lib/cpu/components/SLMemoryInterface.sleela)

SLMemoryInterface class

Defines SLMemoryInterface — an OOD interface/adapter layer that

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TECH_SRAMstatic final int TECH_SRAM = 0Target-cadence technology ids mirror SLMemoryModule.TECH_* so the interface can present any tier's refresh discipline over any real module.
TECH_DRAMstatic final int TECH_DRAM = 1No description in source.
TECH_SDRAMstatic final int TECH_SDRAM = 2No description in source.
TECH_DDRstatic final int TECH_DDR = 3No description in source.
TECH_DDR2static final int TECH_DDR2 = 4No description in source.
TECH_DDR3static final int TECH_DDR3 = 5No description in source.
TECH_DDR4static final int TECH_DDR4 = 6No description in source.
TECH_DDR5static final int TECH_DDR5 = 7No description in source.
partNameString partNamenameful: "DDR2-cadence interface", ...
actualSLMemoryModule actualthe REAL module in the system (e.g. DDR5-6400)
targetTechint targetTechthe cadence presented (mirrors the slot connector)
slotSLCadenceConnector slotThe cadence SLOT is filled by a Dynamite Connector, not by setters. The connector resolves a named generation (or a custom profile) into the refresh timings this interface reads back once the connector is loaded.
tREFI_nsint tREFI_nsRefresh model, in nanoseconds (the Sleela-layer cadence, not host timers): tREFI = average refresh interval (how often a refresh is issued) tRFC = refresh command time (how long the array is busy per refresh) The duty the system sees available is (tREFI - tRFC) / tREFI. These are populated from the connected cadence connector, never set directly.
tRFC_nsint tRFC_nsNo description in source.
engagedint engaged1 = the cadence overlay is active

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, SLMemoryModule realModule, int cadenceTech)Wrap a real module and present the given target technology's refresh cadence by building and connecting a Dynamite cadence connector for it.
connectboolean connect(SLCadenceConnector connector)Plug a cadence connector into the slot: resolve-then-load it (if the caller has not already), then read its resolved timings. Fail-closed — a connector that will not load leaves the overlay disengaged with a refresh-free duty.
cadenceSlotSLCadenceConnector cadenceSlot()The connector currently filling the cadence slot (null if none).
engagevoid engage()No description in source.
disengagevoid disengage()pass the real module through untouched
availableDutyPctint availableDutyPct()Available duty as a percentage: the share of time NOT spent refreshing. 100% when the overlay is off or the cadence is refresh-free.
refreshOverheadPctint refreshOverheadPct()Refresh overhead the cadence costs, as a percentage of time.
nativeBandwidthMBsint nativeBandwidthMBs()The module's REAL peak bandwidth, unscaled (native data rate preserved).
effectiveBandwidthMBsint effectiveBandwidthMBs()Effective bandwidth the system observes: real peak scaled by the available duty of the presented cadence. The data rate is unchanged; availability is what the refresh duty cycle shapes.
moduleSLMemoryModule module()Pass-through identity of the REAL module (never masked by the overlay).
nativeTechint nativeTech()No description in source.
nativeTechNameString nativeTechName()No description in source.
capacityMiBint capacityMiB()No description in source.
channelCountint channelCount()No description in source.
nameString name()No description in source.
activeboolean active()No description in source.
cadenceTechint cadenceTech()No description in source.
refreshIntervalNsint refreshIntervalNs()No description in source.
refreshTimeNsint refreshTimeNs()No description in source.
refreshesAsNameString refreshesAsName()No description in source.

SLMemoryManager #sleela 2.5 (lib/cpu/SLMemoryManager.sleela)

SLMemoryManager class

Defines SLMemoryManager — the OS's physical/virtual memory manager. It carves main memory into pages, tracks which are free vs. allocated, and hands page-aligned regions to processes. It also models the kernel/user split so user programs cannot touch kernel memory. A simple bump+bitmap allocator over a page count; enough to give each process its own region. Virtual-to-physical translation is modeled as a per-process base offset. Family: cpu. Composes SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
memorySLRAM memoryNo description in source.
pageWordsint pageWordswords per page
totalPagesint totalPagesNo description in source.
kernelPagesint kernelPageslow pages reserved for the kernel
nextFreePageint nextFreePageNo description in source.
allocationsint allocationsNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLRAM ram, int wordsPerPage, int reservedKernelPages)No description in source.
pageToAddrint pageToAddr(int page)No description in source.
allocPagesint allocPages(int pages)Allocate `pages` contiguous pages for a process; return the base address, or -1 if out of memory.
userMayAccessboolean userMayAccess(int addr)Enforce the kernel/user boundary: a user access must stay above the kernel region.
freePagesint freePages()No description in source.
pageCountint pageCount()No description in source.
allocationCountint allocationCount()No description in source.

SLMemoryModule #sleela 2.5 (lib/cpu/components/SLMemoryModule.sleela)

SLMemoryModule class

Defines SLMemoryModule — a selectable main-memory part a user plugs into a Sleela executor build. It carries the real-world specification of a RAM module: technology (DRAM/SDRAM/DDRn/SRAM), capacity, data-bus width, clock, CAS latency, and the resulting first-word latency and peak transfer bandwidth. The timings are what make one RAM choice faster than another; SLComponentCatalog offers presets (DDR3-1600, DDR5-6000, ...). The module backs an SLRAM at the chosen capacity; the spec fields drive the performance model (effective bandwidth, access latency) so overclocked CPUs and faster RAM visibly change an executor's characterization. Family: cpu.components. Composes SLRAM; selected via SLComponentCatalog.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TECH_SRAMstatic final int TECH_SRAM = 0Memory technology ids.
TECH_DRAMstatic final int TECH_DRAM = 1No description in source.
TECH_SDRAMstatic final int TECH_SDRAM = 2No description in source.
TECH_DDRstatic final int TECH_DDR = 3No description in source.
TECH_DDR2static final int TECH_DDR2 = 4No description in source.
TECH_DDR3static final int TECH_DDR3 = 5No description in source.
TECH_DDR4static final int TECH_DDR4 = 6No description in source.
TECH_DDR5static final int TECH_DDR5 = 7No description in source.
partNameString partNamee.g. "DDR4-3200 16GB"
technologyint technologyNo description in source.
capacityMiBint capacityMiBmodule capacity in MiB
busWidthBitsint busWidthBitsdata bus width per channel (e.g. 64 for a DIMM)
clockMHzint clockMHzI/O bus clock (MT/s = clockMHz × ddrFactor)
casLatencyint casLatencyCL in clock cycles
ddrFactorint ddrFactor1 for SDR/SRAM, 2 for DDR double-pumping
channelsint channelspopulated memory channels (1 single, 4 HEDT, 8 PRO)
backingSLRAM backingthe actual word store the executor addresses

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int tech, int capMiB, int busBits,No description in source.
configureChannelsvoid configureChannels(String name, int tech, int capMiB, int busBits,Full form: also state how many memory channels are populated. A platform with N channels multiplies both the addressable capacity (N modules) and the aggregate peak bandwidth by N — this is what distinguishes a 4-channel HEDT board from an 8-channel workstation board running the same DIMMs.
setChannelsvoid setChannels(int channelCount)Set the populated channel count after configuration (e.g. to retarget the same DIMM spec from a 4-channel to an 8-channel platform).
mountSLRAM mount(int wordWidth)Allocate the backing store for this module as `width`-bit words. The arena spans the full populated capacity across every channel.
transfersPerSecMTint transfersPerSecMT()Effective data rate in mega-transfers/second per channel (DDR double-pumps).
channelBandwidthMBsint channelBandwidthMBs()Per-channel peak bandwidth in MB/s: MT/s × bus bytes.
peakBandwidthMBsint peakBandwidthMBs()Aggregate peak bandwidth in MB/s across every populated channel. For a single-channel module this equals the per-channel figure.
totalCapacityMiBint totalCapacityMiB()Total installed capacity across all channels (one module per channel).
firstWordLatencyNsint firstWordLatencyNs()First-word access latency in nanoseconds: CL / clock. (×1000 for ns.)
nameString name()No description in source.
techint tech()No description in source.
capacityint capacity()No description in source.
channelCountint channelCount()No description in source.
busWidthint busWidth()No description in source.
clockint clock()No description in source.
clint cl()No description in source.
memorySLRAM memory()No description in source.
technologyNameString technologyName()No description in source.

SLMemoryTierPolicy #sleela 2.5 (lib/cpu/SLMemoryTierPolicy.sleela)

SLMemoryTierPolicy class

Defines SLMemoryTierPolicy — the bridge from the SOURCE memory-tier

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MOD_USUALMEMstatic final int MOD_USUALMEM = 32768Modifier bits as emitted by the frontend (mirror impl/frontend/ast.h). JavaMemUsual = 1 << 15
MOD_ACCURATEMEMstatic final int MOD_ACCURATEMEM = 65536JavaMemAccurate = 1 << 16
TIER_INHERITstatic final int TIER_INHERIT = 0Tier ids (mirror SLMemoryTierRouter.TIER_*).
TIER_USUALstatic final int TIER_USUAL = 1No description in source.
TIER_ACCURATEstatic final int TIER_ACCURATE = 2No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
tierFromModifiersint tierFromModifiers(int modifiers)Read a declaration's modifier bitset and return the tier it flags. usualmem wins only if accuratemem is absent (they are mutually exclusive by intent); neither bit => TIER_INHERIT.
methodTierFromModifiersint methodTierFromModifiers(int methodModifiers)The tier a method declares (TIER_INHERIT when it declares none).
documentTierFromModifiersint documentTierFromModifiers(int classModifiers)The document (whole-program) default tier from the top-level class's modifiers (TIER_INHERIT when the class declares none).
effectiveTierint effectiveTier(int methodTier, int documentTier)Resolve a method's EFFECTIVE tier: its own tier, else the document default, else accurate (DDR5). Mirrors SLProgram.effectiveTier.
tierNameString tierName(int tier)No description in source.

SLMemoryTierRouter #sleela 2.5 (lib/cpu/components/SLMemoryTierRouter.sleela)

SLMemoryTierRouter class

Defines SLMemoryTierRouter — the piece that makes memory tiers PHYSICAL. A build can carry two real memory modules: a "usual" tier (for usual activities, e.g. DDR2) and an "accurate" tier (for competency/ accuracy-critical work, e.g. DDR5). This router holds both, knows the program's default (main) tier, and — given a function's declared tier — returns the actual SLMemoryModule that function should bind its memory accesses to. The VM/dispatcher consults it per function so a program marked `usualmem`/`accuratemem` (or defaulted at the document level) runs against the matching module, not a single shared store. Tier ids mirror the Sleela memory-tier modifiers and SLAccessSemantics shape: 0 = inherit (use the main tier), 1 = usual (DDR2), 2 = accurate (DDR5). A function that declares neither inherits the main tier. Family: cpu.components. Composes SLMemoryModule; held by SLExecutorBuild; consulted by the VM dispatch path.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TIER_INHERITstatic final int TIER_INHERIT = 0no per-function tier -> use main
TIER_USUALstatic final int TIER_USUAL = 1usualmem (DDR2)
TIER_ACCURATEstatic final int TIER_ACCURATE = 2accuratemem (DDR5)
usualSLMemoryModule usualthe usual-activities tier module (may be null)
accurateSLMemoryModule accuratethe accuracy/competency tier module (may be null)
mainTierint mainTierTIER_USUAL or TIER_ACCURATE (default accurate)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
installUsualvoid installUsual(SLMemoryModule m)No description in source.
installAccuratevoid installAccurate(SLMemoryModule m)No description in source.
setMainTiervoid setMainTier(int tier)No description in source.
resolveTierint resolveTier(int declaredTier)Resolve a function's declared tier to the concrete tier it runs on: TIER_INHERIT folds to the main tier; otherwise the declared tier stands.
moduleForSLMemoryModule moduleFor(int declaredTier)The actual memory module a function with `declaredTier` binds to. Falls back to whichever tier IS installed if the resolved one is absent, so a model that declared only one tier still runs (the router never returns null when at least one tier is present).
tierNameString tierName(int declaredTier)Human-readable tier a function resolves to (for reports/diagnostics).
hasUsualboolean hasUsual()No description in source.
hasAccurateboolean hasAccurate()No description in source.
mainint main()No description in source.
twoTierboolean twoTier()No description in source.

SLMIPSCPU #sleela 2.5 (lib/cpu/mips/SLMIPSCPU.sleela)

SLMIPSCPU class extends SLCPURuntime

Defines SLMIPSCPU — a runnable model of a classic 32-bit MIPS R- style load/store RISC: 32 general registers (R0 hardwired to zero), the HI and LO multiply/divide result registers, and a program counter. It extends SLCPURuntime and adds the MIPS register conventions, a decoder for a compact R/I-type encoding, and the branch-delay-slot / CP0 hooks the skeleton named. Instruction model (op in bits 24..31, rd in 16..23, rs in 8..15, rt/imm in 0..7): ADD rd,rs,rt / SUB rd,rs,rt / ADDI rd,rs,imm / LW rd,imm(rs) / SW rt,imm(rs) / BEQ rs,rt,off / BNE rs,rt,off / J addr / NOP / SYSCALL(halt). R0 reads as zero and ignores writes, as on real MIPS. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_HIstatic final int R_HI = 32No description in source.
R_LOstatic final int R_LO = 33No description in source.
ADDstatic final int ADD = 1No description in source.
SUBstatic final int SUB = 2No description in source.
ADDIstatic final int ADDI = 3No description in source.
LWstatic final int LW = 4No description in source.
SWstatic final int SW = 5No description in source.
BEQstatic final int BEQ = 6No description in source.
BNEstatic final int BNE = 7No description in source.
Jstatic final int J = 8No description in source.
SYSCALLstatic final int SYSCALL = 9No description in source.
cp0Statusint cp0StatusCP0 (system control) status register
inDelaySlotint inDelaySlotNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
gprint gpr(int i)R0 is hardwired to zero.
setGprvoid setGpr(int i, int v)No description in source.
opOfint opOf(int w)No description in source.
rdOfint rdOf(int w)No description in source.
rsOfint rsOf(int w)No description in source.
rtImmOfint rtImmOf(int w)No description in source.
decodevoid decode(int word)No description in source.
branchDelaySlotvoid branchDelaySlot()The classic MIPS branch-delay slot: the instruction after a taken branch still executes. Modelled by letting fetch run one more time before the new PC takes effect (hook retained for callers reasoning about pipeline order).
exceptionvoid exception(int cause)CP0 exception entry (SYSCALL, overflow, etc.).
interruptvoid interrupt(int vector)No description in source.
signedint signed(int b)No description in source.
encodeRint encodeR(int op, int rd, int rs, int rt)No description in source.
encodeIint encodeI(int op, int rd, int rs, int imm)No description in source.
regint reg(int i)No description in source.
hiint hi()No description in source.
loint lo()No description in source.
cp0int cp0()No description in source.

SLMMU #sleela 2.5 (lib/cpu/SLMMU.sleela)

SLMMU class

Defines SLMMU — a Memory Management Unit providing real page-table translation from a guest's (virtual / guest-physical) address space to host-physical addresses, with per-page presence and protection bits. This is step 2 of the OS-VM roadmap: it replaces the single base-offset window with genuine second-level address translation, so a guest OS can have paged memory, unmapped regions that fault, and read-only/no-execute protections — the memory model a real kernel needs. Model: a single-level page table over a configurable page size. Each entry records the host-physical frame and permission bits (present, write, exec). translate() walks the table; a miss or protection violation raises a page fault (returned as -1 with the fault recorded), which the hypervisor delivers to the guest as a TRAP. Page-table entries are stored in SLRAM (one word per entry: frame<<3 | perms) so the table can be large (realistic address spaces). Family: cpu. Composes SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
PERM_PRESENTstatic final int PERM_PRESENT = 1No description in source.
PERM_WRITEstatic final int PERM_WRITE = 2No description in source.
PERM_EXECstatic final int PERM_EXEC = 4No description in source.
FAULT_NONEstatic final int FAULT_NONE = 0No description in source.
FAULT_UNMAPPEDstatic final int FAULT_UNMAPPED= 1No description in source.
FAULT_PROTstatic final int FAULT_PROT = 2No description in source.
pageSizeint pageSizewords per page
pageCountint pageCountnumber of virtual pages
tableSLRAM tablepage table: entry = (frame << 3) | perms
translationsint translationsNo description in source.
faultsint faultsNo description in source.
lastFaultint lastFaultNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int wordsPerPage, int pages)No description in source.
vpnOfint vpnOf(int vaddr)No description in source.
offsetOfint offsetOf(int vaddr)No description in source.
mapvoid map(int vpn, int frame, int perms)Map a virtual page to a host-physical frame with permissions.
unmapvoid unmap(int vpn)No description in source.
entryOfint entryOf(int vpn)No description in source.
frameOfint frameOf(int entry)No description in source.
permsOfint permsOf(int entry)No description in source.
presentboolean present(int entry)PRESENT bit
translateAccessint translateAccess(int vaddr, int access)Translate a virtual address to a host-physical address, checking the requested access (0 read, PERM_WRITE write, PERM_EXEC execute). Returns the host-physical address, or -1 on a page fault (reason recorded).
translateint translate(int vaddr)Convenience: a plain read translation.
identityMapvoid identityMap(int pages, int baseFrame, int perms)Identity-map `pages` pages starting at vpn 0 to frames at `baseFrame`, with full permissions — the simplest bring-up a guest kernel uses before it installs its own tables.
translationCountint translationCount()No description in source.
faultCountint faultCount()No description in source.
lastFaultReasonint lastFaultReason()No description in source.
pagesint pages()No description in source.

SLMotherboard #sleela 2.5 (lib/cpu/components/SLMotherboard.sleela)

SLMotherboard class

Defines SLMotherboard — the board a Sleela executor is built on: the CPU socket, the platform chipset, the memory topology (channel count and DIMM slots), the number of PCIe lanes the platform exposes and their generation, and the system-bus generation the board carries. These are the "motherboard-pertinent settings" that bound a build: a CPU only drops into a matching socket, memory can only populate as many channels as the board routes, and no card can use more PCIe lanes than the platform provides. The board is nameful and spec-first: every field states a real platform property (sTR5 socket, TRX50/WRX90 chipset, 4- vs 8-channel memory, PCIe 5.0 lane budget) rather than assuming a generic machine. SLExecutorBuild mounts a board and can check that the chosen CPU socket and memory channels fit it. Family: cpu.components. Selected via SLComponentCatalog; mounted in SLExecutorBuild; partners SLMemoryModule and SLSystemBus.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
SOCKET_UNKNOWNstatic final int SOCKET_UNKNOWN = 0Socket ids (the mechanical/electrical CPU interface).
SOCKET_STR5static final int SOCKET_STR5 = 1AMD sTR5 (Threadripper 9000)
SOCKET_AM5static final int SOCKET_AM5 = 2AMD AM5 (Ryzen desktop)
SOCKET_SP5static final int SOCKET_SP5 = 3AMD SP5 (EPYC)
SOCKET_LGA1700static final int SOCKET_LGA1700 = 4Intel LGA1700
SOCKET_GENERICstatic final int SOCKET_GENERIC = 5non-specific / legacy
partNameString partNamenameful: "ASRock WRX90 WS EVO", "TRX50 reference", ...
socketint socketone of SOCKET_*
chipsetString chipset"TRX50", "WRX90", ...
memoryChannelsint memoryChannelsrouted memory channels (4 HEDT, 8 PRO WX, ...)
dimmSlotsint dimmSlotsphysical DIMM slots
pcieLanesint pcieLanestotal CPU-attached PCIe lanes the board exposes
pcieGenint pcieGenPCIe generation (5 = PCIe 5.0)
busTypeint busTypethe SLSystemBus type the board's primary slot is

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int socketId, String chipsetName,No description in source.
acceptsSocketboolean acceptsSocket(int cpuSocket)Does a CPU that reports socket `cpuSocket` drop into this board?
supportsChannelsboolean supportsChannels(int wantChannels)Can this board populate a memory module that wants `wantChannels` channels?
supportsLanesboolean supportsLanes(int wantLanes)Can a card/device asking for `wantLanes` PCIe lanes be seated here?
nameString name()No description in source.
socketIdint socketId()No description in source.
chipsetNameString chipsetName()No description in source.
channelsint channels()No description in source.
slotsint slots()No description in source.
lanesint lanes()No description in source.
pcieGenerationint pcieGeneration()No description in source.
systemBusTypeint systemBusType()No description in source.
socketNameString socketName()No description in source.

SLNESCPU #sleela 2.5 (lib/cpu/nintendo-nes/SLNESCPU.sleela)

SLNESCPU class extends SLCPURuntime

Defines SLNESCPU — a runnable model of the Nintendo NES (Ricoh 2A03 / 6502). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo NES (Ricoh 2A03 / 6502) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLNetworkDriver #sleela 2.5 (lib/cpu/SLNetworkDriver.sleela)

SLNetworkDriver class extends SLDeviceDriver

Defines SLNetworkDriver — a NIC driver. It extends SLDeviceDriver and moves frames between memory and the network device, using DMA ring buffers and IRQ_NETWORK for receive/transmit completion. The OS network stack sits above it. Family: cpu. Extends SLDeviceDriver; composes SLDMAController.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
dmaSLDMAController dmaNo description in source.
framesTxint framesTxNo description in source.
framesRxint framesRxNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
initvoid init(SLIOBus bus, int port, SLDMAController dmaEngine)No description in source.
transmitint transmit(int memWord, int words)No description in source.
serviceInterruptvoid serviceInterrupt()No description in source.
transmittedint transmitted()No description in source.
receivedint received()No description in source.

SLNintendo64CPU #sleela 2.5 (lib/cpu/nintendo-64/SLNintendo64CPU.sleela)

SLNintendo64CPU class extends SLCPURuntime

Defines SLNintendo64CPU — a runnable model of the Nintendo 64 (NEC VR4300 / MIPS). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo 64 (NEC VR4300 / MIPS) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 33No description in source.
R_LINKstatic final int R_LINK = 32No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLNomadCPU #sleela 2.5 (lib/cpu/sega-nomad/SLNomadCPU.sleela)

SLNomadCPU class extends SLCPURuntime

Defines SLNomadCPU — a runnable model of the Sega Nomad (68000). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Nomad (68000) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLNS32000CPU #sleela 2.5 (lib/cpu/ns32000/SLNS32000CPU.sleela)

SLNS32000CPU class extends SLCPURuntime

Defines SLNS32000CPU — a runnable model of the NS 32000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the NS 32000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLNvidiaGraceCPU #sleela 2.5 (lib/cpu/nvidia-grace/SLNvidiaGraceCPU.sleela)

SLNvidiaGraceCPU class extends SLCPURuntime

Defines SLNvidiaGraceCPU — a runnable model of the NVIDIA Grace (ARM Neoverse V2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the NVIDIA Grace (ARM Neoverse V2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLOpcodeMap #sleela 2.5 (lib/cpu/SLOpcodeMap.sleela)

SLOpcodeMap class

Defines SLOpcodeMap — the translator that maps the register-style CPU ISA (SLInstructionSet) and the OS system calls (SLSystemCall) ONTO the canonical SLeeLa opcode substrate (SLSleelaOpcode), emitting the result into an SLSleelaVM. This is the pivot of the whole design: every CPU instruction and every OS service is expressed as a sequence of canonical Sleela opcodes. Because the Sleela opcodes are Turing complete and already executed by the native VM, mapping the CPU ISA + syscalls onto them means the register machine's behavior is fully realized by the substrate. Repeating this mapping for whatever a frontend emits is exactly what makes C/C++/Java/Sleela 1:1 in Turing effect: they all become streams of the same opcodes. Register model: the register file is mapped to Sleela GLOBAL slots (rN -> global N). A register op becomes: load operands from globals, do the stack arithmetic, store the result back to a global. Family: cpu. Composes SLInstructionSet, SLSystemCall, SLSleelaOpcode, SLSleelaVM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
sysSLSystemCall sysNo description in source.
sopSLSleelaOpcode sopNo description in source.
vmSLSleelaVM vmNo description in source.
mappedInstrint mappedInstrregister-ISA instructions translated
emittedOpsint emittedOpsSleela opcodes emitted

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLInstructionSet instructionSet, SLSystemCall syscalls, SLSleelaVM target)No description in source.
op0void op0(int opcode)No description in source.
op1void op1(int opcode, int arg)No description in source.
mapInstructionvoid mapInstruction(int op, int rd, int rs, int imm)Map ONE register-ISA instruction (opcode rd rs imm) to a Sleela opcode sequence appended to the VM's code store. Registers live in global slots.
aluToSleelaint aluToSleela(int op)Map a register-ISA ALU opcode to the Sleela stack-arithmetic opcode.
mapSyscallvoid mapSyscall(int number, int argReg)Map ONE OS system call onto Sleela service opcodes. The syscall argument convention: argReg holds the register whose value is the primary argument.
mapProgramint mapProgram(SLProgram program, SLInstructionDecoder decoder)Translate a whole SLProgram (register-ISA image) into the Sleela substrate.
instructionsMappedint instructionsMapped()No description in source.
opcodesEmittedint opcodesEmitted()No description in source.
substrateSLSleelaVM substrate()No description in source.

SLOpenRISCCPU #sleela 2.5 (lib/cpu/openrisc/SLOpenRISCCPU.sleela)

SLOpenRISCCPU class extends SLCPURuntime

Defines SLOpenRISCCPU — a runnable model of the OpenRISC 1000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the OpenRISC 1000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLOperatingSystem #sleela 2.5 (lib/cpu/SLOperatingSystem.sleela)

SLOperatingSystem class

Defines SLOperatingSystem — the full OS assembly: it constructs the kernel and all its subsystems over a given CPU and memory, wires the standard device drivers, and exposes a clean API for the machine to boot and for programs to be loaded and run. This is the Sleela Class-Driven OS. Composition order mirrors a real boot: memory manager -> I/O bus + drivers -> filesystem -> syscalls -> scheduler -> kernel. Family: cpu. Top of the OS layer; composes SLKernel and all subsystems.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
cpuSLCPU cpuNo description in source.
memorySLRAM memoryNo description in source.
ioSLIOBus ioNo description in source.
dmaSLDMAController dmaNo description in source.
consoleSLConsoleDriver consoleNo description in source.
diskSLDiskDriver diskNo description in source.
keyboardSLKeyboardDriver keyboardNo description in source.
netSLNetworkDriver netNo description in source.
driversSLDriverManager driversNo description in source.
mmSLMemoryManager mmNo description in source.
syscallsSLSystemCall syscallsNo description in source.
fsSLFileSystem fsNo description in source.
schedulerSLScheduler schedulerNo description in source.
kernelSLKernel kernelNo description in source.
nextPidint nextPidNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String osName, SLCPU processor, SLRAM ram)No description in source.
installvoid install(SLHardDrive bootDrive, int syscallHandlerAddr)Build every subsystem and bring the kernel up.
spawnSLProcess spawn(String procName, int entryPoint)Admit a loaded program as a schedulable process.
runint run(int rounds)Hand control to the kernel for a bounded number of scheduling rounds.
osNameString osName()No description in source.
getKernelSLKernel getKernel()No description in source.
getFileSystemSLFileSystem getFileSystem()No description in source.
getDriversSLDriverManager getDrivers()No description in source.

SLOpticalDrive #sleela 2.5 (lib/cpu/components/SLOpticalDrive.sleela)

SLOpticalDrive class

Defines SLOpticalDrive — a selectable optical drive for a Sleela executor build: CD, DVD, or Blu-ray reader/writer. It models the real spec that sets its speed: the medium, the base 1× data rate for that medium, the drive's speed multiplier (e.g. 52× CD, 16× DVD), and whether it can write. The 1× rate differs per medium (CD 150 KB/s, DVD 1,385 KB/s, BD 4,500 KB/s), so a "16×" DVD and a "16×" CD are very different throughputs — this class makes that explicit. Family: cpu.components. Selected via SLComponentCatalog.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MEDIUM_CDstatic final int MEDIUM_CD = 0No description in source.
MEDIUM_DVDstatic final int MEDIUM_DVD = 1No description in source.
MEDIUM_BDstatic final int MEDIUM_BD = 2Blu-ray
BASE_CD_KBSstatic final int BASE_CD_KBS = 150Base 1x data rate in KB/s for each medium.
BASE_DVD_KBSstatic final int BASE_DVD_KBS = 1385No description in source.
BASE_BD_KBSstatic final int BASE_BD_KBS = 4500No description in source.
partNameString partNameNo description in source.
mediumint mediumNo description in source.
speedMultiplierint speedMultiplierthe "nnX" rating
writerint writer1 if it can burn media
capacityMiBint capacityMiBdisc capacity (CD 700, DVD 4700, BD 25000, ...)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int mediumId, int multiplier, boolean canWrite, int discMiB)No description in source.
baseRateKBsint baseRateKBs()No description in source.
readRateKBsint readRateKBs()Sustained read rate in KB/s = base × multiplier.
readRateMBsint readRateMBs()No description in source.
readTimeMsint readTimeMs(int mib)Time in milliseconds to read `mib` megabytes at the drive's rate.
nameString name()No description in source.
speedint speed()No description in source.
canWriteboolean canWrite()No description in source.
capacityint capacity()No description in source.
mediumNameString mediumName()No description in source.

SLPARISCCPU #sleela 2.5 (lib/cpu/pa-risc/SLPARISCCPU.sleela)

SLPARISCCPU class extends SLCPURuntime

Defines SLPARISCCPU — a runnable model of the HP PA-RISC. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the HP PA-RISC register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP10CPU #sleela 2.5 (lib/cpu/pdp10/SLPDP10CPU.sleela)

SLPDP10CPU class extends SLCPURuntime

Defines SLPDP10CPU — a runnable model of the DEC PDP-10. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-10 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP11CPU #sleela 2.5 (lib/cpu/pdp11/SLPDP11CPU.sleela)

SLPDP11CPU class extends SLCPURuntime

Defines SLPDP11CPU — a runnable model of the DEC PDP-11. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-11 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP12CPU #sleela 2.5 (lib/cpu/pdp12/SLPDP12CPU.sleela)

SLPDP12CPU class extends SLCPURuntime

Defines SLPDP12CPU — a runnable model of the DEC PDP-12. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-12 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP14CPU #sleela 2.5 (lib/cpu/pdp14/SLPDP14CPU.sleela)

SLPDP14CPU class extends SLCPURuntime

Defines SLPDP14CPU — a runnable model of the DEC PDP-14. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-14 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP15CPU #sleela 2.5 (lib/cpu/pdp15/SLPDP15CPU.sleela)

SLPDP15CPU class extends SLCPURuntime

Defines SLPDP15CPU — a runnable model of the DEC PDP-15. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-15 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP1CPU #sleela 2.5 (lib/cpu/pdp1/SLPDP1CPU.sleela)

SLPDP1CPU class extends SLCPURuntime

Defines SLPDP1CPU — a runnable model of the DEC PDP-1. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-1 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP4CPU #sleela 2.5 (lib/cpu/pdp4/SLPDP4CPU.sleela)

SLPDP4CPU class extends SLCPURuntime

Defines SLPDP4CPU — a runnable model of the DEC PDP-4. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-4 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP5CPU #sleela 2.5 (lib/cpu/pdp5/SLPDP5CPU.sleela)

SLPDP5CPU class extends SLCPURuntime

Defines SLPDP5CPU — a runnable model of the DEC PDP-5. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-5 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP6CPU #sleela 2.5 (lib/cpu/pdp6/SLPDP6CPU.sleela)

SLPDP6CPU class extends SLCPURuntime

Defines SLPDP6CPU — a runnable model of the DEC PDP-6. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-6 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP7CPU #sleela 2.5 (lib/cpu/pdp7/SLPDP7CPU.sleela)

SLPDP7CPU class extends SLCPURuntime

Defines SLPDP7CPU — a runnable model of the DEC PDP-7. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-7 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPDP8CPU #sleela 2.5 (lib/cpu/pdp8/SLPDP8CPU.sleela)

SLPDP8CPU class extends SLCPURuntime

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
machineModelString machineModel = ""No description in source.
strictProfileBoolean strictProfile = trueNo description in source.
extendedArithmeticEnabledBoolean extendedArithmeticEnabled = falseNo description in source.
memoryExtensionEnabledBoolean memoryExtensionEnabled = falseNo description in source.
accumulatorInteger accumulator = 0No description in source.
linkInteger link = 0No description in source.
instructionRegisterInteger instructionRegister = 0No description in source.
currentInstructionAddressInteger currentInstructionAddress = 0No description in source.
memoryWordsInteger memoryWords = 4096No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()Standard entry point: bring up the inherited runtime (12-bit data, 12-bit address, a small register file for AC/LINK/PC) and apply a default PDP-8/E profile. Call configureModel(...) to select a specific machine profile.
configureModelvoid configureModel(String selectedMachineModel,No description in source.
resetArchitecturalStatevoid resetArchitecturalState()No description in source.
maskWord12int maskWord12(Integer value)No description in source.
readPdpWordInteger readPdpWord(Integer address)No description in source.
writePdpWordvoid writePdpWord(Integer address, Integer value)No description in source.
setLinkvoid setLink(Integer value)No description in source.
requireFeaturevoid requireFeature(Boolean enabled, String featureName)No description in source.
getMachineModelString getMachineModel()No description in source.
getAccumulatorInteger getAccumulator()No description in source.
getLinkInteger getLink()No description in source.

SLPDP9CPU #sleela 2.5 (lib/cpu/pdp9/SLPDP9CPU.sleela)

SLPDP9CPU class extends SLCPURuntime

Defines SLPDP9CPU — a runnable model of the DEC PDP-9. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC PDP-9 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPicoCPU #sleela 2.5 (lib/cpu/sega-pico/SLPicoCPU.sleela)

SLPicoCPU class extends SLCPURuntime

Defines SLPicoCPU — a runnable model of the Sega Pico (68000). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Pico (68000) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPlayStation1CPU #sleela 2.5 (lib/cpu/playstation-1/SLPlayStation1CPU.sleela)

SLPlayStation1CPU class extends SLCPURuntime

Defines SLPlayStation1CPU — a runnable model of the PlayStation (MIPS R3000A). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PlayStation (MIPS R3000A) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 33No description in source.
R_LINKstatic final int R_LINK = 32No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPlayStation2CPU #sleela 2.5 (lib/cpu/playstation-2/SLPlayStation2CPU.sleela)

SLPlayStation2CPU class extends SLCPURuntime

Defines SLPlayStation2CPU — a runnable model of the PlayStation 2 (Emotion Engine / MIPS). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PlayStation 2 (Emotion Engine / MIPS) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 33No description in source.
R_LINKstatic final int R_LINK = 32No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPlayStation3CPU #sleela 2.5 (lib/cpu/playstation-3/SLPlayStation3CPU.sleela)

SLPlayStation3CPU class extends SLCPURuntime

Defines SLPlayStation3CPU — a runnable model of the PlayStation 3 (Cell / PowerPC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PlayStation 3 (Cell / PowerPC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPlayStation4CPU #sleela 2.5 (lib/cpu/playstation-4/SLPlayStation4CPU.sleela)

SLPlayStation4CPU class extends SLCPURuntime

Defines SLPlayStation4CPU — a runnable model of the PlayStation 4 (x86-64 Jaguar). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PlayStation 4 (x86-64 Jaguar) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPlayStation5CPU #sleela 2.5 (lib/cpu/playstation-5/SLPlayStation5CPU.sleela)

SLPlayStation5CPU class extends SLCPURuntime

Defines SLPlayStation5CPU — a runnable model of the PlayStation 5 (x86-64 Zen 2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PlayStation 5 (x86-64 Zen 2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPOWERCPU #sleela 2.5 (lib/cpu/power/SLPOWERCPU.sleela)

SLPOWERCPU class extends SLCPURuntime

Defines SLPOWERCPU — a runnable model of the IBM POWER1. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM POWER1 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLPowerPCCPU #sleela 2.5 (lib/cpu/powerpc/SLPowerPCCPU.sleela)

SLPowerPCCPU class extends SLCPURuntime

Defines SLPowerPCCPU — a runnable model of the PowerPC 601. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the PowerPC 601 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLProcess #sleela 2.5 (lib/cpu/SLProcess.sleela)

SLProcess class

Defines SLProcess — a unit of execution the OS schedules: a process control block (PCB). It records the process id, its state (new, ready, running, blocked, terminated), its saved program counter and a few saved registers (its context), its memory base, and accounting. The scheduler switches the CPU between processes by saving/restoring this. Family: cpu. Pure Sleela OS data structure.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
NEWstatic final int NEW = 0No description in source.
READYstatic final int READY = 1No description in source.
RUNNINGstatic final int RUNNING = 2No description in source.
BLOCKEDstatic final int BLOCKED = 3No description in source.
TERMINATEDstatic final int TERMINATED = 4No description in source.
pidint pidNo description in source.
nameString nameNo description in source.
stateint stateNo description in source.
priorityint priorityNo description in source.
savedPCint savedPCSaved context (restored on dispatch).
memoryBaseint memoryBaseNo description in source.
entryPointint entryPointNo description in source.
quantaUsedint quantaUsedscheduler accounting

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int id, String procName, int entry, int base, int prio)No description in source.
markReadyvoid markReady()No description in source.
markRunningvoid markRunning()No description in source.
markBlockedvoid markBlocked()No description in source.
terminatevoid terminate()No description in source.
saveContextvoid saveContext(SLCore core)Save the live core state into the PCB (context switch out).
restoreContextvoid restoreContext(SLCore core)Restore this PCB into the live core (context switch in).
chargeQuantumvoid chargeQuantum()No description in source.
processIdint processId()No description in source.
processNameString processName()No description in source.
processStateint processState()No description in source.
entryint entry()No description in source.
baseint base()No description in source.
runnableboolean runnable()No description in source.
aliveboolean alive()No description in source.

SLProgram #sleela 2.5 (lib/cpu/SLProgram.sleela)

SLProgram class

Defines SLProgram — an executable image: a sequence of encoded

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
entryPointint entryPointNo description in source.
lengthint lengthinstruction count
imageSLRAM imagestaging buffer holding the encoded words
timingSLTimingManifest timingstated operating point (null until attached)
accessSLAccessManifest accessstated access semantics (null until attached)
docMemTierint docMemTierDocument-level memory tier: flags the WHOLE program with a default tier (SLMemoryTierRouter.TIER_*): 0 none (accurate/DDR5 default), 1 usual (DDR2), 2 accurate (DDR5). A method's own usualmem/accuratemem tier overrides this; any method that declares no tier inherits this document default. This is the "flag the entire document" lever; per-method flags handle any subset.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String programName, int capacityWords)No description in source.
setDocumentTiervoid setDocumentTier(int tier)Flag the entire document's default tier. `usualmem` on the program means "everything is usual unless a method says otherwise"; likewise accurate.
documentTierint documentTier()No description in source.
effectiveTierint effectiveTier(int methodTier)The EFFECTIVE tier for a method: the method's own tier when it declares one (usualmem/accuratemem), else the document default, else accurate (2).
setEntryPointvoid setEntryPoint(int addr)No description in source.
attachTimingvoid attachTiming(SLTimingManifest manifest)Attach the stated timing/voltage/expertise manifest this image was compiled for. The loader and VM read it instead of inferring an operating point.
timingManifestSLTimingManifest timingManifest()No description in source.
hasTimingboolean hasTiming()No description in source.
timingHonoredboolean timingHonored()True only when the image declares an operating point AND that point was sealed honored at compile time — the consumer may trust it as stated.
attachAccessvoid attachAccess(SLAccessManifest manifest)Attach the stated access-semantics manifest (public/private/protected as system roles). The VM reads it to stand up the System backdrop instead of guessing a file-network topology.
accessManifestSLAccessManifest accessManifest()No description in source.
hasAccessboolean hasAccess()No description in source.
accessCompetentboolean accessCompetent()True only when the image declares access semantics AND they were sealed as a competent backdrop the consumer may realize as stated.
appendint append(int encodedWord)Append one encoded instruction word to the image.
wordAtint wordAt(int index)No description in source.
sizeint size()No description in source.
entryint entry()No description in source.
programNameString programName()No description in source.

SLProgramCounter #sleela 2.5 (lib/cpu/SLProgramCounter.sleela)

SLProgramCounter class

Defines SLProgramCounter (PC) — the register holding the address of the next instruction to fetch. Each cycle it either increments to the following instruction or is overwritten by a branch/jump target. It is a specialized SLRegister with increment and branch operations. Family: cpu. Specializes the register abstraction.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
regSLRegister regNo description in source.
strideint stridebytes/words advanced per sequential instruction

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int bits, int step)No description in source.
resetvoid reset()No description in source.
valueint value()No description in source.
incrementint increment()Sequential advance to the next instruction.
branchToint branchTo(int target)Non-sequential transfer of control (jump/branch/call target).

SLProgramLoader #sleela 2.5 (lib/cpu/SLProgramLoader.sleela)

SLProgramLoader class

Defines SLProgramLoader — the OS loader that copies an SLProgram image into main memory at a chosen load address, registers the entry point, and asks the OS to spawn it as a process. This is the final link: it takes an assembled Sleela program and makes it a running process on the Sleela CPU under the Sleela OS. Family: cpu. Composes SLOperatingSystem, SLRAM, SLProgram, SLProcess.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
osSLOperatingSystem osNo description in source.
memorySLRAM memoryNo description in source.
compilerSLCompilerDriver compilermulti-language front-end driver
loadedint loadedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLOperatingSystem operatingSystem, SLRAM ram)No description in source.
attachCompilervoid attachCompiler(SLInstructionSet isa)Attach the ISA so the loader can compile source in any supported language.
loadSLProcess load(SLProgram program, int loadAddr)Copy an already-compiled program image into memory starting at loadAddr, then spawn it. Returns the created process.
loadSourceSLProcess loadSource(String path, int langId, String programName, int loadAddr)Compile a source file in ANY supported language (C, C++, Java, Sleela) to a program image via the shared frontend/IR/backend pipeline, then load it. This is the multi-language loader entry point.
loadFileSLProcess loadFile(String path, String programName, int loadAddr)Convenience: infer the language from the file extension.
compilerDriverSLCompilerDriver compilerDriver()No description in source.
programsLoadedint programsLoaded()No description in source.

SLRAM #sleela 2.5 (lib/cpu/SLRAM.sleela)

SLRAM class

Defines SLRAM — random-access main memory: a word-addressable store the CPU reads instructions and data from. It models capacity, word width, and access counting, and crosses the explicit VM/OS bridge to the native memory subsystem for the actual backing cells (SLeeLa's surface has no large array storage, so bulk cells live below the bridge). Addressing is by word index; out-of-range access is rejected. Family: cpu. Native backing store via bridge.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
wordCountint wordCountnumber of addressable words
widthint widthbits per word
handleint handlenative backing-store handle (0 until allocated)
readsint readsNo description in source.
writesint writesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int words, int bits)No description in source.
allocateint allocate()Allocate the native backing store (zero-initialized).
inRangeboolean inRange(int addr)No description in source.
readWordint readWord(int addr)No description in source.
writeWordint writeWord(int addr, int value)No description in source.
freevoid free()No description in source.
capacityWordsint capacityWords()No description in source.
capacityBytesint capacityBytes()No description in source.

SLRamTiming #sleela 2.5 (lib/cpu/SLRamTiming.sleela)

SLRamTiming class

Defines SLRamTiming — the expert memory-timing settings of a RAM channel, stated the way a DRAM datasheet / BIOS does: the actual data rate (MT/s), the Vddq rail, and the primary timings CL, tRCD, tRP, tRAS, tRC and command rate as CLOCK CYCLES, plus the derived nanosecond latencies those cycles cost at the dialed data rate. Rather than assume memory keeps up, each primary timing becomes a named SLTiming budget checked against the bus period, and the first-word read latency is reported in real nanoseconds. Expert knobs are explicit: an operator tightens CL/tRCD/tRP/tRAS and the class recomputes real access latency and re-checks every budget against the settled Vddq, so tightening past what the voltage honors is refused. Family: cpu. Composes SLTiming and SLVoltageRail; partners SLRAM/SLBusTiming.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString namenameful: "DIMM-A ch0", ...
dataRateMTsint dataRateMTstransfers per second, millions (e.g. 3200 = DDR4-3200)
minMTsint minMTslowest data rate the operator may dial
maxMTsint maxMTshighest validated data rate
clint clPrimary timings, in command-clock CYCLES (the datasheet surface). CAS latency: read command -> first data
trcdint trcdRAS-to-CAS delay: activate -> read/write
trpint trprow precharge: precharge -> next activate
trasint trasrow active time: activate -> precharge
trcint trcrow cycle: activate -> activate (same bank)
commandRateint commandRate1 (1T) or 2 (2T) command rate
vddqSLVoltageRail vddqthe DRAM I/O supply rail
mvPerStepint mvPerStepsettled Vddq each extra MT/s step of ceiling needs
stepMTsint stepMTsthe MT/s granularity one voltage step buys
casBudgetSLTiming casBudgetCAS-to-DQ named budget
rcdBudgetSLTiming rcdBudgetactivate-to-CAS named budget
rpBudgetSLTiming rpBudgetprecharge named budget

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String channelName, int rateMTs, int floorMTs, int ceilingMTs)No description in source.
attachVddqvoid attachVddq(SLVoltageRail rail, int millivoltsPerStep, int mtsPerStep)No description in source.
commandClockMHzint commandClockMHz()The command clock runs at half the data rate on DDR (two transfers per command clock). Period of one command clock, in picoseconds.
commandPeriodPsint commandPeriodPs()No description in source.
setCLvoid setCL(int cycles)Set each primary timing (in command-clock cycles). Larger = looser/safer.
setTRCDvoid setTRCD(int cycles)No description in source.
setTRPvoid setTRP(int cycles)No description in source.
setTRASvoid setTRAS(int cycles)No description in source.
setTRCvoid setTRC(int cycles)No description in source.
setCommandRatevoid setCommandRate(int t)No description in source.
setDataRateint setDataRate(int mts)Dial the data rate, clamped into [min,max] and into what settled Vddq supports. DDR data rate changes the command period every budget rides on.
voltageCeilingMTsint voltageCeilingMTs()No description in source.
restampvoid restamp()Re-derive each budget. A primary timing of N command-clocks must physically complete inside N clock periods: the window the controller allows is N periods, and the DRAM's internal settle (modeled as the array's fixed ~ns access translated back into this period) must fit with margin. We model the settle as (N-1) periods of propagation, so a tighter N shrinks the slack — tighten too far and the budget stops being honored.
firstWordLatencyNsint firstWordLatencyNs()First-word read latency in nanoseconds: (tRCD + CL) command-clocks times the command period, divided by 1000 ps/ns.
randomAccessLatencyNsint randomAccessLatencyNs()Random full-row access latency in ns: tRP (close) + tRCD (open) + CL.
honoredboolean honored()Honored when tRAS >= tRCD + CL (row stays open long enough to read it), tRC >= tRAS + tRP (the row cycle closes cleanly), and Vddq is in limits.
channelNameString channelName()No description in source.
dataRateint dataRate()No description in source.
casLatencyint casLatency()No description in source.
rasToCasint rasToCas()No description in source.
rowPrechargeint rowPrecharge()No description in source.
rowActiveint rowActive()No description in source.
rowCycleint rowCycle()No description in source.
commandRateTint commandRateT()No description in source.

SLRegister #sleela 2.5 (lib/cpu/SLRegister.sleela)

SLRegister class

Defines SLRegister — an N-bit register: a word of storage that loads on a clock edge. Conceptually a row of SLFlipFlop cells sharing one clock and one load-enable. Registers hold the CPU's working values (the general-purpose registers, the program counter, the status word). This class stores the word as an integer for efficiency but models the clocked, load-enabled flip-flop behavior exactly. Family: cpu. Clocked storage.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
widthint widthNo description in source.
valueint valueNo description in source.
loadEnableint loadEnableNo description in source.
lastClkint lastClkNo description in source.
writesint writesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String regName, int bits)No description in source.
pow2int pow2(int n)No description in source.
maskint mask()No description in source.
setInputvoid setInput(int v)combinational input staging
enableLoadvoid enableLoad()No description in source.
disableLoadvoid disableLoad()No description in source.
clockint clock(int clk, int input)Clocked load. On the rising edge, if load is enabled, capture the input (already truncated to the register width).
loadint load(int input)Direct load helper (one clocked write), convenient for drivers.
readint read()No description in source.
regNameString regName()No description in source.
bitWidthint bitWidth()No description in source.

SLRegisterFile #sleela 2.5 (lib/cpu/SLRegisterFile.sleela)

SLRegisterFile class

Defines SLRegisterFile — the bank of general-purpose registers a CPU core reads and writes each cycle. Real cores expose on the order of 16-32 architectural registers with multiple read ports and one or more write ports; this models a configurable count with one write and two reads per access (the classic RISC pattern feeding the ALU). Backed by SLRegister cells; indexed access with bounds checking. Family: cpu. Composes SLRegister.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
countint countNo description in source.
widthint widthNo description in source.
readsint readsNo description in source.
writesint writesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int regCount, int bits)SLeeLa surface has no array storage; model up to 16 registers as fields, which matches a typical architectural register count.
pow2int pow2(int n)No description in source.
clampWordint clampWord(int v)No description in source.
writevoid write(int index, int v)No description in source.
readint read(int index)No description in source.
registerCountint registerCount()No description in source.

SLRISCVCPU #sleela 2.5 (lib/cpu/riscv/SLRISCVCPU.sleela)

SLRISCVCPU class extends SLCPURuntime

Defines SLRISCVCPU — a runnable model of RV32I: 32 integer registers (x0 hardwired to zero), a program counter, and a small CSR file. It extends SLCPURuntime and adds the RISC-V register conventions, an immediate generator, a decoder for a compact R/I/B/J encoding, and the trap / system-instruction hooks the skeleton named. Instruction model (op in bits 24..31, rd in 16..23, rs1 in 8..15, rs2/imm in 0..7): ADD / SUB / ADDI / LW / SW / BEQ / BNE / JAL / ECALL(trap+halt) / NOP. x0 reads as zero and discards writes, matching the architecture. Compact teaching encoding, enough to run the CPU and host further .sleela inputs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
ADDstatic final int ADD = 1No description in source.
SUBstatic final int SUB = 2No description in source.
ADDIstatic final int ADDI = 3No description in source.
LWstatic final int LW = 4No description in source.
SWstatic final int SW = 5No description in source.
BEQstatic final int BEQ = 6No description in source.
BNEstatic final int BNE = 7No description in source.
JALstatic final int JAL = 8No description in source.
ECALLstatic final int ECALL = 9No description in source.
CSR_MSTATUSstatic final int CSR_MSTATUS = 32A few CSRs modelled as named registers above the GPR file.
CSR_MCAUSEstatic final int CSR_MCAUSE = 33No description in source.
CSR_MEPCstatic final int CSR_MEPC = 34No description in source.
xlenint xlenregister width (32 for RV32)
isaExtensionsString isaExtensionse.g. "IMAFD"
privilegeint privilege0 U, 1 S, 3 M

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String extensions)No description in source.
xint x(int i)No description in source.
setXvoid setX(int i, int v)No description in source.
opOfint opOf(int w)No description in source.
rdOfint rdOf(int w)No description in source.
rs1Ofint rs1Of(int w)No description in source.
rs2ImmOfint rs2ImmOf(int w)No description in source.
immediateint immediate(int w)Immediate generator: sign-extend the compact 8-bit immediate field.
decodevoid decode(int word)No description in source.
systemInstructionvoid systemInstruction()ECALL: record the trap in CSRs and halt (environment call to the host/VM). mcause 11 = ecall from M
trapvoid trap(int cause)No description in source.
interruptvoid interrupt(int vector)No description in source.
encodeRint encodeR(int op, int rd, int rs1, int rs2)No description in source.
encodeIint encodeI(int op, int rd, int rs1, int imm)No description in source.
regint reg(int i)No description in source.
csrint csr(int i)No description in source.
registerWidthint registerWidth()No description in source.
extensionsString extensions()No description in source.

SLRockchipCPU #sleela 2.5 (lib/cpu/rockchip/SLRockchipCPU.sleela)

SLRockchipCPU class extends SLCPURuntime

Defines SLRockchipCPU — a runnable model of the Rockchip (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Rockchip (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLROMPCPU #sleela 2.5 (lib/cpu/romp/SLROMPCPU.sleela)

SLROMPCPU class extends SLCPURuntime

Defines SLROMPCPU — a runnable model of the IBM ROMP. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM ROMP register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSaturnCPU #sleela 2.5 (lib/cpu/sega-saturn/SLSaturnCPU.sleela)

SLSaturnCPU class extends SLCPURuntime

Defines SLSaturnCPU — a runnable model of the Sega Saturn (SH-2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega Saturn (SH-2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLScheduler #sleela 2.5 (lib/cpu/SLScheduler.sleela)

SLScheduler class

Defines SLScheduler — the OS component that decides which ready process runs next and for how long. This models a round-robin scheduler with a fixed time quantum: the timer interrupt preempts the running process at the end of its quantum and the scheduler rotates to the next ready one. Holds up to 8 processes (SLeeLa surface has no arrays); enough to demonstrate multiprogramming on the modeled machine. Family: cpu. Composes SLProcess.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAX_PROCstatic final int MAX_PROC = 8No description in source.
countint countNo description in source.
currentint currentindex of the running process
quantumint quantumticks per time slice
switchesint switchesNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int timeQuantum)No description in source.
admitint admit(SLProcess p)No description in source.
atSLProcess at(int idx)No description in source.
pickNextint pickNext()Pick the next runnable process after `current`, round-robin.
scheduleSLProcess schedule(SLCore core)Preempt the current process and dispatch the next onto the given core.
quantumTicksint quantumTicks()No description in source.
processCountint processCount()No description in source.
contextSwitchesint contextSwitches()No description in source.
runningSLProcess running()No description in source.

SLSega32XCPU #sleela 2.5 (lib/cpu/sega-32x/SLSega32XCPU.sleela)

SLSega32XCPU class extends SLCPURuntime

Defines SLSega32XCPU — a runnable model of the Sega 32X (SH-2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega 32X (SH-2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSG1000CPU #sleela 2.5 (lib/cpu/sega-sg-1000/SLSG1000CPU.sleela)

SLSG1000CPU class extends SLCPURuntime

Defines SLSG1000CPU — a runnable model of the Sega SG-1000 (Z80). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sega SG-1000 (Z80) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSHARCCPU #sleela 2.5 (lib/cpu/sharc/SLSHARCCPU.sleela)

SLSHARCCPU class extends SLCPURuntime

Defines SLSHARCCPU — a runnable model of the Analog Devices SHARC. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Analog Devices SHARC register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSiFiveU74CPU #sleela 2.5 (lib/cpu/sifive-u74/SLSiFiveU74CPU.sleela)

SLSiFiveU74CPU class extends SLCPURuntime

Defines SLSiFiveU74CPU — a runnable model of the SiFive U74 (RISC-V RV64GC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the SiFive U74 (RISC-V RV64GC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSleelaOpcode #sleela 2.5 (lib/cpu/SLSleelaOpcode.sleela)

SLSleelaOpcode class

Defines SLSleelaOpcode — the canonical SLeeLa VM opcode registry,

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
OP_NOPstatic final int OP_NOP=0; static final int OP_CONST=1; static final int OP_POP=2; static final int OP_DUP=3Base computational/service core, in exact native numeric order. These are the Turing-complete subset the CPU ISA and OS syscalls lower onto; the native enum continues past them with extended host-facing opcodes.
OP_LOADGstatic final int OP_LOADG=4; static final int OP_STOREG=5; static final int OP_LOADL=6; static final int OP_STOREL=7No description in source.
OP_ADDstatic final int OP_ADD=8; static final int OP_SUB=9; static final int OP_MUL=10; static final int OP_DIV=11No description in source.
OP_MODstatic final int OP_MOD=12; static final int OP_NEG=13; static final int OP_EQ=14; static final int OP_NE=15No description in source.
OP_LTstatic final int OP_LT=16; static final int OP_LE=17; static final int OP_GT=18; static final int OP_GE=19No description in source.
OP_ANDstatic final int OP_AND=20; static final int OP_OR=21; static final int OP_NOT=22; static final int OP_JMP=23No description in source.
OP_JMPFstatic final int OP_JMPF=24; static final int OP_CALL=25; static final int OP_RET=26; static final int OP_PRINT=27No description in source.
OP_SPAWNstatic final int OP_SPAWN=28; static final int OP_JOINALL=29; static final int OP_LOCK=30; static final int OP_UNLOCK=31No description in source.
OP_SENDstatic final int OP_SEND=32; static final int OP_RECV=33; static final int OP_LISTEN=34; static final int OP_ACCEPT=35No description in source.
OP_CONNECTstatic final int OP_CONNECT=36; static final int OP_SOCKREAD=37; static final int OP_SOCKWRITE=38; static final int OP_SOCKCLOSE=39No description in source.
OP_PIPEstatic final int OP_PIPE=40; static final int OP_PIPEPEER=41; static final int OP_FIFO_MK=42; static final int OP_FILEOPEN=43No description in source.
OP_FILEREADstatic final int OP_FILEREAD=44; static final int OP_FILEWRITE=45; static final int OP_FILECLOSE=46; static final int OP_FILEUNLINK=47No description in source.
OP_HALTstatic final int OP_HALT=48No description in source.
OP_NEWSTRUCTstatic final int OP_NEWSTRUCT=58; static final int OP_GETFIELD=59; static final int OP_SETFIELD=60Time services 49..57, structs 58..62 (available to the substrate).
BASE_COUNTstatic final int BASE_COUNT = 49--- Double-shelf opcode tiers -------------------------------------------- The native substrate (impl/core/sleela_core.h `SLOp`) defines 156 opcodes (codes 0..154). All are acceptable; the tiers below do not gate execution, they let the professional monitoring/storage layer tag each opcode by the SHELF it belongs to and iterate each shelf under its own flag. The three shelves are contiguous half-open ranges [prev, COUNT): Shelf 1 codes 0..48 base computational/service core (through OP_HALT): arithmetic, control flow, call/return, threads, sockets, pipes, files. The Turing-complete subset the CPU ISA + syscalls lower onto. Shelf 2 codes 49..97 substrate extensions: time services, structs, Synchro / Munction / Best-of. Part of the canonical substrate. Shelf 3 codes 98..154 host-facing services: arrays, OS syscalls, GC hint, `ran::`, Idea realtime canvas, VM-select / Modium, UI bridge, structural send, runtime type checks, and two-entry stack duplication. end of shelf 1 (base core), exclusive
SUBSTRATE_COUNTstatic final int SUBSTRATE_COUNT = 98end of shelf 2 (substrate), exclusive
NATIVE_COUNTstatic final int NATIVE_COUNT = 156end of shelf 3 (full native enum), exclusive. Includes host-facing services through OP_OSLS_CALL (155) OP_UI_CALL (150), OP_SSEND (151), OP_CHECKCAST (152), OP_INSTANCEOF (153), OP_DUP2 (154), and OP_OSLS_CALL (155): the real opcodes are 0..155, so the count is 156.
OP_UI_CALLstatic final int OP_UI_CALL = 150OP_SSEND (151): the ::: structural-offload send. A host-shelf service opcode that frames a String source element-by-element into a receiver reach.
OP_SSENDstatic final int OP_SSEND = 151No description in source.
OP_CHECKCASTstatic final int OP_CHECKCAST = 152No description in source.
OP_INSTANCEOFstatic final int OP_INSTANCEOF = 153No description in source.
OP_DUP2static final int OP_DUP2 = 154No description in source.
OP_OSLS_CALLstatic final int OP_OSLS_CALL = 155No description in source.
TIER_NONEstatic final int TIER_NONE = 0Tier ids the monitoring/storage layer pivots on (the "iteration flags"). not a native opcode (out of range)
TIER_BASEstatic final int TIER_BASE = 1shelf 1: base computational/service core
TIER_SUBSTRATEstatic final int TIER_SUBSTRATE = 2shelf 2: substrate extensions
TIER_HOSTstatic final int TIER_HOST = 3shelf 3: host-facing services
codeint codeNo description in source.
mnemonicString mnemonicNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int opcode, String name)No description in source.
validboolean valid(int opcode)Any native opcode is acceptable; validity is the full 0..NATIVE_COUNT range.
isBaseboolean isBase(int opcode)Per-shelf acceptance checks (all acceptable; these name WHICH shelf).
isSubstrateboolean isSubstrate(int opcode)No description in source.
isHostboolean isHost(int opcode)No description in source.
tierint tier(int opcode)The shelf an opcode sits on, as a TIER_* flag — the value the professional monitoring/storage layer records per opcode and iterates each shelf under.
tierNameString tierName(int opcode)No description in source.
baseShelfCountint baseShelfCount()Count of opcodes on each shelf, for sizing per-shelf monitoring/storage. 49
substrateShelfCountint substrateShelfCount()49
hostShelfCountint hostShelfCount()58
isStackPushboolean isStackPush(int op)Classification used by the mapping/equivalence layers.
isArithmeticboolean isArithmetic(int op)No description in source.
isComparisonboolean isComparison(int op)No description in source.
isLogicboolean isLogic(int op)No description in source.
isControlboolean isControl(int op)No description in source.
isServiceboolean isService(int op)The I/O + OS-service opcodes a system-call layer maps onto.
nameOfString nameOf(int op)No description in source.
baseCountint baseCount()Shelf-boundary reporters (exclusive upper bounds). base core: 0..48
substrateCountint substrateCount()+ substrate: 0..97
nativeCountint nativeCount()full native set: 0..149

SLSleelaVM #sleela 2.5 (lib/cpu/SLSleelaVM.sleela)

SLSleelaVM class

Defines SLSleelaVM — a stack machine that executes the canonical SLeeLa opcodes (SLSleelaOpcode) directly. It mirrors the native dispatch loop in impl/core/sleela_core.c ("in = code[ip++]; switch(in.op){...}"): fetch one opcode, execute it against an operand stack and globals, advance. This is the Turing-complete substrate of the entire CPU model. Every higher layer — the register-style SLControlUnit, the OS system calls, and all four language frontends — ultimately produces a stream of these opcodes, and this VM gives that stream its meaning. Running the same effect here and on the native VM is what makes the equivalence (SLTuringBridge) concrete. Operand stack and globals are modeled over SLRAM so arbitrarily large computations are expressible (unbounded tape => Turing-complete). Family: cpu. Composes SLSleelaOpcode, SLStack, SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
opSLSleelaOpcode opNo description in source.
codeOpsSLRAM codeOpsopcode of each instruction
codeArgsSLRAM codeArgsimmediate operand of each instruction
stackSLRAM stackoperand stack (grows up)
globalsSLRAM globalsglobal slots
codeLenint codeLenNo description in source.
ipint ipinstruction pointer
spint spoperand-stack pointer
haltedint haltedNo description in source.
executedint executedNo description in source.
lastPrintint lastPrintlast value sent to OP_PRINT (observable output)
hostedint hostedVM-exit mechanism (step 5): when hosted under a hypervisor, a service opcode does not act inline — it parks a pending exit so the host can route it (to a device / syscall emulation) and resume. hosted==0 keeps the standalone behavior (PRINT acts directly), so SLSleelaVM is usable both bare and virtualized. 1 = park service opcodes as VM-exits
exitPendingint exitPending1 = execution paused awaiting host handling
exitOpcodeint exitOpcodethe service opcode that caused the exit
exitArgint exitArgits immediate
exitPayloadint exitPayloadthe stack value it carried (e.g. the char to print)
timingSLTimingManifest timingStated operating point (step: honor declared timings). When a compiled .sleela image carries an SLTimingManifest, the VM adopts it here and reports the DECLARED clocks/voltages instead of assuming hardware quality.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int codeCap, int stackCap, int globalCap)No description in source.
adoptTimingvoid adoptTiming(SLTimingManifest manifest)Adopt the operating point a compiled image declares. After this the VM operates the STATED timings (clocks/voltages/tier) rather than inferring the quality of the CPU it is modeled on.
adoptProgramTimingvoid adoptProgramTiming(SLProgram prog)Convenience: pull the manifest straight off a compiled program.
hasTimingboolean hasTiming()No description in source.
timingManifestSLTimingManifest timingManifest()No description in source.
declaredCoreMHzint declaredCoreMHz()The core clock (MHz) the image was compiled for, or 0 if it stated none — the VM never fabricates a frequency it was not told.
setHostedvoid setHosted()Enable hosted mode: service opcodes park VM-exits instead of acting inline.
exitingboolean exiting()No description in source.
exitReasonOpcodeint exitReasonOpcode()No description in source.
exitReasonArgint exitReasonArg()No description in source.
exitReasonPayloadint exitReasonPayload()No description in source.
resolveExitvoid resolveExit()Host clears the exit after servicing it so the guest can resume.
pushResultvoid pushResult(int value)Host pushes a syscall return value onto the operand stack for the guest.
emitint emit(int opcode, int arg)Load one opcode+arg into the code store.
pushvoid push(int v)Stack helpers.
popint pop()No description in source.
stepint step()Execute exactly one opcode (the one-at-a-time native contract).
parkExitvoid parkExit(int opcode, int arg, int payload)Park a VM-exit: record the service opcode and pause execution until the host resolves it (step 5).
boolIntint boolInt(boolean b)No description in source.
printValuevoid printValue(int v)No description in source.
runint run(int budget)Run until HALT, a pending VM-exit (hosted mode), or budget exhausted.
opcodeAtIndexint opcodeAtIndex(int i)Read back a loaded code slot (used by the kernel builder to package an image).
argAtIndexint argAtIndex(int i)No description in source.
instructionPointerint instructionPointer()Instruction-pointer access, for guest context switches (step 6): the guest scheduler saves the preempted task's ip and restores the next task's.
setInstructionPointervoid setInstructionPointer(int newIp)No description in source.
topint top()No description in source.
printedint printed()No description in source.
instructionsRunint instructionsRun()No description in source.
isHaltedboolean isHalted()No description in source.
programLengthint programLength()No description in source.

SLSnapdragonCPU #sleela 2.5 (lib/cpu/qualcomm-snapdragon/SLSnapdragonCPU.sleela)

SLSnapdragonCPU class extends SLCPURuntime

Defines SLSnapdragonCPU — a runnable model of the Qualcomm Snapdragon (ARM64). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Qualcomm Snapdragon (ARM64) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSNESCPU #sleela 2.5 (lib/cpu/nintendo-snes/SLSNESCPU.sleela)

SLSNESCPU class extends SLCPURuntime

Defines SLSNESCPU — a runnable model of the Nintendo SNES (65C816). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo SNES (65C816) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSparcCPU #sleela 2.5 (lib/cpu/sparc/SLSparcCPU.sleela)

SLSparcCPU class extends SLCPURuntime

Defines SLSparcCPU — a runnable model of the SPARC V8. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the SPARC V8 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLStack #sleela 2.5 (lib/cpu/SLStack.sleela)

SLStack class

Defines SLStack — the hardware call/data stack a core uses for PUSH/POP and for CALL/RET return addresses. It is a region of main memory addressed through a stack pointer (SP) that grows downward from a base, the classic convention on x86/ARM. The control unit drives it; the OS gives each process its own stack region. Grows downward: push decrements SP then writes; pop reads then increments. Overflow (past the limit) and underflow (past the base) are reported, not silently wrapped. Family: cpu. Composes SLRAM.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
memorySLRAM memoryNo description in source.
baseint basehighest address of the stack region (SP starts here)
limitint limitlowest address the stack may reach
spint spstack pointer
pushesint pushesNo description in source.
popsint popsNo description in source.
faultedint faultedset on overflow/underflow

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(SLRAM ram, int stackBase, int stackLimit)No description in source.
emptyboolean empty()No description in source.
fullboolean full()No description in source.
pushint push(int value)Push a word: pre-decrement SP, then store. Returns new SP, or -1 on overflow.
popint pop()Pop a word: read at SP, then post-increment. Returns the value, or -1 on underflow.
peekint peek()No description in source.
pointerint pointer()No description in source.
setPointervoid setPointer(int newSp)No description in source.
depthint depth()No description in source.
faultingboolean faulting()No description in source.
clearFaultvoid clearFault()No description in source.

SLStatusRegister #sleela 2.5 (lib/cpu/SLStatusRegister.sleela)

SLStatusRegister class

Defines SLStatusRegister — the processor status word (FLAGS). It holds the condition flags the ALU sets (zero, negative, carry, overflow) and the mode/interrupt-enable bits the control unit and OS use. Conditional branches read this register. Family: cpu. Pure Sleela state.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
zeroint zeroNo description in source.
negativeint negativeNo description in source.
carryint carryNo description in source.
overflowint overflowNo description in source.
interruptEnableint interruptEnableNo description in source.
supervisorint supervisor1 = kernel/supervisor mode, 0 = user mode

Methods — the actions this unit can perform.

MethodSignatureWhat it does
resetvoid reset()No description in source.
setFromALUvoid setFromALU(SLALU alu)No description in source.
enableInterruptsvoid enableInterrupts()No description in source.
disableInterruptsvoid disableInterrupts()No description in source.
enterUserModevoid enterUserMode()No description in source.
enterSupervisorModevoid enterSupervisorMode()No description in source.
zeroFlagint zeroFlag()No description in source.
negativeFlagint negativeFlag()No description in source.
carryFlagint carryFlag()No description in source.
overflowFlagint overflowFlag()No description in source.
interruptsEnabledboolean interruptsEnabled()No description in source.
inSupervisorboolean inSupervisor()No description in source.

SLStorageDevice #sleela 2.5 (lib/cpu/components/SLStorageDevice.sleela)

SLStorageDevice class

Defines SLStorageDevice — a selectable mass-storage part for a Sleela executor build: hard disk, solid-state disk, NVMe, floppy, or tape. It carries the real spec that distinguishes them — capacity, interface (ST-506/IDE/SATA/SAS/NVMe), rotational speed (RPM, 0 for solid state), average seek time, and sequential transfer rate — plus a simple access-time model (seek + rotational latency + transfer) so a build with a fast NVMe behaves differently from one with a 3600-RPM MFM drive. Family: cpu.components. Selected via SLComponentCatalog.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
CLASS_FLOPPYstatic final int CLASS_FLOPPY = 0Device classes.
CLASS_HDDstatic final int CLASS_HDD = 1No description in source.
CLASS_SSDstatic final int CLASS_SSD = 2No description in source.
CLASS_NVMEstatic final int CLASS_NVME = 3No description in source.
CLASS_TAPEstatic final int CLASS_TAPE = 4No description in source.
IF_ST506static final int IF_ST506 = 0Interfaces.
IF_IDEstatic final int IF_IDE = 1No description in source.
IF_SCSIstatic final int IF_SCSI = 2No description in source.
IF_SATAstatic final int IF_SATA = 3No description in source.
IF_SASstatic final int IF_SAS = 4No description in source.
IF_NVMEstatic final int IF_NVME = 5No description in source.
partNameString partNameNo description in source.
deviceClassint deviceClassNo description in source.
ifaceint ifaceNo description in source.
capacityMiBint capacityMiBcapacity in MiB
rpmint rpmrotational speed (0 for SSD/NVMe/flash)
avgSeekUsint avgSeekUsaverage seek time, microseconds (0 for solid state)
transferMBsint transferMBssustained sequential transfer, MB/s

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int devClass, int interfaceId, int capMiB,No description in source.
rotationalLatencyUsint rotationalLatencyUs()Average rotational latency in microseconds (half a revolution). 0 for non-rotational media.
accessTimeUsint accessTimeUs(int bytes)Modelled random-access time for a `bytes`-sized read: seek + rotational latency + transfer time, in microseconds.
nameString name()No description in source.
classIdint classId()No description in source.
capacityint capacity()No description in source.
rotationRpmint rotationRpm()No description in source.
seekTimeUsint seekTimeUs()No description in source.
transferRateint transferRate()No description in source.
solidStateboolean solidState()No description in source.
classNameString className()No description in source.
interfaceNameString interfaceName()No description in source.

SLSunUltraSPARCCPU #sleela 2.5 (lib/cpu/sun-ultrasparc/SLSunUltraSPARCCPU.sleela)

SLSunUltraSPARCCPU class extends SLCPURuntime

Defines SLSunUltraSPARCCPU — a runnable model of the Sun UltraSPARC. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Sun UltraSPARC register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)r0 is hardwired to zero (reads 0, writes discarded).
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSuperHCPU #sleela 2.5 (lib/cpu/superh/SLSuperHCPU.sleela)

SLSuperHCPU class extends SLCPURuntime

Defines SLSuperHCPU — a runnable model of the Hitachi SuperH SH-4. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Hitachi SuperH SH-4 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSwitch2CPU #sleela 2.5 (lib/cpu/nintendo-switch-2/SLSwitch2CPU.sleela)

SLSwitch2CPU class extends SLCPURuntime

Defines SLSwitch2CPU — a runnable model of the Nintendo Switch 2 (ARM Cortex-A78C). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo Switch 2 (ARM Cortex-A78C) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSwitchCPU #sleela 2.5 (lib/cpu/nintendo-switch/SLSwitchCPU.sleela)

SLSwitchCPU class extends SLCPURuntime

Defines SLSwitchCPU — a runnable model of the Nintendo Switch (ARM Cortex-A57). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo Switch (ARM Cortex-A57) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSystem360CPU #sleela 2.5 (lib/cpu/system-360/SLSystem360CPU.sleela)

SLSystem360CPU class extends SLCPURuntime

Defines SLSystem360CPU — a runnable model of the IBM System/360. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM System/360 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSystem370CPU #sleela 2.5 (lib/cpu/system-370/SLSystem370CPU.sleela)

SLSystem370CPU class extends SLCPURuntime

Defines SLSystem370CPU — a runnable model of the IBM System/370. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM System/370 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLSystemBus #sleela 2.5 (lib/cpu/components/SLSystemBus.sleela)

SLSystemBus class

Defines SLSystemBus — a selectable system/expansion bus for a Sleela executor build: ISA, PCI, AGP, PCIe (by generation and lane count), or a front-side bus. It carries the real spec that bounds how fast the CPU, memory, and devices talk to each other: bus clock, data width, and the resulting peak bandwidth. The bus can cap an otherwise-fast RAM/storage choice, so it belongs in the build. Family: cpu.components. Selected via SLComponentCatalog.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
BUS_ISAstatic final int BUS_ISA = 0No description in source.
BUS_PCIstatic final int BUS_PCI = 1No description in source.
BUS_AGPstatic final int BUS_AGP = 2No description in source.
BUS_PCIEstatic final int BUS_PCIE = 3No description in source.
BUS_FSBstatic final int BUS_FSB = 4No description in source.
partNameString partNameNo description in source.
busTypeint busTypeNo description in source.
clockMHzint clockMHzNo description in source.
widthBitsint widthBitsdata path width
lanesint lanesfor PCIe (1 otherwise)
perLaneMBsint perLaneMBsper-lane rate for serial buses (PCIe), 0 for parallel

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int type, int clock, int width, int laneCount, int laneMBs)No description in source.
peakBandwidthMBsint peakBandwidthMBs()Peak bandwidth in MB/s. Serial buses (PCIe) use per-lane × lanes; parallel buses use clock × bus bytes.
nameString name()No description in source.
clockint clock()No description in source.
widthint width()No description in source.
laneCountint laneCount()No description in source.
busNameString busName()No description in source.

SLSystemCall #sleela 2.5 (lib/cpu/SLSystemCall.sleela)

SLSystemCall class

Defines SLSystemCall — the system-call interface: the controlled doorway from user programs into the kernel. A user program issues the SYSCALL instruction with a call number; the CPU switches to supervisor mode and jumps to the kernel's syscall handler, which dispatches on the number. This class is the registry of call numbers and the dispatcher contract. Call numbers model a minimal POSIX-like surface: write, read, open, close, exit, spawn, yield. Family: cpu. Pure Sleela ABI definition.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
SYS_WRITEstatic final int SYS_WRITE = 0No description in source.
SYS_READstatic final int SYS_READ = 1No description in source.
SYS_OPENstatic final int SYS_OPEN = 2No description in source.
SYS_CLOSEstatic final int SYS_CLOSE = 3No description in source.
SYS_EXITstatic final int SYS_EXIT = 4No description in source.
SYS_SPAWNstatic final int SYS_SPAWN = 5No description in source.
SYS_YIELDstatic final int SYS_YIELD = 6No description in source.
SYS_COUNTstatic final int SYS_COUNT = 7No description in source.
callsint callsNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
validboolean valid(int number)No description in source.
countvoid count()No description in source.
nameOfString nameOf(int number)No description in source.
callCountint callCount()No description in source.

SLTiming #sleela 2.5 (lib/cpu/SLTiming.sleela)

SLTiming class

Defines SLTiming — one named, careful timing budget: the atom all the expert bus / CPU / I/O / RAM timings are built from. A budget names a path and states its real electrical constraints in picoseconds (ps): setup, hold, propagation, and jitter, all against a declared period. Rather than assume a part is "fast enough", a budget is CHECKED — slack is period minus the consumed time, and a path is honored only when slack is non-negative with the stated guardband. Everything here is nameful and quality-first: each budget carries the signal name and a human reason, so a timing report reads as prose, not as magic numbers. A compiled .sleela file embeds these budgets so a compiler or VM operates the STATED timings instead of inferring confidences about silicon. Family: cpu. Pure Sleela timing model (picosecond integer arithmetic).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
signalString signalnameful path: "addr->ras", "cas->dq", "req->ack", ...
reasonString reasonwhy this budget exists, in words
periodPsint periodPsthe clock/strobe period this path must fit inside (ps)
setupPsint setupPsrequired setup before the capturing edge (ps)
holdPsint holdPsrequired hold after the capturing edge (ps)
propagationPsint propagationPscombinational / flight time along the path (ps)
jitterPsint jitterPspeak cycle-to-cycle jitter to subtract from the period
guardbandPsint guardbandPsextra margin demanded on top of a bare pass (ps)
checksint checkshow many times this budget has been evaluated
violationsint violationshow many of those failed

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String name, int period, int guardband)Name a path and give it a period and a guardband.
describevoid describe(String why)No description in source.
setSetupvoid setSetup(int ps)State the path's electrical constraints.
setHoldvoid setHold(int ps)No description in source.
setPropagationvoid setPropagation(int ps)No description in source.
setJittervoid setJitter(int ps)No description in source.
setPeriodvoid setPeriod(int ps)No description in source.
setGuardbandvoid setGuardband(int ps)No description in source.
consumedPsint consumedPs()Time consumed along the path before data is stable at the capture point.
effectivePeriodPsint effectivePeriodPs()The usable period after jitter is removed from the raw period.
setupSlackPsint setupSlackPs()Setup slack: usable period minus consumed time minus the demanded guardband. Non-negative = the path is honored.
holdSlackPsint holdSlackPs()Hold slack: propagation must out-last the required hold window.
honoredboolean honored()Does this budget hold, counting setup, hold, and guardband together?
maxFrequencyMHzint maxFrequencyMHz()The highest strobe frequency (MHz) this path can be run at and still meet setup with its guardband: f = 1e6 / (consumed + guardband + jitter) ps.
signalNameString signalName()No description in source.
whyString why()No description in source.
periodint period()No description in source.
guardbandint guardband()No description in source.
checkCountint checkCount()No description in source.
violationCountint violationCount()No description in source.
cleanboolean clean()No description in source.

SLTimingClass #sleela 2.5 (lib/cpu/SLTimingClass.sleela)

SLTimingClass class

Defines SLTimingClass — the expertise TIER expressed as a Class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
TIER_NOVICEstatic final int TIER_NOVICE = 0No description in source.
TIER_BASICstatic final int TIER_BASIC = 1No description in source.
TIER_ADVANCEDstatic final int TIER_ADVANCED = 2No description in source.
TIER_EXPERTstatic final int TIER_EXPERT = 3No description in source.
tierint tierone of TIER_*
labelString labelnameful: tier name, e.g. "Expert"
mediumString mediumthe "brand or medium" this tier is applied to/for
guardbandPsint guardbandPstiming guardband this tier demands on every budget
headroomMvint headroomMvvoltage headroom (above floor) this tier insists on
clockHeadroomPctint clockHeadroomPcthow far below the honest ceiling this tier dials (%)
knobsWritableint knobsWritable1 = expert timing/voltage knobs may be changed
railsUnlockableint railsUnlockable1 = rails may be unlocked (uncapped adjustment)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int tierId, String brandOrMedium)Build the tier object for a given tier id and brand/medium label.
novicevoid novice(String brandOrMedium)Convenience constructors by name — each returns this configured object.
basicvoid basic(String brandOrMedium)No description in source.
advancedvoid advanced(String brandOrMedium)No description in source.
expertvoid expert(String brandOrMedium)No description in source.
applyPolicyvoid applyPolicy()The heart of the object: a tier IS its policy.
allowsKnobboolean allowsKnob()May the operator change an expert timing/voltage knob at this tier?
allowsUnlockboolean allowsUnlock()May a rail be unlocked (adjustment uncapped) at this tier?
dialableMHzint dialableMHz(int ceilingMHz)Given an honest ceiling frequency, the speed this tier is willing to dial to: pulled back by its clock headroom. Novice leaves 30% on the table; Expert takes it all.
satisfiesSlackboolean satisfiesSlack(int slackPs)Does a candidate budget slack satisfy this tier's guardband demand? (The SLTiming guardband is set from this value, so a passing budget already honors the tier; this reports extra margin beyond the demand.)
satisfiesHeadroomboolean satisfiesHeadroom(int railHeadroomMv)Does a rail's headroom satisfy this tier's insistence?
retierString retier(int tierId)Promote/demote to another tier (re-applies policy). Returns the new label.
tierIdint tierId()No description in source.
tierNameString tierName()No description in source.
brandOrMediumString brandOrMedium()No description in source.
guardbandint guardband()No description in source.
headroomint headroom()No description in source.
clockHeadroomint clockHeadroom()No description in source.

SLTimingManifest #sleela 2.5 (lib/cpu/SLTimingManifest.sleela)

SLTimingManifest class

Defines SLTimingManifest — the compact, serializable record of a timing/voltage/expertise profile that a COMPILED .sleela file carries inside it. This is the pivot the request turns on: a compiled program must not oblige a compiler or VM to GUESS the quality of the hardware it runs on ("rather than inherently to expect the quality of these operating as confidences of how CPUs operate"). Instead the program states its timings, and the engine operates those STATED numbers. A manifest flattens an SLTimingProfile into plain integers/strings: the expertise tier + brand/medium, the dialed core/bus/io clocks, the settled rail voltages, the RAM primaries, and the worst honored slack. It can be embedded as a header in an SLProgram image and read back by any consumer — SLSleelaVM, SLControlUnit, SLCompilerDriver — so every stage honors the same declared operating point. Family: cpu. Serialization layer over SLTimingProfile; embedded in SLProgram.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAGICstatic final int MAGIC = 5213--- magic / identity --- "SL-TIMING" marker word in a program header
versionint versionNo description in source.
tierint tier--- expertise tier --- SLTimingClass.TIER_*
tierLabelString tierLabel"Novice" / "Basic" / "Advanced" / "Expert"
brandMediumString brandMediumthe brand or medium this profile targets
coreMHzint coreMHz--- dialed clocks (variable speeds) ---
busMHzint busMHzNo description in source.
ioMHzint ioMHzNo description in source.
ramMTsint ramMTsNo description in source.
vcoreMvint vcoreMv--- settled actual voltages (millivolts) ---
vsocMvint vsocMvNo description in source.
vddqMvint vddqMvNo description in source.
vioMvint vioMvNo description in source.
honoredFlagint honoredFlag--- honored summary --- 1 = every budget honored when the manifest was sealed
worstSlackPsint worstSlackPstightest setup slack across all paths (quality margin)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
setTiervoid setTier(int tierId, String label, String brandOrMedium)No description in source.
setClocksvoid setClocks(int core, int bus, int io, int ram)No description in source.
setVoltagesvoid setVoltages(int vcore, int vsoc, int vddq, int vio)No description in source.
setRamvoid setRam(int casLatency, int rasToCas, int rowPrecharge, int rowActive)No description in source.
sealvoid seal(boolean isHonored, int worstSlack)No description in source.
validboolean valid()Is this a well-formed, honored manifest a consumer may trust?
honoredboolean honored()No description in source.
writeHeaderint writeHeader(SLRAM mem, int at)Serialize the numeric fields into a caller-provided SLRAM header region, starting at `at`. Returns the next free word index. A compiled .sleela image stores this header ahead of the instruction stream so the loader and the VM read the STATED operating point instead of inferring one.
headerWordsint headerWords()The fixed number of header words writeHeader emits (so a loader can skip the header to reach the first instruction).
readHeaderboolean readHeader(SLRAM mem, int at)Read the manifest back from an SLRAM header at `at`. Returns true only when the magic matches — so a consumer can tell "this image carries a stated profile" from "this image expects me to assume one".
tierIdint tierId()No description in source.
tierNameString tierName()No description in source.
brandOrMediumString brandOrMedium()No description in source.
coreint core()No description in source.
busint bus()No description in source.
ioint io()No description in source.
ramint ram()No description in source.
vcoreint vcore()No description in source.
vddqint vddq()No description in source.
worstSlackint worstSlack()No description in source.

SLTimingProfile #sleela 2.5 (lib/cpu/SLTimingProfile.sleela)

SLTimingProfile class

Defines SLTimingProfile — the one object that gathers a whole

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
tierSLTimingClass tierthe governing expertise Class Object
vcoreSLVoltageRail vcoreNamed, adjustable voltage rails — the ACTUAL voltages, in millivolts. CPU core
vsocSLVoltageRail vsocSoC / uncore / interconnect
vddqSLVoltageRail vddqDRAM I/O
vioSLVoltageRail vioperipheral I/O ring
cpuSLCpuTiming cpuExpert timings, each on its rail.
memBusSLBusTiming memBusthe memory interconnect
sysBusSLBusTiming sysBusthe system/front-side interconnect
ioLinkSLIOTiming ioLinkNo description in source.
ramSLRamTiming ramNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int tierId, String brandOrMedium)Configure the whole profile for an expertise tier and a brand/medium, then populate sensible per-tier defaults for a modern part. The tier's guardband and headroom are stamped into every budget and rail.
stampTierGuardbandsvoid stampTierGuardbands()Push the tier's demanded guardband onto every named budget so a passing check already means "honored for this expertise tier".
dialToTierDefaultsvoid dialToTierDefaults()Dial each variable speed to the tier's willing fraction of its honest ceiling (Novice backs off; Expert pushes to the edge).
dialCoreint dialCore(int mhz)No description in source.
dialMemBusint dialMemBus(int mhz)No description in source.
dialSysBusint dialSysBus(int mhz)No description in source.
dialIOint dialIO(int mhz)No description in source.
dialRamint dialRam(int mts)No description in source.
adjustVcoreint adjustVcore(int deltaMv)Adjust an ACTUAL voltage (mV). Novice/Basic may only lower (undervolt is always safe); Advanced/Expert may raise within limits. Expert may unlock.
adjustVsocint adjustVsoc(int deltaMv)No description in source.
adjustVddqint adjustVddq(int deltaMv)No description in source.
adjustVioint adjustVio(int deltaMv)No description in source.
adjustRailint adjustRail(SLVoltageRail rail, int deltaMv)No description in source.
honoredboolean honored()Everything honored together: every expert timing on every rail, and every rail inside its limits with the tier's insisted headroom.
worstSlackPsint worstSlackPs()The tightest setup slack across the carefully-named bus/CPU/IO paths — the single quality number a consumer reads to know how close to the edge this profile runs.
toManifestSLTimingManifest toManifest()Flatten the whole operating point into the embeddable manifest a compiled .sleela file carries — stated numbers, not assumed confidences.
expertiseSLTimingClass expertise()No description in source.
coreRailSLVoltageRail coreRail()No description in source.
memoryRailSLVoltageRail memoryRail()No description in source.
ioRailSLVoltageRail ioRail()No description in source.
cpuTimingSLCpuTiming cpuTiming()No description in source.
memoryBusSLBusTiming memoryBus()No description in source.
systemBusSLBusTiming systemBus()No description in source.
ioTimingSLIOTiming ioTiming()No description in source.
ramTimingSLRamTiming ramTiming()No description in source.

SLTMS320CPU #sleela 2.5 (lib/cpu/tms320/SLTMS320CPU.sleela)

SLTMS320CPU class extends SLCPURuntime

Defines SLTMS320CPU — a runnable model of the TI TMS320. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the TI TMS320 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
R_SPstatic final int R_SP = 4No description in source.
R_PCstatic final int R_PC = 5No description in source.
R_FLAGSstatic final int R_FLAGS = 6No description in source.
R_AUXstatic final int R_AUX = 7No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLTransputerCPU #sleela 2.5 (lib/cpu/transputer/SLTransputerCPU.sleela)

SLTransputerCPU class extends SLCPURuntime

Defines SLTransputerCPU — a runnable model of the Inmos Transputer T800. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Inmos Transputer T800 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLTuringBridge #sleela 2.5 (lib/cpu/SLTuringBridge.sleela)

SLTuringBridge class

Defines SLTuringBridge — the equivalence driver that closes the

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
isaSLInstructionSet isaNo description in source.
decoderSLInstructionDecoder decoderNo description in source.
sysSLSystemCall sysNo description in source.
runsint runsNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
runLanguageint runLanguage(int langId, String path, String name)Compile a given language id to the register ISA, then reduce to the Sleela opcode substrate, then execute. Returns the value the program PRINTed.
runProgramint runProgram(SLProgram prog)Reduce ONE already-built register-ISA program to the substrate and run it.
proveEquivalenceboolean proveEquivalence(String cPath, String cppPath, String javaPath, String sleelaPath)Prove 1:1 Turing effect: compile the SAME computation from all four languages, reduce each to the Sleela opcode substrate, run each, and return true iff every language produced the identical observable result.
SLFrontend_LANG_SLEELAint SLFrontend_LANG_SLEELA()Language-id helpers (mirror SLFrontend constants without an instance).
SLFrontend_LANG_Cint SLFrontend_LANG_C()No description in source.
SLFrontend_LANG_CPPint SLFrontend_LANG_CPP()No description in source.
SLFrontend_LANG_JAVAint SLFrontend_LANG_JAVA()No description in source.
runCountint runCount()No description in source.

SLTX0CPU #sleela 2.5 (lib/cpu/tx0/SLTX0CPU.sleela)

SLTX0CPU class extends SLCPURuntime

Defines SLTX0CPU — a runnable model of the MIT TX-0. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the MIT TX-0 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0No description in source.
R_Bstatic final int R_B = 1No description in source.
R_Xstatic final int R_X = 2No description in source.
R_Ystatic final int R_Y = 3No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLVAXCPU #sleela 2.5 (lib/cpu/vax/SLVAXCPU.sleela)

SLVAXCPU class extends SLCPURuntime

Defines SLVAXCPU — a runnable model of the DEC VAX-11. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the DEC VAX-11 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLVoltageRail #sleela 2.5 (lib/cpu/SLVoltageRail.sleela)

SLVoltageRail class

Defines SLVoltageRail — one adjustable supply rail with ACTUAL voltages expressed in millivolts (mV). A real CPU, its buses, its I/O ring, and its memory each sit on named rails (Vcore, Vsoc, Vddq, Vio, ...). The rail carries a nominal operating point, hard floor/ceiling limits, a per-rail load-line droop (how far the voltage sags under current), and an offset the operator dials in. The settled voltage a timing budget must survive is `effective()` = nominal + offset - droopAtLoad. Voltages are kept careful and nameful: every rail has a name, a reason for its limits, and a settle point you can read back and reason about. Nothing here assumes a "confidence" about how a part behaves — it states the actual electrical operating point the timings below are proven against. Family: cpu. Pure Sleela electrical model (millivolt integer arithmetic).

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString namenameful rail: "Vcore", "Vsoc", "Vddq", "Vio", ...
nominalMvint nominalMvnominal operating voltage in millivolts
offsetMvint offsetMvoperator-dialed adjustment (may be negative = undervolt)
floorMvint floorMvhard lower limit; below this the part is unstable
ceilingMvint ceilingMvhard upper limit; above this the part is unsafe
loadLineUohmint loadLineUohmload-line resistance in micro-ohms (droop = I * R)
loadMaint loadMapresent current draw in milliamps
lockedint locked1 = limits enforced, adjustments clamped into range

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String railName, int nominal, int floor, int ceiling)Configure a rail with its name, nominal point, and safe window.
setLoadLinevoid setLoadLine(int microOhms)Give the rail a load line (micro-ohms) so droop can be computed from draw.
setLoadvoid setLoad(int milliamps)Declare the present current draw (milliamps) the rail is sourcing.
adjustvoid adjust(int deltaMv)Dial an adjustment. When locked, the resulting effective voltage is held inside [floor, ceiling]; the offset is clamped so a settled rail is safe.
setOffsetvoid setOffset(int deltaMv)Set the adjustment to an absolute value (relative to nominal).
lockvoid lock()No description in source.
unlockvoid unlock()bench/expert mode: adjustments uncapped
droopMvint droopMv()Droop in millivolts from the load line at the present draw: droop(mV) = loadMa (mA) * loadLineUohm (uOhm) / 1_000_000
effectiveMvint effectiveMv()The voltage the rail actually settles at under load — what every timing budget on this rail is proven against.
clampToWindowvoid clampToWindow()Keep the dialed offset such that effective() stays within the safe window.
withinLimitsboolean withinLimits()Is the settled rail inside its stated safe window?
headroomMvint headroomMv()Headroom (mV) between the settled point and the floor — the margin a slow corner has before it browns out. Negative means a violation.
railNameString railName()No description in source.
nominalint nominal()No description in source.
offsetint offset()No description in source.
floorint floor()No description in source.
ceilingint ceiling()No description in source.
loadint load()No description in source.

SLWeitekPowerCPU #sleela 2.5 (lib/cpu/weitek/SLWeitekPowerCPU.sleela)

SLWeitekPowerCPU class extends SLCPURuntime

Defines SLWeitekPowerCPU — a runnable model of the Weitek. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Weitek register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLWiiCPU #sleela 2.5 (lib/cpu/nintendo-wii/SLWiiCPU.sleela)

SLWiiCPU class extends SLCPURuntime

Defines SLWiiCPU — a runnable model of the Nintendo Wii (Broadway / PowerPC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo Wii (Broadway / PowerPC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLWiiUCPU #sleela 2.5 (lib/cpu/nintendo-wii-u/SLWiiUCPU.sleela)

SLWiiUCPU class extends SLCPURuntime

Defines SLWiiUCPU — a runnable model of the Nintendo Wii U (Espresso / PowerPC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Nintendo Wii U (Espresso / PowerPC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLWorkload #sleela 2.5 (lib/cpu/SLWorkload.sleela)

SLWorkload class

Defines SLWorkload — a unit of work to run on a CPU, written in C, C++, or Sleela (and Java, which shares the same frontend path). A workload names its source, its language, and the SLCPUResource grant it needs. compile() drives the shared multi-language pipeline (SLCompilerDriver -> SLProgram, the register-ISA image); the CPU then maps that image onto its own canonical-opcode substrate and runs it inside the grant. The SAME workload therefore runs identically whether its source was C, C++, or Sleela — the 1:1 Turing-effect guarantee (SLTuringBridge). Family: cpu. Composes SLCPUResource, SLCompilerDriver, SLProgram; consumed by SLCPURuntime.runWorkload().

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
LANG_SLEELAstatic final int LANG_SLEELA = 0Language ids (match SLCompilerDriver / SLFrontend).
LANG_Cstatic final int LANG_C = 1No description in source.
LANG_CPPstatic final int LANG_CPP = 2No description in source.
LANG_JAVAstatic final int LANG_JAVA = 3No description in source.
STATE_NEWstatic final int STATE_NEW = 0Lifecycle states.
STATE_COMPILEDstatic final int STATE_COMPILED = 1No description in source.
STATE_ADMITTEDstatic final int STATE_ADMITTED = 2No description in source.
STATE_RUNNINGstatic final int STATE_RUNNING = 3No description in source.
STATE_DONEstatic final int STATE_DONE = 4No description in source.
STATE_REJECTEDstatic final int STATE_REJECTED = 5No description in source.
nameString nameNo description in source.
sourcePathString sourcePathNo description in source.
languageint languageNo description in source.
stateint stateNo description in source.
resourceSLCPUResource resourcethe grant this workload runs within
programSLProgram programcompiled register-ISA image (language-independent)
resultint resultlast observable output (printed value)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String workloadName, String path, int langId, SLCPUResource grant)No description in source.
compileSLProgram compile(SLInstructionSet isa)Compile the source (any supported language) to the shared register-ISA image via the multi-language driver. After this the image is language- independent, so the CPU runs it the same regardless of source language.
markAdmittedvoid markAdmitted()No description in source.
markRejectedvoid markRejected()No description in source.
markRunningvoid markRunning()No description in source.
markDonevoid markDone(int observable)No description in source.
imageSLProgram image()No description in source.
grantSLCPUResource grant()No description in source.
languageIdint languageId()No description in source.
workloadNameString workloadName()No description in source.
sourceString source()No description in source.
runStateint runState()No description in source.
outputint output()No description in source.
compiledboolean compiled()No description in source.
finishedboolean finished()No description in source.
rejectedboolean rejected()No description in source.
languageNameString languageName()No description in source.

SLX86CPU #sleela 2.5 (lib/cpu/x86/SLX86CPU.sleela)

SLX86CPU class extends SLCPURuntime

Defines SLX86CPU — a runnable model of a 32-bit x86 (IA-32 style): the general registers EAX ECX EDX EBX ESP EBP ESI EDI, an EFLAGS register, and a program counter (EIP). It extends SLCPURuntime and adds the x86 register set, a decoder for a compact two-operand encoding, the protected- mode / control-register and interrupt hooks the skeleton named, and — as a worked example of a CPU running ON TOP OF the secondary Sleela VM — a lower() path that translates a short x86 sequence into canonical opcodes and executes them on the inherited SLSleelaVM substrate. Instruction model (op in high byte, 4-bit dst + 4-bit src/imm in low byte): MOV r,imm / MOV r,r / ADD r,r / SUB r,r / INC r / CMP r,r / MOV r,[m] / MOV [m],r / JMP / JE / JNE / INT(interrupt+halt) / HLT / NOP. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
EAXstatic final int EAX = 0; static final int ECX = 1; static final int EDX = 2; static final int EBX = 3No description in source.
ESPstatic final int ESP = 4; static final int EBP = 5; static final int ESI = 6; static final int EDI = 7No description in source.
EFLAGSstatic final int EFLAGS = 8No description in source.
MOV_RIstatic final int MOV_RI = 1; static final int MOV_RR = 2; static final int ADD_RR = 3No description in source.
SUB_RRstatic final int SUB_RR = 4; static final int INC_R = 5; static final int CMP_RR = 6No description in source.
MOV_RMstatic final int MOV_RM = 7; static final int MOV_MR = 8; static final int JMP = 9No description in source.
JEstatic final int JE = 10; static final int JNE = 11; static final int INT = 12; static final int HLT = 13No description in source.
modeint mode0 real, 1 protected (control-register hook)
cr0int cr0control register 0

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
immOfint immOf(int w)No description in source.
decodevoid decode(int word)No description in source.
interruptvoid interrupt(int vector)IDT dispatch hook (model no-op)
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
encodeImmint encodeImm(int opcode, int dst, int imm)No description in source.
lowerAddAndPrintint lowerAddAndPrint(int a, int b)--- Worked example: run x86 "MOV EAX,a; MOV EBX,b; ADD; PRINT" on top of the secondary Sleela VM by lowering to canonical opcodes. This demonstrates a CPU model executing on the native-opcode substrate rather than inline.
regint reg(int i)No description in source.
eflagsint eflags()No description in source.
protectedModeboolean protectedMode()No description in source.

SLXbox360CPU #sleela 2.5 (lib/cpu/xbox-360/SLXbox360CPU.sleela)

SLXbox360CPU class extends SLCPURuntime

Defines SLXbox360CPU — a runnable model of the Xbox 360 (Xenon / PowerPC). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox 360 (Xenon / PowerPC) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 31No description in source.
R_LINKstatic final int R_LINK = 30No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxCPU #sleela 2.5 (lib/cpu/xbox/SLXboxCPU.sleela)

SLXboxCPU class extends SLCPURuntime

Defines SLXboxCPU — a runnable model of the Xbox (x86 Pentium III). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox (x86 Pentium III) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 7No description in source.
R_LINKstatic final int R_LINK = 6No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxOneCPU #sleela 2.5 (lib/cpu/xbox-one/SLXboxOneCPU.sleela)

SLXboxOneCPU class extends SLCPURuntime

Defines SLXboxOneCPU — a runnable model of the Xbox One (x86-64 Jaguar). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox One (x86-64 Jaguar) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxOneSCPU #sleela 2.5 (lib/cpu/xbox-one-s/SLXboxOneSCPU.sleela)

SLXboxOneSCPU class extends SLCPURuntime

Defines SLXboxOneSCPU — a runnable model of the Xbox One S (x86-64 Jaguar). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox One S (x86-64 Jaguar) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxOneXCPU #sleela 2.5 (lib/cpu/xbox-one-x/SLXboxOneXCPU.sleela)

SLXboxOneXCPU class extends SLCPURuntime

Defines SLXboxOneXCPU — a runnable model of the Xbox One X (x86-64 Jaguar). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox One X (x86-64 Jaguar) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxSeriesSCPU #sleela 2.5 (lib/cpu/xbox-series-s/SLXboxSeriesSCPU.sleela)

SLXboxSeriesSCPU class extends SLCPURuntime

Defines SLXboxSeriesSCPU — a runnable model of the Xbox Series S (x86-64 Zen 2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox Series S (x86-64 Zen 2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXboxSeriesXCPU #sleela 2.5 (lib/cpu/xbox-series-x/SLXboxSeriesXCPU.sleela)

SLXboxSeriesXCPU class extends SLCPURuntime

Defines SLXboxSeriesXCPU — a runnable model of the Xbox Series X (x86-64 Zen 2). It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Xbox Series X (x86-64 Zen 2) register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLXtensaCPU #sleela 2.5 (lib/cpu/xtensa/SLXtensaCPU.sleela)

SLXtensaCPU class extends SLCPURuntime

Defines SLXtensaCPU — a runnable model of the Tensilica Xtensa. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Tensilica Xtensa register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLZ8000CPU #sleela 2.5 (lib/cpu/z8000/SLZ8000CPU.sleela)

SLZ8000CPU class extends SLCPURuntime

Defines SLZ8000CPU — a runnable model of the Zilog Z8000. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the Zilog Z8000 register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

SLZ80CPU #sleela 2.5 (lib/cpu/z80/SLZ80CPU.sleela)

SLZ80CPU class extends SLCPURuntime

Defines SLZ80CPU — a runnable model of the Zilog Z80: an 8-bit machine with the A accumulator, B/C/D/E/H/L general registers, a 16-bit stack pointer, an R refresh register, and S Z H PV N C flags. It extends SLCPURuntime for register/memory/ALU/loop machinery and adds the Z80 register set, a decoder, a separate I/O port space, and the refresh/wait behaviours the skeleton named. Instruction model (op in high byte, operand in low byte of each word): a compact teaching encoding sufficient to run the CPU and host further .sleela inputs — LD r,n / LD A,(nn) / LD (nn),A / ADD A,n / SUB n / INC r / OUT (n),A / IN A,(n) / JP nn / JR Z,e / JR NZ,e / HALT / NOP. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_Astatic final int R_A = 0; static final int R_B = 1; static final int R_C = 2No description in source.
R_Dstatic final int R_D = 3; static final int R_E = 4; static final int R_H = 5No description in source.
R_Lstatic final int R_L = 6; static final int R_SP = 7; static final int R_R = 8No description in source.
R_Fstatic final int R_F = 9flags
LD_R_Nstatic final int LD_R_N = 1operand low nibble = reg, high nibble = n (packed)
LD_A_NNstatic final int LD_A_NN = 2A <- (nn)
ST_NN_Astatic final int ST_NN_A = 3(nn) <- A
ADD_A_Nstatic final int ADD_A_N = 4No description in source.
SUB_Nstatic final int SUB_N = 5No description in source.
INC_Rstatic final int INC_R = 6No description in source.
OUT_N_Astatic final int OUT_N_A = 7No description in source.
IN_A_Nstatic final int IN_A_N = 8No description in source.
JP_NNstatic final int JP_NN = 9No description in source.
JR_Zstatic final int JR_Z = 10No description in source.
JR_NZstatic final int JR_NZ = 11No description in source.
HALTstatic final int HALT = 12No description in source.
ioPortsSLRAM ioPorts256-port I/O space (separate from memory, Z80 style)
rCounterint rCountermemory-refresh counter (R register wraps 0..127)

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
operandOfint operandOf(int w)No description in source.
preFetchvoid preFetch()Each M1 (opcode-fetch) cycle a real Z80 ticks its memory-refresh register. SLCPURuntime.step() calls preFetch() before fetch(), so refresh runs for every instruction without depending on fetch() override dispatch.
refreshvoid refresh()No description in source.
waitvoid wait(int cycles)model hook; cycle-accurate waits are documented, not simulated
decodevoid decode(int word)No description in source.
ioCycleWritevoid ioCycleWrite(int port, int value)Separate I/O port space (OUT/IN), distinct from the memory bus.
ioCycleReadint ioCycleRead(int port)No description in source.
signedint signed(int b)No description in source.
encodeint encode(int opcode, int operand)No description in source.
accumulatorint accumulator()No description in source.
refreshRegisterint refreshRegister()No description in source.

SLZArchitectureCPU #sleela 2.5 (lib/cpu/z-architecture/SLZArchitectureCPU.sleela)

SLZArchitectureCPU class extends SLCPURuntime

Defines SLZArchitectureCPU — a runnable model of the IBM z/Architecture. It extends SLCPURuntime, so it inherits register storage, a word-addressable memory interface, an SLALU, the fetch-decode-execute loop, and — crucially — the resource-aware workload path (admit()/runWorkload()) that runs C, C++ or Sleela programs on this CPU within an SLCPUResource grant, mapped onto the canonical SLeeLa opcode substrate. This file supplies the IBM z/Architecture register set and a decode() over a compact instruction encoding (load/move/arithmetic/compare/branch/halt). It is a functional model sufficient to run the CPU as a CPU and as a target for further .sleela inputs, not a cycle-accurate emulator; per-arch bus/timing detail remains in this folder's markdown docs. Family: cpu. Extends SLCPURuntime.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
R_ZEROstatic final int R_ZERO = 0No description in source.
R_SPstatic final int R_SP = 15No description in source.
R_LINKstatic final int R_LINK = 14No description in source.
I_LOADIstatic final int I_LOADI = 1dst <- imm
I_MOVEstatic final int I_MOVE = 2dst <- src
I_LOADstatic final int I_LOAD = 3dst <- mem[imm]
I_STOREstatic final int I_STORE = 4mem[imm] <- dst
I_ADDstatic final int I_ADD = 5dst <- dst + src
I_SUBstatic final int I_SUB = 6dst <- dst - src
I_MULstatic final int I_MUL = 7dst <- dst * src
I_ANDstatic final int I_AND = 8dst <- dst & src
I_ORstatic final int I_OR = 9dst <- dst | src
I_CMPstatic final int I_CMP = 10flags <- dst - src
I_JMPstatic final int I_JMP = 11pc <- imm
I_JZstatic final int I_JZ = 12if Z: pc <- imm
I_HALTstatic final int I_HALT = 13No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
gprint gpr(int i)No description in source.
setGprvoid setGpr(int i, int v)No description in source.
configurevoid configure()No description in source.
opOfint opOf(int w)No description in source.
dstOfint dstOf(int w)No description in source.
srcOfint srcOf(int w)No description in source.
decodevoid decode(int word)No description in source.
setZNvoid setZN(int v)No description in source.
encodeint encode(int opcode, int dst, int src)No description in source.
regint reg(int i)No description in source.
registersint registers()No description in source.

threadripper-at-spec #sleela 2.5 (lib/cpu/components/examples/threadripper-at-spec.sleela)

ThreadripperAtSpecExample class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
mainvoid main()No description in source.

world-net-results #sleela 2.5 (lib/cpu/examples/world-net-results.sleela)

ClockPolicy class

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configureSpecvoid configureSpec(int ratedMHz)No description in source.
overclockTovoid overclockTo(int targetMHz)No description in source.
reassessvoid reassess()No description in source.
effectiveMHzint effectiveMHz()No description in source.
ratingint rating()No description in source.
isOverclockedboolean isOverclocked()No description in source.
isStableboolean isStable()No description in source.
speedRatioMilliint speedRatioMilli()No description in source.

Resource class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int words, int b)No description in source.
wordsint words()No description in source.
budgetOfint budgetOf()No description in source.
usedOfint usedOf()No description in source.
chargevoid charge(int n)No description in source.
remainingint remaining()No description in source.

Workload class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
LANG_SLEELAstatic final int LANG_SLEELA = 0; static final int LANG_C = 1; static final int LANG_CPP = 2; static final int LANG_JAVA = 3No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(String n, int language, int words, int cost, int result)No description in source.
assignvoid assign(Resource g)No description in source.
languageNameString languageName()No description in source.

CpuModel class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
bringUpvoid bringUp(String k, String human, String fam, int bits, int words, int specMHz)No description in source.
specClockMHzint specClockMHz()No description in source.
effectiveMHzint effectiveMHz()No description in source.
overclockedboolean overclocked()No description in source.
clockStableboolean clockStable()No description in source.
overclockboolean overclock(int targetMHz)No description in source.
admitboolean admit(Workload w)Admission: the workload fits only if its memory request fits this CPU's address space and the grant has a positive budget.
runWorkloadint runWorkload(Workload w)Run a workload within its grant. Charges the instruction cost (clamped to the budget) and returns a deterministic observable output: the workload's base result, identical across architectures (the 1:1 Turing-effect guarantee), independent of clock. Returns -1 if rejected.

CpuCatalog class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAXstatic final int MAX = 64No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure()No description in source.
addvoid add(String k, String human, String fam, int mhz, int bits, int words)No description in source.
sizeint size()No description in source.
keyAtString keyAt(int i)No description in source.
indexOfint indexOf(String k)No description in source.
hasboolean has(String k)No description in source.
makeCpuModel make(String k)Instantiate the model selected by key (null if unknown).
listString list()No description in source.
seedvoid seed()A roster spanning eras: 8-bit micros through modern 64-bit console SoCs.

CpuFleet class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
MAXstatic final int MAX = 64No description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(CpuCatalog cat)No description in source.
selectboolean select(String k)No description in source.
selectAllvoid selectAll()No description in source.
countint count()No description in source.
atCpuModel at(int i)No description in source.
keyAtString keyAt(int i)No description in source.
overclockFleetPercentvoid overclockFleetPercent(int percent)No description in source.
runAcrossint runAcross(String name, int lang, int wordsNeeded, int instrCost, int baseResult, int grantWords, int budget)Run the same workload spec across every member, each with a fresh grant, and aggregate the net results.
accumulatevoid accumulate(String k, CpuModel cpu, Resource g, int out)No description in source.
resetResultsvoid resetResults()No description in source.
completedint completed()No description in source.
rejectedCountint rejectedCount()No description in source.
netint net()No description in source.
aggregateEffectiveMHzint aggregateEffectiveMHz()No description in source.
aggregateSpecMHzint aggregateSpecMHz()No description in source.
fleetSpeedRatioMilliint fleetSpeedRatioMilli()No description in source.
fastestString fastest()No description in source.
scoreboardString scoreboard()No description in source.

CreatorNetwork class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(CpuFleet f)No description in source.
dispatchint dispatch(String name, int lang, int wordsNeeded, int instrCost, int baseResult, int grantWords, int budget)Dispatch a workload spec to the whole fleet "over the network": each hop adds latency proportional to the node index; a node is reachable here (no packet loss modeled by default), and the fleet executes locally per node.
totalLatencyint totalLatency()No description in source.
deliveredCountint deliveredCount()No description in source.
networkReportString networkReport()No description in source.

World class

Methods — the actions this unit can perform.

MethodSignatureWhat it does
bannervoid banner(String t)No description in source.
mainvoid main()No description in source.
selfCheckvoid selfCheck(CpuCatalog roster, CpuFleet fleet, CpuFleet netFleet, CreatorNetwork creator, int net, int net2, int netNet)No description in source.
expectint expect(boolean cond, String what)No description in source.