1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use ;
// CONSTANTS
// ================================================================================================
/// Number of selector columns in the trace.
pub const NUM_SELECTORS: usize = 1;
/// Number of columns needed to record an execution trace of the bitwise chiplet.
pub const TRACE_WIDTH: usize = NUM_SELECTORS + 12;
/// The number of rows required to compute an operation in the Bitwise chiplet.
pub const OP_CYCLE_LEN: usize = 8;
// --- OPERATION SELECTORS ------------------------------------------------------------------------
/// Specifies a bitwise AND operation.
pub const BITWISE_AND: Felt = ZERO;
/// Unique label for the bitwise AND operation. Computed as 1 more than the binary composition of
/// the chiplet and operation selectors [1, 0, 0].
pub const BITWISE_AND_LABEL: Felt = new;
/// Specifies a bitwise XOR operation.
pub const BITWISE_XOR: Felt = ONE;
/// Unique label for the bitwise XOR operation. Computed as 1 more than the binary composition of
/// the chiplet and operation selectors [1, 0, 1].
pub const BITWISE_XOR_LABEL: Felt = new;
// --- INPUT DECOMPOSITION ------------------------------------------------------------------------
/// The number of bits decomposed per row per input parameter `a` or `b`.
pub const NUM_DECOMP_BITS: usize = 4;
// --- COLUMN ACCESSOR INDICES WITHIN THE CHIPLET -------------------------------------------------
/// The index of the column holding the aggregated value of input `a` within the bitwise chiplet
/// execution trace.
pub const A_COL_IDX: usize = NUM_SELECTORS;
/// The index of the column holding the aggregated value of input `b` within the bitwise chiplet
/// execution trace.
pub const B_COL_IDX: usize = A_COL_IDX + 1;
/// The index range for the bit decomposition of `a` within the bitwise chiplet's trace.
pub const A_COL_RANGE: = create_range;
/// The index range for the bit decomposition of `b` within the bitwise chiplet's trace.
pub const B_COL_RANGE: = create_range;
/// The index of the column containing the aggregated output value within the bitwise chiplet
/// execution trace.
pub const PREV_OUTPUT_COL_IDX: usize = B_COL_IDX + 1 + 2 * NUM_DECOMP_BITS;
/// The index of the column containing the aggregated output value within the bitwise chiplet
/// execution trace.
pub const OUTPUT_COL_IDX: usize = PREV_OUTPUT_COL_IDX + 1;
// TYPE ALIASES
// ================================================================================================
pub type Selectors = ;