v4 fabric to spec: the mesh boot, the one adaptive heartbeat, mechanism A (#189) #197

Merged
rajames merged 160 commits from StarForth-v4.0.0 into master 2026-11-19 11:19:50 +00:00
Showing only changes of commit 81890760e4 - Show all commits
+15 -10
View File
@@ -13,10 +13,10 @@ in time, with the same vocabularies and behaviour, on the F18-derived engine;
and every ISA, hosted and bare metal, must still reach its `ok` prompt.
`make -C v4 test` passing is a development check, not acceptance.
What exists so far is the single node: registers, circular stacks, memory, all
32 opcodes, per-opcode and per-call-target heat, and three console
registers (`CONSOLE-TX`, which captures output, and `CONSOLE-RX` and `CONSOLE-STATUS`, which hand out
input a test feeds) standing in for the console node until the mesh exists. The tests load definitions
A node has registers, circular stacks, memory, all 32 opcodes, per-opcode and per-call-target heat, and
three console registers: `CONSOLE-TX`, which captures output, and `CONSOLE-RX` and `CONSOLE-STATUS`,
which hand out input. In the engine's tests a test feeds them. In the kernel's mesh, Hera's are fed from
the keyboard, and the console is a device on her port 1 (`v4/system/mesh.c`). The tests load definitions
onto a node either opcode by opcode (`v4/include/v4/asm.h`) or as text in the notation `DECOMPOSITION.md`
uses (`v4/include/v4/text.h`). `make -C v4 test` builds
and runs the tests at both cell widths; `make -C v4 sanitize` repeats them
@@ -114,9 +114,15 @@ neighbour writes and a write until the neighbour reads; a node is born
empty with `P` at its ports and executes what a neighbour sends it, which
is how each product's node now gets its nucleus, as a capsule; and
the fabric (`v4/src/fabric.c`) is the nodes there are and the table of how
their ports are wired, both of which change while they run. The products
below are still one node each; they become the five nodes at `MESH.md`
steps 8 and 9.
their ports are wired, both of which change while they run. The bare-metal product now boots as a mesh (046ce0be,
`v4/system/mesh.c`, `v4_mesh_boot`):
- Hera is born empty at place 0, with the kernel on her port 0 and the console on port 1, and runs POST
in the fabric.
- Nodes are born and killed through her.
- The fabric is lockstep, not a scheduler: every node that is not blocked executes one instruction word
at each step. Each step walks only the places that hold a node (mechanism A, FABRIC-3 XLVIII.26).
- Every node ticks on the kernel's one adaptive heartbeat, active or not
(`docs/v4.0.0/plans/2026-11-17-one-adaptive-heartbeat.md`).
**Finding the way** (`MESH.md` step 4) is built: a node has a table of
which port leads toward which node (`ROUTE`, `DEFAULT-ROUTE`, `NO-ROUTES`),
@@ -180,9 +186,8 @@ is fast RAM, the ramdrive and the virtio disk; the disk is read and not yet
written, because nothing in v4 gives its owner's word that it may be
formatted. Who may have which block is not checked yet.
**This is still the lone node.** On bare metal `kernel_main.c` starts it
before the fleet tables, beside the kernel's own system and not in the VM's
place. `ENGINE.md` sets out the steps from here; step 1 is done and step 2 is
**On bare metal** the kernel starts the mesh (`kernel/src/v4/sk_v4.c`, `v4_mesh_boot`), and Hera's
prompt is the system's (FABRIC-3 XLVIII.25, .26). `ENGINE.md` sets out the steps from here; step 1 is done and step 2 is
part done. `V3-PARITY.md` records the rulings it is built from.
**What this does not yet show.** `forth79.4th` holds two definitions, `U*`