wave-36d: t27c add gen-axi-lite-slave for BitNet host CSR interface (R-BN-4, Closes #766)#767
Merged
Merged
Conversation
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
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.
Closes #766
Wave 36d lands the BitNet HLS host interface (R-BN-4): an AMBA AXI4-Lite slave with a 16-entry control/status register aperture. With this module the previously emitted compute and buffering blocks (W36a-W36c) become host-controllable — a CPU can program DDR base addresses, layer geometry, threshold, IRQ enables, kick off inference via the CTRL register, and read retired-cycle telemetry.
W36d intentionally ships a single AXI module to keep the L4 test surface obozrimo. DMA controller and IRQ controller land in W36e / W36f.
What changed
bootstrap/src/bitnet_axi.rs(NEW, ~410 lines) —build_axi_lite_slave(module_name, addr_width, data_width)+ Verilog-identifier validator + param clamp + 15 inline unit tests.bootstrap/src/main.rs— registersmod bitnet_axi;, addsCommands::GenAxiLiteSlave+run_gen_axi_lite_slave()dispatched from both match arms via the sharedwrite_verilog_to_output(...)helper.bootstrap/tests/bitnet_axi.rs(NEW) — 18 integration tests covering module-name overrides, identifier rejection, parameter clamps, full write/read AXI port lists, full CSR port list, complete write/read case maps (16 readable offsets, 12 writable offsets),32'hDEADBEEFdefault read, BRESP/RRESP OKAY semantics, handshake dropbacks, reset, ASCII, and help.docs/NOW.md— Wave 36d section prepended.CLI surface
Defaults:
ADDR_WIDTH=8(clamped 1..=16),DATA_WIDTH=32(clamped 1..=64).CSR map (16 regs × 4 bytes = 64-byte aperture)
Reads to unmapped offsets return
32'hDEADBEEF. All responses OKAY.Sample output
t27c gen-axi-lite-slave --module-name axi_lite_slave:Constitutional gates
Closes #766in title, body, and commit message.bootstrap/anddocs/NOW.md. No edits togen/,coq/,trios-coq/,proofs/,specs/,conformance/,architecture/,rings/, or rootCargo.toml.phi^2 + 1/phi^2 = 3unmodified — emitter is control-plane only.Tests
cargo test -p t27c --release --test bitnet_axi).bitnet_buffers22,bitnet_pipeline20,weight_bram13,phi_selfcheck11,behavior_sva8,trit_stdlib14,verilog_*5×2 = 10).Source attribution
Ported from
gHashTag/vibee-langsrc/vibeec/verilog_codegen.ziglines ~1344-1450 (writeAxiLiteSlave). Original author: Dmitrii Vasilev (@gHashTag).Known orthogonal CI failures
The following jobs are inherited failures pre-dating Wave 31 and remain out of scope for this PR:
fpga-formal— formal engine harness.fpga-synthesis-arty— Arty-board synthesis.fpga-bitstream— bitstream build (always-pending → fail ~3 min).Required gates (
check,coverage,fpga-conformance,fpga-smoke,fpga-lint,fpga-synthesis,phi-loop-check, L1 traceability, plus the unit/integration suite) are expected to be green.Roadmap
dma_controller(vibee-lang ~1452-1548) — streams activations between DDR and the on-chip activation BRAMs in parallel with compute.interrupt_controller(~1550-1590) +bitnet_engine_top(~1667-1725) integration. Closes BitNet HLS at 9/9 components — end-to-end synthesizable.##N/s_eventually).gen_verilog_*spec emits.After W36d merges: BitNet HLS pipeline 6/9 components complete (
weight_bram,pipeline_stage2_compute,layer_sequencer,double_buffer_ctrl,weight_prefetch_ctrl,axi_lite_slave).