project01: Comments/cleanup

This commit is contained in:
2025-09-03 22:10:34 -04:00
parent dd31b8f1dc
commit 934f1ad2f5
11 changed files with 54 additions and 33 deletions

View File

@@ -20,7 +20,9 @@ CHIP Mux8Way16 {
OUT out[16];
PARTS:
Mux4Way16(a=a, b=b, c=c, d=d, sel=sel[0..1], out=tmp1);
Mux4Way16(a=e, b=f, c=g, d=h, sel=sel[0..1], out=tmp2);
Mux16(a=tmp1, b=tmp2, sel=sel[2], out=out);
// sel[0..1] pick from each group
Mux4Way16(a=a, b=b, c=c, d=d, sel=sel[0..1], out=lowGroup); // group abcd
Mux4Way16(a=e, b=f, c=g, d=h, sel=sel[0..1], out=highGroup); // group efgh
// sel[2] pick which group
Mux16(a=lowGroup, b=highGroup, sel=sel[2], out=out);
}