8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_ALU_REGISTER_TAG_VALUE";
22 static constexpr Column COUNTS = Column::lookup_alu_register_tag_value_counts;
23 static constexpr Column INVERSES = Column::lookup_alu_register_tag_value_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
25 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_mem_tag_reg_0_,
26 ColumnAndShifts::execution_register_1_, ColumnAndShifts::execution_mem_tag_reg_1_,
27 ColumnAndShifts::execution_register_2_, ColumnAndShifts::execution_mem_tag_reg_2_,
28 ColumnAndShifts::execution_subtrace_operation_id, ColumnAndShifts::execution_sel_opcode_error
30 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
31 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_ib, ColumnAndShifts::alu_ib_tag,
32 ColumnAndShifts::alu_ic, ColumnAndShifts::alu_ic_tag, ColumnAndShifts::alu_op_id, ColumnAndShifts::alu_sel_err
37template <
typename FF_>
43 static constexpr std::string_view
NAME =
"LOOKUP_ALU_TAG_MAX_BITS_VALUE";
48 static constexpr Column COUNTS = Column::lookup_alu_tag_max_bits_value_counts;
49 static constexpr Column INVERSES = Column::lookup_alu_tag_max_bits_value_inv;
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ia_tag,
51 ColumnAndShifts::alu_max_bits,
52 ColumnAndShifts::alu_max_value };
53 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
54 ColumnAndShifts::precomputed_clk,
55 ColumnAndShifts::precomputed_tag_max_bits,
56 ColumnAndShifts::precomputed_tag_max_value
61template <
typename FF_>
67 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_A_LO";
72 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_a_lo_counts;
73 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_a_lo_inv;
74 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_a_lo,
75 ColumnAndShifts::alu_a_lo_bits };
76 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
77 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
83template <
typename FF_>
90 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_A_HI";
95 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_a_hi_counts;
96 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_a_hi_inv;
97 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_a_hi,
98 ColumnAndShifts::alu_a_hi_bits };
99 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
100 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
106template <
typename FF_>
113 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_B_LO";
118 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_b_lo_counts;
119 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_b_lo_inv;
120 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_b_lo,
121 ColumnAndShifts::alu_constant_64 };
122 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
123 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
129template <
typename FF_>
136 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_B_HI";
141 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_b_hi_counts;
142 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_b_hi_inv;
143 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_b_hi,
144 ColumnAndShifts::alu_constant_64 };
145 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
146 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
152template <
typename FF_>
159 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_MUL_U128_C_HI";
164 static constexpr Column COUNTS = Column::lookup_alu_range_check_mul_u128_c_hi_counts;
165 static constexpr Column INVERSES = Column::lookup_alu_range_check_mul_u128_c_hi_inv;
166 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_c_hi,
167 ColumnAndShifts::alu_constant_64 };
168 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
169 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
174template <
typename FF_>
181 static constexpr std::string_view
NAME =
"LOOKUP_ALU_GT_DIV_REMAINDER";
186 static constexpr Column COUNTS = Column::lookup_alu_gt_div_remainder_counts;
188 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ib,
189 ColumnAndShifts::alu_helper1,
190 ColumnAndShifts::alu_sel_op_div };
191 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
192 ColumnAndShifts::gt_input_b,
193 ColumnAndShifts::gt_res };
197template <
typename FF_>
203 static constexpr std::string_view
NAME =
"LOOKUP_ALU_FF_GT";
210 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
211 ColumnAndShifts::alu_lt_ops_input_a, ColumnAndShifts::alu_lt_ops_input_b, ColumnAndShifts::alu_lt_ops_result_c
213 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
214 ColumnAndShifts::ff_gt_b,
215 ColumnAndShifts::ff_gt_result };
224 static constexpr std::string_view
NAME =
"LOOKUP_ALU_INT_GT";
231 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
232 ColumnAndShifts::alu_lt_ops_input_a, ColumnAndShifts::alu_lt_ops_input_b, ColumnAndShifts::alu_lt_ops_result_c
234 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
235 ColumnAndShifts::gt_input_b,
236 ColumnAndShifts::gt_res };
245 static constexpr std::string_view
NAME =
"LOOKUP_ALU_SHIFTS_TWO_POW";
250 static constexpr Column COUNTS = Column::lookup_alu_shifts_two_pow_counts;
252 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
253 ColumnAndShifts::alu_shift_lo_bits, ColumnAndShifts::alu_two_pow_shift_lo_bits
255 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
256 ColumnAndShifts::precomputed_clk, ColumnAndShifts::precomputed_power_of_2
261template <
typename FF_>
267 static constexpr std::string_view
NAME =
"LOOKUP_ALU_EXEC_DISPATCHING_CAST";
272 static constexpr Column COUNTS = Column::lookup_alu_exec_dispatching_cast_counts;
274 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
275 ColumnAndShifts::execution_register_0_, ColumnAndShifts::execution_rop_2_,
276 ColumnAndShifts::execution_subtrace_operation_id, ColumnAndShifts::execution_register_1_,
277 ColumnAndShifts::execution_mem_tag_reg_1_, ColumnAndShifts::execution_sel_opcode_error
279 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
280 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_op_id,
281 ColumnAndShifts::alu_ic, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::precomputed_zero
286template <
typename FF_>
292 static constexpr std::string_view
NAME =
"LOOKUP_ALU_EXEC_DISPATCHING_SET";
297 static constexpr Column COUNTS = Column::lookup_alu_exec_dispatching_set_counts;
299 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
300 ColumnAndShifts::execution_rop_2_,
301 ColumnAndShifts::execution_rop_1_,
302 ColumnAndShifts::execution_subtrace_operation_id,
303 ColumnAndShifts::execution_register_0_,
304 ColumnAndShifts::execution_mem_tag_reg_0_,
305 ColumnAndShifts::execution_sel_opcode_error
307 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
308 ColumnAndShifts::alu_ia, ColumnAndShifts::alu_ia_tag, ColumnAndShifts::alu_op_id,
309 ColumnAndShifts::alu_ic, ColumnAndShifts::alu_ic_tag, ColumnAndShifts::precomputed_zero
314template <
typename FF_>
320 static constexpr std::string_view
NAME =
"LOOKUP_ALU_LARGE_TRUNC_CANONICAL_DEC";
325 static constexpr Column COUNTS = Column::lookup_alu_large_trunc_canonical_dec_counts;
326 static constexpr Column INVERSES = Column::lookup_alu_large_trunc_canonical_dec_inv;
327 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ia,
328 ColumnAndShifts::alu_a_lo,
329 ColumnAndShifts::alu_a_hi };
330 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
331 ColumnAndShifts::ff_gt_a_lo,
332 ColumnAndShifts::ff_gt_a_hi };
336template <
typename FF_>
343 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_TRUNC_MID";
348 static constexpr Column COUNTS = Column::lookup_alu_range_check_trunc_mid_counts;
350 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_mid,
351 ColumnAndShifts::alu_mid_bits };
352 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
353 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
358template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr Column DST_SELECTOR
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::string_view NAME
static constexpr std::string_view RELATION_NAME
static constexpr Column SRC_SELECTOR
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr Column COUNTS
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column COUNTS
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::string_view NAME
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column SRC_SELECTOR
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view RELATION_NAME
static constexpr Column COUNTS
static constexpr std::string_view NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr std::string_view NAME
static constexpr Column DST_SELECTOR
static constexpr Column COUNTS
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr Column INVERSES
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr size_t LOOKUP_TUPLE_SIZE
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > SRC_COLUMNS
static constexpr Column DST_SELECTOR
static constexpr Column SRC_SELECTOR
static constexpr std::string_view RELATION_NAME
static constexpr Column INVERSES
static constexpr std::string_view NAME
static constexpr Column COUNTS
static constexpr std::array< ColumnAndShifts, LOOKUP_TUPLE_SIZE > DST_COLUMNS