Skip to content

Commit

Permalink
cargo fmt.
Browse files Browse the repository at this point in the history
  • Loading branch information
thealmarty committed Apr 15, 2024
1 parent e92fc82 commit 09614ea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions basic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use valida_bus::{
};
use valida_cpu::{
BeqInstruction, BneInstruction, Imm32Instruction, JalInstruction, JalvInstruction,
Load32Instruction, LoadU8Instruction, LoadS8Instruction, LoadFpInstruction, ReadAdviceInstruction, StopInstruction,
Store32Instruction, StoreU8Instruction
Load32Instruction, LoadFpInstruction, LoadS8Instruction, LoadU8Instruction,
ReadAdviceInstruction, StopInstruction, Store32Instruction, StoreU8Instruction,
};
use valida_cpu::{CpuChip, MachineWithCpuChip};
use valida_machine::__internal::p3_challenger::{CanObserve, FieldChallenger};
Expand Down
14 changes: 8 additions & 6 deletions cpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use valida_machine::{
};
use valida_memory::{MachineWithMemoryChip, Operation as MemoryOperation};
use valida_opcodes::{
BEQ, BNE, BYTES_PER_INSTR, IMM32, JAL, JALV, LOAD32, LOADFP, READ_ADVICE, STOP, STORE32,
LOADU8, LOADS8, STOREU8
BEQ, BNE, BYTES_PER_INSTR, IMM32, JAL, JALV, LOAD32, LOADFP, LOADS8, LOADU8, READ_ADVICE, STOP,
STORE32, STOREU8,
};

use p3_air::VirtualPairCol;
Expand Down Expand Up @@ -520,13 +520,15 @@ where

// The original content of the cell to write to.
let cell_write = state
.mem_mut()
.read(clk, write_addr.into(), true, pc, opcode, 1, "");
.mem_mut()
.read(clk, write_addr.into(), true, pc, opcode, 1, "");

// The Word to write, with one byte overwritten to the read byte
let cell_to_write = cell_write.update_byte(cell_byte, index_of_write);

state.mem_mut().write(clk, write_addr.into(), cell_to_write, true);

state
.mem_mut()
.write(clk, write_addr.into(), cell_to_write, true);
state.cpu_mut().pc += 1;
state.cpu_mut().push_op(Operation::StoreU8, opcode, ops);
}
Expand Down
1 change: 0 additions & 1 deletion machine/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ impl Word<u8> {
}
}


impl<F: Copy> Word<F> {
pub fn transform<T, G>(self, mut f: G) -> Word<T>
where
Expand Down

0 comments on commit 09614ea

Please sign in to comment.