Error with CPGN code
Updated code section to repair the math issue: The issue was that all of the bitslice would add the following 1 + 1, 0 + 0,etc. depending on a set of switches. The problem is say we were adding 1 + 1. The result would be 10 in binary, but we can only grab 1 bit and send the other bit over. The old code wasn't sending the carry over correctly. Thanks to @DaveTweed I was able to find the error in my work and understand this code better. Below is the updated code and the CPGN module is added to see what CPGN is doing to C and how it is sending it over.
'''
bitslice dig0(
.A(A[0]),
.B(B[0]),
.Cin(C[0]),//Here
.S(S[0]),
.P(P[0]),
.G(G[0])
);
bitslice dig1(
    .A(A[1]),
    .B(B[1]),
    .Cin(C[1]),//Here
    .S(S[1]),
    .P(P[1]),
    .G(G[1])
);

bitslice dig2(
    .A(A[2]),
    .B(B[2]),
    .Cin(C[2]),//Here
    .S(S[2]),
    .P(P[2]),
    .G(G[2])
);

bitslice dig3(
    .A(A[3]),
    .B(B[3]),
    .Cin(C[3]),//Here
    .S(S[3]),
    .P(P[3]),
    .G(G[3])
);

CPGN adder(
    .G(G),
    .P(P),
    .Cin(Cin),
    .C(C)
    );

'''
CPGN MODULE
'''
module CPGN(
input [3:0] G,
input [3:0] P,
input Cin,
output [4:0] C
);
assign C[0] = Cin;
assign C[1] = (C[0] &amp; P[0]) | G[0];
assign C[2] = (C[1] &amp; P[1]) | G[1];
assign C[3] = (C[2] &amp; P[2]) | G[2];
assign C[4] = (C[3] &amp; P[3]) | G[3];

endmodule
'''