Wave 44 — R-HT-1: Ternary weight packer/unpacker
Summary
Add a host-side ternary weight packer/unpacker that converts between human-readable trit arrays [-1, 0, +1] and the 54-bit packed-trit format used by the W36a weight BRAM (27 trits × 2 bits/trit = 54 bits per word). This bridges the spec-level ternary encoding with the hardware format and enables realistic weight generation for the InferenceEngine.
Scope
bootstrap/src/host/ternary.rs — new file
bootstrap/src/host/mod.rs — add pub mod ternary + re-exports
bootstrap/src/main.rs — new CLI subcommand host-pack + host-unpack
bootstrap/tests/host_ternary.rs — >= 20 integration tests
docs/NOW.md — wave-44 entry
Constraints
- Bootstrap-only — L2/L6 clean
- Encoding: 2'b00 = -1, 2'b01 = 0, 2'b10 = +1 (matching trit_stdlib.rs)
- 27 trits per 54-bit word, LSB-first
- No new dependencies
Acceptance
Wave 44 — R-HT-1: Ternary weight packer/unpacker
Summary
Add a host-side ternary weight packer/unpacker that converts between human-readable trit arrays
[-1, 0, +1]and the 54-bit packed-trit format used by the W36a weight BRAM (27 trits × 2 bits/trit = 54 bits per word). This bridges the spec-level ternary encoding with the hardware format and enables realistic weight generation for the InferenceEngine.Scope
bootstrap/src/host/ternary.rs— new filebootstrap/src/host/mod.rs— addpub mod ternary+ re-exportsbootstrap/src/main.rs— new CLI subcommandhost-pack+host-unpackbootstrap/tests/host_ternary.rs— >= 20 integration testsdocs/NOW.md— wave-44 entryConstraints
Acceptance
pack_words()andunpack_words()round-trip correctlyhost-packandhost-unpack