gepo
Newbie level 6
loop exceeded maximum iteration limit
Hi, all,
I met a weird problem. I used "for" in my function "mmreduce" and when I compiled it using DC_SHELL, it gives me such a error message:
"loop exceeded maximum iteration limit".
It is pretty weird since I only iterate 8 times.
My purpose is to generate a EQN format file, not to generate a structural file.
Do you guys know some switch that can increase the iteration limit?
Thanks a lot.
my entire code:
module mmnew(a,b,n,result);
parameter width=8;
input [width-1:0] a; //multiplicand
input [width-1:0] b; //multiplier
input [width:0] n; //irreducible polynomial
output [width-1:0] result;
reg [width-1:0] result;
reg [width-1:0] tempa;
reg [width-1:0] tempb;
reg [width-1:0] temp_result;
function [width-1:0] mmreduce;//(p1,p2,irre); //montgomery reduction
input [width-1:0] p1;
input [width-1:0] p2;
input [width:0] irre;
reg [width-1:0] p3;
reg[2:0] i;
begin
p3=8'b0;
for (i=0;i<8;i=i+1)
begin
p3 = p3 ^ (p1 * p2);
p3 = p3 ^ (p3[0]* irre);
p3 = p3 >> 1 ;
end
mmreduce=p3;
end
endfunction
always @(a or b or n)
begin
tempa=mmreduce(a,a,n);//blocking assignment
tempb=mmreduce(a,a,n);
temp_result=mmreduce(tempa,tempb,n);
result=mmreduce(temp_result,temp_result,n);
end
endmodule
Hi, all,
I met a weird problem. I used "for" in my function "mmreduce" and when I compiled it using DC_SHELL, it gives me such a error message:
"loop exceeded maximum iteration limit".
It is pretty weird since I only iterate 8 times.
My purpose is to generate a EQN format file, not to generate a structural file.
Do you guys know some switch that can increase the iteration limit?
Thanks a lot.
my entire code:
module mmnew(a,b,n,result);
parameter width=8;
input [width-1:0] a; //multiplicand
input [width-1:0] b; //multiplier
input [width:0] n; //irreducible polynomial
output [width-1:0] result;
reg [width-1:0] result;
reg [width-1:0] tempa;
reg [width-1:0] tempb;
reg [width-1:0] temp_result;
function [width-1:0] mmreduce;//(p1,p2,irre); //montgomery reduction
input [width-1:0] p1;
input [width-1:0] p2;
input [width:0] irre;
reg [width-1:0] p3;
reg[2:0] i;
begin
p3=8'b0;
for (i=0;i<8;i=i+1)
begin
p3 = p3 ^ (p1 * p2);
p3 = p3 ^ (p3[0]* irre);
p3 = p3 >> 1 ;
end
mmreduce=p3;
end
endfunction
always @(a or b or n)
begin
tempa=mmreduce(a,a,n);//blocking assignment
tempb=mmreduce(a,a,n);
temp_result=mmreduce(tempa,tempb,n);
result=mmreduce(temp_result,temp_result,n);
end
endmodule