3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-08-10 16:11:12 +00:00
yosys/kernel/pmux.h
Emil J. Tywoniak 77ad54139e WIP
2026-07-20 12:27:17 +02:00

25 lines
506 B
C++

#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) {
log_assert(mux->type == TW($mux) || mux->type == TW($pmux));
port_idx = 0;
b = mux->getPort(TW::B).to_sigbit_vector();
port_count = GetSize(sig_b) / s_width;
}
};
YOSYS_NAMESPACE_END
#endif