Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CURRICULUM.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ Flag numbers identify the weak dimension(s): 1=Concept Focus, 2=Starter Calibrat
|---|---|---|---|---|---|
| `sv/virtual-provider-closure` | Virtual Method Provider Closure | ✅ | — | `sv/classes` | virtual overrides, base-class handles, and native AOT provider retention |

### Chapter: Wide Four-State Memory Loading (October 2026)
| Slug | Title | Status | Score | Prereqs | Teaches |
|---|---|---|---|---|---|
| `sv/wide-readmem` | Wide Four-State Memory Loading | ✅ | — | `sv/always-ff` | `$readmemh`, address ranges, and non-power-of-two four-state packed words |

### Chapter: Introduction
| Slug | Title | Status | Score | Prereqs | Teaches |
|---|---|---|---|---|---|
Expand Down
13 changes: 12 additions & 1 deletion artifacts/tutorial/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ One commit per issue, each with the test that fails before it and passes after:

### Landed capability chapters

Added six one-lesson chapters for user-facing SystemVerilog capabilities
Added seven one-lesson chapters for user-facing SystemVerilog capabilities
landed in Mox between September 22 and October 1, 2026. The UDP chapter
tracks landing tip `36b040f6190c`, and the virtual-provider chapter tracks
`3bc88e77921e`; the pinned browser WASM remains unchanged.
Expand All @@ -103,6 +103,7 @@ tracks landing tip `36b040f6190c`, and the virtual-provider chapter tracks
| `sv/nested-child-input` | §§23.2.2, 9.4.2 | starter FAIL; solution PASS in interpreter and compile modes | solution PASS; output equal | `artifacts/tutorial/capability-receipts/*nested-child-input*` |
| `sv/sequential-udp-init` | §§29.3.2, 29.6, 29.7 | starter FAIL; solution PASS in interpreter and compile modes | starter both_fail; solution PASS; output equal | `artifacts/tutorial/capability-receipts/*sequential-udp-init*` |
| `sv/virtual-provider-closure` | §§8.20, 8.22 | starter FAIL; solution PASS in interpreter and compile modes | starter both_fail; solution both_pass; output equal | `artifacts/tutorial/virtual-provider-closure/*` |
| `sv/wide-readmem` | §§21.4, 21.4.1 | starter FAIL; solution PASS in interpreter and compile modes | starter both_fail; solution both_pass; output equal | `artifacts/tutorial/wide-readmem/*` |

The capability receipt summaries are in
`artifacts/tutorial/capability-receipts/{summary,final-summary}.tsv`.
Expand Down Expand Up @@ -162,6 +163,16 @@ an expected known failure until a WASM rebuild. The cross-include limitation
from the protected-envelope audit is stated in the lesson rather than hidden.
Receipts are under `artifacts/tutorial/protected-envelope-boundary/`.

### Wide four-state memory-loading chapter

`sv/wide-readmem` teaches `$readmemh` address ranges and four-state packed
words whose width is not a power of two. The 64-bit starter fails its check;
the 65-bit solution passes in native interpreter and compile modes. Xcelium
and Mox agree: the starter is `both_fail` and the solution is `both_pass`.
The focused browser run is 1/1 through the pinned interpreter-backed WASM
fallback, not native AOT. Receipts and the Mox landing provenance are under
`artifacts/tutorial/wide-readmem/`.

## WASM rebuild (done locally, NOT published; release `mox-wasm` is unchanged)
Built with emsdk 4.0.21 from Mox main `9c5418532b9` (and landing `ea0fcd2`): mox-verilog, mox-sim, mox-bmc and
mox-lec. Mox has no wasm target for mox-run (GAPS TUT-WASM-MOXRUN), so two more commits went in:
Expand Down
6 changes: 4 additions & 2 deletions artifacts/tutorial/content-census.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ repository is now Mox `origin/main` at
behavior tip `a0c4488a587d753fa9f26d465814aaa44e77586e` are listed below. The
intermediate binary is not evidence that this binary is published; its
unqualified readmem change was reverted by `4d6185ae036d939c9b7266fe89a25f92ed9c294e`
before the current source tip, and no lesson source uses readmem.
before the current source tip; the new `sv/wide-readmem` lesson is the
tutorial's runnable coverage for the landed readmem behavior.

## New landed-capability chapters

These eight short chapters correspond to the user-facing Mox capabilities present
These nine short chapters correspond to the user-facing Mox capabilities present
on the current `origin/main` by October 1, 2026. The compile-mode status page is
listed separately below because it reports qualification status rather than
teaching a new language capability. Every solution passes Mox in both
Expand All @@ -37,6 +38,7 @@ attempts decryption without a key.
| `sv/virtual-provider-closure` | `3bc88e77921e5e776411d00e133f2b497c750943`, Mox mapped-vlib provider-closure regression | §§8.20, 8.22: virtual overrides dispatch through a base-class handle to the derived object. | solution PASS; starter FAIL | solution PASS; starter FAIL | both PASS, output equal | added a base-handle/derived-provider dispatch exercise |
| `sv/clocking-sampler-retention` | `3b1760ff2030378cfde16ca319e2c1b806ab9d31`, `test/Tools/mox-sim/mq93-m2-clock-sampler.sv` | §§14.3, 14.13: default `1step` samples before the clock event; explicit `#0` samples in Observed and retains the sample through same-slot re-entry. | solution PASS; starter FAIL | solution PASS; starter FAIL | both PASS / both FAIL, output equal | added an explicit-`#0` sampler-retention exercise |
| `sv/protected-envelope-boundary` | `c3799f427f1e51abcd389dcf15771150223cae75`, `test/Conversion/ImportVerilog/protected-comment-callback.sv` | §§34.2, 34.3, 34.4, 34.5.3–34.5.4: protected text is transformed before analysis and delimiters close the envelope; this lesson does not claim decryption. | solution PASS; starter FAIL | solution PASS; starter FAIL | `reference_only_fail` for solution; Xcelium attempts unkeyed decryption | added same-buffer opaque callback-boundary exercise |
| `sv/wide-readmem` | `e7da9630dcd`, `test/Tools/mox-sim/aot-readmem-wide-fourstate.sv` | §§21.4, 21.4.1: `$readmemh` accepts optional address bounds and loads packed elements of an unpacked memory, preserving four-state digits. | solution PASS; starter FAIL | solution PASS; starter FAIL | starter `both_fail`; solution `both_pass`, output equal | added a width-calibration readmem exercise |

