-
Notifications
You must be signed in to change notification settings - Fork 42
chore: machine-solidity-step tweaks #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a4270ef to
7e1d2a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See in-line comments.
768ce84 to
83e8d76
Compare
Uh oh!
There was an error while loading. Please reload this page.