Skip to content

test(bitnet): elaborate the assembled engine bundle under iverilog - #1731

Merged
gHashTag merged 1 commit into
masterfrom
feat/bitnet-elaborate-test
Aug 5, 2026
Merged

gHashTag merged 1 commit into
masterfrom
feat/bitnet-elaborate-test

Conversation

@gHashTag

@gHashTag gHashTag commented Aug 5, 2026

Copy link
Copy Markdown
Owner

The BitNet HLS modules were validated only by substring assertions on the emitted Verilog. Nothing elaborated the assembled engine, so structural breakage (a missing module, a port/width mismatch, a syntax error) stayed invisible until hardware — the same blind spot that let the stale bitnet_top asserts (#1726) sit red unnoticed.

Closes #1730.

What this adds

tests/bitnet_elaborate.rs — an integration test that:

  1. Emits the full bundle (gen-bitnet-bundle --output-dir).
  2. Emits the trit stdlib (gen-trit-stdlib) alongside it — the bundle instantiates trit27_dot_product but does not include the stdlib that defines it (a real gap; self-containing the bundle is a follow-up on test: no test elaborates the assembled BitNet engine bundle (structural blind spot) #1730 since it shifts the index-based bundle tests).
  3. Runs iverilog -g2012 -t null -s bitnet_engine_top over all RTL modules (excluding the SVA property file, which isn't iverilog-parseable) and asserts clean elaboration.
  4. Skips gracefully when iverilog is not on PATH.

Why it's meaningful (not a no-op)

During bring-up this exact instrument caught Unknown module type: trit27_dot_product — proving it detects real structural defects. It establishes the observability needed before any engine-top datapath change (e.g. the input≡weight aliasing at bitnet_top.rs:217, where both compute operands currently read the same weight BRAM).

Test-only; no compiler change, no reseal. Full local run green.

Pre-existing unrelated bitnet_top::{top_busy..., top_mem_outputs_tied_off} reds (#1726) are untouched here.

🤖 Generated with Claude Code

The BitNet HLS modules were checked only by substring asserts on emitted
Verilog; nothing elaborated the assembled engine, so a missing module or
port mismatch stayed invisible -- the same blind spot that let the stale
bitnet_top asserts (#1726) sit red. New integration test generates the
bundle + trit stdlib and runs iverilog -g2012 -t null -s bitnet_engine_top
over all RTL, asserting clean elaboration; skips when iverilog is absent.
Test-only; no compiler change, no reseal.

Closes #1730

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-08-05 17:48:34 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 0
PRs with All Checks Green 50
READY 0
FAILING 0
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=864a709e6e17 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 4102b49 into master Aug 5, 2026
18 checks passed
@gHashTag
gHashTag deleted the feat/bitnet-elaborate-test branch August 5, 2026 17:49
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.

test: no test elaborates the assembled BitNet engine bundle (structural blind spot)

1 participant