Skip to content

Conversation

@mpernambuco
Copy link
Collaborator

@mpernambuco mpernambuco commented Nov 9, 2025

Copy link

Copilot AI left a 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_SIZECM_HASH_TREE_LOG2_WORD_SIZE)
  • Renames UARCH_MAX_CYCLE to UARCH_CYCLE_MAX for naming consistency
  • Fixes ecall-putchar.S to use a0 instead of a6 for 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.

@mpernambuco mpernambuco force-pushed the solidity-step-tweaks branch 2 times, most recently from 109e5ba to 768ce84 Compare November 15, 2025 21:37
@mpernambuco mpernambuco requested a review from edubart November 15, 2025 23:46
Copy link
Contributor

@diegonehab diegonehab left a 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.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Machine Unit Nov 19, 2025
edubart
edubart previously approved these changes Nov 24, 2025
Base automatically changed from share/hash-tree-on-disk to main November 25, 2025 15:33
@edubart edubart dismissed their stale review November 25, 2025 15:33

The base branch was changed.

@edubart edubart added this to the v0.20.0 milestone Nov 25, 2025
@edubart edubart added the enhancement New feature or request label Nov 25, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Waiting Merge in Machine Unit Nov 26, 2025
@mpernambuco mpernambuco merged commit 83e8d76 into main Nov 26, 2025
16 checks passed
@mpernambuco mpernambuco deleted the solidity-step-tweaks branch November 26, 2025 13:07
@github-project-automation github-project-automation bot moved this from Waiting Merge to Done in Machine Unit Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants