Skip to content

feat(bootstrap): ternary weight packer/unpacker for packed-trit BRAM format (Wave 44, R-HT-1) #797

Description

@gHashTag

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

  • pack_words() and unpack_words() round-trip correctly
  • CLI commands host-pack and host-unpack
  • >= 20 integration tests
  • docs/NOW.md updated
  • Zero regressions

Activity

  1. gHashTag commented on Jun 17, 2026

    @gHashTag
    OwnerAuthor

    Wave Loop 90 audit: This stale bootstrap issue has been superseded by newer host infrastructure work. Closing as completed/obviated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/hostHost side: driver/CLI/bootstrappriority/mediumShould fix in current quarter

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions