31 typedef std::vector<RTLIL::State>
bits_t;
38 std::vector<RTLIL::State> pattern(
width);
39 for (
int i = 0; i <
width; i++) {
41 pattern[i] = sig[i].data;
53 std::vector<RTLIL::State> pattern(width);
54 for (
int i = 0; i <
width; i++)
73 for (
int i = 0; i <
width; i++)
92 if (
match(it, bits)) {
93 for (
int i = 0; i <
width; i++)
106 std::vector<bits_t> pattern_list;
107 for (
auto &it :
pool)
109 pattern_list.push_back(it);
110 for (
auto pattern : pattern_list) {
112 for (
int i = 0; i <
width; i++) {
115 bits_t new_pattern = pattern;
117 pool.insert(new_pattern);
#define YOSYS_NAMESPACE_END
RTLIL::Const as_const() const
BitPatternPool(RTLIL::SigSpec sig)
std::vector< RTLIL::State > bits_t
#define log_assert(_assert_expr_)
bool match(bits_t a, bits_t b)
#define YOSYS_NAMESPACE_BEGIN
bool has_all(RTLIL::SigSpec sig)
BitPatternPool(int width)
std::vector< RTLIL::State > bits
bits_t sig2bits(RTLIL::SigSpec sig)
bool take(RTLIL::SigSpec sig)
bool has_any(RTLIL::SigSpec sig)