Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
lookups_ecc_mem.hpp
Go to the documentation of this file.
1// AUTOGENERATED FILE
2#pragma once
3
4#include <cstddef>
5#include <string_view>
6#include <tuple>
7
8#include "../columns.hpp"
11
12namespace bb::avm2 {
13
15
17 static constexpr std::string_view NAME = "LOOKUP_ECC_MEM_CHECK_DST_ADDR_IN_RANGE";
18 static constexpr std::string_view RELATION_NAME = "ecc_mem";
19 static constexpr size_t LOOKUP_TUPLE_SIZE = 3;
20 static constexpr Column SRC_SELECTOR = Column::ecc_add_mem_sel;
21 static constexpr Column DST_SELECTOR = Column::gt_sel;
22 static constexpr Column COUNTS = Column::lookup_ecc_mem_check_dst_addr_in_range_counts;
23 static constexpr Column INVERSES = Column::lookup_ecc_mem_check_dst_addr_in_range_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
25 ColumnAndShifts::ecc_add_mem_dst_addr_2_,
26 ColumnAndShifts::ecc_add_mem_max_mem_addr,
27 ColumnAndShifts::ecc_add_mem_sel_dst_out_of_range_err
28 };
29 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = { ColumnAndShifts::gt_input_a,
30 ColumnAndShifts::gt_input_b,
31 ColumnAndShifts::gt_res };
32};
33
36template <typename FF_>
39
41
43 static constexpr std::string_view NAME = "LOOKUP_ECC_MEM_INPUT_OUTPUT_ECC_ADD";
44 static constexpr std::string_view RELATION_NAME = "ecc_mem";
45 static constexpr size_t LOOKUP_TUPLE_SIZE = 9;
46 static constexpr Column SRC_SELECTOR = Column::ecc_add_mem_sel_should_exec;
47 static constexpr Column DST_SELECTOR = Column::ecc_sel;
48 static constexpr Column COUNTS = Column::lookup_ecc_mem_input_output_ecc_add_counts;
49 static constexpr Column INVERSES = Column::lookup_ecc_mem_input_output_ecc_add_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
51 ColumnAndShifts::ecc_add_mem_p_x, ColumnAndShifts::ecc_add_mem_p_y, ColumnAndShifts::ecc_add_mem_p_is_inf,
52 ColumnAndShifts::ecc_add_mem_q_x, ColumnAndShifts::ecc_add_mem_q_y, ColumnAndShifts::ecc_add_mem_q_is_inf,
53 ColumnAndShifts::ecc_add_mem_res_x, ColumnAndShifts::ecc_add_mem_res_y, ColumnAndShifts::ecc_add_mem_res_is_inf
54 };
55 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
56 ColumnAndShifts::ecc_p_x, ColumnAndShifts::ecc_p_y, ColumnAndShifts::ecc_p_is_inf,
57 ColumnAndShifts::ecc_q_x, ColumnAndShifts::ecc_q_y, ColumnAndShifts::ecc_q_is_inf,
58 ColumnAndShifts::ecc_r_x, ColumnAndShifts::ecc_r_y, ColumnAndShifts::ecc_r_is_inf
59 };
60};
61
63template <typename FF_>
66
68
70 static constexpr std::string_view NAME = "LOOKUP_ECC_MEM_WRITE_MEM_0";
71 static constexpr std::string_view RELATION_NAME = "ecc_mem";
72 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
73 static constexpr Column SRC_SELECTOR = Column::ecc_add_mem_sel_should_exec;
74 static constexpr Column DST_SELECTOR = Column::memory_sel;
75 static constexpr Column COUNTS = Column::lookup_ecc_mem_write_mem_0_counts;
76 static constexpr Column INVERSES = Column::lookup_ecc_mem_write_mem_0_inv;
77 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
78 ColumnAndShifts::ecc_add_mem_execution_clk, ColumnAndShifts::ecc_add_mem_dst_addr_0_,
79 ColumnAndShifts::ecc_add_mem_res_x, ColumnAndShifts::precomputed_zero,
80 ColumnAndShifts::ecc_add_mem_space_id, ColumnAndShifts::ecc_add_mem_sel_should_exec
81 };
82 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
83 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
84 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_space_id, ColumnAndShifts::memory_rw
85 };
86};
87
89template <typename FF_>
91
93
95 static constexpr std::string_view NAME = "LOOKUP_ECC_MEM_WRITE_MEM_1";
96 static constexpr std::string_view RELATION_NAME = "ecc_mem";
97 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
98 static constexpr Column SRC_SELECTOR = Column::ecc_add_mem_sel_should_exec;
99 static constexpr Column DST_SELECTOR = Column::memory_sel;
100 static constexpr Column COUNTS = Column::lookup_ecc_mem_write_mem_1_counts;
101 static constexpr Column INVERSES = Column::lookup_ecc_mem_write_mem_1_inv;
102 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
103 ColumnAndShifts::ecc_add_mem_execution_clk, ColumnAndShifts::ecc_add_mem_dst_addr_1_,
104 ColumnAndShifts::ecc_add_mem_res_y, ColumnAndShifts::precomputed_zero,
105 ColumnAndShifts::ecc_add_mem_space_id, ColumnAndShifts::ecc_add_mem_sel_should_exec
106 };
107 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
108 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
109 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_space_id, ColumnAndShifts::memory_rw
110 };
111};
112
114template <typename FF_>
116
118
120 static constexpr std::string_view NAME = "LOOKUP_ECC_MEM_WRITE_MEM_2";
121 static constexpr std::string_view RELATION_NAME = "ecc_mem";
122 static constexpr size_t LOOKUP_TUPLE_SIZE = 6;
123 static constexpr Column SRC_SELECTOR = Column::ecc_add_mem_sel_should_exec;
124 static constexpr Column DST_SELECTOR = Column::memory_sel;
125 static constexpr Column COUNTS = Column::lookup_ecc_mem_write_mem_2_counts;
126 static constexpr Column INVERSES = Column::lookup_ecc_mem_write_mem_2_inv;
127 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> SRC_COLUMNS = {
128 ColumnAndShifts::ecc_add_mem_execution_clk, ColumnAndShifts::ecc_add_mem_dst_addr_2_,
129 ColumnAndShifts::ecc_add_mem_res_is_inf, ColumnAndShifts::ecc_add_mem_sel_should_exec,
130 ColumnAndShifts::ecc_add_mem_space_id, ColumnAndShifts::ecc_add_mem_sel_should_exec
131 };
132 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE> DST_COLUMNS = {
133 ColumnAndShifts::memory_clk, ColumnAndShifts::memory_address, ColumnAndShifts::memory_value,
134 ColumnAndShifts::memory_tag, ColumnAndShifts::memory_space_id, ColumnAndShifts::memory_rw
135 };
136};
137
139template <typename FF_>
141
142} // namespace bb::avm2
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME