yosys/kernel/pmux.h

26 lines
506 B
C
Raw Normal View History

2026-06-05 12:04:19 +02:00
#ifndef PMUX_H
#define PMUX_H
#include "kernel/yosys_common.h"
#include "kernel/rtlil.h"
YOSYS_NAMESPACE_BEGIN
struct PmuxBPortIterator {
Cell* cell;
std::vector<SigBit> b;
int port_idx;
int port_count;
PmuxBPortIterator(Cell* mux) : cell(mux) {
2026-06-12 00:18:53 +02:00
log_assert(mux->type == TW($mux) || mux->type == TW($pmux));
2026-06-05 12:04:19 +02:00
port_idx = 0;
2026-06-10 19:22:53 +02:00
b = mux->getPort(TW::B).to_sigbit_vector();
2026-06-05 12:04:19 +02:00
port_count = GetSize(sig_b) / s_width;
}
};
YOSYS_NAMESPACE_END
#endif