Skip to content

W977: root cause — the MAC's private copy of the multiply lost the zero guard; seven operators to the die - #686

Merged
gHashTag merged 3 commits into
mainfrom
root-cause-w977
Aug 21, 2026
Merged

gHashTag merged 3 commits into
mainfrom
root-cause-w977

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

The MAC keeps a private copy of the multiply, and it lost the zero guard

#685 reported mac(0,x,0,y) = 512 + 4x. The cause is one line — or rather, two lines that are missing.

line zero guards
GftSmul 333: prod = __mul_noop((512 + am), (512 + bm)) if (a == 0) @258, if (b == 0) @262
GftSignedMac 69: prod = __mul_noop((512 + am), (512 + bm)) none — the word "zero" never appears

GftSignedMac is a flat module with zero instances of GftSmul or GftSadd. It re-implements the multiply inline, reaching the identical hidden-bit line without the guards the primitive carries. The 512 + is the format's implicit leading one, so a zero operand is multiplied as though it had a hidden one.

One missing guard explains both die results at once: gft_smul's ZERO clause is true on silicon (it has the guard); gft_signed_mac's is false (it does not).

The general shape: two specs produced two implementations of one operation, and the derived one lost a special case. Nothing in the pipeline compares them. A generator that can emit the same arithmetic from more than one spec will eventually emit it two different ways — and here the only oracle that noticed was a die.

Three hypotheses refuted first — that is what made it narrow

hypothesis test result
sadd(0,0) ≠ 0 drive GftSadd directly = 0
smul(0,x) ≠ 0 drive GftSmul directly = 0
smul is not commutative 20 operand pairs 0 violations

With both factors demonstrably clean, the defect had nowhere left to be except the MAC's own body.

And #685's own measurement was re-verified before being built on. It had read result after a fixed 40 cycles without consulting ready. Re-run gated on ready: identical — 16 violations in 16 points, 512 + 4·live, ready high.

Seven operators to the die

operator simulation die outcome
gft_sadd 3 / 3 1111 PASS
gft_train1 3 / 3 1111 PASS
gft_smul 3 / 3 1010 FAIL — COMM, IND
gft_signed_mac 2 / 2 0011 FAIL — ZERO, COMM
gft_bitnet_neuron 2 — FAIL timing — 16.63 MHz against 70.77 required
gft_xorpercep 1 / 1 — ABSENT — nextpnr 600 s cap
gft_signed_dot4 — — ABSENT — cap + BSCAN chain/site mismatch

Every operator passes its own simulation suite. Four of the five that reached a verdict do not pass on hardware.

The ABSENT / FAIL distinction earns its keep: bitnet genuinely misses its constraint by 4.3×, while xorpercep and dot4 were merely stopped. Collapsing them would claim three timing failures where there is one.

python3 research/arxiv_tnf/verify_numbers.py

304 derived checks, all passing. Related: #683, #684, #685.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant