Skip to main content

Module onboard

Module onboard 

Source
Expand description

The compiler as the board’s own CPU runs it: LOGOS source → register bytecode → the fabric engine’s wire image, through exactly the path the laptop’s board hosts take (super::engine_build), with the VM’s golden proven against the engine model before a byte of the image exists. The board runs a riscv64gc-unknown-linux-musl build of this same code; onboard_compiler_lock holds its every answer byte-identical to the host build’s.

Structs§

Compiled
One program compiled for the fabric engine.
Entry
One program of a library: its title, its source file, and what the engine runs of it.
Reply
The engine’s reply so far: every Show it sent, each rendered as the VM prints it, and how the run ended once the result frame is whole.

Enums§

Ended
How an engine run ended, read from its result frame.
Golden
The VM’s answer the engine must reproduce: a Main program’s output, one line per Show, or a function’s value.
Run
What the engine is asked to run: the program’s ## Main, or one of its functions on arguments.

Functions§

agrees
FABRIC == VM: a finished run whose shows are the VM’s lines (a Main program) or whose result is the VM’s answer (a function). An overflowed run never agrees.
compile
Compile src for the engine: lower run and prove it ≡ VM (lower_main / lower), check the image against the engine profile and the flashed image’s caps (NAME=N,…, DEPTH and HEAP measured on the exact arguments), then emit the wire image and the bytecode it was lowered from. A refusal is the sentence a person reads on the screen.
engine_reply
Decode what the engine has sent of one run — its bytes arrive in pieces, so a reply cut short is not an error, only not over yet. Bytes before the first record or frame (the engine’s power-on byte) are skipped. A program that calls the host is refused by name: the board answers no host calls.
hw_caps
The caps of Board B’s hardware engine, written the way a build recipe writes them.
library
The entries of a library file (benchmarks/silicon/programs/terminal_library.txt’s format): one per line, title | program file | function | arguments, a ## Main program with neither function nor arguments; # starts a comment line.
register_bytecode
The register bytecode of src, compiled the way the fabric lifters compile it, as a binary ISA frame.
report
A compile’s report, one key=value line per fact: lifter=, then golden= (a function’s value) or golden_json= (a Main program’s lines), then bytecode= and wire= in lowercase hex. A refusal is the single line error= followed by the sentence.
shown
One shown value as the VM prints it — through the engine model’s own rendering, so the board and the laptop can never print a value two ways.