3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-25 16:42:35 +00:00
This commit is contained in:
Emil J. Tywoniak 2026-06-05 12:04:19 +02:00
parent 3d27e83d0f
commit 3424c00cd0
63 changed files with 2635 additions and 503 deletions

25
kernel/pmux.h Normal file
View file

@ -0,0 +1,25 @@
#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 == ID($mux) || mux->type == ID($pmux));
port_idx = 0;
b = mux->getPort(ID::B).to_sigbit_vector();
port_count = GetSize(sig_b) / s_width;
}
};
YOSYS_NAMESPACE_END
#endif