[SOLVED] not getting output even though no errors found when compiled

Status
Not open for further replies.
When I used to drive my old car, sometimes it wouldnt work properly. Can you fix it?

Without more details, and description, and maybe some code that doesnt work - we cant really help.
 

Code:
module Kogge_Stone32 (sum,cout,a,b,cin);
input [31:0] a,b;
output [31:0] sum;
input cin;
output cout;

// input stage
wire [31:0] g,p;
assign g = a & b;
assign p = a ^ b;

//LAC tree
wire [31:0] G;
//wire [15:0] c;

//level1 output
wire [31:0]l;
wire [31:1]m;
//level2 output
wire [31:1]q;
wire [31:3]r;
//level3 output
wire [31:3]s;
wire [31:7]t;
//level4 output
wire [31:7]u;
wire [31:15]v;
//level5 output
wire [32:15]w;


// assign x=g[0]|(p[0]&cin);
//level1
gn GC0 (.g2(g[0]), .p2(p[0]), .g1(cin), .G(l[0]));

gp BC1 (.g2(g[1]), .p2(p[1]), .g1(g[0]), .p1(p[0]), .G(l[1]), .P(m[1]) );
gp BC2 (.g2(g[2]), .p2(p[2]), .g1(g[1]), .p1(p[1]), .G(l[2]), .P(m[2]) );
gp BC3 (.g2(g[3]), .p2(p[3]), .g1(g[2]), .p1(p[2]), .G(l[3]), .P(m[3]) );
gp BC4 (.g2(g[4]), .p2(p[4]), .g1(g[3]), .p1(p[3]), .G(l[4]), .P(m[4]) );
gp BC5 (.g2(g[5]), .p2(p[5]), .g1(g[4]), .p1(p[4]), .G(l[5]), .P(m[5]) );
gp BC6 (.g2(g[6]), .p2(p[6]), .g1(g[5]), .p1(p[5]), .G(l[6]), .P(m[6]) );
gp BC7 (.g2(g[7]), .p2(p[7]), .g1(g[6]), .p1(p[6]), .G(l[7]), .P(m[7]) );
gp BC8 (.g2(g[8]), .p2(p[8]), .g1(g[7]), .p1(p[7]), .G(l[8]), .P(m[8]) );
gp BC9 (.g2(g[9]), .p2(p[9]), .g1(g[8]), .p1(p[8]), .G(l[9]), .P(m[9]) );
gp BC10 (.g2(g[10]), .p2(p[10]), .g1(g[9]), .p1(p[9]), .G(l[10]), .P(m[10]));
gp BC11 (.g2(g[11]), .p2(p[11]), .g1(g[10]), .p1(p[10]), .G(l[11]), .P(m[11]));
gp BC12 (.g2(g[12]), .p2(p[12]), .g1(g[11]), .p1(p[11]), .G(l[12]), .P(m[12]));
gp BC13 (.g2(g[13]), .p2(p[13]), .g1(g[12]), .p1(p[12]), .G(l[13]), .P(m[13]));
gp BC14 (.g2(g[14]), .p2(p[14]), .g1(g[13]), .p1(p[13]), .G(l[14]), .P(m[14]));
gp BC15 (.g2(g[15]), .p2(p[15]), .g1(g[14]), .p1(p[14]), .G(l[15]), .P(m[15]));
gp BC16 (.g2(g[16]), .p2(p[16]), .g1(g[15]), .p1(p[15]), .G(l[16]), .P(m[16]) );
gp BC17 (.g2(g[17]), .p2(p[17]), .g1(g[16]), .p1(p[16]), .G(l[17]), .P(m[17]) );
gp BC18 (.g2(g[18]), .p2(p[18]), .g1(g[17]), .p1(p[17]), .G(l[18]), .P(m[18]) );
gp BC19 (.g2(g[19]), .p2(p[19]), .g1(g[18]), .p1(p[18]), .G(l[19]), .P(m[19]) );
gp BC20 (.g2(g[20]), .p2(p[20]), .g1(g[19]), .p1(p[19]), .G(l[20]), .P(m[20]) );
gp BC21 (.g2(g[21]), .p2(p[21]), .g1(g[20]), .p1(p[20]), .G(l[21]), .P(m[21]) );
gp BC22 (.g2(g[22]), .p2(p[22]), .g1(g[21]), .p1(p[21]), .G(l[22]), .P(m[22]) );
gp BC23 (.g2(g[23]), .p2(p[23]), .g1(g[22]), .p1(p[22]), .G(l[23]), .P(m[23]) );
gp BC24 (.g2(g[24]), .p2(p[24]), .g1(g[23]), .p1(p[23]), .G(l[24]), .P(m[24]) );
gp BC25 (.g2(g[25]), .p2(p[25]), .g1(g[24]), .p1(p[24]), .G(l[25]), .P(m[25]));
gp BC26 (.g2(g[26]), .p2(p[26]), .g1(g[25]), .p1(p[25]), .G(l[26]), .P(m[26]));
gp BC27 (.g2(g[27]), .p2(p[27]), .g1(g[26]), .p1(p[26]), .G(l[27]), .P(m[27]));
gp BC28 (.g2(g[28]), .p2(p[28]), .g1(g[27]), .p1(p[27]), .G(l[28]), .P(m[28]));
gp BC29 (.g2(g[29]), .p2(p[29]), .g1(g[28]), .p1(p[28]), .G(l[29]), .P(m[29]));
gp BC30 (.g2(g[30]), .p2(p[30]), .g1(g[29]), .p1(p[29]), .G(l[30]), .P(m[30]));
gp BC31 (.g2(g[31]), .p2(p[31]), .g1(g[30]), .p1(p[30]), .G(l[31]), .P(m[31]) );


