docs(v4.0.0): step 6d -- the plan; and the wait offers on each port, not one

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-07 22:27:21 -04:00
co-authored by Claude Opus 5.5
parent 5150155281
commit dfabfa46f6
2 changed files with 228 additions and 15 deletions
+23 -15
View File
@@ -492,34 +492,41 @@ ideas."
### 7c.2 The engine
Two more addresses follow a node's ports (section 4.1, 7a):
More addresses follow a node's ports (section 4.1, 7a):
| Address | What |
|---|---|
| `base + V4_PORTS + 4` | Offer to: store the number of a port |
| `base + V4_PORTS + 5` | Offer: store the word offered. Fetch: the wait |
| `base + V4_PORTS + 4 + k` | Offer on port *k*: store the word offered there |
| `base + 2 * V4_PORTS + 4` | The wait: a fetch here blocks |
- A store to either is remembered and waits for nothing.
*(Changed while the plan was written, 2026-10-07: as first approved there
was one offer, on one port. A node may owe NACKs to several neighbours at
once, and with one offer the node would sleep offering the first to a
neighbour that is stuck while a second neighbour waited for its own. So
a node may offer a word on each of its ports at once.)*
- A store to an offer address is remembered and waits for nothing.
- **A fetch of the wait blocks the node** until one of these, which the
fabric looks for once a step, in this order:
1. *A word for it.* A neighbour is blocked writing to it, on any port,
or a device on one of its ports has a word to give. It gets that
word, as a read of "any port" would, and "which port" says where
from. Its offer is withdrawn.
2. *Its offer taken.* The node on the port offered to is blocked reading
that port or any port; or is a device that takes what is written; or
is itself in the wait. The word is handed over. The fetch gives 0,
and "which port" gives `V4_PORTS`, which is no port: the offer was
taken.
from.
2. *An offer taken.* The node on a port it has an offer on is blocked
reading that port or any port; or is a device that takes what is
written; or is itself in the wait. The word is handed over. The
fetch gives 0, and "which port" gives `V4_PORTS + k`: the offer on
port *k* was taken. The lowest such port is the one.
3. *Two nodes each offering to the other:* the one at the lower place in
the fabric has its offer taken, and the other gets the word (case 2
for the one, case 1 for the other).
- Whichever it is, every offer the node had is withdrawn.
- A node in the wait that is handed a word by case 2 of another node gets
it by its own case 1.
- A node in the wait executes nothing and spends no heat. It shows to its
neighbours as waiting to read.
- With nothing on the port offered to, a node that can take an error has
error 18 raised on it (section 4.1); a bare node waits. A neighbour that
- With nothing on a port it has an offer on, a node that can take an error
has error 18 raised on it (section 4.1); a bare node waits. A neighbour that
is asleep takes nothing: the offer stands.
- `v4_fabric_interrupt_error`, a device's `pending`, and
`v4_node_words_since_look` are removed.
@@ -533,9 +540,10 @@ Two more addresses follow a node's ports (section 4.1, 7a):
instead, take that message in and offer again; when the offer is taken,
write the rest, each word waiting for the neighbour, which has taken the
first and reads to the end.
- *Paying what is owed* (`(PAY)`): each NACK is offered the same way. A
node with nothing to do that owes one sleeps in the wait; it no longer
goes round, and it no longer writes one without looking.
- *Paying what is owed* (`(PAY)`): every NACK owed is offered at once,
each on the port it goes by (one to a port). A node with nothing to do
that owes one sleeps in the wait; it no longer goes round, and it no
longer writes one without looking.
- *Text from its console for a node that is waiting to begin a message*
ends what the node was doing in error 21, "Interrupted", and is then
done, as in `AWAIT` (7b.6). This is how Hera is typed to while she waits