Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevjue committed May 22, 2024
1 parent 5b00b1d commit 3fb0b25
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/src/cpu/air/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ impl CpuChip {
&memory_columns.memory_access,
is_memory_instruction.clone(),
);

// On memory load instructions, make sure that the memory value is not changed.
builder
.when(self.is_load_instruction::<AB>(&local.selectors))
.assert_word_eq(
*memory_columns.memory_access.value(),
*memory_columns.memory_access.prev_value(),
);
}

/// Evaluates constraints related to loading from memory.
Expand Down Expand Up @@ -142,7 +150,7 @@ impl CpuChip {
local.mem_value_is_neg,
);

// When the memory value is not negaitve, assert that op_a value is equal to the unsigned
// When the memory value is not negative, assert that op_a value is equal to the unsigned
// memory value.
builder
.when(is_load)
Expand Down

0 comments on commit 3fb0b25

Please sign in to comment.