wave-36e: t27c add gen-dma-controller for BitNet DDR<->BRAM activation streaming (R-BN-5, Closes #768)#769
Merged
Merged
Conversation
…n streaming (R-BN-5, Closes #768)
|
📓 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 #768
This wave (R-BN-5) ports
writeDmaControllerfromgHashTag/vibee-lang(src/vibeec/verilog_codegen.zig, lines 1452-1548) into the t27c bootstrap CLI as a parameterised emitter for the BitNet HLS pipeline's DDR <-> on-chip-BRAM data mover. With this module the host can program DDR base addresses via the AXI-Lite CSR aperture emitted in W36d, then have the DMA engine stream 64-bit beats into the local BRAM that the compute pipeline (W36b) and double-buffer storage (W36c) already consume. The interrupt controller and engine top-level are intentionally deferred to W36f to keep the L4 test surface manageable.What changed
bootstrap/src/bitnet_dma.rs(new, ~395 lines):build_dma_controller(module_name)pure string emitter + Verilog-ident validator with safe fallback + 15 inline unit tests.bootstrap/src/main.rs(additive only):mod bitnet_dma;, newCommands::GenDmaController { module_name, output }variant,run_gen_dma_controller(...)helper routed through the sharedwrite_verilog_to_output(...), dispatch in both HTTP-server and CLI match arms.bootstrap/tests/bitnet_dma.rs(new, 22 integration tests viaCARGO_BIN_EXE_t27c, notempfilecrate — usesstd::env::temp_dir()).docs/NOW.mdprepended with the W36e section.CLI surface
Invalid Verilog identifiers (
"","9bad","has space","dash-name", ...) fall back to the default namedma_controller.Sample output
Constitutional gates (L1-L7)
Closes #768in title + body + commit messagebootstrap/src/{bitnet_dma.rs,main.rs},bootstrap/tests/bitnet_dma.rs,docs/NOW.md. Zero changes undergen/,coq/,trios-coq/,proofs/,specs/,conformance/,architecture/,rings/, rootCargo.toml.dma_output_is_pure_ascii).phi^2 + 1/phi^2 = 3not touched -- this emitter is a data-mover only.Tests
cargo test -p t27c --release --test bitnet_dma).behavior_sva8,bitnet_axi18,bitnet_buffers22,bitnet_pipeline20,phi_selfcheck11,trit_stdlib14,verilog_array_literal_expr2,verilog_const_array2,verilog_initial_decl2,verilog_r_si_12,verilog_translate_off2,weight_bram13 = 116 / 116.Source attribution
Ported from
gHashTag/vibee-lang, filesrc/vibeec/verilog_codegen.zig, functionwriteDmaController(lines 1452-1548). Original author: Dmitrii Vasilev (@gHashTag). Bit-level equivalence with the upstream emitter is the explicit goal of this wave.Known orthogonal CI failures
The
fpga-formal,fpga-synthesis-arty, andfpga-bitstreamjobs are expected to fail on every PR until their upstream toolchains are wired in — they are not gated by anything this wave changes. All other required gates (check,coverage,fpga-conformance,fpga-smoke,fpga-lint,fpga-synthesis,phi-loop-check,Check L1 TRACEABILITY,NotebookLM,validate,pr-dashboard) are expected to pass.Roadmap
After this wave, the BitNet HLS pipeline stands at 7 / 9 modules:
weight_bram(W36a),pipeline_stage2_compute+layer_sequencer(W36b),double_buffer_ctrl+weight_prefetch_ctrl(W36c),axi_lite_slave(W36d), and nowdma_controller(W36e). Remaining:interrupt_controller+bitnet_engine_top(W36f). Beyond W36f the program moves on to W37 (richer behavior-DSL — multi-clause antecedents,##N,s_eventually) and W38+ (wiring stdlib + behavior emitter into the existinggen_verilog_*spec emits, which will be the first wave that needs L2 / L6 reconsideration).