+/TECS

git clone https://git.julia.blue/+/TECS

P1n3appl3Remove headers5e97a3a

v1.0
357 B17 linesraw
1/**
2 * 4-way 16-bit multiplexor:
3 * out = a if sel == 00
4 *       b if sel == 01
5 *       c if sel == 10
6 *       d if sel == 11
7 */
8
9CHIP Mux4Way16 {
10    IN a[16], b[16], c[16], d[16], sel[2];
11    OUT out[16];
12
13    PARTS:
14    Mux16(a=a,b=b,sel=sel[0],out=w1);
15    Mux16(a=c,b=d,sel=sel[0],out=w2);
16    Mux16(a=w1,b=w2,sel=sel[1],out=out);
17}