wave-36f: t27c add gen-interrupt-controller + gen-bitnet-engine-top, closing BitNet HLS at 9/9 (R-BN-6, Closes #770)#771
Merged
Conversation
…closing BitNet HLS at 9/9 (R-BN-6, Closes #770)
|
📓 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 #770
This wave (R-BN-6) closes the BitNet HLS pipeline at 9/9 modules by porting the last two vibee-lang emitters:
writeInterruptController(vibee-langsrc/vibeec/verilog_codegen.ziglines 1550-1590) -- async completion signalling for the host CPU.writeBitNetEngineTop(vibee-langsrc/vibeec/verilog_codegen.ziglines 1667-1725) -- top-level wrapper that instantiatesmultilayer_sequencer+double_buffer_ctrland adds a 32-bit cycle counter.After this PR, t27c can emit every block in the BitNet HLS pipeline from the upstream vibee-lang spec.
What changed
bootstrap/src/bitnet_irq.rs(new, ~200 lines):build_interrupt_controller(module_name)pure string emitter + Verilog-ident validator with safe fallback + 11 inline unit tests.bootstrap/src/bitnet_top.rs(new, ~265 lines):build_bitnet_engine_top(module_name)pure string emitter + Verilog-ident validator with safe fallback + 14 inline unit tests.bootstrap/src/main.rs(additive only):mod bitnet_irq;andmod bitnet_top;, two newCommands::Gen*variants, two newrun_gen_*helpers routed through the sharedwrite_verilog_to_output(...), dispatch in both HTTP-server and CLI match arms.bootstrap/tests/bitnet_irq.rs(new, 16 integration tests) andbootstrap/tests/bitnet_top.rs(new, 17 integration tests), both viaCARGO_BIN_EXE_t27c, notempfilecrate -- both usestd::env::temp_dir().docs/NOW.mdprepended with the W36f section.CLI surface
Invalid Verilog identifiers (
"","9bad","has space","dash-name", ...) fall back to the default module name in both subcommands.Sample output (interrupt_controller)
Sample output (bitnet_engine_top, excerpt)
Constitutional gates (L1-L7)
Closes #770in title + body + commit messagebootstrap/src/{bitnet_irq.rs,bitnet_top.rs,main.rs},bootstrap/tests/bitnet_{irq,top}.rs,docs/NOW.md. Zero changes undergen/,coq/,trios-coq/,proofs/,specs/,conformance/,architecture/,rings/, rootCargo.toml.irq_output_is_pure_asciiandtop_output_is_pure_ascii).phi^2 + 1/phi^2 = 3not touched -- both emitters are control-plane / structural-wrapper only.Tests
cargo test -p t27c --release --test bitnet_irq).cargo test -p t27c --release --test bitnet_top).bitnet_irq.rs+ 14 inbitnet_top.rs; compiled and embedded; verified locally).behavior_sva8,bitnet_axi18,bitnet_buffers22,bitnet_dma22,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 = 138 / 138.Source attribution
Ported from
gHashTag/vibee-lang, filesrc/vibeec/verilog_codegen.zig, functionswriteInterruptController(lines 1550-1590) andwriteBitNetEngineTop(lines 1667-1725). Original author: Dmitrii Vasilev (@gHashTag). The only deliberate divergence from the upstream emitter is twoassign mem_addr = 32'd0; assign mem_rd_en = 1'b0;tie-offs in the engine-top wrapper to prevent X-driver inference at the composition layer (the upstream emitter relies on a higher assembly to drive these). Everything else is bit-level equivalent.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
BitNet HLS pipeline closes at 9 / 9 modules:
weight_bram(W36a),pipeline_stage2_compute+layer_sequencer(W36b),double_buffer_ctrl+weight_prefetch_ctrl(W36c),axi_lite_slave(W36d),dma_controller(W36e), and nowinterrupt_controller+bitnet_engine_top(W36f).Next program phase:
##Ndelay-clock,s_eventuallystrong-fairness). Bootstrap-scoped, tested throughbehavior_sva.gen_verilog_*spec emits. First wave needing L2 / L6 reconsideration.interrupt_controller.