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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
use crateFelt;
// --- CONSTANTS ----------------------------------------------------------------------------------
/// Unique label ACE operation, computed as the chiplet selector with the bits reversed, plus one.
/// `selector = [1, 1, 1, 0]`, `flag = rev(selector) + 1 = [0, 1, 1, 1] + 1 = 8`
pub const ACE_INIT_LABEL: Felt = new;
/// Total number of columns making up the ACE chiplet.
pub const ACE_CHIPLET_NUM_COLS: usize = 16;
/// Offset of the `ID1` wire used when encoding an ACE instruction.
pub const ACE_INSTRUCTION_ID1_OFFSET: Felt = new;
/// Offset of the `ID2` wire used when encoding an ACE instruction.
pub const ACE_INSTRUCTION_ID2_OFFSET: Felt = new;
// --- OPERATION SELECTORS ------------------------------------------------------------------------
/// The index of the column containing the flag indicating the start of a new circuit evaluation.
pub const SELECTOR_START_IDX: usize = 0;
/// The index of the column containing the flag indicating whether the current row performs
/// a READ or EVAL operation.
pub const SELECTOR_BLOCK_IDX: usize = 1;
// --- OPERATION IDENTIFIERS ----------------------------------------------------------------------
/// The index of the column containing memory context.
pub const CTX_IDX: usize = 2;
/// The index of the column containing the pointer from which to read the next two variables
/// or instruction.
pub const PTR_IDX: usize = 3;
/// The index of the column containing memory clk at which the memory read is performed.
pub const CLK_IDX: usize = 4;
/// The index of the column containing the index of the first wire being evaluated.
pub const READ_NUM_EVAL_IDX: usize = 12;
// --- ARITHMETIC GATES ---------------------------------------------------------------------------
/// The index of the column containing the flag indicating which arithmetic operation to perform.
pub const EVAL_OP_IDX: usize = 5;
/// The index of the column containing ID of the first wire.
pub const ID_0_IDX: usize = 6;
/// The index of the column containing the first base-field element of the value of the first wire.
pub const V_0_0_IDX: usize = 7;
/// The index of the column containing the second base-field element of the value of the first wire.
pub const V_0_1_IDX: usize = 8;
/// The index of the column containing the multiplicity of the first wire.
pub const M_0_IDX: usize = 15;
/// The index of the column containing ID of the second wire.
pub const ID_1_IDX: usize = 9;
/// The index of the column containing the first base-field element of the value of the second wire.
pub const V_1_0_IDX: usize = 10;
/// The index of the column containing the second base-field element of the value of the second
/// wire.
pub const V_1_1_IDX: usize = 11;
/// The index of the column containing the multiplicity of the second wire.
/// This column has the meaning of a multiplicity column only when the rows are `READ` rows, else
/// it should be interpreted as containing the second base-field element of the value of the third
/// wire.
pub const M_1_IDX: usize = 14;
/// The index of the column containing ID of the third wire.
pub const ID_2_IDX: usize = 12;
/// The index of the column containing the first base-field element of the value of the third wire.
pub const V_2_0_IDX: usize = 13;
/// The index of the column containing the second base-field element of the value of the third wire.
pub const V_2_1_IDX: usize = 14;