mirror of
https://github.com/soconnor0919/eceg431.git
synced 2025-12-11 22:54:43 -05:00
Implement multi-way gates: Or8Way, Mux4Way16, Mux8Way16, DMux4Way, DMux8Way
This commit is contained in:
@@ -12,7 +12,10 @@
|
||||
CHIP Mux4Way16 {
|
||||
IN a[16], b[16], c[16], d[16], sel[2];
|
||||
OUT out[16];
|
||||
|
||||
|
||||
PARTS:
|
||||
//// Replace this comment with your code.
|
||||
}
|
||||
// Use two levels of Mux16: first level selects between pairs, second level selects final output
|
||||
Mux16(a=a, b=b, sel=sel[0], out=muxAB);
|
||||
Mux16(a=c, b=d, sel=sel[0], out=muxCD);
|
||||
Mux16(a=muxAB, b=muxCD, sel=sel[1], out=out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user