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:
@@ -20,5 +20,8 @@ CHIP Mux8Way16 {
|
||||
OUT out[16];
|
||||
|
||||
PARTS:
|
||||
//// Replace this comment with your code.
|
||||
// Use two Mux4Way16 gates and one Mux16 to select from 8 inputs
|
||||
Mux4Way16(a=a, b=b, c=c, d=d, sel=sel[0..1], out=mux4wayABCD);
|
||||
Mux4Way16(a=e, b=f, c=g, d=h, sel=sel[0..1], out=mux4wayEFGH);
|
||||
Mux16(a=mux4wayABCD, b=mux4wayEFGH, sel=sel[2], out=out);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user