Repository navigation
W977: root cause — the MAC's private copy of the multiply lost the zero guard; seven operators to the die - #686
Merged
Merged
Conversation
This was referenced Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.GftSmulprod = __mul_noop((512 + am), (512 + bm))if (a == 0)@258,if (b == 0)@262GftSignedMacprod = __mul_noop((512 + am), (512 + bm))GftSignedMacis a flat module with zero instances ofGftSmulorGftSadd. It re-implements the multiply inline, reaching the identical hidden-bit line without the guards the primitive carries. The512 +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
sadd(0,0) ≠ 0GftSadddirectly= 0smul(0,x) ≠ 0GftSmuldirectly= 0smulis not commutativeWith 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
resultafter a fixed 40 cycles without consultingready. Re-run gated onready: identical — 16 violations in 16 points,512 + 4·live,readyhigh.Seven operators to the die
gft_sadd1111gft_train11111gft_smul1010gft_signed_mac0011gft_bitnet_neurongft_xorpercepgft_signed_dot4Every operator passes its own simulation suite. Four of the five that reached a verdict do not pass on hardware.
The
ABSENT/FAILdistinction earns its keep:bitnetgenuinely misses its constraint by 4.3×, whilexorpercepanddot4were merely stopped. Collapsing them would claim three timing failures where there is one.304 derived checks, all passing. Related: #683, #684, #685.
🤖 Generated with Claude Code