Package cpu
build-your-executor #sleela 2.5 (lib/cpu/components/examples/build-your-executor.sleela)
BuildYourExecutorExample class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
result | int result | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
ddr5-as-ddr2-cadence #sleela 2.5 (lib/cpu/components/examples/ddr5-as-ddr2-cadence.sleela)
Ddr5AsDdr2CadenceExample class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
dma-and-gpu-options #sleela 2.5 (lib/cpu/examples/dma-and-gpu-options.sleela)
DmaAndGpuOptionsExample class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
moved | int moved | No description in source. |
gpuOut | int gpuOut | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
epyc-with-ddr2-settings #sleela 2.5 (lib/cpu/amd-epyc/examples/epyc-with-ddr2-settings.sleela)
EpycWithDdr2Settings class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
result | int result | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
dispatch | void 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
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
memory-tiers-dispatch #sleela 2.5 (lib/cpu/examples/memory-tiers-dispatch.sleela)
MemoryTiersDispatchExample class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
dispatch | void 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
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cOut | int cOut | No description in source. |
sleelaOut | int sleelaOut | No description in source. |
crossArchOut | int crossArchOut | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | Register file indices (into the inherited SLRAM register store). accumulator |
R_X | static final int R_X = 1 | X index |
R_Y | static final int R_Y = 2 | Y index |
R_SP | static final int R_SP = 3 | stack pointer |
R_P | static final int R_P = 4 | processor status |
LDA_IMM | static final int LDA_IMM = 1 | Opcodes in the compact model encoding (high byte of the instruction word). |
LDX_IMM | static final int LDX_IMM = 2 | No description in source. |
LDY_IMM | static final int LDY_IMM = 3 | No description in source. |
STA_ABS | static final int STA_ABS = 4 | No description in source. |
LDA_ABS | static final int LDA_ABS = 5 | No description in source. |
ADC_IMM | static final int ADC_IMM = 6 | No description in source. |
SBC_IMM | static final int SBC_IMM = 7 | No description in source. |
INX | static final int INX = 8 | No description in source. |
INY | static final int INY = 9 | No description in source. |
TAX | static final int TAX = 10 | No description in source. |
TAY | static final int TAY = 11 | No description in source. |
JMP_ABS | static final int JMP_ABS = 12 | No description in source. |
BEQ_REL | static final int BEQ_REL = 13 | No description in source. |
BNE_REL | static final int BNE_REL = 14 | No description in source. |
BRK | static final int BRK = 15 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
opOf | int opOf(int word) | No description in source. |
operandOf | int operandOf(int word) | No description in source. |
decode | void decode(int word) | No description in source. |
signed | int signed(int b) | Treat the low byte as a signed relative offset for branches. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int operand) | Assembler helper: pack an instruction word for loadProgramWord(). |
accumulator | int accumulator() | No description in source. |
indexX | int indexX() | No description in source. |
indexY | int indexY() | No description in source. |
opcodeObservable | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
D0 | static final int D0 = 0 | D0..D7 => 0..7, A0..A7 => 8..15 (A7 == stack pointer). |
A0 | static final int A0 = 8 | No description in source. |
SP | static final int SP = 15 | A7 |
MOVE_RR | static final int MOVE_RR = 1 | MOVE Dsrc,Ddst |
MOVEQ | static final int MOVEQ = 2 | MOVEQ #imm,Dn |
MOVE_RM | static final int MOVE_RM = 3 | MOVE Dn,(An) |
MOVE_MR | static final int MOVE_MR = 4 | MOVE (An),Dn |
ADD_RR | static final int ADD_RR = 5 | No description in source. |
SUB_RR | static final int SUB_RR = 6 | No description in source. |
ADDQ | static final int ADDQ = 7 | ADDQ #imm,Dn |
LEA_IMM | static final int LEA_IMM = 8 | LEA #imm,An |
JMP_ABS | static final int JMP_ABS = 9 | No description in source. |
BEQ | static final int BEQ = 10 | No description in source. |
BNE | static final int BNE = 11 | No description in source. |
RTS | static final int RTS = 12 | No description in source. |
busHeld | int busHeld | bus-arbitration state (BR/BG) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | high nibble of low byte |
srcOf | int srcOf(int w) | low nibble |
immOf | int immOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
effectiveAddress | int effectiveAddress(int operand) | Effective-address computation hook (immediate/absolute in this model). |
busRequest | void busRequest() | Bus arbitration hooks the skeleton named (BR / BG handshake). |
busGrant | void busGrant() | No description in source. |
busBusy | boolean busBusy() | No description in source. |
signed | int signed(int b) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dstReg, int srcReg) | No description in source. |
encodeImm | int encodeImm(int opcode, int dstReg, int imm) | No description in source. |
dataRegister | int dataRegister(int n) | No description in source. |
addressRegister | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
SLAccessManifest #sleela 2.5 (lib/cpu/SLAccessManifest.sleela)
SLAccessManifest class
Defines SLAccessManifest — the compact, serializable record of a
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAGIC | static final int MAGIC = 5214 | --- magic / identity --- "SL-ACCESS" marker word (SL-TIMING is 5213) |
version | int version | No description in source. |
exposedCount | int exposedCount | --- per-role member counts (how the image's surface divides up) --- public members: network-exposed hops |
localCount | int localCount | private members: local/admin/safety/security/backup |
guardedCount | int guardedCount | protected members: integrity-guarded connections |
hopChainLength | int hopChainLength | --- ordered public hop chain (doc 1 -> doc 2 -> doc 3 ...) --- number of ordered hops the public surface forms |
orderedFlag | int orderedFlag | 1 = the public members communicate in a defined order |
exposeComponents | int exposeComponents | --- default backdrop bundles (ids from SLAccessSemantics) --- default EXPOSE_* the public surface is stood up with |
localConcerns | int localConcerns | default LOCAL_* the private surface declares |
guardControls | int guardControls | default GUARD_* the protected surface enforces |
competentFlag | int competentFlag | --- sealed summary --- 1 = the stated backdrop is complete enough to realize |
surfaceTotal | int surfaceTotal | exposed + local + guarded (the classified member total) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
setCounts | void setCounts(int exposed, int local, int guarded) | No description in source. |
setHopChain | void setHopChain(int length, boolean ordered) | No description in source. |
setBackdrop | void setBackdrop(int expose, int concerns, int guards) | No description in source. |
seal | void seal(boolean competent) | No description in source. |
valid | boolean valid() | No description in source. |
competent | boolean competent() | No description in source. |
exposed | int exposed() | No description in source. |
local | int local() | No description in source. |
guarded | int guarded() | No description in source. |
hops | int hops() | No description in source. |
ordered | boolean ordered() | No description in source. |
exposeBundle | int exposeBundle() | No description in source. |
concernBundle | int concernBundle() | No description in source. |
guardBundle | int guardBundle() | No description in source. |
classifiedTotal | int classifiedTotal() | No description in source. |
writeHeader | int 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. |
headerWords | int headerWords() | No description in source. |
readHeader | boolean 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
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ROLE_NONE | static final int ROLE_NONE = 0 | --- the three roles (one per access modifier) ------------------------- |
ROLE_EXPOSED | static final int ROLE_EXPOSED = 1 | public : REST-exposed hop / hop controller |
ROLE_LOCAL | static final int ROLE_LOCAL = 2 | private : local system / admin / safety / backup |
ROLE_GUARDED | static final int ROLE_GUARDED = 3 | protected : integrity-checked connection |
MOD_PUBLIC | static final int MOD_PUBLIC = 1 | Map the frontend modifier (mirrors impl/frontend/ast.h JavaModifier bits) to the role this interpretation assigns it. JavaPublic (1u<<0) |
MOD_PROTECTED | static final int MOD_PROTECTED = 2 | JavaProtected (1u<<1) |
MOD_PRIVATE | static final int MOD_PRIVATE = 4 | JavaPrivate (1u<<2) |
EXPOSE_REST_ENDPOINT | static 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_CONTROLLER | static final int EXPOSE_HOP_CONTROLLER = 2 | acts as a hop controller for a System |
EXPOSE_ORDERED_CHAIN | static final int EXPOSE_ORDERED_CHAIN = 3 | participates in ordered doc1->doc2->doc3 flow |
EXPOSE_SERVICE_MEMBER | static final int EXPOSE_SERVICE_MEMBER = 4 | a member of a System's service set |
EXPOSE_HEALTH_PROBE | static final int EXPOSE_HEALTH_PROBE = 5 | reachability/health advertised to the network |
LOCAL_SYSTEM_INTERNAL | static final int LOCAL_SYSTEM_INTERNAL = 1 | --- PRIVATE role: local / admin / safety / security / backup ---------- relates to the local System itself |
LOCAL_ADMIN | static final int LOCAL_ADMIN = 2 | admin concern |
LOCAL_SAFETY | static final int LOCAL_SAFETY = 3 | safety concern |
LOCAL_SECURITY | static final int LOCAL_SECURITY = 4 | security concern |
LOCAL_DATA_BACKUP | static final int LOCAL_DATA_BACKUP = 5 | data-backup concern |
LOCAL_AUDIT | static final int LOCAL_AUDIT = 6 | local audit/log concern |
LOCAL_CONFIG | static final int LOCAL_CONFIG = 7 | local configuration/secrets |
GUARD_DOUBLE_INPUT | static 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_SCAN | static final int GUARD_VIRUS_SCAN = 2 | run a virus scanner over the inputs |
GUARD_SYSTEM_INTEGRITY | static final int GUARD_SYSTEM_INTEGRITY = 3 | check System integrity before continuing |
GUARD_HEURISTICS | static final int GUARD_HEURISTICS = 4 | heuristic plausibility checks |
GUARD_ADMIN_INVOLVED | static final int GUARD_ADMIN_INVOLVED = 5 | require admin involvement/approval |
GUARD_DB_INTEGRITY | static final int GUARD_DB_INTEGRITY = 6 | database integrity checks |
GUARD_CHECKSUM | static final int GUARD_CHECKSUM = 7 | checksum/hash verification of payload |
GUARD_RATE_LIMIT | static final int GUARD_RATE_LIMIT = 8 | throttle to resist abuse |
GUARD_SCHEMA_VALIDATE | static final int GUARD_SCHEMA_VALIDATE = 9 | validate input against a declared schema |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
roleOfModifier | int roleOfModifier(int modifierBit) | No description in source. |
roleName | String roleName(int role) | No description in source. |
guardName | String guardName(int guard) | Human-readable names for the control ids (used in reports/backdrops). |
localConcernName | String localConcernName(int concern) | No description in source. |
exposeComponentName | String exposeComponentName(int component) | No description in source. |
defaultGuardsForGuarded | int 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 |
defaultExposeForExposed | int defaultExposeForExposed() | at least a REST endpoint |
defaultConcernForLocal | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
width | int width | bits per word (e.g. 32 or 64) |
fa | SLFullAdder fa | one reusable full-adder cell, applied bit by bit |
result | int result | numeric sum, truncated to `width` bits |
carryOut | int carryOut | carry out of the most significant bit |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int bits) | No description in source. |
bitAt | int bitAt(int value, int i) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
add | int add(int a, int b) | Add two words of `width` bits; ripple the carry through each full adder. |
sum | int sum() | No description in source. |
carry | int carry() | No description in source. |
bitWidth | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 31 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r31 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OP_ADD | static final int OP_ADD = 0 | No description in source. |
OP_SUB | static final int OP_SUB = 1 | No description in source. |
OP_AND | static final int OP_AND = 2 | No description in source. |
OP_OR | static final int OP_OR = 3 | No description in source. |
OP_XOR | static final int OP_XOR = 4 | No description in source. |
OP_NOT | static final int OP_NOT = 5 | No description in source. |
OP_SHL | static final int OP_SHL = 6 | No description in source. |
OP_SHR | static final int OP_SHR = 7 | No description in source. |
OP_CMP | static final int OP_CMP = 8 | No description in source. |
OP_PASS | static final int OP_PASS= 9 | No description in source. |
OP_MUL | static final int OP_MUL = 10 | No description in source. |
OP_DIV | static final int OP_DIV = 11 | No description in source. |
OP_MOD | static final int OP_MOD = 12 | No description in source. |
OP_NEG | static final int OP_NEG = 13 | No description in source. |
width | int width | No description in source. |
adder | SLAdder adder | No description in source. |
result | int result | No description in source. |
flagZero | int flagZero | No description in source. |
flagNeg | int flagNeg | No description in source. |
flagCarry | int flagCarry | No description in source. |
flagOverflow | int flagOverflow | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int bits) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
mask | int mask() | 2^width |
bitAt | int bitAt(int v, int i) | No description in source. |
signBit | int signBit(int v) | No description in source. |
bitwise | int bitwise(int a, int b, int op) | No description in source. |
setFlags | void setFlags(int value, int carry, int overflow) | No description in source. |
execute | int execute(int a, int b, int op) | No description in source. |
out | int out() | No description in source. |
zero | int zero() | No description in source. |
negative | int negative() | No description in source. |
carry | int carry() | No description in source. |
overflow | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 63 | No description in source. |
R_LINK | static final int R_LINK = 62 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
bringUpModel | void 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(). |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
bringUpModel | void 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(). |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
vcore | SLVoltageRail vcore() | Vcore: Zen 5 core rail. Nominal ~1.20 V, safe window ~0.95–1.45 V. |
vsoc | SLVoltageRail vsoc() | Vsoc: SoC / memory-controller rail. AMD caps SoC at ~1.30 V; nominal ~1.20 V. |
vddq | SLVoltageRail vddq() | Vddq: DDR5 I/O rail. DDR5 standard is 1.1 V (1100 mV), window ~1.067–1.166 V. |
ddr5_6400Timing | SLRamTiming 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). |
hedtBoard | SLMotherboard hedtBoard() | HEDT board: sTR5 + TRX50, 4-channel DDR5, up to 88 PCIe 5.0 lanes. |
proBoard | SLMotherboard proBoard() | Workstation board: sTR5 + WRX90, 8-channel DDR5, up to 128 PCIe 5.0 lanes. |
hedtMemory | SLMemoryModule 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). |
proMemory | SLMemoryModule proMemory(int capMiBPerModule) | 8-channel DDR5-6400 populated for the PRO WX platform. |
pcie5x16 | SLSystemBus 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_SP | static final int R_SP = 13; static final int R_LR = 14; static final int R_PC = 15 | No description in source. |
R_CPSR | static final int R_CPSR = 16 | No description in source. |
COND_EQ | static final int COND_EQ = 0; static final int COND_NE = 1; static final int COND_AL = 14 | Condition codes. |
MOV | static final int MOV = 1; static final int ADD = 2; static final int SUB = 3 | Operations (bits 20..27 of the model word). |
CMP | static final int CMP = 4; static final int LDR = 5; static final int STR = 6 | No description in source. |
B | static final int B = 7; static final int BL = 8; static final int SWI = 9 | No description in source. |
securityState | int securityState | 0 non-secure, 1 secure (TrustZone hook) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
condOf | int condOf(int w) | No description in source. |
opOf | int opOf(int w) | No description in source. |
rdOf | int rdOf(int w) | No description in source. |
rnOf | int rnOf(int w) | No description in source. |
op2Of | int op2Of(int w) | No description in source. |
conditionPasses | boolean conditionPasses(int cond) | Evaluate the ARM condition field against current flags. |
decode | void decode(int word) | No description in source. |
exception | void exception(int vector) | Exception / banked-register entry (SWI, IRQ, etc.). |
interrupt | void interrupt(int vector) | No description in source. |
signed12 | int signed12(int v) | No description in source. |
setNZ | void setNZ(int v) | No description in source. |
encode | int encode(int cond, int opcode, int rd, int rn, int op2) | No description in source. |
reg | int reg(int i) | No description in source. |
cpsr | int cpsr() | No description in source. |
secure | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
program | SLProgram program | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet, SLProgram target) | No description in source. |
emit | int emit(int opcode, int rd, int rs, int imm) | Encode and append one instruction; returns the address (index) it landed at. |
mov | int mov(int rd, int imm) | Convenience emitters for the common instructions. |
add | int add(int rd, int rs) | No description in source. |
sub | int sub(int rd, int rs) | No description in source. |
cmp | int cmp(int rd, int rs) | No description in source. |
load | int load(int rd, int addr) | No description in source. |
store | int store(int rs, int addr) | No description in source. |
jmp | int jmp(int addr) | No description in source. |
jz | int jz(int addr) | No description in source. |
jnz | int jnz(int addr) | No description in source. |
syscall | int syscall(int number) | No description in source. |
halt | int halt() | No description in source. |
assembled | SLProgram 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cpu | SLCPU cpu | No description in source. |
boot | SLDiskDriver boot | No description in source. |
memory | SLRAM memory | No description in source. |
kernelLoadAddr | int kernelLoadAddr | No description in source. |
kernelBlocks | int kernelBlocks | No description in source. |
booted | int booted | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLCPU processor, SLDiskDriver bootDisk, SLRAM ram) | No description in source. |
post | boolean post() | POST: minimal power-on self test — confirm core 0 and memory are present. |
loadKernel | int 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. |
handedOff | boolean handedOff() | No description in source. |
entryPoint | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CTRL_IDLE | static final int CTRL_IDLE = 0 | No description in source. |
CTRL_READ | static final int CTRL_READ = 1 | No description in source. |
CTRL_WRITE | static final int CTRL_WRITE = 2 | No description in source. |
name | String name | No description in source. |
width | int width | No description in source. |
addressLane | int addressLane | No description in source. |
dataLane | int dataLane | No description in source. |
controlLane | int controlLane | No description in source. |
transfers | int transfers | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String busName, int bits) | No description in source. |
driveAddress | void driveAddress(int addr) | No description in source. |
driveData | void driveData(int data) | No description in source. |
driveControl | void driveControl(int ctrl) | No description in source. |
transfer | int transfer() | Complete the current transfer; returns the data lane value. |
address | int address() | No description in source. |
data | int data() | No description in source. |
control | int control() | No description in source. |
transferCount | int transferCount() | No description in source. |
busName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | nameful bus: "FSB", "MemBus", "PCIe", "IOBus", ... |
minMHz | int minMHz | lowest clock the operator may dial the bus to |
maxMHz | int maxMHz | highest clock the bus is validated for |
currentMHz | int currentMHz | the variable clock the bus is presently run at |
widthBits | int widthBits | transfer width (for bandwidth reporting) |
transfersPerClk | int transfersPerClk | 1 = SDR, 2 = DDR, 4 = QDR; the data-rate multiplier |
rail | SLVoltageRail rail | the supply this interconnect sits on |
mvPerMHz | int mvPerMHz | how much settled voltage one extra MHz of ceiling needs |
addrPath | SLTiming addrPath | address-lane budget |
dataPath | SLTiming dataPath | data-strobe budget (the carefully-named one) |
ctrlPath | SLTiming ctrlPath | control/handshake budget |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String busName, int floorMHz, int ceilingMHz, int bits, int perClock) | Configure a bus: name, dialing range, width, and data-rate multiplier. |
attachRail | void attachRail(SLVoltageRail supply, int millivoltsPerMHz) | Bind the supply rail and the volts-per-MHz the ceiling needs. |
periodPsAt | int periodPsAt(int mhz) | The clock period in picoseconds for a given MHz: 1e6 ps / MHz. |
strobePeriodPs | int 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). |
setClock | int 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. |
voltageCeilingMHz | int voltageCeilingMHz() | The highest MHz the present settled voltage justifies. With no rail or no volts-per-MHz declared, the datasheet ceiling stands. |
retime | void retime() | Re-stamp every budget's period after a clock change so checks reflect the speed the bus is actually dialed to. |
setAddressPath | void 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. |
setDataPath | void setDataPath(int propagationPs, int setupPs, int holdPs, int jitterPs) | No description in source. |
setControlPath | void setControlPath(int propagationPs, int setupPs, int holdPs) | No description in source. |
honored | boolean 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. |
bandwidthMBs | int bandwidthMBs() | Peak bandwidth in megabytes/sec at the dialed clock: MHz * transfers/clk * (width/8) bytes. |
worstSlackPs | int 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. |
busName | String busName() | No description in source. |
clock | int clock() | No description in source. |
floorMHz | int floorMHz() | No description in source. |
ceilingMHz | int ceilingMHz() | No description in source. |
addressBudget | SLTiming addressBudget() | No description in source. |
dataBudget | SLTiming dataBudget() | No description in source. |
controlBudget | SLTiming 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
level | String level | "L1", "L2", "L3" |
sizeBytes | int sizeBytes | No description in source. |
lineBytes | int lineBytes | No description in source. |
associativity | int associativity | ways |
backing | SLRAM backing | next level down (main memory or a lower cache) |
accesses | int accesses | No description in source. |
hits | int hits | No description in source. |
misses | int misses | No description in source. |
warmLines | int warmLines | modeled count of resident lines |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String cacheLevel, int size, int line, int ways) | No description in source. |
attachBacking | void attachBacking(SLRAM ram) | No description in source. |
lineCount | int lineCount() | No description in source. |
lineOf | int lineOf(int addr) | No description in source. |
access | int 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. |
accessCount | int accessCount() | No description in source. |
hitCount | int hitCount() | No description in source. |
missCount | int missCount() | No description in source. |
hitRatePercent | int hitRatePercent() | hit rate in percent (0..100), integer |
levelName | String levelName() | No description in source. |
SLCadenceConnector #sleela 2.5 (lib/cpu/components/SLCadenceConnector.sleela)
SLCadenceConnector class
Defines SLCadenceConnector — a Dynamite Connector for a memory
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
TECH_SRAM | static final int TECH_SRAM = 0 | Generation ids mirror SLMemoryModule.TECH_* / SLMemoryInterface.TECH_*. |
TECH_DRAM | static final int TECH_DRAM = 1 | No description in source. |
TECH_SDRAM | static final int TECH_SDRAM = 2 | No description in source. |
TECH_DDR | static final int TECH_DDR = 3 | No description in source. |
TECH_DDR2 | static final int TECH_DDR2 = 4 | No description in source. |
TECH_DDR3 | static final int TECH_DDR3 = 5 | No description in source. |
TECH_DDR4 | static final int TECH_DDR4 = 6 | No description in source. |
TECH_DDR5 | static final int TECH_DDR5 = 7 | No description in source. |
referenceName | String referenceName | --- Dynamite Connector contract fields --- the cadence being connected, e.g. "DDR2" |
configuration | String configuration | free-form config note |
status | String status | lifecycle: imported -> resolved -> [deferred] -> loaded |
tech | int tech | --- resolved payload (the cadence this connector binds) --- target generation id (or -1 for a custom profile) |
tREFI_ns | int tREFI_ns | resolved refresh interval |
tRFC_ns | int tRFC_ns | resolved refresh command time |
resolved | int resolved | 1 once resolve()/resolveCustom() has run |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
initialize | void 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. |
resolve | String resolve() | Resolve the reference name into its representative refresh timings. These are the representative per-generation refresh timings a connected slot binds into SLMemoryInterface. |
resolveCustom | String resolveCustom(String label, int refreshIntervalNs, int refreshTimeNs) | Resolve to a genuinely special-purpose profile instead of a named gen. |
deferConstruction | String deferConstruction() | Defer: keep the connector staged but not yet active (the slot stays empty until a later load()). Part of the Dynamite Connector contract. |
load | boolean 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. |
ready | boolean ready() | No description in source. |
referenceId | String referenceId() | No description in source. |
cadenceTech | int cadenceTech() | No description in source. |
refreshIntervalNs | int refreshIntervalNs() | No description in source. |
refreshTimeNs | int refreshTimeNs() | No description in source. |
state | String state() | No description in source. |
equalsStr | boolean equalsStr(String a, String b) | Tiny string equality helper (status is set only to the literals above). |
genName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
gateCount | int gateCount | gates directly in this circuit |
subCircuitCount | int subCircuitCount | nested sub-circuits |
inputs | int inputs | No description in source. |
outputs | int outputs | No description in source. |
propagationUnits | int propagationUnits | modeled gate-delay depth (critical path) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String circuitName, int in, int out) | No description in source. |
addGate | void addGate() | No description in source. |
addGates | void addGates(int n) | No description in source. |
addSubCircuit | void addSubCircuit(SLCircuit c) | No description in source. |
setCriticalPath | void setCriticalPath(int depth) | No description in source. |
totalGates | int totalGates() | No description in source. |
criticalPath | int criticalPath() | No description in source. |
transistorEstimate | int transistorEstimate() | CMOS rule of thumb: a 2-input gate is ~4 transistors; report an estimate. |
circuitName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
frequencyMHz | int frequencyMHz | No description in source. |
level | int level | current clock level, 0 or 1 |
cycles | int cycles | completed cycles (rising edges issued) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int mhz) | No description in source. |
toggle | int toggle() | One half-step: toggle the level. A full cycle is two toggles; a rising edge (0 -> 1) increments the cycle counter. |
tick | int tick() | Issue a full cycle (low then high) and return the new cycle count. |
currentLevel | int currentLevel() | No description in source. |
cycleCount | int cycleCount() | No description in source. |
frequency | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
baseClockMHz | int baseClockMHz | reference/base clock (e.g. FSB/BCLK), MHz |
multiplier | int multiplier | clock multiplier (effective = base × multiplier) |
specMHz | int specMHz | the CPU's rated/spec frequency, MHz |
maxStableMHz | int maxStableMHz | highest frequency the model treats as stable |
overclocked | int overclocked | 1 once pushed above spec |
unstable | int unstable | 1 when effective exceeds maxStableMHz |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configureSpec | void 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). |
setStabilityCeiling | void 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. |
setMultiplier | void setMultiplier(int m) | Overclock by raising the multiplier (classic unlocked-multiplier OC). |
setBaseClock | void setBaseClock(int mhz) | Overclock by raising the base clock (BCLK/FSB OC). |
overclockTo | void overclockTo(int targetMHz) | Overclock directly to a target effective frequency. |
resetToSpec | void resetToSpec() | Return to the rated spec clock. |
reassess | void reassess() | No description in source. |
effectiveMHz | int effectiveMHz() | No description in source. |
rating | int rating() | No description in source. |
base | int base() | No description in source. |
mult | int mult() | No description in source. |
ceiling | int ceiling() | No description in source. |
isOverclocked | boolean isOverclocked() | No description in source. |
isStable | boolean isStable() | No description in source. |
speedRatioMilli | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
lastLanguage | int lastLanguage | No description in source. |
profile | SLTimingProfile profile | the operating point stamped into compiled output |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet) | No description in source. |
useTimingProfile | void 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). |
frontendFor | SLFrontend frontendFor(int langId, String path) | Build the appropriate frontend for a language id. |
languageOf | int languageOf(String path) | Infer the language from a file extension. |
endsWith | boolean endsWith(String s, String suffix) | No description in source. |
length | int length(String s) | No description in source. |
substring | String substring(String s, int a, int b) | No description in source. |
compile | SLProgram compile(String path, int langId, String programName) | Compile a source file in the given language into a runnable SLProgram. |
compileFile | SLProgram compileFile(String path, String programName) | Convenience: infer language from the path extension. |
language | int 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
mem | SLMemoryModule mem(String name, int tech, int capMiB, int bus, int clk, int cl, int ddr) | ---------------- Memory presets ---------------- |
sram_fast | SLMemoryModule sram_fast(int capKiB) | No description in source. |
dram_fpm | SLMemoryModule dram_fpm(int capMiB) | No description in source. |
sdram_pc100 | SLMemoryModule sdram_pc100(int capMiB) | No description in source. |
ddr_400 | SLMemoryModule ddr_400(int capMiB) | No description in source. |
ddr2_800 | SLMemoryModule ddr2_800(int capMiB) | No description in source. |
ddr3_1600 | SLMemoryModule ddr3_1600(int capMiB) | No description in source. |
ddr4_3200 | SLMemoryModule ddr4_3200(int capMiB) | No description in source. |
ddr5_6000 | SLMemoryModule ddr5_6000(int capMiB) | No description in source. |
ddr5_6400 | SLMemoryModule ddr5_6400(int capMiB) | No description in source. |
memChannels | SLMemoryModule 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_quadChannel | SLMemoryModule ddr5_6400_quadChannel(int capMiBPerModule) | DDR5-6400 on a 4-channel HEDT board (Threadripper 9980X/9970X/9960X, TRX50). |
ddr5_6400_octaChannel | SLMemoryModule ddr5_6400_octaChannel(int capMiBPerModule) | DDR5-6400 on an 8-channel workstation board (Threadripper PRO WX, WRX90). |
memInterface | SLMemoryInterface 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. |
ddrCadenceInterface | SLMemoryInterface 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). |
ddr2CadenceInterface | SLMemoryInterface ddr2CadenceInterface(SLMemoryModule realModule) | No description in source. |
ddr3CadenceInterface | SLMemoryInterface ddr3CadenceInterface(SLMemoryModule realModule) | No description in source. |
ddr4CadenceInterface | SLMemoryInterface ddr4CadenceInterface(SLMemoryModule realModule) | No description in source. |
ddr5CadenceInterface | SLMemoryInterface ddr5CadenceInterface(SLMemoryModule realModule) | No description in source. |
cadenceConnector | SLCadenceConnector 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. |
ddrCadence | SLCadenceConnector ddrCadence() | No description in source. |
ddr2Cadence | SLCadenceConnector ddr2Cadence() | No description in source. |
ddr3Cadence | SLCadenceConnector ddr3Cadence() | No description in source. |
ddr4Cadence | SLCadenceConnector ddr4Cadence() | No description in source. |
ddr5Cadence | SLCadenceConnector ddr5Cadence() | No description in source. |
store | SLStorageDevice store(String name, int cls, int iface, int capMiB, int rpm, int seekUs, int mbs) | ---------------- Storage presets ---------------- |
floppy144 | SLStorageDevice floppy144() | ~1.44MB, slow |
mfmHdd | SLStorageDevice mfmHdd() | 20MB, ~65ms seek |
ideHdd | SLStorageDevice ideHdd() | 40GB |
sataHdd | SLStorageDevice sataHdd() | 2TB |
sataSsd | SLStorageDevice sataSsd() | 1TB, ~0.1ms |
nvmeGen3 | SLStorageDevice nvmeGen3() | 3.5GB/s |
nvmeGen4 | SLStorageDevice nvmeGen4() | 7GB/s |
tapeLto | SLStorageDevice tapeLto() | huge, high latency |
optical | SLOpticalDrive optical(String name, int medium, int mult, boolean write, int capMiB) | ---------------- Optical presets ---------------- |
cdrom52 | SLOpticalDrive cdrom52() | No description in source. |
cdrw | SLOpticalDrive cdrw() | No description in source. |
dvd16 | SLOpticalDrive dvd16() | No description in source. |
dvdrw | SLOpticalDrive dvdrw() | No description in source. |
bluRay | SLOpticalDrive bluRay() | No description in source. |
bdxl | SLOpticalDrive bdxl() | No description in source. |
bus | SLSystemBus bus(String name, int type, int clk, int width, int lanes, int laneMBs) | ---------------- Bus presets ---------------- |
isa | SLSystemBus isa() | No description in source. |
pci33 | SLSystemBus pci33() | No description in source. |
agp8x | SLSystemBus agp8x() | No description in source. |
pcieGen3x16 | SLSystemBus pcieGen3x16() | No description in source. |
pcieGen4x16 | SLSystemBus pcieGen4x16() | No description in source. |
pcieGen5x16 | SLSystemBus pcieGen5x16() | No description in source. |
fsb | SLSystemBus fsb(int mhz) | No description in source. |
board | SLMotherboard board(String name, int socket, String chipset, int channels, | ---------------- Motherboard presets ---------------- |
trx50 | SLMotherboard trx50() | AMD Threadripper 9000 HEDT: sTR5 + TRX50, 4-channel DDR5, up to 88 PCIe 5.0 lanes. |
wrx90 | SLMotherboard 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
charsWritten | int charsWritten | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLIOBus bus, int port) | No description in source. |
putChar | int putChar(int code) | Write one character code to the console port and to the host terminal. |
charCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
decoder | SLInstructionDecoder decoder | No description in source. |
regs | SLRegisterFile regs | No description in source. |
alu | SLALU alu | No description in source. |
pc | SLProgramCounter pc | No description in source. |
status | SLStatusRegister status | No description in source. |
memory | SLRAM memory | No description in source. |
stack | SLStack stack | No description in source. |
halted | int halted | No description in source. |
executed | int executed | No description in source. |
syscallVector | int syscallVector | address the OS installed for SYSCALL |
trapVector | int trapVector | address installed for TRAP (faults / guest exits) |
lastSyscall | int lastSyscall | last syscall number requested (for the kernel to read) |
lastTrap | int lastTrap | last trap number requested |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet, SLInstructionDecoder dec, | No description in source. |
installSyscallVector | void installSyscallVector(int addr) | No description in source. |
installTrapVector | void installTrapVector(int addr) | No description in source. |
isHalted | boolean isHalted() | No description in source. |
instructionsRetired | int instructionsRetired() | No description in source. |
pendingSyscall | int pendingSyscall() | No description in source. |
pendingTrap | int pendingTrap() | No description in source. |
clearSyscall | void clearSyscall() | No description in source. |
clearTrap | void clearTrap() | No description in source. |
step | int step() | Execute exactly one instruction at the current PC. Returns the opcode run, or -1 if the core is halted. |
raiseTrap | void raiseTrap(int number) | Deliver a trap: record it and vector to the handler (or just advance). |
toAluOp | int toAluOp(int op) | Map ISA arithmetic opcodes onto SLALU operation selectors. |
run | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
id | int id | No description in source. |
width | int width | No description in source. |
clock | SLClock clock | No description in source. |
regs | SLRegisterFile regs | No description in source. |
alu | SLALU alu | No description in source. |
pc | SLProgramCounter pc | No description in source. |
status | SLStatusRegister status | No description in source. |
isa | SLInstructionSet isa | No description in source. |
decoder | SLInstructionDecoder decoder | No description in source. |
control | SLControlUnit control | No description in source. |
stack | SLStack stack | No description in source. |
l1 | SLCache l1 | No description in source. |
irq | SLInterruptController irq | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
assemble | void assemble(int coreId, int bits, int clockMHz, SLRAM sharedMemory) | No description in source. |
loadEntryPoint | void loadEntryPoint(int addr) | No description in source. |
installSyscallVector | void installSyscallVector(int addr) | No description in source. |
tick | int tick() | Advance one clock cycle: tick the clock, execute one instruction. |
timerTick | void timerTick() | Raise the timer interrupt (the OS uses this for preemptive scheduling). |
halted | boolean halted() | No description in source. |
pendingSyscall | int pendingSyscall() | No description in source. |
clearSyscall | void clearSyscall() | No description in source. |
coreId | int coreId() | No description in source. |
cyclesRun | int cyclesRun() | No description in source. |
retired | int retired() | No description in source. |
controlUnit | SLControlUnit controlUnit() | No description in source. |
registers | SLRegisterFile registers() | No description in source. |
interrupts | SLInterruptController interrupts() | No description in source. |
hardwareStack | SLStack hardwareStack() | No description in source. |
instructionSet | SLInstructionSet 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
vendor | String vendor | No description in source. |
model | String model | No description in source. |
coreCount | int coreCount | No description in source. |
width | int width | No description in source. |
clockMHz | int clockMHz | No description in source. |
memory | SLRAM memory | No description in source. |
l3 | SLCache l3 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String cpuVendor, String cpuModel, int cores, int bits, int mhz) | No description in source. |
power | void power(SLRAM mainMemory) | Build the chip: allocate memory, the shared L3, and each core. |
core | SLCore core(int index) | No description in source. |
bootCore | SLCore bootCore() | The bootstrap processor (core 0) is where firmware/the OS starts. |
vendorName | String vendorName() | No description in source. |
modelName | String modelName() | No description in source. |
cores | int cores() | No description in source. |
wordWidth | int wordWidth() | No description in source. |
clock | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ENDIAN_LITTLE | static final int ENDIAN_LITTLE = 0 | No description in source. |
ENDIAN_BIG | static final int ENDIAN_BIG = 1 | No description in source. |
identity | String identity | ISA name, e.g. "MOS 6502", "ARMv7-A" |
isa | String isa | ISA family tag, e.g. "6502", "arm", "riscv" |
wordWidth | int wordWidth | data path width in bits |
addressWidth | int addressWidth | address bus width in bits |
endian | int endian | No description in source. |
registerFile | int registerFile | architectural register count |
pipeline | int pipeline | assumed pipeline depth (0 = none) |
executionUnits | int executionUnits | No description in source. |
cacheHierarchy | int cacheHierarchy | cache level count |
memoryController | int memoryController | 1 if a memory controller is modelled |
interconnect | int interconnect | No description in source. |
ioTiming | int ioTiming | No description in source. |
dmaController | int dmaController | No description in source. |
mmu | int mmu | No description in source. |
interruptController | int interruptController | No description in source. |
couplers | int couplers | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, String isaTag, int dataBits, int addrBits, int endianness, | No description in source. |
addressSpaceWords | int addressSpaceWords() | Address space size in words implied by the address width (bounded for the bounded SLeeLa surface; large ISAs use a windowed subset). |
name | String name() | No description in source. |
isaFamily | String isaFamily() | No description in source. |
dataWidth | int dataWidth() | No description in source. |
addrWidth | int addrWidth() | No description in source. |
endianness | int endianness() | No description in source. |
littleEndian | boolean littleEndian() | No description in source. |
registers | int registers() | No description in source. |
hasMmu | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX | static final int MAX = 128 | No description in source. |
key | String[] key | stable selection key, e.g. "6502" |
label | String[] label | human label, e.g. "MOS 6502" |
family | String[] family | architecture family, e.g. "6502", "arm", "x86" |
specMHz | int[] specMHz | rated spec clock (MHz) |
width | int[] width | data-path width (bits) |
count | int count | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
add | void add(String k, String human, String fam, int mhz, int bits) | Register one model in the roster. |
size | int size() | No description in source. |
has | boolean has(String k) | No description in source. |
indexOf | int indexOf(String k) | No description in source. |
labelOf | String labelOf(String k) | No description in source. |
familyOf | String familyOf(String k) | No description in source. |
specOf | int specOf(String k) | No description in source. |
widthOf | int widthOf(String k) | No description in source. |
keyAt | String keyAt(int i) | No description in source. |
labelAt | String labelAt(int i) | No description in source. |
specAt | int specAt(int i) | No description in source. |
list | String list() | A newline-separated listing of the roster, for a chooser or report. |
make | SLCPURuntime 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. |
instantiate | SLCPURuntime 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. |
seedRoster | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX | static final int MAX = 128 | No description in source. |
catalog | SLCPUCatalog catalog | No description in source. |
memberKey | String[] memberKey | selected catalog keys |
member | SLCPURuntime[] member | the configured CPUs |
size | int size | No description in source. |
ran | int ran | --- net-results accumulators (reset per run) --- CPUs that produced a result |
rejected | int rejected | CPUs that rejected the workload |
netOutput | int netOutput | sum of observable outputs across the fleet |
totalSpecMHz | int totalSpecMHz | sum of rated clocks |
totalEffectiveMHz | int totalEffectiveMHz | sum of effective (post-overclock) clocks |
totalInstructions | int totalInstructions | sum of instructions retired across the fleet |
memberReport | String memberReport | per-member lines accumulated during a run |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLCPUCatalog cat) | No description in source. |
select | boolean select(String key) | Add one CPU by catalog key; returns true if the key resolved. |
selectAll | void selectAll() | Add every model in the catalog (the whole roster). |
count | int count() | No description in source. |
at | SLCPURuntime at(int i) | No description in source. |
keyAt | String keyAt(int i) | No description in source. |
overclockFleetPercent | void 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. |
runAcross | int 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. |
accumulate | void accumulate(String key, SLCPURuntime cpu, SLCPUResource grant, int out, SLWorkload job) | Fold one member's outcome into the net results. |
resetResults | void resetResults() | No description in source. |
fleetSize | int fleetSize() | No description in source. |
completed | int completed() | No description in source. |
rejectedCount | int rejectedCount() | No description in source. |
net | int net() | No description in source. |
aggregateSpecMHz | int aggregateSpecMHz() | No description in source. |
aggregateEffectiveMHz | int aggregateEffectiveMHz() | No description in source. |
retiredInstructions | int retiredInstructions() | No description in source. |
fastest | String fastest() | No description in source. |
slowest | String slowest() | No description in source. |
fleetSpeedRatioMilli | int 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. |
scoreboard | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
architecture | String architecture | No description in source. |
clock | int clock | No description in source. |
registers | int registers | register count |
width | int width | data path width in bits |
pipeline | int pipeline | pipeline stage count (0 = non-pipelined) |
executionUnits | int executionUnits | No description in source. |
caches | int caches | cache level count |
memory | int memory | addressable words |
ioBus | int ioBus | 1 if an I/O bus is present |
dma | int dma | 1 if a DMA engine is present |
mmu | int mmu | 1 if an MMU is present |
interrupts | int interrupts | interrupt line count |
couplers | int couplers | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String arch, int clockMHz, int regCount, int bits, | No description in source. |
withCaches | void withCaches(int levels) | No description in source. |
withIoBus | void withIoBus() | No description in source. |
withDma | void withDma() | No description in source. |
withMmu | void withMmu() | No description in source. |
withInterrupts | void withInterrupts(int n) | No description in source. |
withCouplers | void withCouplers(int n) | No description in source. |
validate | boolean validate() | A model is valid when it names an architecture, has a positive width and register count, and a non-empty address space. |
architectureName | String architectureName() | No description in source. |
clockMHz | int clockMHz() | No description in source. |
registerCount | int registerCount() | No description in source. |
dataWidth | int dataWidth() | No description in source. |
pipelineDepth | int pipelineDepth() | No description in source. |
units | int units() | No description in source. |
cacheLevels | int cacheLevels() | No description in source. |
addressableWords | int addressableWords() | No description in source. |
hasMmu | boolean hasMmu() | No description in source. |
hasDma | boolean hasDma() | No description in source. |
hasIoBus | boolean hasIoBus() | No description in source. |
interruptLines | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PRIORITY_IDLE | static final int PRIORITY_IDLE = 0 | Scheduling priority bands. |
PRIORITY_NORMAL | static final int PRIORITY_NORMAL = 1 | No description in source. |
PRIORITY_HIGH | static final int PRIORITY_HIGH = 2 | No description in source. |
PRIORITY_REALTIME | static final int PRIORITY_REALTIME = 3 | No description in source. |
memoryWords | int memoryWords | address-space words the workload may use |
instructionBudget | int instructionBudget | max instructions it may retire this grant (time-slice) |
priority | int priority | No description in source. |
ioAllowed | int ioAllowed | 1 = may issue I/O / service opcodes |
privileged | int privileged | 1 = may run supervisor-level services |
coreAffinity | int coreAffinity | preferred core index (-1 = any) |
instructionsUsed | int instructionsUsed | Accounting (filled while running). |
memoryHighWater | int memoryHighWater | highest word index touched |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int words, int budget, int schedPriority) | No description in source. |
allowIo | void allowIo(boolean on) | No description in source. |
allowPrivileged | void allowPrivileged(boolean on) | No description in source. |
pinToCore | void pinToCore(int index) | No description in source. |
chargeInstruction | void chargeInstruction() | Budget accounting, used by the CPU's run loop. |
observeAddress | void observeAddress(int addr) | No description in source. |
exhausted | boolean exhausted() | No description in source. |
withinMemory | boolean withinMemory(int addr) | No description in source. |
reset | void reset() | No description in source. |
words | int words() | No description in source. |
budget | int budget() | No description in source. |
schedulingPriority | int schedulingPriority() | No description in source. |
ioEnabled | boolean ioEnabled() | No description in source. |
privilegedMode | boolean privilegedMode() | No description in source. |
affinity | int affinity() | No description in source. |
used | int used() | No description in source. |
peakAddress | int peakAddress() | No description in source. |
remaining | int remaining() | No description in source. |
SLCPURuntime #sleela 2.5 (lib/cpu/SLCPURuntime.sleela)
SLCPURuntime class
Defines SLCPURuntime — the runnable base class every specific
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
archName | String archName | No description in source. |
width | int width | data path width in bits |
addrWidth | int addrWidth | address bus width in bits |
regCount | int regCount | architectural register count |
regs | SLRAM regs | architectural registers (one word each) |
mem | SLRAM mem | word-addressable system memory |
memWords | int memWords | No description in source. |
alu | SLALU alu | No description in source. |
pc | int pc | program counter (word index) |
halted | int halted | No description in source. |
retired | int retired | instructions executed |
clock | SLClockPolicy clock | --- clock: run at the model's spec, with overclock support --- spec/overclock frequency policy |
specMHz | int specMHz | the model's rated clock (set via setSpecClock) |
substrate | SLSleelaVM substrate | --- secondary-VM substrate: the CPU runs its lowered form here --- |
op | SLSleelaOpcode op | No description in source. |
lowering | int lowering | 1 => execute by lowering to canonical opcodes |
workIsa | SLInstructionSet 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). --- |
workDecoder | SLInstructionDecoder workDecoder | No description in source. |
workSys | SLSystemCall workSys | No description in source. |
activeGrant | SLCPUResource activeGrant | the grant the current workload runs within |
admittedWorkloads | int admittedWorkloads | No description in source. |
completedWorkloads | int completedWorkloads | No description in source. |
attachedSubstrate | SLSleelaVM 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. |
dmaOption | int 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 |
gpuOption | int gpuOption | 1 when native GPU access is enabled |
dma | SLDMAController dma | the DMA engine (operates over this CPU's memory) |
gpu | SLGPUDevice gpu | the GPU device |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
bringUp | void bringUp(String name, int dataBits, int addressBits, int registers, int memoryWords) | Bring the inherited machinery up once a subclass has set its widths. |
enableDMA | void 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. |
disableDMA | void disableDMA() | No description in source. |
dmaEnabled | boolean dmaEnabled() | No description in source. |
dmaEngine | SLDMAController dmaEngine() | No description in source. |
dmaCopy | int dmaCopy(int src, int dst, int length) | Convenience passthrough for the common bulk move (returns words moved or -1). |
enableGPU | void 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. |
enableGPU | void enableGPU(String name, int units, int lanes, int core, int vramMiB) | No description in source. |
disableGPU | void disableGPU() | No description in source. |
gpuEnabled | boolean gpuEnabled() | No description in source. |
gpuDevice | SLGPUDevice gpuDevice() | No description in source. |
workloadIsa | SLInstructionSet 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). |
attachSubstrate | void attachSubstrate(SLSleelaVM hostSubstrate) | Host hands its substrate to the CPU so the CPU runs nested on it (SLVM). |
detachSubstrate | void detachSubstrate() | No description in source. |
nested | boolean nested() | No description in source. |
setSpecClock | void 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(). |
overclock | boolean 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). |
setClockMultiplier | void setClockMultiplier(int m) | No description in source. |
setBaseClock | void setBaseClock(int mhz) | No description in source. |
setStabilityCeiling | void setStabilityCeiling(int mhz) | No description in source. |
resetClock | void resetClock() | No description in source. |
clockPolicy | SLClockPolicy clockPolicy() | No description in source. |
specClockMHz | int specClockMHz() | No description in source. |
effectiveMHz | int effectiveMHz() | No description in source. |
overclocked | boolean overclocked() | No description in source. |
clockStable | boolean clockStable() | No description in source. |
cyclesInMicroseconds | int 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). |
mapWorkload | SLSleelaVM 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. |
admit | boolean 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. |
runWorkload | int 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. |
grantsAdmitted | int grantsAdmitted() | No description in source. |
workloadsRun | int workloadsRun() | No description in source. |
currentGrant | SLCPUResource currentGrant() | No description in source. |
readReg | int readReg(int i) | --- register / memory access (what decode() uses) --- |
writeReg | void writeReg(int i, int v) | No description in source. |
readMem | int readMem(int addr) | No description in source. |
writeMem | void writeMem(int addr, int v) | No description in source. |
maskWord | int maskWord(int v) | No description in source. |
aluOp | int aluOp(int a, int b, int op) | --- ALU surface (decode() routes arithmetic through here so flags are set) --- |
enableLowering | void enableLowering() | --- lowering surface: emit canonical opcodes onto the secondary VM --- |
emitConst | int emitConst(int v) | No description in source. |
emitLoadGlobal | int emitLoadGlobal(int slot) | No description in source. |
emitStoreGlobal | int emitStoreGlobal(int slot) | No description in source. |
emitAdd | int emitAdd() | No description in source. |
emitSub | int emitSub() | No description in source. |
emitMul | int emitMul() | No description in source. |
emitPrint | int emitPrint() | No description in source. |
emitHalt | int emitHalt() | No description in source. |
emitJump | int emitJump(int target) | No description in source. |
emitJumpIfFalse | int emitJumpIfFalse(int target) | No description in source. |
runLowered | int 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. |
loweredOutput | int loweredOutput() | No description in source. |
engine | SLSleelaVM engine() | No description in source. |
fetch | int fetch() | --- fetch-decode-execute lifecycle (overridable) --- Default fetch: read the instruction word at pc and advance. |
decode | void 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. |
preFetch | void preFetch() | Per-instruction hook a subclass overrides for M1-cycle side effects (e.g. the Z80 memory refresh). Default does nothing. |
step | int step() | One instruction: pre-fetch hook, fetch, decode/execute, count. |
run | int run(int budget) | No description in source. |
reset | void reset() | No description in source. |
loadProgramWord | void loadProgramWord(int addr, int word) | No description in source. |
setEntryPoint | void setEntryPoint(int addr) | No description in source. |
interrupt | void interrupt(int vector) | arch-specific; default no-op |
validate | boolean validate() | --- introspection --- |
architecture | String architecture() | No description in source. |
programCounter | int programCounter() | No description in source. |
instructionsRetired | int instructionsRetired() | No description in source. |
isHalted | boolean isHalted() | No description in source. |
dataWidth | int dataWidth() | No description in source. |
registerCount | int registerCount() | No description in source. |
zero | int zero() | No description in source. |
negative | int negative() | No description in source. |
carry | int carry() | No description in source. |
overflow | int overflow() | No description in source. |
runByOpcodes | int 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. |
runByOpcodes | int runByOpcodes(int[] program, int budget) | No description in source. |
runByEquivalence | int 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. |
opcodeObservable | int 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. |
basisHolds | boolean 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. |
runsByBoth | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | nameful: "core0-pipeline", ... |
minMHz | int minMHz | lowest core clock the operator may dial |
maxMHz | int maxMHz | datasheet ceiling for the core clock |
currentMHz | int currentMHz | the variable core clock presently selected |
vcore | SLVoltageRail vcore | the core supply rail |
mvPerMHz | int mvPerMHz | settled Vcore each extra MHz of ceiling needs |
fetch | SLTiming fetch | fetch-stage critical path |
decode | SLTiming decode | decode-stage critical path |
execute | SLTiming execute | execute-stage critical path (usually the long pole) |
writeback | SLTiming writeback | writeback-stage critical path |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String coreName, int floorMHz, int ceilingMHz) | No description in source. |
attachVcore | void attachVcore(SLVoltageRail rail, int millivoltsPerMHz) | No description in source. |
periodPsAt | int periodPsAt(int mhz) | No description in source. |
setFetch | void setFetch(int propPs, int setupPs, int holdPs) | State a stage's measured path (propagation + setup, with hold). |
setDecode | void setDecode(int propPs, int setupPs, int holdPs) | No description in source. |
setExecute | void setExecute(int propPs, int setupPs, int holdPs) | No description in source. |
setWriteback | void setWriteback(int propPs, int setupPs, int holdPs) | No description in source. |
setClockJitter | void setClockJitter(int jitterPs) | Jitter from the clock tree applies to every stage equally. |
criticalMaxMHz | int criticalMaxMHz() | The honest maximum core clock: the lowest per-stage max-frequency (the critical stage wins) further capped by what the settled Vcore supports. |
voltageCeilingMHz | int voltageCeilingMHz() | No description in source. |
setClock | int setClock(int mhz) | Dial the variable core clock, clamped into [min,max] and into the honest critical/voltage ceiling. Returns the clock actually set. |
retime | void retime() | No description in source. |
criticalStage | String criticalStage() | Which stage is the critical path, by name — nameful reporting. |
honored | boolean honored() | Every stage honored at the dialed clock AND Vcore in limits. |
timingName | String timingName() | No description in source. |
clock | int clock() | No description in source. |
floorMHz | int floorMHz() | No description in source. |
ceilingMHz | int ceilingMHz() | No description in source. |
executeBudget | SLTiming 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
STATE_UNLOADED | static final int STATE_UNLOADED = 0 | No description in source. |
STATE_ATTACHED | static final int STATE_ATTACHED = 1 | No description in source. |
STATE_OPEN | static final int STATE_OPEN = 2 | No description in source. |
name | String name | No description in source. |
portNumber | int portNumber | No description in source. |
irqLine | int irqLine | No description in source. |
state | int state | No description in source. |
io | SLIOBus io | No description in source. |
opsIn | int opsIn | No description in source. |
opsOut | int opsOut | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String driverName, int port, int irq, SLIOBus bus) | No description in source. |
probe | boolean probe() | Lifecycle. probe() asks whether the device is present; attach() binds it. |
attach | void attach() | No description in source. |
open | void open() | No description in source. |
close | void close() | No description in source. |
detach | void detach() | No description in source. |
read | int read() | Default transfer: byte/word through the bound port. Concrete drivers override with device-specific framing. |
write | int write(int value) | No description in source. |
serviceInterrupt | void serviceInterrupt() | Interrupt service routine entry; concrete drivers override. |
ready | boolean ready() | No description in source. |
driverName | String driverName() | No description in source. |
irq | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
drive | SLHardDrive drive | No description in source. |
dma | SLDMAController dma | No description in source. |
blocksRead | int blocksRead | No description in source. |
blocksWritten | int blocksWritten | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLIOBus bus, int port, SLHardDrive hd, SLDMAController dmaEngine) | No description in source. |
readBlock | int readBlock(int block) | No description in source. |
writeBlock | int writeBlock(int block, int payloadHandle) | No description in source. |
dmaReadInto | int dmaReadInto(int diskBlock, int memWord, int words) | Bulk read via DMA directly into main memory, then the device raises its IRQ. |
serviceInterrupt | void serviceInterrupt() | No description in source. |
readsIssued | int readsIssued() | No description in source. |
writesIssued | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MODE_MEM_TO_MEM | static final int MODE_MEM_TO_MEM = 0 | Transfer modes. |
MODE_MEM_TO_DEV | static final int MODE_MEM_TO_DEV = 1 | No description in source. |
MODE_DEV_TO_MEM | static final int MODE_DEV_TO_MEM = 2 | No description in source. |
CHANNELS | static final int CHANNELS = 8 | No description in source. |
enabled | int enabled | 1 when the DMA option is on |
memory | SLRAM memory | the address space transfers operate over |
busyMask | int busyMask | Per-channel descriptors (bounded: 8 channels, wired as fields). bit c set while channel c is running |
completedMask | int completedMask | bit c set once channel c finished |
transfersDone | int transfersDone | completed transfers |
wordsMoved | int wordsMoved | total words moved |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLRAM addressSpace) | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
isEnabled | boolean isEnabled() | No description in source. |
transfer | int 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. |
memcpy | int memcpy(int src, int dst, int length) | Convenience: a plain memory-to-memory move on channel 0. |
fill | int fill(int channel, int dst, int length, int value) | Fill a region with a constant (memset-style) without CPU involvement. |
start | void start(int channel) | No description in source. |
complete | void complete(int channel) | No description in source. |
stop | void stop(int channel) | No description in source. |
busy | boolean busy(int channel) | No description in source. |
finished | boolean finished(int channel) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
transfers | int transfers() | No description in source. |
totalWords | int totalWords() | No description in source. |
channels | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
console | SLConsoleDriver console | No description in source. |
disk | SLDiskDriver disk | No description in source. |
keyboard | SLKeyboardDriver keyboard | No description in source. |
net | SLNetworkDriver net | No description in source. |
installed | int installed | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
installConsole | void installConsole(SLConsoleDriver d) | No description in source. |
installDisk | void installDisk(SLDiskDriver d) | No description in source. |
installKeyboard | void installKeyboard(SLKeyboardDriver d) | No description in source. |
installNetwork | void installNetwork(SLNetworkDriver d) | No description in source. |
dispatchInterrupt | void dispatchInterrupt(int line) | Route an interrupt line to the driver that owns it (ISR dispatch). |
consoleDriver | SLConsoleDriver consoleDriver() | No description in source. |
diskDriver | SLDiskDriver diskDriver() | No description in source. |
keyboardDriver | SLKeyboardDriver keyboardDriver() | No description in source. |
networkDriver | SLNetworkDriver networkDriver() | No description in source. |
driverCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
buildName | String buildName | No description in source. |
cpu | SLCPURuntime cpu | No description in source. |
board | SLMotherboard board | No description in source. |
memory | SLMemoryModule memory | No description in source. |
memInterface | SLMemoryInterface memInterface | optional OOD cadence-overlay over `memory` |
tiers | SLMemoryTierRouter tiers | optional two-tier (usual/accurate) router |
storage | SLStorageDevice storage | No description in source. |
optical | SLOpticalDrive optical | No description in source. |
bus | SLSystemBus bus | No description in source. |
assembled | int assembled | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name) | No description in source. |
installCpu | void installCpu(SLCPURuntime chosenCpu) | Pick parts (any may be omitted; CPU and memory are required to assemble). |
installBoard | void installBoard(SLMotherboard motherboard) | No description in source. |
installMemory | void installMemory(SLMemoryModule module) | No description in source. |
installStorage | void installStorage(SLStorageDevice device) | No description in source. |
installOptical | void installOptical(SLOpticalDrive drive) | No description in source. |
installBus | void installBus(SLSystemBus systemBus) | No description in source. |
installMemoryInterface | void 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. |
installUsualTier | void 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. |
installAccurateTier | void installAccurateTier(SLMemoryModule m) | No description in source. |
setMainTier | void setMainTier(int tier) | No description in source. |
enableDMA | void 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. |
enableGPU | void enableGPU() | No description in source. |
dmaEnabled | boolean dmaEnabled() | No description in source. |
gpuEnabled | boolean gpuEnabled() | No description in source. |
setClock | boolean 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. |
assemble | boolean 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. |
effectiveMemoryBandwidthMBs | int 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. |
memoryBandwidthMBs | int 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. |
boardFits | boolean 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. |
processor | SLCPURuntime processor() | No description in source. |
motherboard | SLMotherboard motherboard() | No description in source. |
ram | SLMemoryModule ram() | No description in source. |
ramInterface | SLMemoryInterface ramInterface() | No description in source. |
hasMemoryInterface | boolean hasMemoryInterface() | No description in source. |
tierRouter | SLMemoryTierRouter 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. |
twoTierMemory | boolean twoTierMemory() | No description in source. |
memoryForTier | SLMemoryModule memoryForTier(int declaredTier) | No description in source. |
disk | SLStorageDevice disk() | No description in source. |
opticalDrive | SLOpticalDrive opticalDrive() | No description in source. |
systemBus | SLSystemBus systemBus() | No description in source. |
ready | boolean ready() | No description in source. |
name | String name() | No description in source. |
cpuSpecMHz | int cpuSpecMHz() | No description in source. |
cpuEffectiveMHz | int cpuEffectiveMHz() | No description in source. |
cpuOverclocked | boolean cpuOverclocked() | No description in source. |
cpuStable | boolean cpuStable() | No description in source. |
SLExtensibleNetwork #sleela 2.5 (lib/cpu/SLExtensibleNetwork.sleela)
SLExtensibleNetwork class
Defines SLExtensibleNetwork — the language feature that lets the
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
referenceName | String referenceName | --- Dynamite Connector contract --- the System this network fronts |
configuration | String configuration | free-form config note |
status | String status | imported -> resolved -> [deferred] -> loaded |
sem | SLAccessSemantics sem | the role/catalog source of truth |
memberCount | int memberCount | Registered 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_MEMBERS | static final int MAX_MEMBERS = 8 | No description in source. |
hopChainLength | int hopChainLength | No description in source. |
resolved | int resolved | 1 once resolve() has run |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
initialize | void initialize(String systemName, String config) | No description in source. |
registerMember | boolean 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. |
setRoleAt | void setRoleAt(int idx, int role) | No description in source. |
roleAt | int roleAt(int idx) | No description in source. |
setHopAt | void setHopAt(int idx, int order) | No description in source. |
hopAt | int hopAt(int idx) | No description in source. |
resolve | String 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. |
deferConstruction | String deferConstruction() | Defer realization (stage the network without standing the backdrop up yet). |
load | boolean load() | Load: realize the backdrop. Fail-closed — refuses if not resolved. |
ready | boolean ready() | No description in source. |
exposureBackdrop | int exposureBackdrop() | --- backdrop the VM sets up per role (defaults from SLAccessSemantics) --- Exposure components the public hop surface is stood up with. |
localBackdrop | int localBackdrop() | Local concerns the private surface declares. |
guardBackdrop | int guardBackdrop() | Integrity controls the protected surface enforces. |
competent | boolean 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). |
toManifest | SLAccessManifest toManifest() | Flatten the resolved network into the serializable manifest the compiled image carries and the VM reads back. |
referenceId | String referenceId() | No description in source. |
state | String state() | No description in source. |
members | int members() | No description in source. |
exposed | int exposed() | No description in source. |
localMembers | int localMembers() | No description in source. |
guardedMembers | int guardedMembers() | No description in source. |
hopCount | int hopCount() | No description in source. |
equalsStr | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_FILES | static final int MAX_FILES = 8 | No description in source. |
disk | SLDiskDriver disk | No description in source. |
fileCount | int fileCount | No description in source. |
nextFreeBlock | int nextFreeBlock | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLDiskDriver blockDevice, int dataStartBlock) | No description in source. |
create | int create(String name, int blocks) | Create a file occupying `blocks` contiguous blocks; returns its index. |
indexOf | int indexOf(String name) | No description in source. |
startBlock | int startBlock(int idx) | No description in source. |
lengthBlocks | int lengthBlocks(int idx) | No description in source. |
readFirstBlock | int readFirstBlock(String name) | Read the first block of a named file (loader entry; full reads loop over the file's block run). |
files | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
master | SLLatch master | No description in source. |
slave | SLLatch slave | No description in source. |
d | int d | sampled data input |
lastClk | int lastClk | previous clock level, for edge detection |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build() | No description in source. |
setD | void setD(int bit) | No description in source. |
clock | int clock(int clk) | Drive the clock. On the rising edge (0 -> 1), the sampled D propagates through master then slave to the output. |
read | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
LANG_SLEELA | static final int LANG_SLEELA = 0 | No description in source. |
LANG_C | static final int LANG_C = 1 | No description in source. |
LANG_CPP | static final int LANG_CPP = 2 | No description in source. |
LANG_JAVA | static final int LANG_JAVA = 3 | No description in source. |
language | String language | No description in source. |
langId | int langId | No description in source. |
sourcePath | String sourcePath | No description in source. |
diagnostics | int diagnostics | count of errors/warnings produced |
ir | SLIR ir | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String lang, int id, String path) | No description in source. |
parse | boolean parse() | Lex + parse + semantic check. Concrete frontends override; the base reports readiness only. |
lower | SLIR 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). |
SLIRInstructionConst | int SLIRInstructionConst() | Helper so subclasses can reference the IR_HALT constant without an instance. |
intermediate | SLIR intermediate() | No description in source. |
languageName | String languageName() | No description in source. |
languageId | int languageId() | No description in source. |
diagnosticCount | int 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(String path) | No description in source. |
lower | SLIR 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).
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
initCpp | void initCpp(String path) | No description in source. |
lower | SLIR 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(String path) | No description in source. |
lower | SLIR 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.
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(String path) | No description in source. |
lower | SLIR 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
h1 | SLHalfAdder h1 | No description in source. |
h2 | SLHalfAdder h2 | No description in source. |
orGate | SLGate orGate | No description in source. |
sum | int sum | No description in source. |
carryOut | int carryOut | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build() | No description in source. |
add | void add(int a, int b, int carryIn) | No description in source. |
sumBit | int sumBit() | No description in source. |
carryBit | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
AND | static final int AND = 0 | No description in source. |
OR | static final int OR = 1 | No description in source. |
NOT | static final int NOT = 2 | No description in source. |
NAND | static final int NAND = 3 | No description in source. |
NOR | static final int NOR = 4 | No description in source. |
XOR | static final int XOR = 5 | No description in source. |
XNOR | static final int XNOR = 6 | No description in source. |
BUF | static final int BUF = 7 | No description in source. |
kind | int kind | one of the constants above |
lastOutput | int lastOutput | most recent evaluated output bit |
evaluations | int evaluations | how many times this gate has been evaluated |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int gateKind) | No description in source. |
clampBit | int clampBit(int v) | No description in source. |
eval | int eval(int a, int b) | Evaluate the gate for the given input bits. For unary gates (NOT, BUF), only `a` is used. |
output | int output() | No description in source. |
kindOf | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
model | String model | e.g. "SLeeLa Compute GPU" |
computeUnits | int computeUnits | number of parallel compute units |
lanesPerUnit | int lanesPerUnit | SIMT lanes per unit (warp/wavefront width) |
clockMHz | int clockMHz | core clock |
vramMiB | int vramMiB | VRAM capacity |
enabled | int enabled | 1 when the GPU option is on |
nativeAvailable | int nativeAvailable | 1 if a real host GPU is reachable over the bridge |
vram | SLRAM vram | device memory |
kernelVM | SLSleelaVM kernelVM | executes a kernel's canonical opcodes (per-lane model) |
op | SLSleelaOpcode op | No description in source. |
kernelsRun | int kernelsRun | No description in source. |
lastResult | int lastResult | observable output of the last kernel |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int units, int lanes, int core, int vramMegabytes) | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
isEnabled | boolean isEnabled() | No description in source. |
totalLanes | int totalLanes() | Total parallel lanes across the device. |
probeNative | void 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. |
nativeAccess | boolean nativeAccess() | No description in source. |
writeVram | void writeVram(int addr, int value) | --- VRAM access (host<->device copies are typically via DMA) --- |
readVram | int readVram(int addr) | No description in source. |
deviceMemory | SLRAM deviceMemory() | No description in source. |
emitKernel | int emitKernel(int opcode, int arg) | Build a kernel into the device's kernel engine (canonical opcodes). |
dispatch | int 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. |
kernelEngine | SLSleelaVM kernelEngine() | No description in source. |
kernelCount | int kernelCount() | No description in source. |
result | int result() | No description in source. |
name | String name() | No description in source. |
units | int units() | No description in source. |
lanes | int lanes() | No description in source. |
clock | int clock() | No description in source. |
vramCapacity | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
backing | SLHardDrive backing | No description in source. |
blockNo | int blockNo | No description in source. |
bufAddr | int bufAddr | No description in source. |
status | int status | 0 idle, 1 busy, 2 done |
reads | int reads | No description in source. |
writes | int writes | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(int base, int irq, SLHardDrive drive) | No description in source. |
read | int read(int addr) | No description in source. |
write | void write(int addr, int value) | No description in source. |
command | void command(int cmd) | Execute a block command and signal completion. |
readCount | int readCount() | No description in source. |
writeCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
charsOut | int charsOut | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(int base) | No description in source. |
read | int read(int addr) | No description in source. |
write | void write(int addr, int value) | No description in source. |
emit | void emit(int code) | No description in source. |
charsWritten | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
mmioBase | int mmioBase | No description in source. |
mmioSize | int mmioSize | No description in source. |
irqLine | int irqLine | guest IRQ this device raises, or -1 |
irqPending | int irqPending | No description in source. |
accesses | int accesses | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String deviceName, int base, int size, int irq) | No description in source. |
owns | boolean owns(int addr) | No description in source. |
registerOf | int registerOf(int addr) | No description in source. |
read | int read(int addr) | Default MMIO handlers; concrete devices override. |
write | void write(int addr, int value) | No description in source. |
raiseIRQ | void raiseIRQ() | Interrupt protocol: a device raises its line; the guest's interrupt controller later acknowledges it. |
irqRaised | boolean irqRaised() | No description in source. |
clearIRQ | void clearIRQ() | No description in source. |
irq | int irq() | No description in source. |
deviceName | String deviceName() | No description in source. |
accessCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
timer | SLGuestTimer timer | No description in source. |
console | SLGuestConsole console | No description in source. |
blk | SLGuestBlockDevice blk | No description in source. |
pic | SLInterruptController pic | guest interrupt controller |
mmioAccesses | int mmioAccesses | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestTimer t, SLGuestConsole c, SLGuestBlockDevice b, SLInterruptController controller) | No description in source. |
mmioRead | int mmioRead(int addr) | Route a guest MMIO read to the owning device. |
mmioWrite | void mmioWrite(int addr, int value) | Route a guest MMIO write to the owning device. |
tick | void tick() | Advance device time by one tick and post any raised interrupts into the guest interrupt controller. |
pendingInterrupt | int pendingInterrupt() | The guest kernel's ISR dispatch asks for the highest-priority pending IRQ. |
acknowledge | void acknowledge(int line) | No description in source. |
hasConsole | boolean hasConsole() | Console convenience for the hypervisor's VM-exit router: write one char to the guest console device's data register. |
consoleWrite | void consoleWrite(int code) | No description in source. |
programTimer | void 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. |
timerDevice | SLGuestTimer timerDevice() | No description in source. |
blockDevice | SLGuestBlockDevice blockDevice() | No description in source. |
mmioCount | int mmioCount() | No description in source. |
interruptController | SLInterruptController 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAGIC | static final int MAGIC = 1397113932 | 0x5345584C 'SEXL' |
HDR_WORDS | static final int HDR_WORDS = 4 | No description in source. |
store | SLRAM store | the serialized image |
words | int words | total words written |
opcodeCount | int opcodeCount | No description in source. |
entry | int entry | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int capacity) | No description in source. |
put | int put(int w) | No description in source. |
serialize | void serialize(SLGuestProgram prog, int entryOffset) | Serialize a compiled program (op/arg stream) into the executable format. |
valid | boolean valid() | Validate the header: correct magic and a sane opcode count. |
headerEntry | int headerEntry() | No description in source. |
headerOpcodeCount | int headerOpcodeCount() | No description in source. |
loadInto | int 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. |
writeToFile | int 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). |
imageWords | int imageWords() | No description in source. |
entryPoint | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_FILES | static final int MAX_FILES = 8 | No description in source. |
MAX_FDS | static final int MAX_FDS = 8 | No description in source. |
blk | SLGuestBlockDevice blk | No description in source. |
fileCount | int fileCount | No description in source. |
nextBlock | int nextBlock | No description in source. |
openCount | int openCount | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestBlockDevice blockDevice, int dataStartBlock) | No description in source. |
create | int create(int fileId, int blocks) | Create a file (by integer id) occupying `blocks` blocks; returns its index. |
indexOfId | int indexOfId(int fileId) | No description in source. |
startBlock | int startBlock(int idx) | No description in source. |
openByName | int openByName(int fileId) | Open a file by id; returns a file descriptor (0..3) or -1. |
fdValid | boolean fdValid(int fd) | No description in source. |
writeByte | int writeByte(int fd, int value) | Write one byte to an open fd (append semantics, block-device backed); returns 1 on success. |
readByte | int readByte(int fd) | Read one byte from an open fd; returns the byte or -1 at EOF/error. |
bumpLength | void bumpLength(int fidx) | No description in source. |
close | int close(int fd) | No description in source. |
files | int files() | No description in source. |
openFiles | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
kernel | SLGuestLinux kernel | No description in source. |
substrate | SLSleelaVM substrate | No description in source. |
nextPid | int nextPid | No description in source. |
spawned | int spawned | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestLinux guestKernel, SLSleelaVM guestSubstrate) | No description in source. |
allocPid | int allocPid() | Single pid allocator for the whole guest: init-spawned programs and fork()'d children both draw from this counter so pids never collide. |
spawn | SLGuestTask 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. |
exec | SLGuestTask exec(String name, String sourcePath, int langId) | Compile a program from source and spawn it (exec-style convenience). |
execFromImage | SLGuestTask 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()). |
installAndExec | SLGuestTask 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. |
execInto | int 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. |
execName | String 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. |
execSourcePath | String execSourcePath(int srcId) | No description in source. |
launchShell | SLGuestShell 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. |
forkExecWaitDemo | int 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. |
pid | int pid() | No description in source. |
childrenSpawned | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
decoder | SLInstructionDecoder decoder | No description in source. |
sys | SLSystemCall sys | No description in source. |
built | int built | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
build | SLGuestKernelImage 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. |
buildCount | int 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
version | String version | No description in source. |
ops | SLRAM ops | opcode stream: op per word |
args | SLRAM args | paired immediate per word |
length | int length | No description in source. |
entry | int entry | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String kernelName, String kernelVersion, int capacity) | No description in source. |
append | int append(int opcode, int arg) | Append one compiled opcode to the image. |
opcodeAt | int opcodeAt(int i) | No description in source. |
argAt | int argAt(int i) | No description in source. |
loadInto | void loadInto(SLSleelaVM vm) | Load this image into a guest VM's substrate for execution. |
setEntry | void setEntry(int e) | No description in source. |
entryPoint | int entryPoint() | No description in source. |
size | int size() | No description in source. |
kernelName | String kernelName() | No description in source. |
kernelVersion | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
LINUX_READ | static final int LINUX_READ = 0 | A small, Linux-like syscall ABI (numbers chosen for the model). |
LINUX_WRITE | static final int LINUX_WRITE = 1 | No description in source. |
LINUX_OPEN | static final int LINUX_OPEN = 2 | No description in source. |
LINUX_CLOSE | static final int LINUX_CLOSE = 3 | No description in source. |
LINUX_MMAP | static final int LINUX_MMAP = 9 | No description in source. |
LINUX_EXIT | static final int LINUX_EXIT = 60 | No description in source. |
LINUX_FORK | static final int LINUX_FORK = 57 | No description in source. |
LINUX_WAIT | static final int LINUX_WAIT = 61 | No description in source. |
LINUX_EXECVE | static final int LINUX_EXECVE = 59 | No description in source. |
distro | String distro | No description in source. |
vm | SLGuestVM vm | No description in source. |
kernelImage | SLGuestKernelImage kernelImage | compiled kernel image (step 4), if built |
scheduler | SLGuestScheduler scheduler | guest task scheduler, timer-driven (step 6) |
filesystem | SLGuestFileSystem filesystem | in-guest filesystem over the block device |
syscalls2 | SLGuestSyscall syscalls2 | guest syscall ABI dispatcher (lazy) |
kernelEntry | int kernelEntry | No description in source. |
initEntry | int initEntry | No description in source. |
booted | int booted | No description in source. |
syscalls | int syscalls | No description in source. |
timerTicks | int timerTicks | No description in source. |
GUEST_EMULATED | static final int GUEST_EMULATED = 100 | Translate 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.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String distroName, SLGuestVM guest) | No description in source. |
fileSystem | SLGuestFileSystem fileSystem() | No description in source. |
deliverSignals | void deliverSignals() | Deliver any pending signal to the currently-running task's slot. Called at scheduling points so signals (e.g. SIGKILL/SIGTERM) take effect. |
syscallTable | SLGuestSyscall syscallTable() | The guest syscall dispatcher, wired to this guest's devices, filesystem, and scheduler. Lazily built on first use. |
spawnTask | SLGuestTask 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. |
startScheduling | void startScheduling(int reload) | Program the guest timer and start preemptive scheduling: set the timer reload and enable it so each expiry drives scheduler.onTimerTick(). |
onTimerInterrupt | SLGuestTask 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. |
taskScheduler | SLGuestScheduler taskScheduler() | No description in source. |
timerTickCount | int timerTickCount() | No description in source. |
startInit | SLGuestInit 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. |
installKernelImage | void 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. |
buildKernel | void buildKernel(String sourcePath, int langId) | Build and install a compiled guest kernel from source in any supported language, via the real toolchain (SLGuestKernelBuilder). |
boot | int 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. |
loadKernelImage | void 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. |
isGuestEmulated | boolean 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.) |
emulateSyscall | int emulateSyscall(int linuxNumber) | No description in source. |
isBooted | boolean isBooted() | No description in source. |
syscallsEmulated | int syscallsEmulated() | No description in source. |
distribution | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
buffer | SLRAM buffer | No description in source. |
capacity | int capacity | No description in source. |
head | int head | read index |
tail | int tail | write index |
size | int size | bytes currently buffered |
readerClosed | int readerClosed | No description in source. |
writerClosed | int writerClosed | No description in source. |
totalWritten | int totalWritten | No description in source. |
totalRead | int totalRead | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int cap) | No description in source. |
empty | boolean empty() | No description in source. |
full | boolean full() | No description in source. |
writeByte | int writeByte(int value) | Write one byte; returns 1 on success, 0 if full (back-pressure), -1 if the read end is closed (broken pipe). |
readByte | int 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"). |
closeReader | void closeReader() | No description in source. |
closeWriter | void closeWriter() | No description in source. |
readable | boolean readable() | No description in source. |
available | int available() | No description in source. |
written | int written() | No description in source. |
read | int 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
ops | SLRAM ops | No description in source. |
args | SLRAM args | No description in source. |
length | int length | No description in source. |
base | int base | substrate code index where this program was loaded |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String programName, int capacity) | No description in source. |
append | int append(int opcode, int arg) | No description in source. |
buildFrom | void 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. |
loadInto | int 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. |
opcodeAt | int opcodeAt(int i) | Op/arg accessors so a program can be serialized to an on-disk executable. |
argAt | int argAt(int i) | No description in source. |
entryBase | int entryBase() | No description in source. |
size | int size() | No description in source. |
programName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX | static final int MAX = 8 | No description in source. |
count | int count | No description in source. |
current | int current | No description in source. |
quantum | int quantum | timer ticks per slice |
tickAccum | int tickAccum | ticks since the last switch |
switches | int switches | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int timerTicksPerSlice) | No description in source. |
putAt | void putAt(int idx, SLGuestTask t) | Place a task into a specific slot (no bookkeeping beyond the slot write). |
freeReapedSlot | int 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. |
admit | int admit(SLGuestTask t) | No description in source. |
at | SLGuestTask at(int idx) | No description in source. |
slotOfTid | int slotOfTid(int tid) | Find the scheduler slot holding the task with the given tid, or -1. |
fork | SLGuestTask 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. |
reapChild | SLGuestTask 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). |
hasLiveChild | boolean 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. |
pickNext | int pickNext() | No description in source. |
onTimerTick | SLGuestTask 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). |
markRunningSlot | void 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. |
taskCount | int taskCount() | No description in source. |
contextSwitches | int contextSwitches() | No description in source. |
quantumTicks | int quantumTicks() | No description in source. |
currentSlot | int currentSlot() | No description in source. |
running | SLGuestTask 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CMD_UNKNOWN | static final int CMD_UNKNOWN = 0 | No description in source. |
CMD_HELP | static final int CMD_HELP = 1 | No description in source. |
CMD_ECHO | static final int CMD_ECHO = 2 | No description in source. |
CMD_LS | static final int CMD_LS = 3 | No description in source. |
CMD_CAT | static final int CMD_CAT = 4 | No description in source. |
CMD_PS | static final int CMD_PS = 5 | No description in source. |
CMD_EXIT | static final int CMD_EXIT = 6 | No description in source. |
sys | SLGuestSyscall sys | No description in source. |
commandsRun | int commandsRun | No description in source. |
running | int running | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestSyscall syscalls) | No description in source. |
putc | void 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. |
newline | void newline() | No description in source. |
classify | int 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). |
run | int 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. |
isRunning | boolean isRunning() | No description in source. |
commandCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SIG_LINES | static final int SIG_LINES = 16 | No description in source. |
SIGKILL | static final int SIGKILL = 9 | No description in source. |
SIGTERM | static final int SIGTERM = 15 | No description in source. |
SIGUSR1 | static final int SIGUSR1 = 10 | No description in source. |
SIGCHLD | static final int SIGCHLD = 17 | No description in source. |
DISP_DEFAULT | static final int DISP_DEFAULT = 0 | No description in source. |
DISP_IGNORE | static final int DISP_IGNORE = 1 | No description in source. |
DISP_HANDLE | static final int DISP_HANDLE = 2 | No description in source. |
scheduler | SLGuestScheduler scheduler | No description in source. |
delivered | int delivered | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestScheduler sched) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
bitSet | boolean bitSet(int mask,int sig) | No description in source. |
pendOf | int pendOf(int slot) | No description in source. |
setPend | void setPend(int slot,int mask) | No description in source. |
raise | void raise(int slot, int sig) | Raise a signal against the task in scheduler slot `slot`. |
hasPending | boolean hasPending(int slot) | No description in source. |
nextPending | int nextPending(int slot) | Lowest-numbered pending signal for a slot, or -1. |
deliver | int 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. |
deliveredCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SYS_READ | static final int SYS_READ = 0 | Linux-like syscall numbers (a small, representative subset). |
SYS_WRITE | static final int SYS_WRITE = 1 | No description in source. |
SYS_OPEN | static final int SYS_OPEN = 2 | No description in source. |
SYS_CLOSE | static final int SYS_CLOSE = 3 | No description in source. |
SYS_BRK | static final int SYS_BRK = 12 | No description in source. |
SYS_PIPE | static final int SYS_PIPE = 22 | create a pipe (returns a pipe handle) |
SYS_YIELD | static final int SYS_YIELD = 24 | sched_yield |
SYS_GETPID | static final int SYS_GETPID = 39 | No description in source. |
SYS_KILL | static final int SYS_KILL = 62 | send a signal to a task slot |
SYS_EXIT | static final int SYS_EXIT = 60 | No description in source. |
SYS_FORK | static final int SYS_FORK = 57 | Process creation / lifecycle (the fork/exec/wait family). clone the caller; child shares its text |
SYS_EXECVE | static final int SYS_EXECVE = 59 | replace the caller's image with a new one |
SYS_WAIT | static final int SYS_WAIT = 61 | reap a finished child, yielding its status |
PIPE_FD_BASE | static final int PIPE_FD_BASE = 100 | Pipe fd convention: fds >= PIPE_FD_BASE address the single modeled pipe's read (base) / write (base+1) ends. |
devices | SLGuestDeviceBus devices | No description in source. |
fs | SLGuestFileSystem fs | No description in source. |
scheduler | SLGuestScheduler scheduler | No description in source. |
init | SLGuestInit init | process spawner (for execve: compile/load a new image) |
pipe | SLGuestPipe pipe | IPC: a (modeled single) pipe |
signals | SLGuestSignal signals | IPC: signal delivery |
brkTop | int brkTop | modeled program break (heap top) |
nextChildPid | int nextChildPid | tid allocator for fork()'d children |
calls | int calls | No description in source. |
lastResult | int lastResult | No description in source. |
lastChildStatus | int lastChildStatus | exit status returned by the most recent wait() |
WAIT_BLOCK | static final int WAIT_BLOCK = -2 | wait() would block: children exist, none exited |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLGuestDeviceBus deviceBus, SLGuestFileSystem filesystem, SLGuestScheduler sched, int heapBase) | No description in source. |
attachInit | void 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. |
signalTable | SLGuestSignal signalTable() | No description in source. |
currentPipe | SLGuestPipe currentPipe() | No description in source. |
childStatus | int childStatus() | No description in source. |
valid | boolean valid(int number) | No description in source. |
isPipeFd | boolean isPipeFd(int fd) | No description in source. |
dispatch | int 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(). |
doFork | int 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. |
doExecve | int 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. |
doWait | int 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). |
isExit | boolean isExit(int number) | No description in source. |
isYield | boolean isYield(int number) | No description in source. |
isWaitBlocked | boolean isWaitBlocked(int result) | No description in source. |
programBreak | int programBreak() | No description in source. |
result | int result() | No description in source. |
callCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
READY | static final int READY = 0 | No description in source. |
RUNNING | static final int RUNNING = 1 | No description in source. |
BLOCKED | static final int BLOCKED = 2 | No description in source. |
DONE | static final int DONE = 3 | No description in source. |
tid | int tid | No description in source. |
name | String name | No description in source. |
state | int state | No description in source. |
entry | int entry | guest-code entry (opcode index) |
savedIP | int savedIP | saved substrate instruction pointer (resume point) |
ticks | int ticks | timer quanta consumed |
parentTid | int parentTid | Process-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) |
exitStatus | int exitStatus | status passed to exit() / left for the parent to wait() on |
reaped | int reaped | 1 once a parent has collected this task via wait() |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int id, String taskName, int entryIndex) | No description in source. |
markReady | void markReady() | No description in source. |
markRunning | void markRunning() | No description in source. |
markBlocked | void markBlocked() | No description in source. |
finish | void finish() | No description in source. |
exitWith | void 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). |
saveIP | void saveIP(int ip) | No description in source. |
resumeIP | int resumeIP() | No description in source. |
chargeTick | void chargeTick() | No description in source. |
setParent | void setParent(int ptid) | Parentage: who fork()ed this task. |
parent | int parent() | No description in source. |
status | int 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. |
zombie | boolean zombie() | No description in source. |
reap | void reap() | No description in source. |
reapedYet | boolean reapedYet() | No description in source. |
taskId | int taskId() | No description in source. |
taskName | String taskName() | No description in source. |
taskState | int taskState() | No description in source. |
runnable | boolean runnable() | No description in source. |
alive | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
reload | int reload | No description in source. |
count | int count | No description in source. |
enabled | int enabled | No description in source. |
expiries | int expiries | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(int base, int irq) | No description in source. |
read | int read(int addr) | No description in source. |
write | void write(int addr, int value) | No description in source. |
tick | void tick() | One timer tick: decrement; on reaching zero, reload and raise the IRQ. |
expiryCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
vcpu | SLCore vcpu | virtual CPU (the guest's modeled hardware core) |
substrate | SLSleelaVM substrate | the Turing-complete engine that actually runs guest code |
hostMemory | SLRAM hostMemory | No description in source. |
mmu | SLMMU mmu | real page-table translation (step 2); null => base-offset |
devices | SLGuestDeviceBus devices | guest device model: timer, console, block (step 3) |
kernel | SLGuestLinux kernel | guest kernel, for timer-driven scheduling (step 6) |
windowBase | int windowBase | host-physical base of the guest's memory window |
windowSize | int windowSize | words |
guestEntry | int guestEntry | guest-physical entry point |
running | int running | No description in source. |
exits | int exits | No description in source. |
guestInstr | int guestInstr | No description in source. |
lastExitReason | int lastExitReason | 0 none, 1 syscall, 2 trap, 3 halt |
EXIT_NONE | static final int EXIT_NONE = 0 | No description in source. |
EXIT_SYSCALL | static final int EXIT_SYSCALL = 1 | No description in source. |
EXIT_TRAP | static final int EXIT_TRAP = 2 | No description in source. |
EXIT_HALT | static final int EXIT_HALT = 3 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String vmName, SLCore core, SLRAM ram, int base, int size, int entry) | No description in source. |
attachMMU | void attachMMU(SLMMU unit) | Attach a real MMU for page-table translation + protection faults (step 2). |
memoryUnit | SLMMU memoryUnit() | No description in source. |
attachDevices | void attachDevices(SLGuestDeviceBus bus) | Attach the guest device model (timer/console/block) (step 3). |
deviceBus | SLGuestDeviceBus deviceBus() | No description in source. |
attachKernel | void attachKernel(SLGuestLinux guestKernel) | Attach the guest kernel so timer interrupts drive its scheduler (step 6). |
tickDevices | void tickDevices() | Advance the guest's devices by one tick (timer heartbeat, IRQ posting). |
translate | int 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. |
inWindow | boolean inWindow(int guestAddr) | No description in source. |
loadOpcode | int loadOpcode(int opcode, int arg) | Load one guest opcode+arg into the substrate's code store (the guest kernel / loader populates this; see SLGuestLinux). |
guestSubstrate | SLSleelaVM guestSubstrate() | No description in source. |
enter | void 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. |
run | int 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. |
handleExit | void 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. |
serviceOpcode | int 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. |
syscallNumberFor | int 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. |
syscallArg0 | int 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. |
syscallArg2 | int 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". |
deliverPendingInterrupts | void 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. |
recordSyscallExit | void 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. |
recordTrapExit | void recordTrapExit() | No description in source. |
stop | void stop() | No description in source. |
exitCount | int exitCount() | No description in source. |
lastExit | int lastExit() | No description in source. |
guestInstructions | int guestInstructions() | No description in source. |
printed | int printed() | observable guest output |
vmName | String vmName() | No description in source. |
entry | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
xorGate | SLGate xorGate | No description in source. |
andGate | SLGate andGate | No description in source. |
sum | int sum | No description in source. |
carry | int carry | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
build | void build() | No description in source. |
add | void add(int a, int b) | No description in source. |
sumBit | int sumBit() | No description in source. |
carryBit | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MEDIA_HDD | static final int MEDIA_HDD = 0 | rotational |
MEDIA_SSD | static final int MEDIA_SSD = 1 | solid-state |
name | String name | No description in source. |
blockCount | int blockCount | No description in source. |
blockBytes | int blockBytes | No description in source. |
media | int media | No description in source. |
handle | int handle | No description in source. |
reads | int reads | No description in source. |
writes | int writes | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String driveName, int blocks, int bsize, int mediaKind) | No description in source. |
mount | int mount(String path) | Mount the native file-backed store, creating it if absent. |
inRange | boolean inRange(int block) | No description in source. |
readBlock | int readBlock(int block) | No description in source. |
writeBlock | int writeBlock(int block, int payloadHandle) | No description in source. |
unmount | void unmount() | No description in source. |
capacityBlocks | int capacityBlocks() | No description in source. |
capacityBytes | int capacityBytes() | No description in source. |
solidState | boolean solidState() | No description in source. |
driveName | String driveName() | No description in source. |
SLHypervisor #sleela 2.5 (lib/cpu/SLHypervisor.sleela)
SLHypervisor class
Defines SLHypervisor — a type-2 (hosted) hypervisor running on
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
host | SLCPU host | No description in source. |
hostMemory | SLRAM hostMemory | No description in source. |
bootDisk | SLHardDrive bootDisk | host-backed drive the guest block device uses |
guestCount | int guestCount | No description in source. |
exits | int exits | total VM-exits handled |
current | int current | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLCPU hostCpu, SLRAM ram) | No description in source. |
attachBootDisk | void attachBootDisk(SLHardDrive drive) | Optionally provide a host drive to back guests' virtual block devices. |
createGuest | SLGuestVM 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). |
guest | SLGuestVM guest(int idx) | No description in source. |
runGuest | int runGuest(int idx, int budget) | Run a guest for a bounded number of guest instructions, handling VM-exits. |
guests | int guests() | No description in source. |
vmExits | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
opcode | int opcode | No description in source. |
rd | int rd | destination register index |
rs | int rs | source register index |
imm | int imm | immediate value or memory/branch address |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int op, int dest, int src, int immediate) | No description in source. |
op | int op() | No description in source. |
dest | int dest() | No description in source. |
src | int src() | No description in source. |
immediate | int immediate() | No description in source. |
encode | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
decoded | int decoded | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet) | No description in source. |
decode | SLInstruction decode(int word) | Decode a packed word [opcode][rd][rs][imm] into an SLInstruction. |
validOpcode | boolean validOpcode(int opcode) | No description in source. |
decodeCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
NOP | static final int NOP = 0 | --- control / misc --- |
HALT | static final int HALT = 1 | No description in source. |
MOV | static final int MOV = 2 | --- data movement --- rd <- imm (load immediate) |
MOVR | static final int MOVR = 3 | rd <- rs (register copy) |
LOAD | static final int LOAD = 4 | rd <- mem[imm] (absolute) |
LOADR | static final int LOADR = 5 | rd <- mem[rs] (register-indirect) |
LOADX | static final int LOADX = 6 | rd <- mem[rs + imm] (indexed / struct field, array) |
STORE | static final int STORE = 7 | mem[imm] <- rs (absolute) |
STORER | static final int STORER= 8 | mem[rd] <- rs (register-indirect) |
STOREX | static final int STOREX= 9 | mem[rd + imm] <- rs (indexed) |
ADD | static final int ADD = 10 | --- integer arithmetic --- |
SUB | static final int SUB = 11 | No description in source. |
MUL | static final int MUL = 12 | No description in source. |
DIV | static final int DIV = 13 | No description in source. |
MOD | static final int MOD = 14 | No description in source. |
NEG | static final int NEG = 15 | No description in source. |
AND | static final int AND = 16 | --- bitwise / shift --- |
OR | static final int OR = 17 | No description in source. |
XOR | static final int XOR = 18 | No description in source. |
NOT | static final int NOT = 19 | No description in source. |
SHL | static final int SHL = 20 | No description in source. |
SHR | static final int SHR = 21 | No description in source. |
CMP | static final int CMP = 22 | --- compare + branch --- |
JMP | static final int JMP = 23 | unconditional |
JZ | static final int JZ = 24 | branch if zero flag |
JNZ | static final int JNZ = 25 | branch if not zero |
JLT | static final int JLT = 26 | branch if negative flag (less-than after CMP) |
JGE | static final int JGE = 27 | branch if not negative (>=) |
CALL | static final int CALL = 28 | --- call / stack --- push return addr; jump to imm |
RET | static final int RET = 29 | pop return addr; jump to it |
PUSH | static final int PUSH = 30 | push rs |
POP | static final int POP = 31 | pop into rd |
IN | static final int IN = 32 | --- i/o + system --- rd <- port[imm] |
OUT | static final int OUT = 33 | port[imm] <- rs |
SYSCALL | static final int SYSCALL = 34 | No description in source. |
TRAP | static final int TRAP = 35 | software interrupt (fault/debug/guest-exit) |
OPCODE_COUNT | static final int OPCODE_COUNT = 36 | No description in source. |
defined | int defined | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
valid | boolean valid(int opcode) | No description in source. |
isBranch | boolean isBranch(int opcode) | No description in source. |
isMemory | boolean isMemory(int opcode) | No description in source. |
isArithmetic | boolean isArithmetic(int opcode) | No description in source. |
isStack | boolean isStack(int opcode) | No description in source. |
isIO | boolean isIO(int opcode) | No description in source. |
isSystem | boolean isSystem(int opcode) | No description in source. |
mnemonic | String mnemonic(int opcode) | No description in source. |
opcodeCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
LINES | static final int LINES = 16 | No description in source. |
IRQ_TIMER | static final int IRQ_TIMER = 0 | No description in source. |
IRQ_KEYBOARD | static final int IRQ_KEYBOARD = 1 | No description in source. |
IRQ_DISK | static final int IRQ_DISK = 2 | No description in source. |
IRQ_NETWORK | static final int IRQ_NETWORK = 3 | No description in source. |
vectorBase | int vectorBase | base address of the interrupt vector table |
pendingMask | int pendingMask | bitset of raised-but-unserviced lines |
enableMask | int enableMask | bitset of enabled lines |
serviced | int serviced | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int base) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
bitSet | boolean bitSet(int mask, int line) | No description in source. |
enable | void enable(int line) | No description in source. |
raise | void raise(int line) | No description in source. |
hasPending | boolean hasPending() | No description in source. |
highestPriorityPending | int highestPriorityPending() | Return the lowest-numbered pending line (highest priority), or -1 if none. |
acknowledge | int acknowledge(int line) | Acknowledge a line: clear it and return its handler address. |
servicedCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_PORTS | static final int MAX_PORTS = 16 | No description in source. |
registered | int registered | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
registerPort | void registerPort(int number, SLIOPort port) | No description in source. |
port | SLIOPort port(int number) | No description in source. |
in | int in(int number) | CPU-side IN/OUT routed through the bus. |
out | void out(int number, int value) | No description in source. |
portsRegistered | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
DIR_IN | static final int DIR_IN = 0 | No description in source. |
DIR_OUT | static final int DIR_OUT = 1 | No description in source. |
DIR_INOUT | static final int DIR_INOUT = 2 | No description in source. |
portNumber | int portNumber | No description in source. |
direction | int direction | No description in source. |
latched | int latched | No description in source. |
readCount | int readCount | No description in source. |
writeCount | int writeCount | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int number, int dir) | No description in source. |
in | int in() | No description in source. |
out | void out(int value) | No description in source. |
deviceDeposit | void deviceDeposit(int value) | Device side: a device deposits a value for the CPU to read. |
number | int number() | No description in source. |
dir | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | nameful link: "console-port", "disk-link", ... |
minMHz | int minMHz | lowest link clock the operator may dial |
maxMHz | int maxMHz | highest validated link clock |
currentMHz | int currentMHz | the variable link clock presently selected |
syncStages | int syncStages | flip-flops in the clock-domain-crossing synchronizer |
vio | SLVoltageRail vio | the I/O ring supply rail |
mvPerMHz | int mvPerMHz | settled Vio each extra MHz of ceiling needs |
handshake | SLTiming handshake | req -> ack named budget |
turnaround | SLTiming turnaround | bus direction reversal named budget |
recovery | SLTiming recovery | inter-transaction recovery gap named budget |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String linkName, int floorMHz, int ceilingMHz, int synchronizerStages) | No description in source. |
attachVio | void attachVio(SLVoltageRail rail, int millivoltsPerMHz) | No description in source. |
periodPsAt | int periodPsAt(int mhz) | No description in source. |
setHandshake | void setHandshake(int propPs, int setupPs, int holdPs) | State the measured path (propagation + setup, with hold) of each phase. |
setTurnaround | void setTurnaround(int propPs, int setupPs, int holdPs) | No description in source. |
setRecovery | void setRecovery(int propPs, int setupPs, int holdPs) | No description in source. |
setJitter | void setJitter(int jitterPs) | No description in source. |
setClock | int setClock(int mhz) | Dial the variable link clock, clamped into [min,max] and the voltage ceiling. |
voltageCeilingMHz | int voltageCeilingMHz() | No description in source. |
retime | void retime() | No description in source. |
synchronizerLatencyPs | int 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. |
transactionLatencyPs | int transactionLatencyPs() | Total control latency of one transaction in ps: synchronizer + handshake + turnaround + recovery consumed times. |
honored | boolean honored() | Every phase honored at the dialed clock AND Vio in limits. |
linkName | String linkName() | No description in source. |
clock | int clock() | No description in source. |
synchronizerStages | int synchronizerStages() | No description in source. |
handshakeBudget | SLTiming 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
language | String language | "sleela" | "c" | "cpp" | "java" (provenance only) |
nodeStore | SLRAM nodeStore | encoded IR nodes, one per word-group (modeled) |
count | int count | number of IR instructions |
nextTemp | int nextTemp | SSA-ish temporary allocator |
nextLabel | int nextLabel | label id allocator |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String lang, int capacity) | No description in source. |
allocTemp | int allocTemp() | No description in source. |
allocLabel | int allocLabel() | No description in source. |
emit | int emit(int op, int dst, int a, int b, int imm) | Append an IR instruction; returns its index. |
markImmediateA | void markImmediateA(int index) | No description in source. |
at | SLIRInstruction at(int index) | Read a node back as an SLIRInstruction. |
size | int size() | No description in source. |
lang | String lang() | No description in source. |
tempCount | int tempCount() | No description in source. |
labelCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
IR_CONST | static final int IR_CONST = 0 | Language-neutral IR operations. dst = imm |
IR_MOVE | static final int IR_MOVE = 1 | dst = a |
IR_ADD | static final int IR_ADD = 2 | dst = a + b |
IR_SUB | static final int IR_SUB = 3 | No description in source. |
IR_MUL | static final int IR_MUL = 4 | No description in source. |
IR_DIV | static final int IR_DIV = 5 | No description in source. |
IR_MOD | static final int IR_MOD = 6 | No description in source. |
IR_AND | static final int IR_AND = 7 | No description in source. |
IR_OR | static final int IR_OR = 8 | No description in source. |
IR_XOR | static final int IR_XOR = 9 | No description in source. |
IR_CMP | static final int IR_CMP = 10 | compare a, b (sets condition) |
IR_LABEL | static final int IR_LABEL = 11 | branch target marker (imm = label id) |
IR_JUMP | static final int IR_JUMP = 12 | goto label imm |
IR_JZ | static final int IR_JZ = 13 | if last compare == 0 goto label imm |
IR_JNZ | static final int IR_JNZ = 14 | No description in source. |
IR_LOAD | static final int IR_LOAD = 15 | dst = mem[a] |
IR_STORE | static final int IR_STORE = 16 | mem[a] = b |
IR_PARAM | static final int IR_PARAM = 17 | stage argument a for the next call |
IR_CALL | static final int IR_CALL = 18 | dst = call label imm (function entry) |
IR_RET | static final int IR_RET = 19 | return a |
IR_SYSCALL | static final int IR_SYSCALL= 20 | dst = syscall imm with arg a |
IR_HALT | static final int IR_HALT = 21 | No description in source. |
op | int op | No description in source. |
dst | int dst | destination temporary id (-1 if none) |
a | int a | first source temporary id (-1 if none) |
b | int b | second source temporary id (-1 if none) |
imm | int imm | immediate / label id / syscall number |
aIsImm | boolean aIsImm | when true, `a` carries an immediate value, not a temp id |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int operation, int dstTemp, int srcA, int srcB, int immediate) | No description in source. |
markImmediateA | void markImmediateA() | No description in source. |
operation | int operation() | No description in source. |
destination | int destination() | No description in source. |
sourceA | int sourceA() | No description in source. |
sourceB | int sourceB() | No description in source. |
immediate | int immediate() | No description in source. |
immediateA | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
cpu | SLCPU cpu | No description in source. |
memory | SLRAM memory | No description in source. |
scheduler | SLScheduler scheduler | No description in source. |
mm | SLMemoryManager mm | No description in source. |
drivers | SLDriverManager drivers | No description in source. |
syscalls | SLSystemCall syscalls | No description in source. |
fs | SLFileSystem fs | No description in source. |
syscallHandlerAddr | int syscallHandlerAddr | No description in source. |
ticks | int ticks | No description in source. |
running | int running | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLCPU processor, SLRAM ram, SLScheduler sched, SLMemoryManager memMgr, | No description in source. |
boot | void 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. |
run | int 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. |
serviceSyscall | void 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. |
shutdown | void shutdown() | No description in source. |
tickCount | int tickCount() | No description in source. |
isRunning | boolean isRunning() | No description in source. |
sched | SLScheduler sched() | No description in source. |
driverManager | SLDriverManager driverManager() | No description in source. |
fileSystem | SLFileSystem 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
lastKey | int lastKey | No description in source. |
keysRead | int keysRead | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLIOBus bus, int port) | No description in source. |
serviceInterrupt | void serviceInterrupt() | ISR: pull the scancode the device deposited on the port. |
getKey | int getKey() | No description in source. |
hasKey | boolean hasKey() | No description in source. |
keyCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
q | int q | stored bit |
enabled | int enabled | 1 = transparent (follows D), 0 = holding |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reset | void reset() | No description in source. |
enable | void enable() | No description in source. |
disable | void disable() | No description in source. |
write | int write(int d) | Gated-D behavior: capture D only while enabled, otherwise hold. |
read | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
asm | SLAssembler asm | No description in source. |
program | SLProgram program | No description in source. |
ir | SLIR ir | No description in source. |
labelAddr | SLRAM labelAddr | label id -> emitted instruction address |
emitted | int emitted | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet, SLProgram target, SLIR irModule) | No description in source. |
reg | int reg(int temp) | Map an IR temporary id to a machine register (r1..r15). |
resolveLabels | void 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. |
opcodeFootprint | int opcodeFootprint(SLIRInstruction n) | How many machine instructions a given IR node expands to. |
lower | SLProgram lower() | Pass 2: emit machine code for the whole IR module. |
lowerNode | void lowerNode(SLIRInstruction n) | No description in source. |
emittedCount | int emittedCount() | No description in source. |
lowered | SLProgram 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
memory | SLRAM memory | No description in source. |
drive | SLHardDrive drive | No description in source. |
cpu | SLCPU cpu | No description in source. |
bootloader | SLBootloader bootloader | No description in source. |
os | SLOperatingSystem os | No description in source. |
loader | SLProgramLoader loader | No description in source. |
isa | SLInstructionSet isa | No description in source. |
timing | SLTimingProfile timing | the machine's adjustable operating point (optional) |
kernelEntry | int kernelEntry | No description in source. |
syscallHandler | int syscallHandler | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
buildHardware | void buildHardware(String vendor, String model, int cores, int bits, int mhz) | Build the hardware: main memory, boot disk, and a multi-core CPU. |
boot | void boot() | Boot: firmware loads the kernel image, then the OS installs and comes up. |
loadLanguageProgram | SLProcess 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. |
runOnSubstrate | int 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. |
proveLanguageEquivalence | boolean 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. |
runLinuxGuest | int 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.) |
runLinuxGuestFromSource | int 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. |
runLinuxGuestWithPrograms | int 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. |
runLinuxGuestDiskProgram | int 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. |
runLinuxGuestShell | int 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. |
runLinuxGuestForkExec | int 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. |
runLinuxGuestForkExecOpcodes | int 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). |
buildBootDiskDriver | SLDiskDriver buildBootDiskDriver() | The bootloader needs a disk driver before the OS driver manager exists; build a minimal one bound to the boot drive. |
loadDemoProgram | SLProcess 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. |
powerOnAndRun | int powerOnAndRun(int cores, int bits, int mhz, int rounds) | Run the whole chain end to end: build -> boot -> load program -> run. |
selectTiming | SLTimingProfile 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. |
compileWithTiming | SLProgram 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. |
timingHonored | boolean 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? |
processor | SLCPU processor() | No description in source. |
operatingSystem | SLOperatingSystem operatingSystem() | No description in source. |
programLoader | SLProgramLoader programLoader() | No description in source. |
mainMemory | SLRAM mainMemory() | No description in source. |
timingProfile | SLTimingProfile 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
SLMemoryInterface #sleela 2.5 (lib/cpu/components/SLMemoryInterface.sleela)
SLMemoryInterface class
Defines SLMemoryInterface — an OOD interface/adapter layer that
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
TECH_SRAM | static final int TECH_SRAM = 0 | Target-cadence technology ids mirror SLMemoryModule.TECH_* so the interface can present any tier's refresh discipline over any real module. |
TECH_DRAM | static final int TECH_DRAM = 1 | No description in source. |
TECH_SDRAM | static final int TECH_SDRAM = 2 | No description in source. |
TECH_DDR | static final int TECH_DDR = 3 | No description in source. |
TECH_DDR2 | static final int TECH_DDR2 = 4 | No description in source. |
TECH_DDR3 | static final int TECH_DDR3 = 5 | No description in source. |
TECH_DDR4 | static final int TECH_DDR4 = 6 | No description in source. |
TECH_DDR5 | static final int TECH_DDR5 = 7 | No description in source. |
partName | String partName | nameful: "DDR2-cadence interface", ... |
actual | SLMemoryModule actual | the REAL module in the system (e.g. DDR5-6400) |
targetTech | int targetTech | the cadence presented (mirrors the slot connector) |
slot | SLCadenceConnector slot | The 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_ns | int tREFI_ns | Refresh 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_ns | int tRFC_ns | No description in source. |
engaged | int engaged | 1 = the cadence overlay is active |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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. |
connect | boolean 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. |
cadenceSlot | SLCadenceConnector cadenceSlot() | The connector currently filling the cadence slot (null if none). |
engage | void engage() | No description in source. |
disengage | void disengage() | pass the real module through untouched |
availableDutyPct | int 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. |
refreshOverheadPct | int refreshOverheadPct() | Refresh overhead the cadence costs, as a percentage of time. |
nativeBandwidthMBs | int nativeBandwidthMBs() | The module's REAL peak bandwidth, unscaled (native data rate preserved). |
effectiveBandwidthMBs | int 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. |
module | SLMemoryModule module() | Pass-through identity of the REAL module (never masked by the overlay). |
nativeTech | int nativeTech() | No description in source. |
nativeTechName | String nativeTechName() | No description in source. |
capacityMiB | int capacityMiB() | No description in source. |
channelCount | int channelCount() | No description in source. |
name | String name() | No description in source. |
active | boolean active() | No description in source. |
cadenceTech | int cadenceTech() | No description in source. |
refreshIntervalNs | int refreshIntervalNs() | No description in source. |
refreshTimeNs | int refreshTimeNs() | No description in source. |
refreshesAsName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
memory | SLRAM memory | No description in source. |
pageWords | int pageWords | words per page |
totalPages | int totalPages | No description in source. |
kernelPages | int kernelPages | low pages reserved for the kernel |
nextFreePage | int nextFreePage | No description in source. |
allocations | int allocations | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLRAM ram, int wordsPerPage, int reservedKernelPages) | No description in source. |
pageToAddr | int pageToAddr(int page) | No description in source. |
allocPages | int allocPages(int pages) | Allocate `pages` contiguous pages for a process; return the base address, or -1 if out of memory. |
userMayAccess | boolean userMayAccess(int addr) | Enforce the kernel/user boundary: a user access must stay above the kernel region. |
freePages | int freePages() | No description in source. |
pageCount | int pageCount() | No description in source. |
allocationCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
TECH_SRAM | static final int TECH_SRAM = 0 | Memory technology ids. |
TECH_DRAM | static final int TECH_DRAM = 1 | No description in source. |
TECH_SDRAM | static final int TECH_SDRAM = 2 | No description in source. |
TECH_DDR | static final int TECH_DDR = 3 | No description in source. |
TECH_DDR2 | static final int TECH_DDR2 = 4 | No description in source. |
TECH_DDR3 | static final int TECH_DDR3 = 5 | No description in source. |
TECH_DDR4 | static final int TECH_DDR4 = 6 | No description in source. |
TECH_DDR5 | static final int TECH_DDR5 = 7 | No description in source. |
partName | String partName | e.g. "DDR4-3200 16GB" |
technology | int technology | No description in source. |
capacityMiB | int capacityMiB | module capacity in MiB |
busWidthBits | int busWidthBits | data bus width per channel (e.g. 64 for a DIMM) |
clockMHz | int clockMHz | I/O bus clock (MT/s = clockMHz × ddrFactor) |
casLatency | int casLatency | CL in clock cycles |
ddrFactor | int ddrFactor | 1 for SDR/SRAM, 2 for DDR double-pumping |
channels | int channels | populated memory channels (1 single, 4 HEDT, 8 PRO) |
backing | SLRAM backing | the actual word store the executor addresses |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int tech, int capMiB, int busBits, | No description in source. |
configureChannels | void 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. |
setChannels | void 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). |
mount | SLRAM mount(int wordWidth) | Allocate the backing store for this module as `width`-bit words. The arena spans the full populated capacity across every channel. |
transfersPerSecMT | int transfersPerSecMT() | Effective data rate in mega-transfers/second per channel (DDR double-pumps). |
channelBandwidthMBs | int channelBandwidthMBs() | Per-channel peak bandwidth in MB/s: MT/s × bus bytes. |
peakBandwidthMBs | int peakBandwidthMBs() | Aggregate peak bandwidth in MB/s across every populated channel. For a single-channel module this equals the per-channel figure. |
totalCapacityMiB | int totalCapacityMiB() | Total installed capacity across all channels (one module per channel). |
firstWordLatencyNs | int firstWordLatencyNs() | First-word access latency in nanoseconds: CL / clock. (×1000 for ns.) |
name | String name() | No description in source. |
tech | int tech() | No description in source. |
capacity | int capacity() | No description in source. |
channelCount | int channelCount() | No description in source. |
busWidth | int busWidth() | No description in source. |
clock | int clock() | No description in source. |
cl | int cl() | No description in source. |
memory | SLRAM memory() | No description in source. |
technologyName | String technologyName() | No description in source. |
SLMemoryTierPolicy #sleela 2.5 (lib/cpu/SLMemoryTierPolicy.sleela)
SLMemoryTierPolicy class
Defines SLMemoryTierPolicy — the bridge from the SOURCE memory-tier
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MOD_USUALMEM | static final int MOD_USUALMEM = 32768 | Modifier bits as emitted by the frontend (mirror impl/frontend/ast.h). JavaMemUsual = 1 << 15 |
MOD_ACCURATEMEM | static final int MOD_ACCURATEMEM = 65536 | JavaMemAccurate = 1 << 16 |
TIER_INHERIT | static final int TIER_INHERIT = 0 | Tier ids (mirror SLMemoryTierRouter.TIER_*). |
TIER_USUAL | static final int TIER_USUAL = 1 | No description in source. |
TIER_ACCURATE | static final int TIER_ACCURATE = 2 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
tierFromModifiers | int 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. |
methodTierFromModifiers | int methodTierFromModifiers(int methodModifiers) | The tier a method declares (TIER_INHERIT when it declares none). |
documentTierFromModifiers | int documentTierFromModifiers(int classModifiers) | The document (whole-program) default tier from the top-level class's modifiers (TIER_INHERIT when the class declares none). |
effectiveTier | int effectiveTier(int methodTier, int documentTier) | Resolve a method's EFFECTIVE tier: its own tier, else the document default, else accurate (DDR5). Mirrors SLProgram.effectiveTier. |
tierName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
TIER_INHERIT | static final int TIER_INHERIT = 0 | no per-function tier -> use main |
TIER_USUAL | static final int TIER_USUAL = 1 | usualmem (DDR2) |
TIER_ACCURATE | static final int TIER_ACCURATE = 2 | accuratemem (DDR5) |
usual | SLMemoryModule usual | the usual-activities tier module (may be null) |
accurate | SLMemoryModule accurate | the accuracy/competency tier module (may be null) |
mainTier | int mainTier | TIER_USUAL or TIER_ACCURATE (default accurate) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
installUsual | void installUsual(SLMemoryModule m) | No description in source. |
installAccurate | void installAccurate(SLMemoryModule m) | No description in source. |
setMainTier | void setMainTier(int tier) | No description in source. |
resolveTier | int 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. |
moduleFor | SLMemoryModule 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). |
tierName | String tierName(int declaredTier) | Human-readable tier a function resolves to (for reports/diagnostics). |
hasUsual | boolean hasUsual() | No description in source. |
hasAccurate | boolean hasAccurate() | No description in source. |
main | int main() | No description in source. |
twoTier | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_HI | static final int R_HI = 32 | No description in source. |
R_LO | static final int R_LO = 33 | No description in source. |
ADD | static final int ADD = 1 | No description in source. |
SUB | static final int SUB = 2 | No description in source. |
ADDI | static final int ADDI = 3 | No description in source. |
LW | static final int LW = 4 | No description in source. |
SW | static final int SW = 5 | No description in source. |
BEQ | static final int BEQ = 6 | No description in source. |
BNE | static final int BNE = 7 | No description in source. |
J | static final int J = 8 | No description in source. |
SYSCALL | static final int SYSCALL = 9 | No description in source. |
cp0Status | int cp0Status | CP0 (system control) status register |
inDelaySlot | int inDelaySlot | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
gpr | int gpr(int i) | R0 is hardwired to zero. |
setGpr | void setGpr(int i, int v) | No description in source. |
opOf | int opOf(int w) | No description in source. |
rdOf | int rdOf(int w) | No description in source. |
rsOf | int rsOf(int w) | No description in source. |
rtImmOf | int rtImmOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
branchDelaySlot | void 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). |
exception | void exception(int cause) | CP0 exception entry (SYSCALL, overflow, etc.). |
interrupt | void interrupt(int vector) | No description in source. |
signed | int signed(int b) | No description in source. |
encodeR | int encodeR(int op, int rd, int rs, int rt) | No description in source. |
encodeI | int encodeI(int op, int rd, int rs, int imm) | No description in source. |
reg | int reg(int i) | No description in source. |
hi | int hi() | No description in source. |
lo | int lo() | No description in source. |
cp0 | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
PERM_PRESENT | static final int PERM_PRESENT = 1 | No description in source. |
PERM_WRITE | static final int PERM_WRITE = 2 | No description in source. |
PERM_EXEC | static final int PERM_EXEC = 4 | No description in source. |
FAULT_NONE | static final int FAULT_NONE = 0 | No description in source. |
FAULT_UNMAPPED | static final int FAULT_UNMAPPED= 1 | No description in source. |
FAULT_PROT | static final int FAULT_PROT = 2 | No description in source. |
pageSize | int pageSize | words per page |
pageCount | int pageCount | number of virtual pages |
table | SLRAM table | page table: entry = (frame << 3) | perms |
translations | int translations | No description in source. |
faults | int faults | No description in source. |
lastFault | int lastFault | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int wordsPerPage, int pages) | No description in source. |
vpnOf | int vpnOf(int vaddr) | No description in source. |
offsetOf | int offsetOf(int vaddr) | No description in source. |
map | void map(int vpn, int frame, int perms) | Map a virtual page to a host-physical frame with permissions. |
unmap | void unmap(int vpn) | No description in source. |
entryOf | int entryOf(int vpn) | No description in source. |
frameOf | int frameOf(int entry) | No description in source. |
permsOf | int permsOf(int entry) | No description in source. |
present | boolean present(int entry) | PRESENT bit |
translateAccess | int 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). |
translate | int translate(int vaddr) | Convenience: a plain read translation. |
identityMap | void 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. |
translationCount | int translationCount() | No description in source. |
faultCount | int faultCount() | No description in source. |
lastFaultReason | int lastFaultReason() | No description in source. |
pages | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SOCKET_UNKNOWN | static final int SOCKET_UNKNOWN = 0 | Socket ids (the mechanical/electrical CPU interface). |
SOCKET_STR5 | static final int SOCKET_STR5 = 1 | AMD sTR5 (Threadripper 9000) |
SOCKET_AM5 | static final int SOCKET_AM5 = 2 | AMD AM5 (Ryzen desktop) |
SOCKET_SP5 | static final int SOCKET_SP5 = 3 | AMD SP5 (EPYC) |
SOCKET_LGA1700 | static final int SOCKET_LGA1700 = 4 | Intel LGA1700 |
SOCKET_GENERIC | static final int SOCKET_GENERIC = 5 | non-specific / legacy |
partName | String partName | nameful: "ASRock WRX90 WS EVO", "TRX50 reference", ... |
socket | int socket | one of SOCKET_* |
chipset | String chipset | "TRX50", "WRX90", ... |
memoryChannels | int memoryChannels | routed memory channels (4 HEDT, 8 PRO WX, ...) |
dimmSlots | int dimmSlots | physical DIMM slots |
pcieLanes | int pcieLanes | total CPU-attached PCIe lanes the board exposes |
pcieGen | int pcieGen | PCIe generation (5 = PCIe 5.0) |
busType | int busType | the SLSystemBus type the board's primary slot is |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int socketId, String chipsetName, | No description in source. |
acceptsSocket | boolean acceptsSocket(int cpuSocket) | Does a CPU that reports socket `cpuSocket` drop into this board? |
supportsChannels | boolean supportsChannels(int wantChannels) | Can this board populate a memory module that wants `wantChannels` channels? |
supportsLanes | boolean supportsLanes(int wantLanes) | Can a card/device asking for `wantLanes` PCIe lanes be seated here? |
name | String name() | No description in source. |
socketId | int socketId() | No description in source. |
chipsetName | String chipsetName() | No description in source. |
channels | int channels() | No description in source. |
slots | int slots() | No description in source. |
lanes | int lanes() | No description in source. |
pcieGeneration | int pcieGeneration() | No description in source. |
systemBusType | int systemBusType() | No description in source. |
socketName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
dma | SLDMAController dma | No description in source. |
framesTx | int framesTx | No description in source. |
framesRx | int framesRx | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
init | void init(SLIOBus bus, int port, SLDMAController dmaEngine) | No description in source. |
transmit | int transmit(int memWord, int words) | No description in source. |
serviceInterrupt | void serviceInterrupt() | No description in source. |
transmitted | int transmitted() | No description in source. |
received | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 33 | No description in source. |
R_LINK | static final int R_LINK = 32 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
sys | SLSystemCall sys | No description in source. |
sop | SLSleelaOpcode sop | No description in source. |
vm | SLSleelaVM vm | No description in source. |
mappedInstr | int mappedInstr | register-ISA instructions translated |
emittedOps | int emittedOps | Sleela opcodes emitted |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLInstructionSet instructionSet, SLSystemCall syscalls, SLSleelaVM target) | No description in source. |
op0 | void op0(int opcode) | No description in source. |
op1 | void op1(int opcode, int arg) | No description in source. |
mapInstruction | void 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. |
aluToSleela | int aluToSleela(int op) | Map a register-ISA ALU opcode to the Sleela stack-arithmetic opcode. |
mapSyscall | void 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. |
mapProgram | int mapProgram(SLProgram program, SLInstructionDecoder decoder) | Translate a whole SLProgram (register-ISA image) into the Sleela substrate. |
instructionsMapped | int instructionsMapped() | No description in source. |
opcodesEmitted | int opcodesEmitted() | No description in source. |
substrate | SLSleelaVM 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
cpu | SLCPU cpu | No description in source. |
memory | SLRAM memory | No description in source. |
io | SLIOBus io | No description in source. |
dma | SLDMAController dma | No description in source. |
console | SLConsoleDriver console | No description in source. |
disk | SLDiskDriver disk | No description in source. |
keyboard | SLKeyboardDriver keyboard | No description in source. |
net | SLNetworkDriver net | No description in source. |
drivers | SLDriverManager drivers | No description in source. |
mm | SLMemoryManager mm | No description in source. |
syscalls | SLSystemCall syscalls | No description in source. |
fs | SLFileSystem fs | No description in source. |
scheduler | SLScheduler scheduler | No description in source. |
kernel | SLKernel kernel | No description in source. |
nextPid | int nextPid | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String osName, SLCPU processor, SLRAM ram) | No description in source. |
install | void install(SLHardDrive bootDrive, int syscallHandlerAddr) | Build every subsystem and bring the kernel up. |
spawn | SLProcess spawn(String procName, int entryPoint) | Admit a loaded program as a schedulable process. |
run | int run(int rounds) | Hand control to the kernel for a bounded number of scheduling rounds. |
osName | String osName() | No description in source. |
getKernel | SLKernel getKernel() | No description in source. |
getFileSystem | SLFileSystem getFileSystem() | No description in source. |
getDrivers | SLDriverManager 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MEDIUM_CD | static final int MEDIUM_CD = 0 | No description in source. |
MEDIUM_DVD | static final int MEDIUM_DVD = 1 | No description in source. |
MEDIUM_BD | static final int MEDIUM_BD = 2 | Blu-ray |
BASE_CD_KBS | static final int BASE_CD_KBS = 150 | Base 1x data rate in KB/s for each medium. |
BASE_DVD_KBS | static final int BASE_DVD_KBS = 1385 | No description in source. |
BASE_BD_KBS | static final int BASE_BD_KBS = 4500 | No description in source. |
partName | String partName | No description in source. |
medium | int medium | No description in source. |
speedMultiplier | int speedMultiplier | the "nnX" rating |
writer | int writer | 1 if it can burn media |
capacityMiB | int capacityMiB | disc capacity (CD 700, DVD 4700, BD 25000, ...) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int mediumId, int multiplier, boolean canWrite, int discMiB) | No description in source. |
baseRateKBs | int baseRateKBs() | No description in source. |
readRateKBs | int readRateKBs() | Sustained read rate in KB/s = base × multiplier. |
readRateMBs | int readRateMBs() | No description in source. |
readTimeMs | int readTimeMs(int mib) | Time in milliseconds to read `mib` megabytes at the drive's rate. |
name | String name() | No description in source. |
speed | int speed() | No description in source. |
canWrite | boolean canWrite() | No description in source. |
capacity | int capacity() | No description in source. |
mediumName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
SLPDP8CPU #sleela 2.5 (lib/cpu/pdp8/SLPDP8CPU.sleela)
SLPDP8CPU class extends SLCPURuntime
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
machineModel | String machineModel = "" | No description in source. |
strictProfile | Boolean strictProfile = true | No description in source. |
extendedArithmeticEnabled | Boolean extendedArithmeticEnabled = false | No description in source. |
memoryExtensionEnabled | Boolean memoryExtensionEnabled = false | No description in source. |
accumulator | Integer accumulator = 0 | No description in source. |
link | Integer link = 0 | No description in source. |
instructionRegister | Integer instructionRegister = 0 | No description in source. |
currentInstructionAddress | Integer currentInstructionAddress = 0 | No description in source. |
memoryWords | Integer memoryWords = 4096 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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. |
configureModel | void configureModel(String selectedMachineModel, | No description in source. |
resetArchitecturalState | void resetArchitecturalState() | No description in source. |
maskWord12 | int maskWord12(Integer value) | No description in source. |
readPdpWord | Integer readPdpWord(Integer address) | No description in source. |
writePdpWord | void writePdpWord(Integer address, Integer value) | No description in source. |
setLink | void setLink(Integer value) | No description in source. |
requireFeature | void requireFeature(Boolean enabled, String featureName) | No description in source. |
getMachineModel | String getMachineModel() | No description in source. |
getAccumulator | Integer getAccumulator() | No description in source. |
getLink | Integer 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 33 | No description in source. |
R_LINK | static final int R_LINK = 32 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 33 | No description in source. |
R_LINK | static final int R_LINK = 32 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
NEW | static final int NEW = 0 | No description in source. |
READY | static final int READY = 1 | No description in source. |
RUNNING | static final int RUNNING = 2 | No description in source. |
BLOCKED | static final int BLOCKED = 3 | No description in source. |
TERMINATED | static final int TERMINATED = 4 | No description in source. |
pid | int pid | No description in source. |
name | String name | No description in source. |
state | int state | No description in source. |
priority | int priority | No description in source. |
savedPC | int savedPC | Saved context (restored on dispatch). |
memoryBase | int memoryBase | No description in source. |
entryPoint | int entryPoint | No description in source. |
quantaUsed | int quantaUsed | scheduler accounting |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int id, String procName, int entry, int base, int prio) | No description in source. |
markReady | void markReady() | No description in source. |
markRunning | void markRunning() | No description in source. |
markBlocked | void markBlocked() | No description in source. |
terminate | void terminate() | No description in source. |
saveContext | void saveContext(SLCore core) | Save the live core state into the PCB (context switch out). |
restoreContext | void restoreContext(SLCore core) | Restore this PCB into the live core (context switch in). |
chargeQuantum | void chargeQuantum() | No description in source. |
processId | int processId() | No description in source. |
processName | String processName() | No description in source. |
processState | int processState() | No description in source. |
entry | int entry() | No description in source. |
base | int base() | No description in source. |
runnable | boolean runnable() | No description in source. |
alive | boolean alive() | No description in source. |
SLProgram #sleela 2.5 (lib/cpu/SLProgram.sleela)
SLProgram class
Defines SLProgram — an executable image: a sequence of encoded
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
entryPoint | int entryPoint | No description in source. |
length | int length | instruction count |
image | SLRAM image | staging buffer holding the encoded words |
timing | SLTimingManifest timing | stated operating point (null until attached) |
access | SLAccessManifest access | stated access semantics (null until attached) |
docMemTier | int docMemTier | Document-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.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String programName, int capacityWords) | No description in source. |
setDocumentTier | void 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. |
documentTier | int documentTier() | No description in source. |
effectiveTier | int 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). |
setEntryPoint | void setEntryPoint(int addr) | No description in source. |
attachTiming | void 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. |
timingManifest | SLTimingManifest timingManifest() | No description in source. |
hasTiming | boolean hasTiming() | No description in source. |
timingHonored | boolean 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. |
attachAccess | void 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. |
accessManifest | SLAccessManifest accessManifest() | No description in source. |
hasAccess | boolean hasAccess() | No description in source. |
accessCompetent | boolean accessCompetent() | True only when the image declares access semantics AND they were sealed as a competent backdrop the consumer may realize as stated. |
append | int append(int encodedWord) | Append one encoded instruction word to the image. |
wordAt | int wordAt(int index) | No description in source. |
size | int size() | No description in source. |
entry | int entry() | No description in source. |
programName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
reg | SLRegister reg | No description in source. |
stride | int stride | bytes/words advanced per sequential instruction |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int bits, int step) | No description in source. |
reset | void reset() | No description in source. |
value | int value() | No description in source. |
increment | int increment() | Sequential advance to the next instruction. |
branchTo | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
os | SLOperatingSystem os | No description in source. |
memory | SLRAM memory | No description in source. |
compiler | SLCompilerDriver compiler | multi-language front-end driver |
loaded | int loaded | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLOperatingSystem operatingSystem, SLRAM ram) | No description in source. |
attachCompiler | void attachCompiler(SLInstructionSet isa) | Attach the ISA so the loader can compile source in any supported language. |
load | SLProcess load(SLProgram program, int loadAddr) | Copy an already-compiled program image into memory starting at loadAddr, then spawn it. Returns the created process. |
loadSource | SLProcess 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. |
loadFile | SLProcess loadFile(String path, String programName, int loadAddr) | Convenience: infer the language from the file extension. |
compilerDriver | SLCompilerDriver compilerDriver() | No description in source. |
programsLoaded | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
wordCount | int wordCount | number of addressable words |
width | int width | bits per word |
handle | int handle | native backing-store handle (0 until allocated) |
reads | int reads | No description in source. |
writes | int writes | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int words, int bits) | No description in source. |
allocate | int allocate() | Allocate the native backing store (zero-initialized). |
inRange | boolean inRange(int addr) | No description in source. |
readWord | int readWord(int addr) | No description in source. |
writeWord | int writeWord(int addr, int value) | No description in source. |
free | void free() | No description in source. |
capacityWords | int capacityWords() | No description in source. |
capacityBytes | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | nameful: "DIMM-A ch0", ... |
dataRateMTs | int dataRateMTs | transfers per second, millions (e.g. 3200 = DDR4-3200) |
minMTs | int minMTs | lowest data rate the operator may dial |
maxMTs | int maxMTs | highest validated data rate |
cl | int cl | Primary timings, in command-clock CYCLES (the datasheet surface). CAS latency: read command -> first data |
trcd | int trcd | RAS-to-CAS delay: activate -> read/write |
trp | int trp | row precharge: precharge -> next activate |
tras | int tras | row active time: activate -> precharge |
trc | int trc | row cycle: activate -> activate (same bank) |
commandRate | int commandRate | 1 (1T) or 2 (2T) command rate |
vddq | SLVoltageRail vddq | the DRAM I/O supply rail |
mvPerStep | int mvPerStep | settled Vddq each extra MT/s step of ceiling needs |
stepMTs | int stepMTs | the MT/s granularity one voltage step buys |
casBudget | SLTiming casBudget | CAS-to-DQ named budget |
rcdBudget | SLTiming rcdBudget | activate-to-CAS named budget |
rpBudget | SLTiming rpBudget | precharge named budget |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String channelName, int rateMTs, int floorMTs, int ceilingMTs) | No description in source. |
attachVddq | void attachVddq(SLVoltageRail rail, int millivoltsPerStep, int mtsPerStep) | No description in source. |
commandClockMHz | int commandClockMHz() | The command clock runs at half the data rate on DDR (two transfers per command clock). Period of one command clock, in picoseconds. |
commandPeriodPs | int commandPeriodPs() | No description in source. |
setCL | void setCL(int cycles) | Set each primary timing (in command-clock cycles). Larger = looser/safer. |
setTRCD | void setTRCD(int cycles) | No description in source. |
setTRP | void setTRP(int cycles) | No description in source. |
setTRAS | void setTRAS(int cycles) | No description in source. |
setTRC | void setTRC(int cycles) | No description in source. |
setCommandRate | void setCommandRate(int t) | No description in source. |
setDataRate | int 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. |
voltageCeilingMTs | int voltageCeilingMTs() | No description in source. |
restamp | void 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. |
firstWordLatencyNs | int firstWordLatencyNs() | First-word read latency in nanoseconds: (tRCD + CL) command-clocks times the command period, divided by 1000 ps/ns. |
randomAccessLatencyNs | int randomAccessLatencyNs() | Random full-row access latency in ns: tRP (close) + tRCD (open) + CL. |
honored | boolean 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. |
channelName | String channelName() | No description in source. |
dataRate | int dataRate() | No description in source. |
casLatency | int casLatency() | No description in source. |
rasToCas | int rasToCas() | No description in source. |
rowPrecharge | int rowPrecharge() | No description in source. |
rowActive | int rowActive() | No description in source. |
rowCycle | int rowCycle() | No description in source. |
commandRateT | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | No description in source. |
width | int width | No description in source. |
value | int value | No description in source. |
loadEnable | int loadEnable | No description in source. |
lastClk | int lastClk | No description in source. |
writes | int writes | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String regName, int bits) | No description in source. |
pow2 | int pow2(int n) | No description in source. |
mask | int mask() | No description in source. |
setInput | void setInput(int v) | combinational input staging |
enableLoad | void enableLoad() | No description in source. |
disableLoad | void disableLoad() | No description in source. |
clock | int clock(int clk, int input) | Clocked load. On the rising edge, if load is enabled, capture the input (already truncated to the register width). |
load | int load(int input) | Direct load helper (one clocked write), convenient for drivers. |
read | int read() | No description in source. |
regName | String regName() | No description in source. |
bitWidth | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
count | int count | No description in source. |
width | int width | No description in source. |
reads | int reads | No description in source. |
writes | int writes | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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. |
pow2 | int pow2(int n) | No description in source. |
clampWord | int clampWord(int v) | No description in source. |
write | void write(int index, int v) | No description in source. |
read | int read(int index) | No description in source. |
registerCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
ADD | static final int ADD = 1 | No description in source. |
SUB | static final int SUB = 2 | No description in source. |
ADDI | static final int ADDI = 3 | No description in source. |
LW | static final int LW = 4 | No description in source. |
SW | static final int SW = 5 | No description in source. |
BEQ | static final int BEQ = 6 | No description in source. |
BNE | static final int BNE = 7 | No description in source. |
JAL | static final int JAL = 8 | No description in source. |
ECALL | static final int ECALL = 9 | No description in source. |
CSR_MSTATUS | static final int CSR_MSTATUS = 32 | A few CSRs modelled as named registers above the GPR file. |
CSR_MCAUSE | static final int CSR_MCAUSE = 33 | No description in source. |
CSR_MEPC | static final int CSR_MEPC = 34 | No description in source. |
xlen | int xlen | register width (32 for RV32) |
isaExtensions | String isaExtensions | e.g. "IMAFD" |
privilege | int privilege | 0 U, 1 S, 3 M |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String extensions) | No description in source. |
x | int x(int i) | No description in source. |
setX | void setX(int i, int v) | No description in source. |
opOf | int opOf(int w) | No description in source. |
rdOf | int rdOf(int w) | No description in source. |
rs1Of | int rs1Of(int w) | No description in source. |
rs2ImmOf | int rs2ImmOf(int w) | No description in source. |
immediate | int immediate(int w) | Immediate generator: sign-extend the compact 8-bit immediate field. |
decode | void decode(int word) | No description in source. |
systemInstruction | void systemInstruction() | ECALL: record the trap in CSRs and halt (environment call to the host/VM). mcause 11 = ecall from M |
trap | void trap(int cause) | No description in source. |
interrupt | void interrupt(int vector) | No description in source. |
encodeR | int encodeR(int op, int rd, int rs1, int rs2) | No description in source. |
encodeI | int encodeI(int op, int rd, int rs1, int imm) | No description in source. |
reg | int reg(int i) | No description in source. |
csr | int csr(int i) | No description in source. |
registerWidth | int registerWidth() | No description in source. |
extensions | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX_PROC | static final int MAX_PROC = 8 | No description in source. |
count | int count | No description in source. |
current | int current | index of the running process |
quantum | int quantum | ticks per time slice |
switches | int switches | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int timeQuantum) | No description in source. |
admit | int admit(SLProcess p) | No description in source. |
at | SLProcess at(int idx) | No description in source. |
pickNext | int pickNext() | Pick the next runnable process after `current`, round-robin. |
schedule | SLProcess schedule(SLCore core) | Preempt the current process and dispatch the next onto the given core. |
quantumTicks | int quantumTicks() | No description in source. |
processCount | int processCount() | No description in source. |
contextSwitches | int contextSwitches() | No description in source. |
running | SLProcess 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
SLSleelaOpcode #sleela 2.5 (lib/cpu/SLSleelaOpcode.sleela)
SLSleelaOpcode class
Defines SLSleelaOpcode — the canonical SLeeLa VM opcode registry,
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
OP_NOP | static final int OP_NOP=0; static final int OP_CONST=1; static final int OP_POP=2; static final int OP_DUP=3 | Base 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_LOADG | static final int OP_LOADG=4; static final int OP_STOREG=5; static final int OP_LOADL=6; static final int OP_STOREL=7 | No description in source. |
OP_ADD | static final int OP_ADD=8; static final int OP_SUB=9; static final int OP_MUL=10; static final int OP_DIV=11 | No description in source. |
OP_MOD | static final int OP_MOD=12; static final int OP_NEG=13; static final int OP_EQ=14; static final int OP_NE=15 | No description in source. |
OP_LT | static final int OP_LT=16; static final int OP_LE=17; static final int OP_GT=18; static final int OP_GE=19 | No description in source. |
OP_AND | static final int OP_AND=20; static final int OP_OR=21; static final int OP_NOT=22; static final int OP_JMP=23 | No description in source. |
OP_JMPF | static final int OP_JMPF=24; static final int OP_CALL=25; static final int OP_RET=26; static final int OP_PRINT=27 | No description in source. |
OP_SPAWN | static final int OP_SPAWN=28; static final int OP_JOINALL=29; static final int OP_LOCK=30; static final int OP_UNLOCK=31 | No description in source. |
OP_SEND | static final int OP_SEND=32; static final int OP_RECV=33; static final int OP_LISTEN=34; static final int OP_ACCEPT=35 | No description in source. |
OP_CONNECT | static final int OP_CONNECT=36; static final int OP_SOCKREAD=37; static final int OP_SOCKWRITE=38; static final int OP_SOCKCLOSE=39 | No description in source. |
OP_PIPE | static final int OP_PIPE=40; static final int OP_PIPEPEER=41; static final int OP_FIFO_MK=42; static final int OP_FILEOPEN=43 | No description in source. |
OP_FILEREAD | static final int OP_FILEREAD=44; static final int OP_FILEWRITE=45; static final int OP_FILECLOSE=46; static final int OP_FILEUNLINK=47 | No description in source. |
OP_HALT | static final int OP_HALT=48 | No description in source. |
OP_NEWSTRUCT | static final int OP_NEWSTRUCT=58; static final int OP_GETFIELD=59; static final int OP_SETFIELD=60 | Time services 49..57, structs 58..62 (available to the substrate). |
BASE_COUNT | static 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_COUNT | static final int SUBSTRATE_COUNT = 98 | end of shelf 2 (substrate), exclusive |
NATIVE_COUNT | static final int NATIVE_COUNT = 156 | end 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_CALL | static final int OP_UI_CALL = 150 | OP_SSEND (151): the ::: structural-offload send. A host-shelf service opcode that frames a String source element-by-element into a receiver reach. |
OP_SSEND | static final int OP_SSEND = 151 | No description in source. |
OP_CHECKCAST | static final int OP_CHECKCAST = 152 | No description in source. |
OP_INSTANCEOF | static final int OP_INSTANCEOF = 153 | No description in source. |
OP_DUP2 | static final int OP_DUP2 = 154 | No description in source. |
OP_OSLS_CALL | static final int OP_OSLS_CALL = 155 | No description in source. |
TIER_NONE | static final int TIER_NONE = 0 | Tier ids the monitoring/storage layer pivots on (the "iteration flags"). not a native opcode (out of range) |
TIER_BASE | static final int TIER_BASE = 1 | shelf 1: base computational/service core |
TIER_SUBSTRATE | static final int TIER_SUBSTRATE = 2 | shelf 2: substrate extensions |
TIER_HOST | static final int TIER_HOST = 3 | shelf 3: host-facing services |
code | int code | No description in source. |
mnemonic | String mnemonic | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int opcode, String name) | No description in source. |
valid | boolean valid(int opcode) | Any native opcode is acceptable; validity is the full 0..NATIVE_COUNT range. |
isBase | boolean isBase(int opcode) | Per-shelf acceptance checks (all acceptable; these name WHICH shelf). |
isSubstrate | boolean isSubstrate(int opcode) | No description in source. |
isHost | boolean isHost(int opcode) | No description in source. |
tier | int 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. |
tierName | String tierName(int opcode) | No description in source. |
baseShelfCount | int baseShelfCount() | Count of opcodes on each shelf, for sizing per-shelf monitoring/storage. 49 |
substrateShelfCount | int substrateShelfCount() | 49 |
hostShelfCount | int hostShelfCount() | 58 |
isStackPush | boolean isStackPush(int op) | Classification used by the mapping/equivalence layers. |
isArithmetic | boolean isArithmetic(int op) | No description in source. |
isComparison | boolean isComparison(int op) | No description in source. |
isLogic | boolean isLogic(int op) | No description in source. |
isControl | boolean isControl(int op) | No description in source. |
isService | boolean isService(int op) | The I/O + OS-service opcodes a system-call layer maps onto. |
nameOf | String nameOf(int op) | No description in source. |
baseCount | int baseCount() | Shelf-boundary reporters (exclusive upper bounds). base core: 0..48 |
substrateCount | int substrateCount() | + substrate: 0..97 |
nativeCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
op | SLSleelaOpcode op | No description in source. |
codeOps | SLRAM codeOps | opcode of each instruction |
codeArgs | SLRAM codeArgs | immediate operand of each instruction |
stack | SLRAM stack | operand stack (grows up) |
globals | SLRAM globals | global slots |
codeLen | int codeLen | No description in source. |
ip | int ip | instruction pointer |
sp | int sp | operand-stack pointer |
halted | int halted | No description in source. |
executed | int executed | No description in source. |
lastPrint | int lastPrint | last value sent to OP_PRINT (observable output) |
hosted | int hosted | VM-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 |
exitPending | int exitPending | 1 = execution paused awaiting host handling |
exitOpcode | int exitOpcode | the service opcode that caused the exit |
exitArg | int exitArg | its immediate |
exitPayload | int exitPayload | the stack value it carried (e.g. the char to print) |
timing | SLTimingManifest timing | Stated 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.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int codeCap, int stackCap, int globalCap) | No description in source. |
adoptTiming | void 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. |
adoptProgramTiming | void adoptProgramTiming(SLProgram prog) | Convenience: pull the manifest straight off a compiled program. |
hasTiming | boolean hasTiming() | No description in source. |
timingManifest | SLTimingManifest timingManifest() | No description in source. |
declaredCoreMHz | int 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. |
setHosted | void setHosted() | Enable hosted mode: service opcodes park VM-exits instead of acting inline. |
exiting | boolean exiting() | No description in source. |
exitReasonOpcode | int exitReasonOpcode() | No description in source. |
exitReasonArg | int exitReasonArg() | No description in source. |
exitReasonPayload | int exitReasonPayload() | No description in source. |
resolveExit | void resolveExit() | Host clears the exit after servicing it so the guest can resume. |
pushResult | void pushResult(int value) | Host pushes a syscall return value onto the operand stack for the guest. |
emit | int emit(int opcode, int arg) | Load one opcode+arg into the code store. |
push | void push(int v) | Stack helpers. |
pop | int pop() | No description in source. |
step | int step() | Execute exactly one opcode (the one-at-a-time native contract). |
parkExit | void 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). |
boolInt | int boolInt(boolean b) | No description in source. |
printValue | void printValue(int v) | No description in source. |
run | int run(int budget) | Run until HALT, a pending VM-exit (hosted mode), or budget exhausted. |
opcodeAtIndex | int opcodeAtIndex(int i) | Read back a loaded code slot (used by the kernel builder to package an image). |
argAtIndex | int argAtIndex(int i) | No description in source. |
instructionPointer | int 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. |
setInstructionPointer | void setInstructionPointer(int newIp) | No description in source. |
top | int top() | No description in source. |
printed | int printed() | No description in source. |
instructionsRun | int instructionsRun() | No description in source. |
isHalted | boolean isHalted() | No description in source. |
programLength | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
memory | SLRAM memory | No description in source. |
base | int base | highest address of the stack region (SP starts here) |
limit | int limit | lowest address the stack may reach |
sp | int sp | stack pointer |
pushes | int pushes | No description in source. |
pops | int pops | No description in source. |
faulted | int faulted | set on overflow/underflow |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(SLRAM ram, int stackBase, int stackLimit) | No description in source. |
empty | boolean empty() | No description in source. |
full | boolean full() | No description in source. |
push | int push(int value) | Push a word: pre-decrement SP, then store. Returns new SP, or -1 on overflow. |
pop | int pop() | Pop a word: read at SP, then post-increment. Returns the value, or -1 on underflow. |
peek | int peek() | No description in source. |
pointer | int pointer() | No description in source. |
setPointer | void setPointer(int newSp) | No description in source. |
depth | int depth() | No description in source. |
faulting | boolean faulting() | No description in source. |
clearFault | void 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
zero | int zero | No description in source. |
negative | int negative | No description in source. |
carry | int carry | No description in source. |
overflow | int overflow | No description in source. |
interruptEnable | int interruptEnable | No description in source. |
supervisor | int supervisor | 1 = kernel/supervisor mode, 0 = user mode |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
reset | void reset() | No description in source. |
setFromALU | void setFromALU(SLALU alu) | No description in source. |
enableInterrupts | void enableInterrupts() | No description in source. |
disableInterrupts | void disableInterrupts() | No description in source. |
enterUserMode | void enterUserMode() | No description in source. |
enterSupervisorMode | void enterSupervisorMode() | No description in source. |
zeroFlag | int zeroFlag() | No description in source. |
negativeFlag | int negativeFlag() | No description in source. |
carryFlag | int carryFlag() | No description in source. |
overflowFlag | int overflowFlag() | No description in source. |
interruptsEnabled | boolean interruptsEnabled() | No description in source. |
inSupervisor | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
CLASS_FLOPPY | static final int CLASS_FLOPPY = 0 | Device classes. |
CLASS_HDD | static final int CLASS_HDD = 1 | No description in source. |
CLASS_SSD | static final int CLASS_SSD = 2 | No description in source. |
CLASS_NVME | static final int CLASS_NVME = 3 | No description in source. |
CLASS_TAPE | static final int CLASS_TAPE = 4 | No description in source. |
IF_ST506 | static final int IF_ST506 = 0 | Interfaces. |
IF_IDE | static final int IF_IDE = 1 | No description in source. |
IF_SCSI | static final int IF_SCSI = 2 | No description in source. |
IF_SATA | static final int IF_SATA = 3 | No description in source. |
IF_SAS | static final int IF_SAS = 4 | No description in source. |
IF_NVME | static final int IF_NVME = 5 | No description in source. |
partName | String partName | No description in source. |
deviceClass | int deviceClass | No description in source. |
iface | int iface | No description in source. |
capacityMiB | int capacityMiB | capacity in MiB |
rpm | int rpm | rotational speed (0 for SSD/NVMe/flash) |
avgSeekUs | int avgSeekUs | average seek time, microseconds (0 for solid state) |
transferMBs | int transferMBs | sustained sequential transfer, MB/s |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int devClass, int interfaceId, int capMiB, | No description in source. |
rotationalLatencyUs | int rotationalLatencyUs() | Average rotational latency in microseconds (half a revolution). 0 for non-rotational media. |
accessTimeUs | int accessTimeUs(int bytes) | Modelled random-access time for a `bytes`-sized read: seek + rotational latency + transfer time, in microseconds. |
name | String name() | No description in source. |
classId | int classId() | No description in source. |
capacity | int capacity() | No description in source. |
rotationRpm | int rotationRpm() | No description in source. |
seekTimeUs | int seekTimeUs() | No description in source. |
transferRate | int transferRate() | No description in source. |
solidState | boolean solidState() | No description in source. |
className | String className() | No description in source. |
interfaceName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | r0 is hardwired to zero (reads 0, writes discarded). |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
BUS_ISA | static final int BUS_ISA = 0 | No description in source. |
BUS_PCI | static final int BUS_PCI = 1 | No description in source. |
BUS_AGP | static final int BUS_AGP = 2 | No description in source. |
BUS_PCIE | static final int BUS_PCIE = 3 | No description in source. |
BUS_FSB | static final int BUS_FSB = 4 | No description in source. |
partName | String partName | No description in source. |
busType | int busType | No description in source. |
clockMHz | int clockMHz | No description in source. |
widthBits | int widthBits | data path width |
lanes | int lanes | for PCIe (1 otherwise) |
perLaneMBs | int perLaneMBs | per-lane rate for serial buses (PCIe), 0 for parallel |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int type, int clock, int width, int laneCount, int laneMBs) | No description in source. |
peakBandwidthMBs | int peakBandwidthMBs() | Peak bandwidth in MB/s. Serial buses (PCIe) use per-lane × lanes; parallel buses use clock × bus bytes. |
name | String name() | No description in source. |
clock | int clock() | No description in source. |
width | int width() | No description in source. |
laneCount | int laneCount() | No description in source. |
busName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
SYS_WRITE | static final int SYS_WRITE = 0 | No description in source. |
SYS_READ | static final int SYS_READ = 1 | No description in source. |
SYS_OPEN | static final int SYS_OPEN = 2 | No description in source. |
SYS_CLOSE | static final int SYS_CLOSE = 3 | No description in source. |
SYS_EXIT | static final int SYS_EXIT = 4 | No description in source. |
SYS_SPAWN | static final int SYS_SPAWN = 5 | No description in source. |
SYS_YIELD | static final int SYS_YIELD = 6 | No description in source. |
SYS_COUNT | static final int SYS_COUNT = 7 | No description in source. |
calls | int calls | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
valid | boolean valid(int number) | No description in source. |
count | void count() | No description in source. |
nameOf | String nameOf(int number) | No description in source. |
callCount | int 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
signal | String signal | nameful path: "addr->ras", "cas->dq", "req->ack", ... |
reason | String reason | why this budget exists, in words |
periodPs | int periodPs | the clock/strobe period this path must fit inside (ps) |
setupPs | int setupPs | required setup before the capturing edge (ps) |
holdPs | int holdPs | required hold after the capturing edge (ps) |
propagationPs | int propagationPs | combinational / flight time along the path (ps) |
jitterPs | int jitterPs | peak cycle-to-cycle jitter to subtract from the period |
guardbandPs | int guardbandPs | extra margin demanded on top of a bare pass (ps) |
checks | int checks | how many times this budget has been evaluated |
violations | int violations | how many of those failed |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String name, int period, int guardband) | Name a path and give it a period and a guardband. |
describe | void describe(String why) | No description in source. |
setSetup | void setSetup(int ps) | State the path's electrical constraints. |
setHold | void setHold(int ps) | No description in source. |
setPropagation | void setPropagation(int ps) | No description in source. |
setJitter | void setJitter(int ps) | No description in source. |
setPeriod | void setPeriod(int ps) | No description in source. |
setGuardband | void setGuardband(int ps) | No description in source. |
consumedPs | int consumedPs() | Time consumed along the path before data is stable at the capture point. |
effectivePeriodPs | int effectivePeriodPs() | The usable period after jitter is removed from the raw period. |
setupSlackPs | int setupSlackPs() | Setup slack: usable period minus consumed time minus the demanded guardband. Non-negative = the path is honored. |
holdSlackPs | int holdSlackPs() | Hold slack: propagation must out-last the required hold window. |
honored | boolean honored() | Does this budget hold, counting setup, hold, and guardband together? |
maxFrequencyMHz | int 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. |
signalName | String signalName() | No description in source. |
why | String why() | No description in source. |
period | int period() | No description in source. |
guardband | int guardband() | No description in source. |
checkCount | int checkCount() | No description in source. |
violationCount | int violationCount() | No description in source. |
clean | boolean clean() | No description in source. |
SLTimingClass #sleela 2.5 (lib/cpu/SLTimingClass.sleela)
SLTimingClass class
Defines SLTimingClass — the expertise TIER expressed as a Class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
TIER_NOVICE | static final int TIER_NOVICE = 0 | No description in source. |
TIER_BASIC | static final int TIER_BASIC = 1 | No description in source. |
TIER_ADVANCED | static final int TIER_ADVANCED = 2 | No description in source. |
TIER_EXPERT | static final int TIER_EXPERT = 3 | No description in source. |
tier | int tier | one of TIER_* |
label | String label | nameful: tier name, e.g. "Expert" |
medium | String medium | the "brand or medium" this tier is applied to/for |
guardbandPs | int guardbandPs | timing guardband this tier demands on every budget |
headroomMv | int headroomMv | voltage headroom (above floor) this tier insists on |
clockHeadroomPct | int clockHeadroomPct | how far below the honest ceiling this tier dials (%) |
knobsWritable | int knobsWritable | 1 = expert timing/voltage knobs may be changed |
railsUnlockable | int railsUnlockable | 1 = rails may be unlocked (uncapped adjustment) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int tierId, String brandOrMedium) | Build the tier object for a given tier id and brand/medium label. |
novice | void novice(String brandOrMedium) | Convenience constructors by name — each returns this configured object. |
basic | void basic(String brandOrMedium) | No description in source. |
advanced | void advanced(String brandOrMedium) | No description in source. |
expert | void expert(String brandOrMedium) | No description in source. |
applyPolicy | void applyPolicy() | The heart of the object: a tier IS its policy. |
allowsKnob | boolean allowsKnob() | May the operator change an expert timing/voltage knob at this tier? |
allowsUnlock | boolean allowsUnlock() | May a rail be unlocked (adjustment uncapped) at this tier? |
dialableMHz | int 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. |
satisfiesSlack | boolean 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.) |
satisfiesHeadroom | boolean satisfiesHeadroom(int railHeadroomMv) | Does a rail's headroom satisfy this tier's insistence? |
retier | String retier(int tierId) | Promote/demote to another tier (re-applies policy). Returns the new label. |
tierId | int tierId() | No description in source. |
tierName | String tierName() | No description in source. |
brandOrMedium | String brandOrMedium() | No description in source. |
guardband | int guardband() | No description in source. |
headroom | int headroom() | No description in source. |
clockHeadroom | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAGIC | static final int MAGIC = 5213 | --- magic / identity --- "SL-TIMING" marker word in a program header |
version | int version | No description in source. |
tier | int tier | --- expertise tier --- SLTimingClass.TIER_* |
tierLabel | String tierLabel | "Novice" / "Basic" / "Advanced" / "Expert" |
brandMedium | String brandMedium | the brand or medium this profile targets |
coreMHz | int coreMHz | --- dialed clocks (variable speeds) --- |
busMHz | int busMHz | No description in source. |
ioMHz | int ioMHz | No description in source. |
ramMTs | int ramMTs | No description in source. |
vcoreMv | int vcoreMv | --- settled actual voltages (millivolts) --- |
vsocMv | int vsocMv | No description in source. |
vddqMv | int vddqMv | No description in source. |
vioMv | int vioMv | No description in source. |
honoredFlag | int honoredFlag | --- honored summary --- 1 = every budget honored when the manifest was sealed |
worstSlackPs | int worstSlackPs | tightest setup slack across all paths (quality margin) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
setTier | void setTier(int tierId, String label, String brandOrMedium) | No description in source. |
setClocks | void setClocks(int core, int bus, int io, int ram) | No description in source. |
setVoltages | void setVoltages(int vcore, int vsoc, int vddq, int vio) | No description in source. |
setRam | void setRam(int casLatency, int rasToCas, int rowPrecharge, int rowActive) | No description in source. |
seal | void seal(boolean isHonored, int worstSlack) | No description in source. |
valid | boolean valid() | Is this a well-formed, honored manifest a consumer may trust? |
honored | boolean honored() | No description in source. |
writeHeader | int 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. |
headerWords | int headerWords() | The fixed number of header words writeHeader emits (so a loader can skip the header to reach the first instruction). |
readHeader | boolean 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". |
tierId | int tierId() | No description in source. |
tierName | String tierName() | No description in source. |
brandOrMedium | String brandOrMedium() | No description in source. |
core | int core() | No description in source. |
bus | int bus() | No description in source. |
io | int io() | No description in source. |
ram | int ram() | No description in source. |
vcore | int vcore() | No description in source. |
vddq | int vddq() | No description in source. |
worstSlack | int worstSlack() | No description in source. |
SLTimingProfile #sleela 2.5 (lib/cpu/SLTimingProfile.sleela)
SLTimingProfile class
Defines SLTimingProfile — the one object that gathers a whole
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
tier | SLTimingClass tier | the governing expertise Class Object |
vcore | SLVoltageRail vcore | Named, adjustable voltage rails — the ACTUAL voltages, in millivolts. CPU core |
vsoc | SLVoltageRail vsoc | SoC / uncore / interconnect |
vddq | SLVoltageRail vddq | DRAM I/O |
vio | SLVoltageRail vio | peripheral I/O ring |
cpu | SLCpuTiming cpu | Expert timings, each on its rail. |
memBus | SLBusTiming memBus | the memory interconnect |
sysBus | SLBusTiming sysBus | the system/front-side interconnect |
ioLink | SLIOTiming ioLink | No description in source. |
ram | SLRamTiming ram | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void 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. |
stampTierGuardbands | void stampTierGuardbands() | Push the tier's demanded guardband onto every named budget so a passing check already means "honored for this expertise tier". |
dialToTierDefaults | void dialToTierDefaults() | Dial each variable speed to the tier's willing fraction of its honest ceiling (Novice backs off; Expert pushes to the edge). |
dialCore | int dialCore(int mhz) | No description in source. |
dialMemBus | int dialMemBus(int mhz) | No description in source. |
dialSysBus | int dialSysBus(int mhz) | No description in source. |
dialIO | int dialIO(int mhz) | No description in source. |
dialRam | int dialRam(int mts) | No description in source. |
adjustVcore | int 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. |
adjustVsoc | int adjustVsoc(int deltaMv) | No description in source. |
adjustVddq | int adjustVddq(int deltaMv) | No description in source. |
adjustVio | int adjustVio(int deltaMv) | No description in source. |
adjustRail | int adjustRail(SLVoltageRail rail, int deltaMv) | No description in source. |
honored | boolean honored() | Everything honored together: every expert timing on every rail, and every rail inside its limits with the tier's insisted headroom. |
worstSlackPs | int 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. |
toManifest | SLTimingManifest toManifest() | Flatten the whole operating point into the embeddable manifest a compiled .sleela file carries — stated numbers, not assumed confidences. |
expertise | SLTimingClass expertise() | No description in source. |
coreRail | SLVoltageRail coreRail() | No description in source. |
memoryRail | SLVoltageRail memoryRail() | No description in source. |
ioRail | SLVoltageRail ioRail() | No description in source. |
cpuTiming | SLCpuTiming cpuTiming() | No description in source. |
memoryBus | SLBusTiming memoryBus() | No description in source. |
systemBus | SLBusTiming systemBus() | No description in source. |
ioTiming | SLIOTiming ioTiming() | No description in source. |
ramTiming | SLRamTiming 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
R_SP | static final int R_SP = 4 | No description in source. |
R_PC | static final int R_PC = 5 | No description in source. |
R_FLAGS | static final int R_FLAGS = 6 | No description in source. |
R_AUX | static final int R_AUX = 7 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
SLTuringBridge #sleela 2.5 (lib/cpu/SLTuringBridge.sleela)
SLTuringBridge class
Defines SLTuringBridge — the equivalence driver that closes the
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
isa | SLInstructionSet isa | No description in source. |
decoder | SLInstructionDecoder decoder | No description in source. |
sys | SLSystemCall sys | No description in source. |
runs | int runs | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
runLanguage | int 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. |
runProgram | int runProgram(SLProgram prog) | Reduce ONE already-built register-ISA program to the substrate and run it. |
proveEquivalence | boolean 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_SLEELA | int SLFrontend_LANG_SLEELA() | Language-id helpers (mirror SLFrontend constants without an instance). |
SLFrontend_LANG_C | int SLFrontend_LANG_C() | No description in source. |
SLFrontend_LANG_CPP | int SLFrontend_LANG_CPP() | No description in source. |
SLFrontend_LANG_JAVA | int SLFrontend_LANG_JAVA() | No description in source. |
runCount | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0 | No description in source. |
R_B | static final int R_B = 1 | No description in source. |
R_X | static final int R_X = 2 | No description in source. |
R_Y | static final int R_Y = 3 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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).
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
name | String name | nameful rail: "Vcore", "Vsoc", "Vddq", "Vio", ... |
nominalMv | int nominalMv | nominal operating voltage in millivolts |
offsetMv | int offsetMv | operator-dialed adjustment (may be negative = undervolt) |
floorMv | int floorMv | hard lower limit; below this the part is unstable |
ceilingMv | int ceilingMv | hard upper limit; above this the part is unsafe |
loadLineUohm | int loadLineUohm | load-line resistance in micro-ohms (droop = I * R) |
loadMa | int loadMa | present current draw in milliamps |
locked | int locked | 1 = limits enforced, adjustments clamped into range |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String railName, int nominal, int floor, int ceiling) | Configure a rail with its name, nominal point, and safe window. |
setLoadLine | void setLoadLine(int microOhms) | Give the rail a load line (micro-ohms) so droop can be computed from draw. |
setLoad | void setLoad(int milliamps) | Declare the present current draw (milliamps) the rail is sourcing. |
adjust | void 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. |
setOffset | void setOffset(int deltaMv) | Set the adjustment to an absolute value (relative to nominal). |
lock | void lock() | No description in source. |
unlock | void unlock() | bench/expert mode: adjustments uncapped |
droopMv | int droopMv() | Droop in millivolts from the load line at the present draw: droop(mV) = loadMa (mA) * loadLineUohm (uOhm) / 1_000_000 |
effectiveMv | int effectiveMv() | The voltage the rail actually settles at under load — what every timing budget on this rail is proven against. |
clampToWindow | void clampToWindow() | Keep the dialed offset such that effective() stays within the safe window. |
withinLimits | boolean withinLimits() | Is the settled rail inside its stated safe window? |
headroomMv | int headroomMv() | Headroom (mV) between the settled point and the floor — the margin a slow corner has before it browns out. Negative means a violation. |
railName | String railName() | No description in source. |
nominal | int nominal() | No description in source. |
offset | int offset() | No description in source. |
floor | int floor() | No description in source. |
ceiling | int ceiling() | No description in source. |
load | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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().
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
LANG_SLEELA | static final int LANG_SLEELA = 0 | Language ids (match SLCompilerDriver / SLFrontend). |
LANG_C | static final int LANG_C = 1 | No description in source. |
LANG_CPP | static final int LANG_CPP = 2 | No description in source. |
LANG_JAVA | static final int LANG_JAVA = 3 | No description in source. |
STATE_NEW | static final int STATE_NEW = 0 | Lifecycle states. |
STATE_COMPILED | static final int STATE_COMPILED = 1 | No description in source. |
STATE_ADMITTED | static final int STATE_ADMITTED = 2 | No description in source. |
STATE_RUNNING | static final int STATE_RUNNING = 3 | No description in source. |
STATE_DONE | static final int STATE_DONE = 4 | No description in source. |
STATE_REJECTED | static final int STATE_REJECTED = 5 | No description in source. |
name | String name | No description in source. |
sourcePath | String sourcePath | No description in source. |
language | int language | No description in source. |
state | int state | No description in source. |
resource | SLCPUResource resource | the grant this workload runs within |
program | SLProgram program | compiled register-ISA image (language-independent) |
result | int result | last observable output (printed value) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String workloadName, String path, int langId, SLCPUResource grant) | No description in source. |
compile | SLProgram 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. |
markAdmitted | void markAdmitted() | No description in source. |
markRejected | void markRejected() | No description in source. |
markRunning | void markRunning() | No description in source. |
markDone | void markDone(int observable) | No description in source. |
image | SLProgram image() | No description in source. |
grant | SLCPUResource grant() | No description in source. |
languageId | int languageId() | No description in source. |
workloadName | String workloadName() | No description in source. |
source | String source() | No description in source. |
runState | int runState() | No description in source. |
output | int output() | No description in source. |
compiled | boolean compiled() | No description in source. |
finished | boolean finished() | No description in source. |
rejected | boolean rejected() | No description in source. |
languageName | String 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
EAX | static final int EAX = 0; static final int ECX = 1; static final int EDX = 2; static final int EBX = 3 | No description in source. |
ESP | static final int ESP = 4; static final int EBP = 5; static final int ESI = 6; static final int EDI = 7 | No description in source. |
EFLAGS | static final int EFLAGS = 8 | No description in source. |
MOV_RI | static final int MOV_RI = 1; static final int MOV_RR = 2; static final int ADD_RR = 3 | No description in source. |
SUB_RR | static final int SUB_RR = 4; static final int INC_R = 5; static final int CMP_RR = 6 | No description in source. |
MOV_RM | static final int MOV_RM = 7; static final int MOV_MR = 8; static final int JMP = 9 | No description in source. |
JE | static final int JE = 10; static final int JNE = 11; static final int INT = 12; static final int HLT = 13 | No description in source. |
mode | int mode | 0 real, 1 protected (control-register hook) |
cr0 | int cr0 | control register 0 |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
immOf | int immOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
interrupt | void interrupt(int vector) | IDT dispatch hook (model no-op) |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
encodeImm | int encodeImm(int opcode, int dst, int imm) | No description in source. |
lowerAddAndPrint | int 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. |
reg | int reg(int i) | No description in source. |
eflags | int eflags() | No description in source. |
protectedMode | boolean 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 31 | No description in source. |
R_LINK | static final int R_LINK = 30 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 7 | No description in source. |
R_LINK | static final int R_LINK = 6 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_A | static final int R_A = 0; static final int R_B = 1; static final int R_C = 2 | No description in source. |
R_D | static final int R_D = 3; static final int R_E = 4; static final int R_H = 5 | No description in source. |
R_L | static final int R_L = 6; static final int R_SP = 7; static final int R_R = 8 | No description in source. |
R_F | static final int R_F = 9 | flags |
LD_R_N | static final int LD_R_N = 1 | operand low nibble = reg, high nibble = n (packed) |
LD_A_NN | static final int LD_A_NN = 2 | A <- (nn) |
ST_NN_A | static final int ST_NN_A = 3 | (nn) <- A |
ADD_A_N | static final int ADD_A_N = 4 | No description in source. |
SUB_N | static final int SUB_N = 5 | No description in source. |
INC_R | static final int INC_R = 6 | No description in source. |
OUT_N_A | static final int OUT_N_A = 7 | No description in source. |
IN_A_N | static final int IN_A_N = 8 | No description in source. |
JP_NN | static final int JP_NN = 9 | No description in source. |
JR_Z | static final int JR_Z = 10 | No description in source. |
JR_NZ | static final int JR_NZ = 11 | No description in source. |
HALT | static final int HALT = 12 | No description in source. |
ioPorts | SLRAM ioPorts | 256-port I/O space (separate from memory, Z80 style) |
rCounter | int rCounter | memory-refresh counter (R register wraps 0..127) |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
operandOf | int operandOf(int w) | No description in source. |
preFetch | void 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. |
refresh | void refresh() | No description in source. |
wait | void wait(int cycles) | model hook; cycle-accurate waits are documented, not simulated |
decode | void decode(int word) | No description in source. |
ioCycleWrite | void ioCycleWrite(int port, int value) | Separate I/O port space (OUT/IN), distinct from the memory bus. |
ioCycleRead | int ioCycleRead(int port) | No description in source. |
signed | int signed(int b) | No description in source. |
encode | int encode(int opcode, int operand) | No description in source. |
accumulator | int accumulator() | No description in source. |
refreshRegister | int 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.
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
R_ZERO | static final int R_ZERO = 0 | No description in source. |
R_SP | static final int R_SP = 15 | No description in source. |
R_LINK | static final int R_LINK = 14 | No description in source. |
I_LOADI | static final int I_LOADI = 1 | dst <- imm |
I_MOVE | static final int I_MOVE = 2 | dst <- src |
I_LOAD | static final int I_LOAD = 3 | dst <- mem[imm] |
I_STORE | static final int I_STORE = 4 | mem[imm] <- dst |
I_ADD | static final int I_ADD = 5 | dst <- dst + src |
I_SUB | static final int I_SUB = 6 | dst <- dst - src |
I_MUL | static final int I_MUL = 7 | dst <- dst * src |
I_AND | static final int I_AND = 8 | dst <- dst & src |
I_OR | static final int I_OR = 9 | dst <- dst | src |
I_CMP | static final int I_CMP = 10 | flags <- dst - src |
I_JMP | static final int I_JMP = 11 | pc <- imm |
I_JZ | static final int I_JZ = 12 | if Z: pc <- imm |
I_HALT | static final int I_HALT = 13 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
gpr | int gpr(int i) | No description in source. |
setGpr | void setGpr(int i, int v) | No description in source. |
configure | void configure() | No description in source. |
opOf | int opOf(int w) | No description in source. |
dstOf | int dstOf(int w) | No description in source. |
srcOf | int srcOf(int w) | No description in source. |
decode | void decode(int word) | No description in source. |
setZN | void setZN(int v) | No description in source. |
encode | int encode(int opcode, int dst, int src) | No description in source. |
reg | int reg(int i) | No description in source. |
registers | int registers() | No description in source. |
threadripper-at-spec #sleela 2.5 (lib/cpu/components/examples/threadripper-at-spec.sleela)
ThreadripperAtSpecExample class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
main | void main() | No description in source. |
world-net-results #sleela 2.5 (lib/cpu/examples/world-net-results.sleela)
ClockPolicy class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configureSpec | void configureSpec(int ratedMHz) | No description in source. |
overclockTo | void overclockTo(int targetMHz) | No description in source. |
reassess | void reassess() | No description in source. |
effectiveMHz | int effectiveMHz() | No description in source. |
rating | int rating() | No description in source. |
isOverclocked | boolean isOverclocked() | No description in source. |
isStable | boolean isStable() | No description in source. |
speedRatioMilli | int speedRatioMilli() | No description in source. |
Resource class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(int words, int b) | No description in source. |
words | int words() | No description in source. |
budgetOf | int budgetOf() | No description in source. |
usedOf | int usedOf() | No description in source. |
charge | void charge(int n) | No description in source. |
remaining | int remaining() | No description in source. |
Workload class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
LANG_SLEELA | static final int LANG_SLEELA = 0; static final int LANG_C = 1; static final int LANG_CPP = 2; static final int LANG_JAVA = 3 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(String n, int language, int words, int cost, int result) | No description in source. |
assign | void assign(Resource g) | No description in source. |
languageName | String languageName() | No description in source. |
CpuModel class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
bringUp | void bringUp(String k, String human, String fam, int bits, int words, int specMHz) | No description in source. |
specClockMHz | int specClockMHz() | No description in source. |
effectiveMHz | int effectiveMHz() | No description in source. |
overclocked | boolean overclocked() | No description in source. |
clockStable | boolean clockStable() | No description in source. |
overclock | boolean overclock(int targetMHz) | No description in source. |
admit | boolean 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. |
runWorkload | int 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.
| Field | Declaration | What it holds |
|---|---|---|
MAX | static final int MAX = 64 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure() | No description in source. |
add | void add(String k, String human, String fam, int mhz, int bits, int words) | No description in source. |
size | int size() | No description in source. |
keyAt | String keyAt(int i) | No description in source. |
indexOf | int indexOf(String k) | No description in source. |
has | boolean has(String k) | No description in source. |
make | CpuModel make(String k) | Instantiate the model selected by key (null if unknown). |
list | String list() | No description in source. |
seed | void seed() | A roster spanning eras: 8-bit micros through modern 64-bit console SoCs. |
CpuFleet class
Fields — the named values this unit stores.
| Field | Declaration | What it holds |
|---|---|---|
MAX | static final int MAX = 64 | No description in source. |
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(CpuCatalog cat) | No description in source. |
select | boolean select(String k) | No description in source. |
selectAll | void selectAll() | No description in source. |
count | int count() | No description in source. |
at | CpuModel at(int i) | No description in source. |
keyAt | String keyAt(int i) | No description in source. |
overclockFleetPercent | void overclockFleetPercent(int percent) | No description in source. |
runAcross | int 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. |
accumulate | void accumulate(String k, CpuModel cpu, Resource g, int out) | No description in source. |
resetResults | void resetResults() | No description in source. |
completed | int completed() | No description in source. |
rejectedCount | int rejectedCount() | No description in source. |
net | int net() | No description in source. |
aggregateEffectiveMHz | int aggregateEffectiveMHz() | No description in source. |
aggregateSpecMHz | int aggregateSpecMHz() | No description in source. |
fleetSpeedRatioMilli | int fleetSpeedRatioMilli() | No description in source. |
fastest | String fastest() | No description in source. |
scoreboard | String scoreboard() | No description in source. |
CreatorNetwork class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
configure | void configure(CpuFleet f) | No description in source. |
dispatch | int 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. |
totalLatency | int totalLatency() | No description in source. |
deliveredCount | int deliveredCount() | No description in source. |
networkReport | String networkReport() | No description in source. |
World class
Methods — the actions this unit can perform.
| Method | Signature | What it does |
|---|---|---|
banner | void banner(String t) | No description in source. |
main | void main() | No description in source. |
selfCheck | void selfCheck(CpuCatalog roster, CpuFleet fleet, CpuFleet netFleet, CreatorNetwork creator, int net, int net2, int netNet) | No description in source. |
expect | int expect(boolean cond, String what) | No description in source. |