Skip to content

Commit

Permalink
Merge pull request #169 from valida-xyz/dorebell-bitwise
Browse files Browse the repository at this point in the history
Prover fixes for Bitwise32Chip
  • Loading branch information
tess-eract authored May 15, 2024
2 parents 7ce53f9 + 1aa80c9 commit a39c986
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion alu_u32/src/bitwise/columns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use valida_derive::AlignedBorrow;
use valida_machine::Word;
use valida_util::indices_arr;

#[derive(AlignedBorrow, Default)]
#[derive(AlignedBorrow, Default, Debug)]
pub struct Bitwise32Cols<T> {
pub input_1: Word<T>,
pub input_2: Word<T>,
Expand Down
6 changes: 4 additions & 2 deletions alu_u32/src/bitwise/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use valida_util::pad_to_power_of_two;
pub mod columns;
pub mod stark;

#[derive(Clone)]
#[derive(Clone, Debug)]
pub enum Operation {
And32(Word<u8>, Word<u8>, Word<u8>), // (dst, src1, src2)
Or32(Word<u8>, Word<u8>, Word<u8>), // ''
Expand Down Expand Up @@ -124,6 +124,8 @@ impl Bitwise32Chip {
bits_2[i][j] = F::from_canonical_u8(c[i] >> j & 1);
}
}
cols.bits_1 = bits_1;
cols.bits_2 = bits_2;
}
}

Expand Down Expand Up @@ -246,7 +248,7 @@ where
state
.bitwise_u32_mut()
.operations
.push(Operation::And32(a, b, c));
.push(Operation::Or32(a, b, c));
state.cpu_mut().push_bus_op(imm, opcode, ops);
}
}

0 comments on commit a39c986

Please sign in to comment.