+/TECS

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

P1n3appl3Remove headers5e97a3a

master
424 B19 linesraw
1/**
2 * 8-way 16-bit multiplexor:
3 * out = a if sel == 000
4 *       b if sel == 001
5 *       etc.
6 *       h if sel == 111
7 */
8
9CHIP Mux8Way16 {
10    IN a[16], b[16], c[16], d[16],
11       e[16], f[16], g[16], h[16],
12       sel[3];
13    OUT out[16];
14
15    PARTS:
16    Mux4Way16(a=a,b=b,c=c,d=d,sel=sel[0..1],out=w1);
17    Mux4Way16(a=e,b=f,c=g,d=h,sel=sel[0..1],out=w2);
18    Mux16(a=w1,b=w2,sel=sel[2],out=out);
19}