Merged
Conversation
a4270ef to
7e1d2a5
Compare
There was a problem hiding this comment.
Pull Request Overview
This PR adds two new microarchitecture ecall tests (ecall-mark-page-dirty and ecall-write-tlb) and performs a systematic renaming of hash tree constants from TREE_LOG2_* to HASH_TREE_LOG2_* across the codebase. It also renames UARCH_MAX_CYCLE to UARCH_CYCLE_MAX and fixes a bug where ecall-putchar was using the wrong register.
- Adds new uarch ecall tests for TLB write and mark page dirty functionality
- Renames hash tree constants for consistency (e.g.,
CM_TREE_LOG2_WORD_SIZE→CM_HASH_TREE_LOG2_WORD_SIZE) - Renames
UARCH_MAX_CYCLEtoUARCH_CYCLE_MAXfor naming consistency - Fixes
ecall-putchar.Sto usea0instead ofa6for the character parameter
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/uarch/rv64ui-uarch-catalog.json | Adds entries for the two new test binaries with expected cycle counts |
| tests/uarch/ecall-write-tlb.S | New test file for TLB write ecall functionality |
| tests/uarch/ecall-putchar.S | Fixes register used for putchar argument from a6 to a0 |
| tests/uarch/ecall-mark-page-dirty.S | New test file for mark page dirty ecall functionality |
| tests/uarch/Makefile | Adds new tests to build list |
| tests/misc/test-utils.h | Updates hash tree constant names |
| tests/misc/test-machine-c-api.cpp | Updates hash tree constant names |
| tests/lua/uarch-riscv-tests.lua | Adds new test entries with expected cycle counts |
| tests/lua/spec-hash-tree.lua | Updates hash tree constant names |
| tests/lua/spec-collect-hashes.lua | Updates hash tree constant names |
| tests/lua/machine-bind.lua | Updates hash tree constant names |
| src/uarch-step.cpp | Renames UARCH_MAX_CYCLE to UARCH_CYCLE_MAX |
| src/uarch-constants.h | Renames constant and updates assertion message |
| src/machine-c-api.h | Renames hash tree constants and adds TLB shadow constants |
| src/clua-cartesi.cpp | Exposes renamed constants and new TLB constants to Lua |
| src/cartesi/util.lua | Updates hash tree constant references |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
109e5ba to
768ce84
Compare
diegonehab
reviewed
Nov 19, 2025
diegonehab
reviewed
Nov 19, 2025
diegonehab
reviewed
Nov 19, 2025
diegonehab
requested changes
Nov 19, 2025
Contributor
diegonehab
left a comment
There was a problem hiding this comment.
See in-line comments.
768ce84 to
83e8d76
Compare
edubart
previously approved these changes
Nov 24, 2025
edubart
approved these changes
Nov 25, 2025
diegonehab
approved these changes
Nov 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.