manchal
Newbie level 6
- Joined
- Feb 11, 2013
- Messages
- 14
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,483
i m designing a multiplier with 2 d bypassing.This requires module to be called on conditional basis of input.Module "muxsum" and "fa" are being called depending on the input 'b'.As the input is given after simulation,so the condition on b is not acceptable."b" is input.Please help and guide.
generate for(ii=0;ii<n;ii=ii+1)
begin :abcc
if(ii==0)
begin
if(b[1]==1) begin //ERROR b IS NOT A CONSTANT
for(j=0;j<4;j=j+1)
begin :abcc1
fa(p[ii][j+1],p[ii+1][j],0,s[ii][j],c[ii][j]);
muxsum (s[ii][j],p[ii][j+1],b[ii+1],sm[ii][j]);
muxsum (c[ii][j],0,b[ii+1],cm[ii][j]);
end
end //end of if
else begin
for(j=0;j<n;j=j+1)
begin: abcc2
muxsum (p[ii+1][j],s[ii][j],b[ii+1],sm[ii][j]);
muxsum (c[ii][j],0,b[ii+1],cm[ii][j]);
end
end
generate for(ii=0;ii<n;ii=ii+1)
begin :abcc
if(ii==0)
begin
if(b[1]==1) begin //ERROR b IS NOT A CONSTANT
for(j=0;j<4;j=j+1)
begin :abcc1
fa(p[ii][j+1],p[ii+1][j],0,s[ii][j],c[ii][j]);
muxsum (s[ii][j],p[ii][j+1],b[ii+1],sm[ii][j]);
muxsum (c[ii][j],0,b[ii+1],cm[ii][j]);
end
end //end of if
else begin
for(j=0;j<n;j=j+1)
begin: abcc2
muxsum (p[ii+1][j],s[ii][j],b[ii+1],sm[ii][j]);
muxsum (c[ii][j],0,b[ii+1],cm[ii][j]);
end
end
Last edited: