Lines Matching refs:mux
165 def mux(self, muxs): member in Crossbar
169 for mux in muxs:
170 if self.number == 0 and mux.pin[0] != 0 and mux.pin[0] != 1:
172 if self.number == 1 and mux.pin[0] != 2 and mux.pin[0] != 3:
175 if mux.signal not in bit.signals:
177 if mux.signal in signal_muxs:
178 raise Exception("duplicate signal", mux)
179 if mux.pin < bit.pin_first or mux.pin > bit.pin_last:
180 raise Exception("can't mux signal to pin", mux, bit)
182 signal_muxs[mux.signal] = mux
194 mux = signal_muxs[signal]
195 pins.append(mux.pin)
199 for mux in signal_muxs.values():
200 self.portbanks[mux.pin[0]].apply_mux(mux.pin[1], mux)
220 def apply_mux(self, pin, mux): argument
221 if mux.pinmode == PinMode.ANALOG:
223 elif mux.pinmode == PinMode.DIGITAL_INPUT:
225 elif mux.pinmode == PinMode.PUSH_PULL_OUTPUT:
228 if mux.output_value:
230 elif not mux.output_value:
232 elif mux.output_value is None:
235 raise Exception("unsupported output value", mux.output_value)
236 elif mux.pinmode is None:
239 raise Exception("unsupported pinmode", mux.pinmode)
304 crossbar.mux(pinmux_table)