# ADDER3B, compressed version of ADDER3 # Input: a2, a1, a0, b2, b1, b0, cin # Output: y2, y1, y0, cout GATE("a<2:0>", type="inp") GATE("b<2:0>", type="inp") GATE("cin", type="inp") GATE("y<2:0>", type="out") GATE("cout", type="out") GATE("g<1:3,7:9>", type="xor2") GATE("g<4:6>", type="mux1") WIRE("a2", "g3/x2; g6/x0") WIRE("a1", "g2/x2") WIRE("a0", "g1/x2; g4/x0") WIRE("b2", "g3/x1") WIRE("b1", "g2/x1; g5/x0") WIRE("b0", "g4/x1; g9/x2") WIRE("cin", "g1/x1") WIRE("g1/y", "g4/s1; g9/x1") WIRE("g2/y", "g5/s1; g8/x2") WIRE("g3/y", "g6/s1; g7/x2") WIRE("g4/y", "g5/x1; g8/x1") WIRE("g5/y", "g6/x1; g7/x1") WIRE("g6/y", "cout") WIRE("g<7:9>/y", "y<2:0>")