Implement multi-way gates: Or8Way, Mux4Way16, Mux8Way16, DMux4Way, DMux8Way

This commit is contained in:
2025-08-28 13:19:40 +02:00
parent 93f730d0ce
commit 88b4cc4ad9
5 changed files with 29 additions and 10 deletions

View File

@@ -14,5 +14,8 @@ CHIP DMux4Way {
OUT a, b, c, d;
PARTS:
//// Replace this comment with your code.
}
// Use two levels of DMux: first level splits by sel[1], second level splits by sel[0]
DMux(in=in, sel=sel[1], a=dmuxAB, b=dmuxCD);
DMux(in=dmuxAB, sel=sel[0], a=a, b=b);
DMux(in=dmuxCD, sel=sel[0], a=c, b=d);
}