1 module half_add(a, b, s, c);
6 endmodule /* half_add */
8 module add(a, b, ci, o, co);
12 half_add h1(a, b, x, c1);
13 half_add h2(x, ci, o, c2);
17 module main(a, b, ci, out);
25 add a1(a[0], b[0], ci, out[0], c[0]);
26 add a2(a[1], b[1], c[0], out[1], c[1]);
27 add a3(a[2], b[2], c[1], out[2], c[2]);
28 add a4(a[3], b[3], c[2], out[3], c[3]);
29 add a5(a[4], b[4], c[3], out[4], c[4]);
30 add a6(a[5], b[5], c[4], out[5], c[5]);
31 add a7(a[6], b[6], c[5], out[6], c[6]);
32 add a8(a[7], b[7], c[6], out[7], out[8]);