//level2
gn GC1 (.g2(l[1]), .p2(m[1]), .g1(cin), .G(q[1]));
gn GC2 (.g2(l[2]), .p2(m[2]), .g1(l[0]), .G(q[2]));
gp BC129 (.g2(l[3]), .p2(m[3]), .g1(l[1]), .p1(m[1]), .G(q[3]), .P(r[3]) );
gp BC130 (.g2(l[4]), .p2(m[4]), .g1(l[2]), .p1(m[2]), .G(q[4]), .P(r[4]) );
gp BC131 (.g2(l[5]), .p2(m[5]), .g1(l[3]), .p1(m[3]), .G(q[5]), .P(r[5]) );
gp BC132 (.g2(l[6]), .p2(m[6]), .g1(l[4]), .p1(m[4]), .G(q[6]), .P(r[6]) );
gp BC133 (.g2(l[7]), .p2(m[7]), .g1(l[5]), .p1(m[5]), .G(q[7]), .P(r[7]) );
gp BC134 (.g2(l[8]), .p2(m[8]), .g1(l[6]), .p1(m[6]), .G(q[8]), .P(r[8]) );
gp BC135 (.g2(l[9]), .p2(m[9]), .g1(l[7]), .p1(m[7]), .G(q[9]), .P(r[9]) );
gp BC136 (.g2(l[10]), .p2(m[10]), .g1(l[8]), .p1(m[8]), .G(q[10]), .P(r[10]));
gp BC137 (.g2(l[11]), .p2(m[11]), .g1(l[9]), .p1(m[9]), .G(q[11]), .P(r[11]));
gp BC138 (.g2(l[12]), .p2(m[12]), .g1(l[10]), .p1(m[10]), .G(q[12]), .P(r[12]));
gp BC139 (.g2(l[13]), .p2(m[13]), .g1(l[11]), .p1(m[11]), .G(q[13]), .P(r[13]));
gp BC140 (.g2(l[14]), .p2(m[14]), .g1(l[12]), .p1(m[12]), .G(q[14]), .P(r[14]));
gp BC141 (.g2(l[15]), .p2(m[15]), .g1(l[13]), .p1(m[13]), .G(q[15]), .P(r[15]));
gp BC142 (.g2(l[16]), .p2(m[16]), .g1(l[14]), .p1(m[14]), .G(q[16]), .P(r[16]) );
gp BC143 (.g2(l[17]), .p2(m[17]), .g1(l[15]), .p1(m[15]), .G(q[17]), .P(r[17]) );
gp BC144 (.g2(l[18]), .p2(m[18]), .g1(l[16]), .p1(m[16]), .G(q[18]), .P(r[18]) );
gp BC145 (.g2(l[19]), .p2(m[19]), .g1(l[17]), .p1(m[17]), .G(q[19]), .P(r[19]) );
gp BC146 (.g2(l[20]), .p2(m[20]), .g1(l[18]), .p1(m[18]), .G(q[20]), .P(r[20]) );
gp BC147 (.g2(l[21]), .p2(m[21]), .g1(l[19]), .p1(m[19]), .G(q[21]), .P(r[21]) );
gp BC148 (.g2(l[22]), .p2(m[22]), .g1(l[20]), .p1(m[20]), .G(q[22]), .P(r[22]) );
gp BC149 (.g2(l[23]), .p2(m[23]), .g1(l[21]), .p1(m[21]), .G(q[23]), .P(r[23]) );
gp BC150 (.g2(l[24]), .p2(m[24]), .g1(l[22]), .p1(m[22]), .G(q[24]), .P(r[24]) );
gp BC151 (.g2(l[25]), .p2(m[25]), .g1(l[23]), .p1(m[23]), .G(q[25]), .P(r[25]));
gp BC152 (.g2(l[26]), .p2(m[26]), .g1(l[24]), .p1(m[24]), .G(q[26]), .P(r[26]));
gp BC153 (.g2(l[27]), .p2(m[27]), .g1(l[25]), .p1(m[25]), .G(q[27]), .P(r[27]));
gp BC154 (.g2(l[28]), .p2(m[28]), .g1(l[26]), .p1(m[26]), .G(q[28]), .P(r[28]));
gp BC155 (.g2(l[29]), .p2(m[29]), .g1(l[27]), .p1(m[27]), .G(q[29]), .P(r[29]));
gp BC156 (.g2(l[30]), .p2(m[30]), .g1(l[28]), .p1(m[28]), .G(q[30]), .P(r[30]));
gp BC157 (.g2(l[31]), .p2(m[31]), .g1(l[29]), .p1(m[29]), .G(q[31]), .P(r[31]) );

