From e737bd3859d9f679d21ed4aec331019732ab60ac Mon Sep 17 00:00:00 2001 From: svv232 Date: Mon, 11 Nov 2024 20:17:29 -0500 Subject: [PATCH] adding memory constants for the interpreter --- o1vm/src/interpreters/riscv32i/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/o1vm/src/interpreters/riscv32i/mod.rs b/o1vm/src/interpreters/riscv32i/mod.rs index ee62e20250..ff0f82696e 100644 --- a/o1vm/src/interpreters/riscv32i/mod.rs +++ b/o1vm/src/interpreters/riscv32i/mod.rs @@ -7,7 +7,9 @@ pub const SCRATCH_SIZE: usize = 20; // FIXME: the value might not be correct. It will be updated when the // interpreter is fully implemented. pub const INSTRUCTION_SET_SIZE: usize = 47; - +pub const PAGE_ADDRESS_SIZE: u32 = 12; +pub const PAGE_SIZE: u32 = 1 << PAGE_ADDRESS_SIZE; +pub const PAGE_ADDRESS_MASK: u32 = PAGE_SIZE - 1; /// List all columns used by the interpreter pub mod column;