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
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ add_library(linx::model ALIAS linx_model)
add_custom_target(
gen-isa-codec
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/tools/isa/gen_minst_codec.py"
--spec "${CMAKE_CURRENT_SOURCE_DIR}/../../isa/v0.4/linxisa-v0.4.json"
--spec "${CMAKE_CURRENT_SOURCE_DIR}/../../isa/v0.56/linxisa-v0.56.json"
--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 v0.4 Minst codec tables")
COMMENT "Regenerating committed LinxISA v0.56 Minst codec tables")

target_include_directories(
linx_model
Expand Down
4 changes: 2 additions & 2 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 v0.4 fields, and retire/flush
`MinstPtr`, decode populates generated LinxISA v0.56 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 v0.4 codec and `Minst`
- [`docs/isa.md`](./docs/isa.md) generated LinxISA v0.56 codec and `Minst`
packet contract

Doxygen can be generated locally with:
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 v0.4 form metadata and canonical decoded fields
- decode fills generated v0.56 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
4 changes: 2 additions & 2 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 v0.4 codec for `isa::Minst`.
`linx-model` ships a committed generated LinxISA v0.56 codec for `isa::Minst`.
The source of truth is:

- `/Users/zhoubot/linx-isa/isa/v0.4/linxisa-v0.4.json`
- `/Users/zhoubot/linx-isa/isa/v0.56/linxisa-v0.56.json`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The path to the ISA specification is hardcoded as an absolute path to a specific user's home directory (/Users/zhoubot/...). This should be updated to a relative path or a generic placeholder to ensure it is accurate for all developers and environments.


The generated C++ tables are committed under:

Expand Down
2 changes: 1 addition & 1 deletion src/emulator/minst_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void FillOperand(LinxMinstOperandRecordC &dst, const isa::MinstOperand *src) {
[[nodiscard]] std::size_t BytesForLen(std::uint32_t len_bits) {
LINX_MODEL_ASSERT_MSG(len_bits % 8U == 0U, "minst trace len must be byte-aligned");
LINX_MODEL_ASSERT_MSG(len_bits >= 16U && len_bits <= 64U,
"minst trace len must stay within v0.4 fetch sizes");
"minst trace len must stay within v0.56 fetch sizes");
return static_cast<std::size_t>(len_bits / 8U);
}

Expand Down
2 changes: 1 addition & 1 deletion tools/isa/gen_minst_codec.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument(
"--spec",
default="/Users/zhoubot/linx-isa/isa/v0.4/linxisa-v0.4.json",
default="/Users/zhoubot/linx-isa/isa/v0.56/linxisa-v0.56.json",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The default value for the --spec argument is a hardcoded absolute path to a specific user's home directory. This makes the script non-portable. Since the build system (CMakeLists.txt) already provides this path explicitly, it is better to remove the default and make the argument required to avoid accidental use of an invalid path.

Suggested change
default="/Users/zhoubot/linx-isa/isa/v0.56/linxisa-v0.56.json",
required=True,

)
parser.add_argument(
"--header",
Expand Down
Loading