8#include "../columns.hpp"
17 static constexpr std::string_view
NAME =
"LOOKUP_ALU_TAG_MAX_BITS_VALUE";
22 static constexpr Column COUNTS = Column::lookup_alu_tag_max_bits_value_counts;
23 static constexpr Column INVERSES = Column::lookup_alu_tag_max_bits_value_inv;
24 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ia_tag,
25 ColumnAndShifts::alu_max_bits,
26 ColumnAndShifts::alu_max_value };
27 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
28 ColumnAndShifts::precomputed_clk,
29 ColumnAndShifts::precomputed_tag_max_bits,
30 ColumnAndShifts::precomputed_tag_max_value
35template <
typename FF_>
41 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_A_LO";
46 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_a_lo_counts;
47 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_a_lo_inv;
48 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_a_lo,
49 ColumnAndShifts::alu_a_lo_bits };
50 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
51 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
57template <
typename FF_>
64 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_A_HI";
69 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_a_hi_counts;
70 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_a_hi_inv;
71 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_a_hi,
72 ColumnAndShifts::alu_a_hi_bits };
73 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
74 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
80template <
typename FF_>
87 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_B_LO";
92 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_b_lo_counts;
93 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_b_lo_inv;
94 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_b_lo,
95 ColumnAndShifts::alu_constant_64 };
96 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
97 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
103template <
typename FF_>
110 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_DECOMPOSITION_B_HI";
115 static constexpr Column COUNTS = Column::lookup_alu_range_check_decomposition_b_hi_counts;
116 static constexpr Column INVERSES = Column::lookup_alu_range_check_decomposition_b_hi_inv;
117 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_b_hi,
118 ColumnAndShifts::alu_constant_64 };
119 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
120 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
126template <
typename FF_>
133 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_MUL_U128_C_HI";
138 static constexpr Column COUNTS = Column::lookup_alu_range_check_mul_u128_c_hi_counts;
139 static constexpr Column INVERSES = Column::lookup_alu_range_check_mul_u128_c_hi_inv;
140 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_c_hi,
141 ColumnAndShifts::alu_constant_64 };
142 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
143 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
148template <
typename FF_>
155 static constexpr std::string_view
NAME =
"LOOKUP_ALU_GT_DIV_REMAINDER";
160 static constexpr Column COUNTS = Column::lookup_alu_gt_div_remainder_counts;
162 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ib,
163 ColumnAndShifts::alu_helper1,
164 ColumnAndShifts::alu_sel_op_div };
165 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
166 ColumnAndShifts::gt_input_b,
167 ColumnAndShifts::gt_res };
171template <
typename FF_>
177 static constexpr std::string_view
NAME =
"LOOKUP_ALU_FF_GT";
184 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
185 ColumnAndShifts::alu_lt_ops_input_a, ColumnAndShifts::alu_lt_ops_input_b, ColumnAndShifts::alu_lt_ops_result_c
187 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
188 ColumnAndShifts::ff_gt_b,
189 ColumnAndShifts::ff_gt_result };
198 static constexpr std::string_view
NAME =
"LOOKUP_ALU_INT_GT";
205 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
206 ColumnAndShifts::alu_lt_ops_input_a, ColumnAndShifts::alu_lt_ops_input_b, ColumnAndShifts::alu_lt_ops_result_c
208 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::gt_input_a,
209 ColumnAndShifts::gt_input_b,
210 ColumnAndShifts::gt_res };
219 static constexpr std::string_view
NAME =
"LOOKUP_ALU_SHIFTS_TWO_POW";
224 static constexpr Column COUNTS = Column::lookup_alu_shifts_two_pow_counts;
226 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = {
227 ColumnAndShifts::alu_shift_lo_bits, ColumnAndShifts::alu_two_pow_shift_lo_bits
229 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
230 ColumnAndShifts::precomputed_clk, ColumnAndShifts::precomputed_power_of_2
235template <
typename FF_>
241 static constexpr std::string_view
NAME =
"LOOKUP_ALU_LARGE_TRUNC_CANONICAL_DEC";
246 static constexpr Column COUNTS = Column::lookup_alu_large_trunc_canonical_dec_counts;
247 static constexpr Column INVERSES = Column::lookup_alu_large_trunc_canonical_dec_inv;
248 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_ia,
249 ColumnAndShifts::alu_a_lo,
250 ColumnAndShifts::alu_a_hi };
251 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = { ColumnAndShifts::ff_gt_a,
252 ColumnAndShifts::ff_gt_a_lo,
253 ColumnAndShifts::ff_gt_a_hi };
257template <
typename FF_>
264 static constexpr std::string_view
NAME =
"LOOKUP_ALU_RANGE_CHECK_TRUNC_MID";
269 static constexpr Column COUNTS = Column::lookup_alu_range_check_trunc_mid_counts;
271 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
SRC_COLUMNS = { ColumnAndShifts::alu_mid,
272 ColumnAndShifts::alu_mid_bits };
273 static constexpr std::array<ColumnAndShifts, LOOKUP_TUPLE_SIZE>
DST_COLUMNS = {
274 ColumnAndShifts::range_check_value, ColumnAndShifts::range_check_rng_chk_bits
279template <
typename FF_>
This file contains the template for the generic lookup that can be specialized to enforce various loo...
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::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