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