Skip to content

promote bcd → strict bitexact (2-digit packed instance, 3 witnesses) - #1319

Merged
gHashTag merged 2 commits into
masterfrom
bcd-bitexact-promotion
Jul 4, 2026
Merged

promote bcd → strict bitexact (2-digit packed instance, 3 witnesses)#1319
gHashTag merged 2 commits into
masterfrom
bcd-bitexact-promotion

Conversation

@gHashTag

@gHashTag gHashTag commented Jul 4, 2026

Copy link
Copy Markdown
Owner

What

Promote bcd from structural → strict bitexact (+1 SW axis: bitexact 69 → 70, structural 14 → 13).

Why bcd was structural: generic BCD is variable-width (u4_per_digit, no single fixed layout) — a bit-precise round-trip isn't well-defined for the generic class. This pack fixes the concrete 2-digit packed instance (8-bit: tens[7:4]*10 + ones[3:0], range 0..99) — the same instance decoded on AX7203 silicon and iverilog-witnessed.

Gate (recipe-sw-bitexact: independent decoder + exact oracle + 2nd witness)

Vectors: 100 valid codes 00..99 (exhaustive over the valid range), abs_error=0. Three independent witnesses:

# Witness Result
1 Python golden (tens*10+ones, integer exact) 100/100 abs_error=0
2 iverilog 13.0 sim of bcd_decode.v (trinity-fpga) 256/256 bit-exact (fails=0) — incl. invalid-nibble mod-128 + valid flag
3 FPGA HW: corona-decode-bcd on AX7203 (IDCODE 0x13636093) 100/100 @160000 (HW Tier-E, trinity-fpga #199)

Witness #2 is the meaningful SW-bitexact witness: real Verilog fixed-width sim, not a Python transcription. Invalid nibbles (0xA..0xF) excluded from the round-trip claim; their RTL behaviour documented in format_notes.

INDEX delta

bitexact_packs:   69 -> 70
structural_packs: 14 -> 13
bcd.kind: structural -> bitexact  (n_vectors 0 -> 100)

Honesty

  • [verified SW на iverilog] (256/256) + [измерено на кремнии] (HW Tier-E 100/100). Catalog = 83 unchanged.
  • Fixes ONE specific instance (2-digit packed); generic variable-width BCD noted in catalog.instance/format_notes.
  • Context: auditing the trinity-catalog-100 skill baseline found live INDEX already at 69/0/14 (skill snapshot stale at 62/6/15; the 6 GF-selfconsistent are already bitexact). bcd = the one clean promotable-from-structural candidate with a decode law; takum32/64 remain (table-maker's-dilemma caveat, recipe:26).

Closes #1321

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-07-04 11:58:32 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 12
PRs with All Checks Green 5
READY 4
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=16664105c99c != manifest seal=49e55df6d444.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-07-04 12:06:21 UTC

Summary

Status Count
Total Open PRs 18
PRs with Failing Checks 13
PRs with All Checks Green 5
READY 4
FAILING 13
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=16664105c99c != manifest seal=49e55df6d444.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

gHashTag added 2 commits July 4, 2026 12:08
…tance)

BCD was structural (generic variable-width, u4_per_digit, no single layout).
This pack fixes the concrete 2-digit packed instance (8-bit: tens[7:4]*10 +
ones[3:0], range 0..99) - the same instance decoded on AX7203 silicon
(corona-decode-bcd, HW Tier-E 100/100) and iverilog-witnessed on bcd_decode.v.

Vectors: 100 valid codes 00..99 (exhaustive over the valid range), abs_error=0.
Three independent witnesses recorded:
  1. Python golden (tens*10+ones, integer exact) - 100/100 abs_error=0
  2. iverilog 13.0 sim of bcd_decode.v - 256/256 bit-exact (incl. invalid-nibble
     mod-128 + valid flag), independent of the Python oracle
  3. FPGA HW (corona-decode-bcd, AX7203 IDCODE 0x13636093) - 100/100 @160000

INDEX: bitexact_packs 69 -> 70, structural_packs 14 -> 13.
Generic-BCD variable-width nature noted in catalog.instance + format_notes;
invalid nibbles (0xA..0xF) excluded from the round-trip claim (documented policy).

Per recipe-sw-bitexact gate (independent decoder + exact oracle + 2nd witness).
Status tag: [verified SW] (iverilog) + [izmereno na kremnii] (HW Tier-E).
Catalog = 83 unchanged.

Closes #1321
- Replace em-dash (U+2014) with ASCII hyphen in bcd_conformance_v0.json
  (fixes integrity-gate Check D parse error: ascii codec byte 0xe2).
- Refresh bcd sha256 in INDEX_all_formats.json to match file byte-for-byte
  (fixes integrity-gate Check C sha_drift).
- Add docs/NOW.md entry for the bcd promotion (fixes check-now-freshness).

No vector values changed; 100/100 abs_error=0 unchanged. Catalog = 83.

Closes #1321
@gHashTag
gHashTag force-pushed the bcd-bitexact-promotion branch from fe6b230 to 52b66fc Compare July 4, 2026 12:10
@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-07-04 12:10:41 UTC

Summary

Status Count
Total Open PRs 17
PRs with Failing Checks 12
PRs with All Checks Green 5
READY 4
FAILING 12
PENDING 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=16664105c99c != manifest seal=49e55df6d444.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit bc70a05 into master Jul 4, 2026
19 checks passed
@gHashTag
gHashTag deleted the bcd-bitexact-promotion branch July 4, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

promote bcd -> strict bitexact (2-digit packed instance, 3 witnesses)

1 participant