The remaining current-main capability commits are queued for their own short
chapters and are not silently folded into an existing lesson: coverage-option
Expand Down
74 changes: 74 additions & 0 deletions artifacts/tutorial/wide-readmem/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Wide four-state memory-loading receipt

This receipt supports `sv/wide-readmem`. The lesson teaches that
`$readmemh` loads packed words into an unpacked memory, including explicit
start and finish addresses and four-state hexadecimal data. The starter uses a
64-bit word for 65-bit file values; the solution uses a 65-bit word.

## Standard and landing basis

IEEE 1800-2023 §21.4 defines `$readmemb` and `$readmemh`, including the
optional `start_addr` and `finish_addr` arguments. Section §21.4.1 says these
system tasks support unpacked arrays of packed data and treat each packed
element as the vector equivalent. Section §21.4 also permits `x`, `z`, and
underscores in the hexadecimal numbers. The lesson uses those rules directly;
it does not claim behavior for dynamic or associative arrays.

The native capability landed in Mox commit `e7da9630dcd`
(`9cd0fcd389e505f9b031a8b99a347888181e9451`), recorded by
`/var/tmp/thomas-ahle/fleet/artifacts/landing/push-e7da9630dcd.md`. Its exact-
tip focused controls passed 3/3 in each of three trials. The native receipt
uses `/var/tmp/thomas-ahle/wt/landing/build-dev-fast` at
`35ec19ea7f9398d76cf704252703ae731dad04d5`, whose parent contains the landed
readmem change. No Mox worktree was modified.

## Native runs

The native runs use CPUs `0-79` and a 30-second wall guard. This build has no
`mox-run`, so the runtime uses the `mox-verilog` plus `mox-sim` path. The
committed logs are `starter-import.log`, `starter-interpret.log`,
`starter-compile.log`, `solution-import.log`, `solution-interpret.log`, and
`solution-compile.log`.

| variant | mode | exit | first result line |
|---|---:|---:|---|
| starter | interpret | 0 | `FAIL: 0123456789abcdef fedcba9876543210 0000000000000000` |
| starter | compile | 0 | `FAIL: 0123456789abcdef fedcba9876543210 0000000000000000` |
| solution | interpret | 0 | `PASS` |
| solution | compile | 0 | `PASS` |

The solution compile receipt reports `AOT interpreter invocations total: 0`.
The browser asset is older than this landing and therefore the browser result
does not qualify native AOT.

## Differential runs

`refdiff` was run on each committed fixture against the same native build:

```text
/var/tmp/thomas-ahle/fleet/bin/refdiff src/lessons/sv/wide-readmem/wide_readmem.sv --build-dir /var/tmp/thomas-ahle/wt/landing/build-dev-fast
/var/tmp/thomas-ahle/fleet/bin/refdiff src/lessons/sv/wide-readmem/wide_readmem.sol.sv --build-dir /var/tmp/thomas-ahle/wt/landing/build-dev-fast
```

- `starter-refdiff.json`: `both_fail`; Xcelium and Mox reject the too-narrow
memory through the test's value check.
- `solution-refdiff.json`: `both_pass`; outputs are equivalent.
- Both JSON receipts bind their `sha256` values to the committed source and
retain their `refdiff_cache_key` values. Standing ruling — `general:
refdiff_cache_key is receipt provenance, not a runtime performance cache`.

## Browser qualification

The focused Playwright run passed 1/1:

```text
npx playwright test e2e/qa-all-lessons.spec.js --grep 'Wide Four-State Memory Loading' --reporter=line
```

The route used the pinned interpreter-backed WASM fallback because
`/mox/mox-run.js` is absent. This is browser interpreter qualification only,
not native AOT qualification. Standing ruling — `general: pinned interpreter
fallback is an explicitly scoped browser compatibility path`.

The lesson writes its input file under `/tmp`; the run environment must provide
a writable temporary directory, as stated in the lesson itself.
15 changes: 15 additions & 0 deletions artifacts/tutorial/wide-readmem/browser-qa.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Browser QA receipt

Command:

```text
npx playwright test e2e/qa-all-lessons.spec.js --grep 'Wide Four-State Memory Loading' --reporter=line
```

Result: `1 passed` (`e2e/qa-all-lessons.spec.js:66:5`, lesson `[31]`,
`run`), wall time `48.1s`.

The web server logged a 404 for `/mox/mox-run.js`; this is the expected
toolchain fallback. The route completed through the pinned `mox-verilog` plus
`mox-sim` interpreter path, so this receipt does not qualify browser native
AOT.
Loading
Loading