- * Models a multiplexer. Takes an arbitrary amount of input {@link WireArray}s, one of which,
- * as determined by select, is put through to the output.
+ * Models a multiplexer. Takes an arbitrary amount of input {@link WireArray}s, one of which, as determined by select, is put through to the
+ * output.
+ *
* @author Fabian Stemmler
*
*/
public class Mux extends BasicComponent
{
private WireArray select;
* @author Fabian Stemmler
*
*/
public class Mux extends BasicComponent
{
private WireArray select;
- * @param out Must be of uniform length with all inputs.
- * @param select Indexes the input array which is to be mapped to the output. Must have enough bits
- * to index all inputs.
+ *
+ * @param out Must be of uniform length with all inputs.
+ * @param select Indexes the input array which is to be mapped to the output. Must have enough bits to index all inputs.
* @param inputs One of these inputs is mapped to the output, depending on the select bits
*/
public Mux(int processTime, WireArray out, WireArray select, WireArray... inputs)
{
super(processTime);
outputSize = out.length;
* @param inputs One of these inputs is mapped to the output, depending on the select bits
*/
public Mux(int processTime, WireArray out, WireArray select, WireArray... inputs)
{
super(processTime);
outputSize = out.length;
throw new IllegalArgumentException("All MUX wire arrays must be of uniform length!");
inputs[i].addObserver(this);
}
throw new IllegalArgumentException("All MUX wire arrays must be of uniform length!");
inputs[i].addObserver(this);
}
- if(this.inputs.length > maxInputs)
- throw new IllegalArgumentException("There are more inputs ("
- + this.inputs.length + ") to the MUX than supported by "
+ if (this.inputs.length > maxInputs)
+ throw new IllegalArgumentException("There are more inputs (" + this.inputs.length + ") to the MUX than supported by "