Skip to content

Align pyCircuit decode with PTO ISA 0.57.1 - #68

Merged
zhoubot merged 3 commits into
mainfrom
codex/pto-isa-0.57.1
Aug 2, 2026
Merged

Align pyCircuit decode with PTO ISA 0.57.1#68
zhoubot merged 3 commits into
mainfrom
codex/pto-isa-0.57.1

Conversation

@zhoubot

@zhoubot zhoubot commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • align Linx pyCircuit example decoders with the exact PTO ISA 0.57.1 Tile header encodings
  • recognize the raw TEPL Mode/Function carrier
  • replace stale generic TMA/CUBE masks with the frozen DataType-open family masks
  • add a source-local guard against 0.56-era decode markers and deleted D-class Tile operations
  • make the repository test entrypoint import-safe and keep the touched Python surface pre-commit clean

Normative source: PTO-ISA/pto-spec commit 2f3f605e289b09d56ef5a9ba39fc80b52948a5f5.

Source hashes:

  • content: 748c1c6ac1bd5482d219cd08b8f0a871c7eda2b8f8afb1e81d498ec742e8abe8
  • encoding: 9705a984e2e48e0d4e856d3fbcfa07041c8578dd326d81f1c90279e826354c32
  • hardware profile: becfbefcc7a31408e5e5293802493f833f68a2fccebb3f9e8008d8b9f4e7658c
  • numeric vectors: b9f908deb9cfec412388e95f4532563cf4e462032b43d15996f0f7b4b93b4ec9

Verification

  • PTO 0.57.1 decode guard
  • Python compile checks
  • pre-commit
  • unit tests: 10/10
  • GitHub Actions: Pre-commit, Unit, Docs, System, Linux/macOS toolchain, Wheel Smoke
  • git diff --check

The previous local toolchain gap is covered by the passing GitHub system/toolchain/wheel jobs.

Final merged-source refresh (2026-08-02)

  • Normative source is the merged Publish the normative PTO ISA 0.57.1 contract PTO-ISA/pto-spec#19 squash commit 2f3f605e289b09d56ef5a9ba39fc80b52948a5f5.
  • Final release identity: content 748c1c6ac1bd5482d219cd08b8f0a871c7eda2b8f8afb1e81d498ec742e8abe8; encoding projection 9705a984e2e48e0d4e856d3fbcfa07041c8578dd326d81f1c90279e826354c32.
  • The final merge keeps the 120-operation names/selectors, command masks/matches, hardware profile, and numeric vectors unchanged; it refreshes source identity plus Bundle/restart/system-register semantic metadata. Embedded locks/ELF identity constants were refreshed where applicable, and focused gates were rerun before promotion.

The example Linx pyCircuit cores must recognize the 0.57.1 public tile header contract, where TEPL is the raw Mode/Function carrier and TMA/CUBE families use exact DataType-open masks from the generated ISA projection.

Constraint: PTO-ISA/pto-spec b30ed3d is the normative source for 0.57.1 encoding identity

Rejected: Keep the old generic BSTART.TMA/BSTART.CUBE masks | they miss TEPL and over-state the 0.57.1 public mnemonic model

Confidence: medium

Scope-risk: narrow

Directive: Keep pyCircuit example decode masks synchronized with the generated Linx ISA projection before changing tile header recognition

Tested: python3 contrib/linx/flows/tools/check_pto_isa_v0571_decode.py

Tested: python3 -m py_compile contrib/linx/flows/tools/check_pto_isa_v0571_decode.py contrib/linx/designs/examples/linx_cpu_pyc/decode.py contrib/linx/designs/examples/linxcore_inorder/decode.py

Tested: git diff --check

Not-tested: run_linx_cpu_pyc_cpp.sh/full pyc gates; local worktree lacks pycc and LLVM_DIR/MLIR_DIR or llvm-config-19
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

RuoyuZhou added 2 commits July 31, 2026 01:45
Gate the raw TEPL family match with the exact 98-selector PTO ISA 0.57.1 set in both Linx pyCircuit example decoders, and lock that set with a standalone guard.

Constraint: The Mode/Function family mask also covers reserved selectors that must remain illegal.

Rejected: Decode every family match into the shared tile control path | it silently accepts unassigned operations.

Confidence: high

Scope-risk: narrow

Directive: Update the selector tuple and guard together from the locked PTO operation projection.

Tested: PTO decode guard; both example designs elaborated to .pyc; Python compile; git diff --check.

Not-tested: C++ and Verilator execution require external toolchains.
The CI pytest console entrypoint did not place the repository root on sys.path, so a main-branch Linx example test could not import the designs namespace. Declare the root in pytest configuration and normalize the PTO 0.57.1 decode files to the repository lint contract.

Constraint: CI invokes pytest as a console script and pre-commit over the complete PR diff

Rejected: Modify the individual Linx test sys.path | test-local workaround would leave other repository-root imports fragile

Confidence: high

Scope-risk: narrow

Directive: Keep repository-root test imports declarative in pytest configuration

Tested: pre-commit on all PR-changed files; pytest tests/unit -m unit (10 passed); PTO ISA 0.57.1 decode guard; py_compile; git diff --check

Not-tested: C++ and simulator system lanes; this change only repairs Python CI collection and formatting
@zhoubot
zhoubot marked this pull request as ready for review August 2, 2026 12:09
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@zhoubot
zhoubot merged commit 84b4028 into main Aug 2, 2026
7 checks passed
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.

1 participant