COURIER_C5X_MMR_LATENCY (off by default) delays memory-mapped writes to
the registers of SPRU056D Table 7-10 by their listed words. Used to rule
them out as the cause of the x2 upstream click.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRTieSnZY49zbAZzpUP
IRQ13 is the 386EX's INT6 pin (INTCFG 0x0d puts INT6 on slave IR5,
Intel386 EX manual figs 5-4/5-5), and its handler at b3d9:0000 is a
~2400 Hz tick: the firmware converts ms to ticks as ms*256/107. The C5x
runs PRD 0x41a4, 2399 Hz at 40.32 MHz, and on the 403 board its TOUT
goes into the ASIC that drives the CPU's interrupt lines. So instead of a
fixed instruction cadence, each timer expiry - C5xCore::timer_expiries,
counted in advance_timer whether TINT is masked or not - raises IRQ13,
in the Python poll and the native one. Without a DSP the old cadence
stays as the capture-only endpoint's stand-in.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PSC and TIM generate their borrow on the CLKOUT cycle after they reach
zero, so TINT rate = CLKOUT / ((TDDR+1) * (PRD+1)). advance_timer
treated the periods as max(TDDR, 1) and PRD (65536 for zero), running
the timer one count fast: PRD=99 gave 1010 expiries in 100000 cycles
instead of 1000, and PRD=0 a TINT every 65536 cycles instead of every
TDDR+1. The first-TINT deadline and the IDLE skip now share
timer_distance() rather than repeating the formula.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stream sender (`out *, 0060` at 0x849e on the 403, 0x8980 on the
I-modem) writes a holding register nothing modelled, and flags the word in
a status bit nobody reported, so every streamed reply - ATI11's tag 57,
the idle page's 46, ATY12's 45 - timed out and read zero.
- c5x_core: port 0x60 in ROM-codec mode fills the output latch the CPU's
0x60/0x62 reads come from.
- 403 (bridge.py, LaneHostIo): status bit 2 is the stream word, cleared
the way bit 1 is for messages.
- I-modem (ImodemDsp, ImodemHostIo, isdn.py): 0x18 bit 7 is the stream
word (PA6 bit 7), 0x80 written to 0x18 acknowledges it, and 0x60/0x62
are routed to the DSP endpoint.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
COURIER_DSP_TRACE_REGISTER=0x25 records every write to that register (cycle,
writing PC, value) and COURIER_DSP_TRACE_FILE writes them out, one JSON line
per core, as each core is retired. Used to rule out the timer as timing
recovery: on the 403 pair PRD only ever gets 419a/41a4 (16795/16805 cycles,
~2400 Hz) from cells 0bf8/0bf7 at 820b/820e, skew or not - the CPU's fine
timebase - and TDXR is written only from 81b8 with sample data.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each handler now finishes its own step and tail-calls the next opcode's
handler, with the op body inlined into it, so every opcode has its own
dispatch branch instead of all of them sharing the loop's. The step is
split into pieces (step_is_rare, step_begin, step_repeat_edge,
step_retire) that step() and the threaded handlers share; a threaded run
hands back to the loop for anything off the fast path and wherever the
loop would stop. The opcode tables move into the core's translation unit
(c5x_optable.ipp) so the handlers can see the op bodies, and the unread
per-step cycle counter is gone. Full x2 call bit-identical; CPU
65 s -> 62 s on this machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The worker's datapump reads 20% of its data from SARAM or the shared
external window and fetches 7% of its code from SARAM; those went through
the out-of-line slow paths. They are now a counter and a cell inline, and
the circular-buffer AR update (the filter loops run with one enabled) and
the step body in the run loops are inline too. The full x2 call's results
are bit-identical; CPU 71-72 s -> 64.5-66 s on this machine.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take the block-repeat edge on step()'s fast path instead of through the rare
path (a third of the worker's DSP steps are inside RPTB bodies), keep XC's
condition sample in one register, and read the serial backlog and the panel
latch's published answer with one cheap call each. Bit-identical results.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FxMN2ECAudm1U2CeD998v
Firmware that flips CNF/OVLY in a tight loop rebuilt the 128K-entry tables
about 1.7M times and slowed the call five-fold; keep up to 16 table pairs
keyed by the inputs to the classification.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FxMN2ECAudm1U2CeD998v
step() takes a short path unless something rare is pending; the frame-rate
events run from a single deadline; program and data space are classified by a
byte table rebuilt only when CNF/OVLY/RAM/MP-MC/GREG change; opcodes dispatch
through plain function pointers; the common indirect addressing modes and
on-chip RAM accesses are inlined.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FxMN2ECAudm1U2CeD998v
- x86 engine: serve the analogue board's live data-lane ports (command,
ack, window reads/stores) through a port model in libcourier_c5x, which
works directly on the DSP's I/O cells. Tallies and last-written values
are folded back into the machine's I/O accounting; anything the model
declines still goes to Python.
- Port 0x14 (front-panel latch / board latch) writes are batched and
replayed in order on both modems.
- C5x core: the per-instruction V.8 dispatch probe is a bitmap lookup
instead of a vector scan, and the first-execution tracker is per core.
These ran on every retired instruction.
- I-modem: slimmer per-access DSP advance chain; core PC read through a
tiny getter; faster advance_imodem result handling.
- LineLink: optional COURIER_LINE_WINDOW (frames in flight, default 1 =
unchanged) so the two modem processes can run ahead of each other by the
line's transit delay.
Paired x2 still connects at 53333 with both payloads intact; full call
350 s -> 250 s. Registers, instruction counts and I/O tallies match the
previous build on the 60M control.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FxMN2ECAudm1U2CeD998v
- Analog bridge: run the C5x to its cycle target in one native call
(step_cycles) instead of looping step()+state(), which also skips IDLE
spans; read line_tx_writes/samples and the codec rate through small
native getters instead of building the full serial/codec state dicts;
reuse ctypes buffers on the per-chunk calls.
- Line exchange runs once a useful batch of codec samples has accumulated
(bounded skip, fallback timer credited), not on every service chunk.
- Resampler dot product uses math.sumprod when available.
- x86 native engine retires software INT itself for vectors the harness
marks (I-modem: all vectors), counting them per vector; null vectors and
guarded accesses still fall back to the Python hook.
- advance_timer avoids two 64-bit divisions in the common period-1 case.
- Build the C5x library with -fno-semantic-interposition so calls inside it
skip the PLT and can inline.
Paired x2 (53333) still connects with both payloads intact; the I-modem's
register, interrupt and instruction state is identical to before on the
60M-instruction control. Adds a native-vs-hook INT equivalence test and
updates the audio-rate test double for line_tx_writes().
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012FxMN2ECAudm1U2CeD998v
XC now uses the conditions from before a single-cycle predecessor
(SPRU056D 4.5.6). That exposed CPL/APL/OPL/XPL #lk being charged one cycle
instead of two, which dropped the TC of CPL-then-XC and broke the analog
x2 53333 call. Tests cover the sampling rule and the cycle counts.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Repair call-overlay acknowledgements and wire the six-word runtime data window with separate DSP holding registers. Correct C5x filter timing and x86 interrupt entry, expand pair probes and diagnostics, and retain regression tests and capture evidence.
set_data_trace_changes_only(false) records every write to the traced
cell; a stream of words (a bitstream) loses data when repeats are dropped.
The default is unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In digital PCM mode an empty queue hands the DSP an idle codeword and every
later octet arrives a frame late. NativeC5x.g711_rx_underruns() and
g711_rx_pending() make that visible; on the I-modem line replay it happens
only twice, both during call setup.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The timer ran a loop per elapsed CLKOUT cycle after every instruction,
the costliest line in step(). advance_timer() works out the same PSC,
TIM and expiry count arithmetically (checked against the loop over 10.9M
cases, zero PRD and TIM wrap included), and step() raises TINT once per
expiry as before. check_nmi() and check_interrupts() are skipped when
nothing is pending, the condition each already returned on.
MICA's native call is 11% faster and byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
set_step_probes(false) skips the V.8 dispatch record, the negotiation-
loop capture, the first-execution record and the built-in 0x0200..0x02FF
trace window. They stay on by default, so nothing here changes; the
window set by set_pc_trace_range() is traced either way. MICA's native
board reads none of them, and they are about a tenth of step().
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TREG1 is a 5-bit shift count and TREG2 a 4-bit bit pointer (SPRU056D);
the MMR reads returned all sixteen stored bits. MICA's INFO CRC steps
TREG2 with lamm @0e / sub #01 / samm @0e under SXM clear and relies on
the -1 it stores reading back as 15. Read back as 0xffff the borrow
never came, every word after the first was skipped, and INFO0d went out
with a wrong CRC.
The two test_c5x_interrupts failures are unchanged by this.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2b89a28 moved the Courier's C52 to the full oscillator. The Quad picked up
half of it through DSP_CYCLES_PER_X86, but its DS0 period still defaulted
to 20.16 MHz (2520 cycles), so octets ran at 16 kHz against the CPU. It now
passes ASIC_DSP_CLOCK_HZ (5040 cycles). The I-modem's step ratio and
digital PCM clock follow the same constant, since its C51 is the same part
fed from the same 40.32 MHz can: 8 DSP instructions per 386 instruction.
configure_digital_pcm no longer has a clock default, and the core's comment
that the C5x halves CLKIN now says the model assumes the PLL x1 strap,
which CLKMD1/CLKMD2 would confirm.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
At 20.16 MHz the V.34 answerer's per-sample echo-canceller update
(~2080 instructions) overruns the 1964-cycle sample budget, and B's TRN
task ran 780 of 1026 passes a frame. At the full oscillator both ends
train through phase 3 and 4, and the dialled pair now reaches
CONNECT .../LAPM/V42BIS once the answerer runs V.42 detection. The
clock is inferred, not measured: TCLKX (DSP pin 96) or CLKMD1/CLKMD2
settles it. The AC01 power-up frame period doubles with it.
The PC trace now carries ACC before each instruction (pc << 48 |
opcode << 32 | ACC), which is what read J out of a4b2/a4ca.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Once the resident runs, the ROM transfer window is six banks each way:
CPU 0x40+4i/0x42+4i is PA 0x58+i, which the resident walks with AR6
circular over 0x58..0x5d. PA6 bit i is a CPU word waiting (82c1 takes it)
and bit 8+i is room for a word to the CPU (8320 fills it); the resident
clears each by writing it back. The CPU commits with out 0x18 and
acknowledges with out 0x1a, and reads both as the opposite sense above
0xc0, as the board does under &T8.
0x18 read a constant 0xff, so the frame ISR's lane pump never returned
after V.34 training, and data-mode commits fell into the legacy path that
wrote lane bytes over the codec ports.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both charged two cycles per iteration, so an n-tap repeated filter cost 2n.
SPRU056D 6-150 and 6-155 give n + 2 with operand 2 in DARAM, and more
only when both operands share a bus (both off-chip, or one SARAM block) or
when MACD's delay-line write lands in SARAM. mac_cycles() applies those
tables with the zero wait states this core models, and a single execution
is n = 1 of the same formula, floored at the table's 3.
The V.34 phase-3 receiver in overlay 6 runs an 82-tap and a 162-tap
repeated MACD every symbol at 3429 baud. Charged 2n, the caller's datapump
fell behind its codec: 862 task passes per 1027 frames, so it dropped 16%
of its samples and could not decode J. It now keeps up (1026 of 1026, one
J-detector pass per symbol). The answerer's TRN task is still short of
real time (780 of 1026), so training still retrains.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The on-chip timer was ticked once per instruction, so it ran slow by the
average cycles-per-instruction, roughly 2.5x. Firmware that measures a
hardware period against TIM read the wrong answer.
The MICA portware's frame-rate check is what exposed it. At program 0x80cd
it reloads TIM from PRD, waits one serial frame, averages 256 readings and
requires 0x137e +/- 0x2ca cycles per frame. With the frame period set to
5000 cycles TIM reported 2000, so the check rejected every clock rate and
the datapump never left that loop.
The core already tracks real cycles in m_cycles for the TDM frame clock, so
drive the timer from the same counter. TINT now fires at its true rate,
which is faster than before for any firmware that uses the timer - the
Courier residents leave it counting via splk @26, #0020.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Every Courier-family C5x resident programs the primary port identically - 403
and 302 at 0x8090, 2.1.1 at 0x80bd, 2.3.31 at 0x109d - and the sequence says
what the model has to do. SPC goes 0x0008 then 0x40c8, so MCM = 0 and TXM = 0
and the frame edge is external; DXR is primed and the part spins on XRDY
waiting for that edge; IFR is write-1-cleared; and then IMR is written with
0x002a: INT2, TINT and XINT. RINT, bit 4, is not enabled, and `samm @04` - the
only write certain to reach IMR, since `splk @04` is DP-relative - appears
exactly once in each of the 403 and 302 residents.
A cold start confirms it. Parked at 0x813c the 403 has IMR = 002a, SPC = 40c8,
and the mask ROM's dispatch cells hold @65 = 8178 for XINT against @64 = 819d
for RINT, the same unused stub @6a holds for NMI. Only XINT has a handler.
So `serial_receive_interrupt` was raising the right IFR bit for the wrong
reason and gating it on SPC.RRST, the receiver's reset bit, which the 403
never consults. The 2.x residents then show why naming one bit is wrong at
all: they test data 0x012f and, if set, `lamm @04 ; and #ffcf ; or #0010 ;
samm @04` - same frame, service moved to RINT. One edge now latches both, each
behind its own half of the port's reset, and IMR and INTM decide recognition
where the part leaves them.
Three more things the residents reach that the core did not do:
- Recognition ran only from `interrupt()` and the INTM controls, so a flag
that became eligible without a fresh source edge waited for the next one.
The 2.x rewrite of IMR above happens with INTM already clear, and RETE
clears INTM on its way out of a handler. It is checked at every instruction
boundary now, and taking a vector is its own step.
- A repeated instruction was interruptible. RPTC and the repeat pointers are
not in the context shadow, so a vector out of the middle of a block lost the
rest of it; check_nmi has always refused for that reason.
- NMI vectored to a literal 0x0024. Its slot is offset 0x24 inside the same
IPTR-relocated table as every other vector; 0x0024 is only right because the
mask ROM runs with IPTR zero.
And the timer ignored TCR.TSS, so a stopped timer still raised TINT - which
matters here because TINT is the other thing 0x002a enables, and it is what
wakes the IDLE at 0x813b when no frame has arrived yet.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two reporting defects in the same quantity, and the diagnostics needed to
tell where DP actually comes from.
m_st0.dp is held pre-shifted - LDP stores DP<<7 and GET_ADDRESS ORs it
straight into the offset - but two readers treated it as a raw DP:
- The V.8 dispatch capture computed `(m_st0.dp & 0x1ff) << 7`, which keeps
only (DP & 3) << 7 and then shifts that again, landing on a page the
dispatcher never runs on. v8_handler, v8_countdown and v8_flags came back
0 from every dispatch for that reason - 133,790 of them on the answering
end alone - which reads exactly like a state machine spinning on an unset
vector. With the page right, the handler is af12 on the answering end and
ae7d on the originating one.
- state() exported m_st0.dp raw, so every consumer printing `dp` was
printing DP<<7. The answering end's "dp=896" was DP 7.
Added alongside: shadow_dp, the DP an interrupt return is about to reinstate;
last_dp_pc/value/source, where DP was last written and by which instruction;
and stray_cala_pc/target/dp, latching the first CALA whose target leaves the
loaded images, with the DP and target it ran with.
That last one exists because DP cannot be read after the fact here. The
originating end's crash is a CALA to program 0000, and the mask ROM it lands
in rewrites DP itself - `LST #0` at 0676 - so a DP sampled at the end of the
run describes the ROM, not the call. Latched where it happens, the call is:
9f3a cala -> 0000, with DP = 6
so the vector it read is @2f on page 6, data 032f, which holds 0000 on both
ends. The answering end never reaches this call and never makes a stray one.
Why 032f is never written is not answered here.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both ends of a leased pair transmitted pure silence, and had since well before
this branch - 0925e22 and f59a824 both record it. The cause is one initialiser.
Fifteen opcodes in the repeatable block-transfer family - TBLR, TBLW, the BLDD
and BLPD forms, MACD and the rest - share this idiom:
while (m_rptc > -1) { ...; m_rptc--; }
which executes RPTC+1 times. But `reset()` and the member default both set
RPTC to -1, and the loop leaves it at -1 when it finishes. So after a reset,
and after every repeat, RPTC was -1 and every one of those instructions was a
silent no-op: no transfer, no write, no fault. Only once some RPT had run and
step()'s block-repeat tail happened to leave RPTC at 0 did they start working.
On the part RPTC reads 0 whenever no RPT is in force, an unrepeated
instruction runs once, and a repeated one runs RPTC+1 times - both ending at
0. So the loops become do/while and reset to 0.
What this cost: the C51 resident's command dispatcher at 83b5 reads a command
byte from ff5e, bounds-checks it, and does `tblr @7c ; lacc @7c ; bacc` over a
table based at 8401. The resident had downloaded perfectly - 286 words sampled
across it, none differing, and 8402 holding its true entry 8003 - but the TBLR
transferred nothing, so @7c kept its initial 0 and the BACC branched to
program 0000. That is the C51's mask ROM: the part fell through the vector
table into the ROM's serial bootstrap spin at 06dc and waited there for a
word no one was ever going to send. No datapump overlay was ever requested,
because the DSP that would request one was gone.
It was path-dependent, which is why one harness path looked healthy: a run
that happened to execute an RPT before reaching the dispatcher left RPTC at 0
and dispatched correctly.
Measured on `--dip-preset dedicated-line --at 'AT&T1'`, the invocation
docs/datapump-dispatch-gate.md gives, before and after:
overlay_downloads 0 -> 2 (id 8, verified)
line_tx_nonzero 0 -> 6732
dxr_writes 36 -> 16715
dsp pc 06dc -> a2b7
and a leased pair over the socket line now carries audio both ways - each
end's transmit matches the other's receive, rms 2201, peak 16160, with tones
at 1801 and 2199 Hz. Cut-through moves from frame 518 to 93, because the DSP
now reaches the state that answers instead of dying at frame 0.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Three corrections to the sound path.
The switched call now has a single state that both subscribers share. Each
end used to decide for itself whether the path was through, from a counter
only it could have: the calling end watched the rings it was sending, the
answering end watched the ring bursts it was receiving, and a leased pair
matched neither rule on the answering side, so B never cut through at all.
The two ends could therefore disagree, which is a half-connected call - one
end transmitting into a cut loop. `call_state` now crosses the line in every
frame; each end advertises the furthest point it knows of and adopts the later
of its own view and the peer's. Every transition has exactly one end that can
make it - only the calling end can seize and ring, only the called end can
answer - so this converges instead of oscillating, and `_cut_through` is now a
derived property rather than a per-end flag.
RS is shared with the AC01, and a reset pin cannot change the board. The
reset already returned the codec's registers to power-up but took the MCLK
back to the 2.88 MHz default with them, so every generation after the first
ran at a clock the board never presents; it also left the frame period at the
rate the previous generation had programmed, while the divider registers it
was supposedly derived from had gone back to A = B = 18. Carry the configured
MCLK across and restart the frame period with the registers.
IRQ5 is the serial port's receive interrupt, not the frame scheduler's.
SPRU056D 5.3: RINT is raised when RSR transfers into DRR, and a receiver held
in reset shifts nothing and raises nothing. The frame clock itself is
genuinely external - the ASIC is the frame master and keeps running while the
DSP is inside an overlay - but all four sites that load DRR now end at one
port-level entry point that applies the RRST gate. Suppressions are counted
and exported as `serial_rint_suppressed`, because a receiver left in reset is
otherwise indistinguishable from a frame clock that stopped. The gate has not
been exercised against a completed call: the C51 ROM loader does not reach its
ASIC poll on either the 302 or the 403 image, which is a fault ahead of it and
predates this change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two instrument faults on the way to the doc's "next question, singular".
_maybe_start_originate_engine returned unless daa.operation was "originate".
Its docstring says why - it was written for the leased line, where the
originating end never dials - and the socket path's new digit receiver moves
the operation to "dialing" on the first digit, so the originating end stopped
arming at all. That was a regression from the dial-tone commit. A dialing
seizure now qualifies once the called party has answered, which is when an
originating modem starts V.8 instead of putting CM under its own digits.
And the core read m_data[0x48] for @48. A direct operand resolves to
(DP << 7) | offset, so that asserted DP 0. Measured at the dispatch DP is
0x180, which puts @48 at 0xc048 and @4a/@4d at 0xc04a/0xc04d: every report of
a null handler was reading a cell the firmware does not use. v8_dispatch_dp is
now reported so the page is never assumed again.
The static question the doc asked is answered: the 403 resident segment has 57
sites storing to @48, 26 to @4a and 58 to @4d, and almost every @48 site is
splk @48, #<address two words on>, so @48 is a continuation vector resumed by
lacl @48 ; bacc - the same arrangement as 2.1/2.2. The signature match is not
a false friend for want of writers.
With both faults fixed @48 still reads zero at every dispatch on both ends,
including B, which emits a full 2.98 s answer tone through 62,759 dispatches
of that routine. A routine whose vector is null on the side that is
negotiating is not the one negotiating, so 0xba0b is not the live V.8 state
machine on 403 and none of these counters mean V.8 progress here.
What does separate the ends is the mailbox stream: A originates 0008:* and B
0016:*, overlapping only on three tags. The audio is unchanged by any of this.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The core no longer hard-codes 2.1/2.2's c418: Bridge._v8_dispatch_addresses
finds every copy of the dispatcher by signature over the resident bank and
each declared overlay, and set_v8_dispatch_pcs hands them to the core, which
now also reports which one fired as v8_dispatch_pc.
_find_call_overlay requires the candidate to be pre-linked for the
destination - first branch target == 0xc418 + 0x0d. 2.1/2.2's stored copy
satisfies it; the self-linked resident copies on 302/403 do not, so nothing
is published there any more.
Measured on a 403 linked pair against the old behaviour as a control: every
V.8 number identical, only call_overlay_available moves, so the gate changed
nothing observable. The dispatcher does run, at 0xba0b, 22,471 times - but
@48, @4a and @4d are all zero, so every entry branches to program 0, and
v8_rx_peak and the audio rms are zero on both sides in the baseline too.
Artifacts in artifacts/v8-dispatcher-403-01/.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`dsp_originated_tags` polls `io_port_stats` once a batch and then reads
whatever `io_output` holds, which samples an asynchronous stream: it
counts polls that saw a change, not messages, and can pair one
message's tag with another's word. The general I/O event log cannot
stand in for it either - it is unfiltered and capped at 8192, and the
datapump's transmit writes to port 0x50 run to half a million per call,
so it holds nothing but PCM by the time anyone reads it.
Keep a separate log of the writes to 0x5e..0x60 in the core, and decode
it in the bridge on the resident sender's own boundary: the tag goes to
0x5e and the words follow on 0x5f (0x83eb, 0x83ee, 0x83f6), so a write
to 0x5e opens a message. `status().dsp_mailbox_log` is the ordered
result, with the pc and instruction count of each send.
On a leased pair it confirms what the poll had reported, so the poll was
not in fact tearing here: the answerer sends exactly two messages in
150M instructions and the originator one.
a 92,860,533 tag 006b words 0000 4321
a 112,636,450 tag 0034 words 0000 0005
b 99,940,384 tag 006b words 0000 4321
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>