//level3
gn GC3 (.g2(q[3]), .p2(r[3]), .g1(cin), .G(s[3]));
gn GC4 (.g2(q[4]), .p2(r[4]), .g1(l[0]), .G(s[4]));
gn GC5 (.g2(q[5]), .p2(r[5]), .g1(q[1]), .G(s[5]));
gn GC6 (.g2(q[6]), .p2(r[6]), .g1(q[2]), .G(s[6]));

gp BC254 (.g2(q[7]), .p2(r[7]), .g1(q[3]), .p1(r[3]), .G(s[7]), .P(t[7]) );
gp BC255 (.g2(q[8]), .p2(r[8]), .g1(q[4]), .p1(r[4]), .G(s[8]), .P(t[8]) );
gp BC256 (.g2(q[9]), .p2(r[9]), .g1(q[5]), .p1(r[5]), .G(s[9]), .P(t[9]) );
gp BC257 (.g2(q[10]), .p2(r[10]), .g1(q[6]), .p1(r[6]), .G(s[10]), .P(t[10]));
gp BC258 (.g2(q[11]), .p2(r[11]), .g1(q[7]), .p1(r[7]), .G(s[11]), .P(t[11]));
gp BC259 (.g2(q[12]), .p2(r[12]), .g1(q[8]), .p1(r[8]), .G(s[12]), .P(t[12]));
gp BC260 (.g2(q[13]), .p2(r[13]), .g1(q[9]), .p1(r[9]), .G(s[13]), .P(t[13]));
gp BC261 (.g2(q[14]), .p2(r[14]), .g1(q[10]), .p1(r[10]), .G(s[14]), .P(t[14]));
gp BC262 (.g2(q[15]), .p2(r[15]), .g1(q[11]), .p1(r[11]), .G(s[15]), .P(t[15]));
gp BC263 (.g2(q[16]), .p2(r[16]), .g1(q[12]), .p1(r[12]), .G(s[16]), .P(t[16]) );
gp BC264 (.g2(q[17]), .p2(r[17]), .g1(q[13]), .p1(r[13]), .G(s[17]), .P(t[17]) );
gp BC265 (.g2(q[18]), .p2(r[18]), .g1(q[14]), .p1(r[14]), .G(s[18]), .P(t[18]) );
gp BC266 (.g2(q[19]), .p2(r[19]), .g1(q[15]), .p1(r[15]), .G(s[19]), .P(t[19]) );
gp BC267 (.g2(q[20]), .p2(r[20]), .g1(q[16]), .p1(r[16]), .G(s[20]), .P(t[20]) );
gp BC268 (.g2(q[21]), .p2(r[21]), .g1(q[17]), .p1(r[17]), .G(s[21]), .P(t[21]) );
gp BC269 (.g2(q[22]), .p2(r[22]), .g1(q[18]), .p1(r[18]), .G(s[22]), .P(t[22]) );
gp BC270 (.g2(q[23]), .p2(r[23]), .g1(q[19]), .p1(r[19]), .G(s[23]), .P(t[23]) );
gp BC271 (.g2(q[24]), .p2(r[24]), .g1(q[20]), .p1(r[20]), .G(s[24]), .P(t[24]) );
gp BC272 (.g2(q[25]), .p2(r[25]), .g1(q[21]), .p1(r[21]), .G(s[25]), .P(t[25]));
gp BC273 (.g2(q[26]), .p2(r[26]), .g1(q[22]), .p1(r[22]), .G(s[26]), .P(t[26]));
gp BC274 (.g2(q[27]), .p2(r[27]), .g1(q[23]), .p1(r[23]), .G(s[27]), .P(t[27]));
gp BC275 (.g2(q[28]), .p2(r[28]), .g1(q[24]), .p1(r[24]), .G(s[28]), .P(t[28]));
gp BC276 (.g2(q[29]), .p2(r[29]), .g1(q[25]), .p1(r[25]), .G(s[29]), .P(t[29]));
gp BC277 (.g2(q[30]), .p2(r[30]), .g1(q[26]), .p1(r[26]), .G(s[30]), .P(t[30]));
gp BC278 (.g2(q[31]), .p2(r[31]), .g1(q[27]), .p1(r[27]), .G(s[31]), .P(t[31]) );


