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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out immutable LinxISA v0.58.1 authority
- name: Check out immutable LinxISA v0.58.3 authority
uses: actions/checkout@v4
with:
repository: LinxISA/linx-isa
ref: e0d686c40d074ae0c15702e4d8cdee5ba5279d3a
ref: 81bfd0e42f20f5be10af3bd3a17492d586ca42a1
path: linxisa-authority
- name: Install toolchain
run: sudo apt-get update && sudo apt-get install -y clang-format cmake ninja-build g++
Expand All @@ -100,11 +100,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check out immutable LinxISA v0.58.1 authority
- name: Check out immutable LinxISA v0.58.3 authority
uses: actions/checkout@v4
with:
repository: LinxISA/linx-isa
ref: e0d686c40d074ae0c15702e4d8cdee5ba5279d3a
ref: 81bfd0e42f20f5be10af3bd3a17492d586ca42a1
path: linxisa-authority
- name: Install toolchain
run: sudo apt-get update && sudo apt-get install -y clang-format cmake ninja-build clang
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

option(LINX_MODEL_ENABLE_SANITIZERS "Enable ASan, LSan, and UBSan" OFF)
option(LINX_MODEL_BUILD_DOCS "Enable Doxygen documentation target" OFF)
set(LINXISA_AUTHORITY_ROOT "" CACHE PATH "Exact LinxISA checkout containing ISA v0.58.1 authority")
set(LINXISA_AUTHORITY_ROOT "" CACHE PATH "Exact LinxISA checkout containing ISA v0.58.3 authority")
if(NOT LINXISA_AUTHORITY_ROOT AND
EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../isa/v0.58/linxisa-v0.58.json")
get_filename_component(
Expand Down Expand Up @@ -56,7 +56,7 @@ add_custom_target(
--header "${CMAKE_CURRENT_SOURCE_DIR}/include/linx/model/isa/generated_tables.hpp"
--source "${CMAKE_CURRENT_SOURCE_DIR}/src/isa/generated_tables.cpp"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Regenerating committed LinxISA 0.58.1 Minst codec tables")
COMMENT "Regenerating committed LinxISA 0.58.3 Minst codec tables")

add_custom_target(
check-isa-codec
Expand All @@ -66,7 +66,7 @@ add_custom_target(
--source "${CMAKE_CURRENT_SOURCE_DIR}/src/isa/generated_tables.cpp"
--check
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Checking committed LinxISA 0.58.1 Minst codec freshness")
COMMENT "Checking committed LinxISA 0.58.3 Minst codec freshness")

target_include_directories(
linx_model
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ state.
- `SimQueue<T>` models latency-aware, cycle-visible FIFO movement for value
payloads, `std::unique_ptr<T>`, and `std::shared_ptr<T>`.
- `isa::Minst` is the single in-flight uop payload. Fetch allocates
`MinstPtr`, decode populates generated LinxISA 0.58.1 fields, and retire/flush
`MinstPtr`, decode populates generated LinxISA 0.58.3 fields, and retire/flush
or DFX consumes the same object.
- `ProgramImage` plus the ELF/raw loader and ISA disassembler let the model CLI
load a binary, decode instructions, and print assembly directly from the
Expand Down Expand Up @@ -71,7 +71,7 @@ ctest --test-dir build-sanitize --output-on-failure
semantics
- [`docs/testing.md`](./docs/testing.md) UT / ST / checks / sanitizers
- [`docs/logging.md`](./docs/logging.md) structured log format and packet dump
- [`docs/isa.md`](./docs/isa.md) generated LinxISA 0.58.1 codec and `Minst`
- [`docs/isa.md`](./docs/isa.md) generated LinxISA 0.58.3 codec and `Minst`
packet contract

Doxygen can be generated locally with:
Expand All @@ -88,16 +88,16 @@ cmake --build build --target gen-isa-codec
cmake --build build --target check-isa-codec
```

Generation fails closed unless the root lock matches the exact PTO ISA 0.58.1
Generation fails closed unless the root lock matches the exact PTO ISA 0.58.3
release, ABI, projection, source commit/tree, catalog hashes/counts, and the
765-form codec cardinality. The freshness target regenerates into a temporary
757-form codec cardinality. The freshness target regenerates into a temporary
directory and byte-compares both committed outputs.

For a standalone checkout, configure with an immutable LinxISA authority:

```bash
cmake -S . -B build -G Ninja \
-DLINXISA_AUTHORITY_ROOT=/path/to/linx-isa-at-ea54153b3351c48df306a57189ffb587801b9197
-DLINXISA_AUTHORITY_ROOT=/path/to/linx-isa-at-81bfd0e42f20f5be10af3bd3a17492d586ca42a1
cmake --build build --target check-isa-codec
```

Expand Down
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Within each `Module`, `WorkSelf()` is event-driven:
repository.

- fetch allocates `MinstPtr`
- decode fills generated LinxISA 0.58.1 form metadata and canonical decoded fields
- decode fills generated LinxISA 0.58.3 form metadata and canonical decoded fields
- middle pipeline stages inspect or extend typed views on the same packet
- retire, flush, or DFX consumes and destroys the packet, or converts it to
shared ownership only at terminal boundaries
Expand Down
31 changes: 18 additions & 13 deletions docs/isa.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

## Scope

`linx-model` ships a committed generated LinxISA 0.58.1 codec for `isa::Minst`.
`linx-model` ships a committed generated LinxISA 0.58.3 codec for `isa::Minst`.
The source of truth is:

- `isa/v0.58/linxisa-v0.58.json` from the LinxISA 0.58.1 projection, generated
- `isa/v0.58/linxisa-v0.58.json` from the LinxISA 0.58.3 projection, generated
from the locked PTO-ISA/pto-spec release

The generated C++ tables are committed under:
Expand Down Expand Up @@ -48,8 +48,10 @@ Decoder behavior:
- chooses the unique most-specific form by fixed-bit count
- validates field constraints
- populates `Minst` metadata and typed views
- exposes exactly 765 current LinxISA forms, including `B.FPATR` and
`BSTART.ICALL`, and rejects retired `B.ARG`,
- exposes exactly 757 current LinxISA forms, including the `B.FPATR`
`TransA`/`TransB` form and the `B.IOT`/`B.IOS` `PEMode`/`SizeCode` forms;
rejects retired scalar branches `B.EQ`, `B.GE`, `B.GEU`, `B.LT`, `B.LTU`,
`B.NE`, `B.NZ`, and `B.Z`, plus retired `B.ARG`,
`C.B.IOS`, `BSTART.FIXP`, and generic `BSTART.CUBE`/`BSTART.TMA` spellings

## PTO 0.58 Shared state
Expand All @@ -58,9 +60,11 @@ Decoder behavior:
destination write path preflights every selected PE before applying one atomic
descriptor-and-payload update. The first write fixes the allocation mask and
per-PE capacity; later subset writes are legal, while allocation expansion or
descriptor drift fails without partial effects. A zero PE mask is a strict
no-op, and uninitialized reads return no value without changing state. PE-mask
bits are architectural-order: bit 3 selects PE0 through bit 0 selecting PE3.
descriptor drift fails without partial effects. `PEMode` values decode to the
fixed participation masks `0000`, `1000`, `0100`, `0010`, `0001`, `1100`,
`1110`, and `1111`; mode zero is a strict no-op. Uninitialized reads return no
value without changing state. `B.IOS` accepts `SizeCode` 1 through 12, while
`B.IOT` accepts 1 through 10.

The machine-readable differential contract is committed at
`tests/fixtures/pto_v058_shared_state.json`. It fixes the TLSU state
Expand Down Expand Up @@ -106,17 +110,18 @@ cmake --build build --target gen-isa-codec
cmake --build build --target check-isa-codec
```

The generator validates the exact root PTO ISA 0.58.1 lock identity, source
commit/tree, catalog hashes/counts, and the generated 765/2661/3401/780
The generator validates the exact root PTO ISA 0.58.3 lock identity, source
commit/tree, catalog hashes/counts, and the generated 757/2643/3375/792
form/field/piece/constraint cardinalities before writing. `check-isa-codec`
also rejects stale committed output without modifying it.

It additionally authenticates the complete authority bytes against the
immutable LinxISA v0.58.1 release: compiled catalog
`4e8a7e96ebc2710d70bb17b77bc181b9613ca87b9f38a368217d596522d4bbf8`, PTO
lock `fec69d22b2757ebb8da3876b16e1d5845af188f107f06d05422af15513309dfd`,
immutable LinxISA v0.58.3 authority at `81bfd0e42f20f5be10af3bd3a17492d586ca42a1`:
compiled catalog
`34ecbcfa075166490b622647eb53c13a9c360848d6c7acb2e034d3e47f8c9a8a`, PTO
lock `d5c17fd6f893267b43ed88ec157cc18ee9848eee6cf1801eaf3fe99358300a4d`,
and release manifest
`3f8f746b52aa14ad39c6be83d0ebf3bc260c992c4d3e932b10cef612d0217f6c`.
`6f1b3fdc81e8be591d74427663a5747e6b2aa884c7d9787b2852b8eba4b5ed4d`.
Standalone builds must provide that checkout through
`LINXISA_AUTHORITY_ROOT`; missing authority is an error for generation and
freshness checks.
Expand Down
2 changes: 1 addition & 1 deletion include/linx/model/emulator/state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ constexpr std::size_t kLinxTileMaxBytes = 64U * 1024U;
constexpr std::size_t kLinxTileMaxWords = kLinxTileMaxBytes / 4U;
constexpr std::size_t kLinxSharedTileCount = 256;
constexpr std::size_t kLinxCorePeCount = 4;
constexpr std::size_t kLinxSharedTileMaxBytes = 8U * 1024U;
constexpr std::size_t kLinxSharedTileMaxBytes = 256U * 1024U;

struct SharedTileDescriptor {
std::uint32_t dtype = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/emulator/shared_tile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ bool DescriptorValid(const SharedTileDescriptor &descriptor, std::uint32_t capac
} // namespace

std::optional<std::uint32_t> SharedTileBank::CapacityBytes(std::uint8_t size_code) noexcept {
if (size_code < 1U || size_code > 7U) {
if (size_code < 1U || size_code > 12U) {
return std::nullopt;
}
return 128U << (size_code - 1U);
Expand Down
Loading
Loading