// block to calculate XY + 8*Z, where X is a 6-bit unsigned #, Y is a 4-bit unsigned # // and Z is a 5-bit unsigned # module xyz(x, y, z, s); input [5:0] x; input [3:0] y; input [4:0] z; output [10:0] s; // internal nodes within the circuit wire [9:0] p; wire t1, t2, t3, t4, t5, t6; assign s[0] = p[0]; assign s[1] = p[1]; assign s[2] = p[2]; // structure of the circuit mult6by4 mult_instance(x, y, p); half_adder ha1(p[3], z[0], s[3], t1); full_adder fa1(p[4], z[1], t1, s[4], t2); full_adder fa2(p[5], z[2], t2, s[5], t3); full_adder fa3(p[6], z[3], t3, s[6], t4); full_adder fa4(p[7], z[4], t4, s[7], t5); half_adder ha2(p[8], t5, s[8], t6); half_adder ha3(p[9], t6, s[9], s[10]); endmodule