//level4
gn GC7 (.g2(s[7]), .p2(t[7]), .g1(cin), .G(u[7]));
gn GC8 (.g2(s[8]), .p2(t[8]), .g1(l[0]), .G(u[8]));
gn GC9 (.g2(s[9]), .p2(t[9]), .g1(q[1]), .G(u[9]));
gn GC10 (.g2(s[10]), .p2(t[10]), .g1(q[2]), .G(u[10]));
gn GC11 (.g2(s[11]), .p2(t[11]), .g1(s[3]), .G(u[11]));
gn GC12 (.g2(s[12]), .p2(t[12]), .g1(s[4]), .G(u[12]));
gn GC13 (.g2(s[13]), .p2(t[13]), .g1(s[5]), .G(u[13]));
gn GC14 (.g2(s[14]), .p2(t[14]), .g1(s[6]), .G(u[14]));
gp BC375 (.g2(s[15]), .p2(t[15]),.g1(s[7]),.p1(t[7]),.G(u[15]),.P(v[15]));
gp BC376 (.g2(s[ 16]), .p2(t[16]),.g1(s[8]),.p1(t[8]),.G(u[16]),.P(v[16]));
gp BC377 (.g2(s[ 17]), .p2(t[17]), .g1(s[9]), .p1(t[9]), .G(u[17]), .P(v[17]));
gp BC378 (.g2(s[ 18]), .p2(t[18]), .g1(s[10]), .p1(t[10]), .G(u[18]), .P(v[18]));
gp BC379 (.g2(s[ 19]), .p2(t[19]), .g1(s[11]), .p1(t[11]), .G(u[19]), .P(v[19]));
gp BC380 (.g2(s[ 20]), .p2(t[20]), .g1(s[12]), .p1(t[12]), .G(u[20]), .P(v[20]));
gp BC381 (.g2(s[ 21]), .p2(t[21]), .g1(s[13]), .p1(t[13]), .G(u[21]), .P(v[21]));
gp BC382 (.g2(s[ 22]), .p2(t[22]), .g1(s[14]), .p1(t[14]), .G(u[22]), .P(v[22]));
gp BC383 (.g2(s[ 23]), .p2(t[23]), .g1(s[15]), .p1(t[15]), .G(u[23]), .P(v[23]));
gp BC384 (.g2(s[ 24]), .p2(t[24]), .g1(s[16]), .p1(t[16]), .G(u[24]), .P(v[24]));
gp BC385 (.g2(s[ 25]), .p2(t[25]), .g1(s[17]), .p1(t[17]), .G(u[25]), .P(v[25]));
gp BC386 (.g2(s[ 26]), .p2(t[26]), .g1(s[18]), .p1(t[18]), .G(u[26]), .P(v[26]));
gp BC387 (.g2(s[ 27]), .p2(t[27]), .g1(s[19]), .p1(t[19]), .G(u[27]), .P(v[27]));
gp BC388 (.g2(s[ 28]), .p2(t[28]), .g1(s[20]), .p1(t[20]), .G(u[28]), .P(v[28]));
gp BC389 (.g2(s[ 29]), .p2(t[29]), .g1(s[21]), .p1(t[21]), .G(u[29]), .P(v[29]));
gp BC390 (.g2(s[ 30]), .p2(t[30]), .g1(s[22]), .p1(t[22]), .G(u[30]), .P(v[30]));
gp BC391 (.g2(s[ 31]), .p2(t[31]), .g1(s[23]), .p1(t[23]), .G(u[31]), .P(v[31]));
//level5
gn GC15 (.g2(u[15]), .p2(v[15]), .g1(cin), .G(w[15]));
gn GC16 (.g2(u[16]), .p2(v[16]), .g1(l[0]), .G(w[16]));
gn GC17 (.g2(u[17]), .p2(v[17]), .g1(q[1]), .G(w[17]));
gn GC18 (.g2(u[18]), .p2(v[18]), .g1(q[2]), .G(w[18]));
gn GC19 (.g2(u[19]), .p2(v[19]), .g1(s[3]), .G(w[19]));
gn GC20 (.g2(u[20]), .p2(v[20]), .g1(s[4]), .G(w[20]));
gn GC21 (.g2(u[21]), .p2(v[21]), .g1(s[5]), .G(w[21]));
gn GC22 (.g2(u[22]), .p2(v[22]), .g1(s[6]), .G(w[22]));
gn GC23 (.g2(u[23]), .p2(v[23]), .g1(u[7]), .G(w[23]));
gn GC24 (.g2(u[24]), .p2(v[24]), .g1(u[8]), .G(w[24]));
gn GC25 (.g2(u[25]), .p2(v[25]), .g1(u[9]), .G(w[25]));
gn GC26 (.g2(u[26]), .p2(v[26]), .g1(u[10]), .G(w[26]));
gn GC27 (.g2(u[27]), .p2(v[27]), .g1(u[11]), .G(w[27]));
gn GC28 (.g2(u[28]), .p2(v[28]), .g1(u[12]), .G(w[28]));
gn GC29 (.g2(u[29]), .p2(v[29]), .g1(u[13]), .G(w[29]));
gn GC30 (.g2(u[30]), .p2(v[30]), .g1(u[14]), .G(w[30]));
gp BC486 (.g2(u[31]), .p2(v[31]), .g1(u[15]), .p1(v[15]), .G(w[31]), .P(w[32]));

// output stage
assign sum[0] = p[0] ^ cin;
assign sum[31:1] = (p[31:1]) ^ G;
assign G = {w[31],w[30:15],u[14:7],s[6:3],q[2:1],l[0]};
assign cout = w[32];

endmodule

module gn(g2,p2,g1,G);

input g1,g2,p2;
output G ;

assign G = g2 | (g1&p2);

endmodule

module gp(g2,p2,g1,p1,G,P);

input g1,p1,g2,p2;
output G,P;

assign G = ( g2 | (g1&p2));
assign P = p1&p2;

endmodule
 
Last edited by a moderator:

That is very poor etiquette - deleting your code after you've fixed it - what if someone else had the same problem, now they will not see the fix.

You code was very bad code. It was a mess with no indentation and no comments. I hope your code gets better in the future.
 

Code restored. From the forum rules:


If the code is deleted again you will be banned.

Keith
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…