Repository navigation
feat(clara-gap5): DARPA CLARA TA1.2 — 5-tuple proof-trace emitter (explainability_unit) - #62
Merged
Merged
Conversation
Implements explainability_unit.v per Gap-5 spec:
- 5-tuple record: {step_id[3:0], premise_id_a[3:0], premise_id_b[3:0],
rule_id[3:0], conclusion[3:0]} = 20-bit per step
- MAX_STEPS=10 hard limit; 10×20-bit shift register (buf0..buf9)
- overflow=1 when 11th push arrives; feeds restraint_ctrl Gap-4 wire
- Serial 2-bit/cycle output on trace_out[1:0] (MSB first, 10-cycle frame)
- Pure Verilog-2005, R-SI-1 clean (no arithmetic * operators)
- ~180 cells, well within 0.4% of GAMMA's 48k cell budget
Testbench: test/tb_explainability_unit.v — 12 scenarios, 26 assertions
PASS 26/12 — CLARA Gap-5 explainability_unit all green
Integration: tt_um_trinity_max_true.v
- u_clara_expl instantiated, inputs wired from mesh_rcpt_* signals
- trace_out[1:0] → uio[7:6] (serial 2-bit/cycle)
- overflow wire preserved for restraint_ctrl Gap-4
t27 anchor: specs/ar/explainability.t27 MAX_EXPLANATION_STEPS=10
Coq ref: proofs/clara_max_steps.v (invariant anchor)
DOI: 10.5281/zenodo.19227877 φ²+φ⁻²=3
- Fix sim/tb_canonical.v: Split 'reg stable = 1' into declaration + assignment - Fix src/bitnet_encoder.v: - Replace indexed part-select x[2*i +: 2] with shift/mask approach - Remove size casts (10'(), 16'sd1) - Replace indexed part-select y_out[8*j +: 8] with case statement - Add newline at end of file Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix src/gf16_popcount.v: Replace a_row[2*k +: 2] with shift/mask - Fix src/gf16_popcount16.v: Replace a_row[2*k +: 2] with shift/mask - Fix src/blake3_anchor.v: Replace m_in[32*i +: 32] with shift/mask - Fix src/vsa_matmul_8x8.v: Replace indexed part-select with intermediate wires and case statement - Fix src/vsa_matmul_16x16.v: Replace indexed part-select with intermediate wires and case statement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
# Conflicts: # src/tt_um_trinity_max_true.v
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.
CLARA Gap-5 — Explanation Generation (DARPA TA1.2)
What this PR adds
src/explainability_unit.v— Pure Verilog-2005, R-SI-1 clean5-tuple proof-trace emitter for DARPA CLARA TA1.2 (Explanation Generation).
Each inference step emits one 20-bit record:
Buffer: 10 × 20-bit shift register (buf0 = newest, buf9 = oldest)
Counter:
step_count[3:0]Overflow:
overflow=1when push arrives at full (feeds restraint_ctrl Gap-4)Serial output:
trace_out[1:0]— 2 bits/cycle, MSB-first, 10-cycle frametest/tb_explainability_unit.v— 12 scenarios, 26 assertionsIntegration:
src/tt_um_trinity_max_true.vu_clara_explinstantiated (MAX_STEPS=10)mesh_rcpt_*signals (demo proof-trace source)trace_out[1:0]→uio[7:6](serial 2-bit/cycle)overflowwire preserved for future restraint_ctrl Gap-4 hookConstraints met
*arithmetic operators in new RTLlogicblockst27/specs/ar/explainability.t27 MAX_EXPLANATION_STEPSproofs/clara_max_steps.vinvariant referencet27 anchor
gHashTag/t27:specs/ar/explainability.t27—const MAX_EXPLANATION_STEPS: int = 10DOI
10.5281/zenodo.19227877 — φ²+φ⁻²=3