arishsu
Member level 3
- Joined
- Sep 10, 2013
- Messages
- 66
- Helped
- 6
- Reputation
- 12
- Reaction score
- 6
- Trophy points
- 8
- Location
- India
- Activity points
- 422
Hi,
I tried to simulate a code for a timer and I got an error when I tried to synthesize on ISE. The error is as below.
"ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."
"ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."
my code is pasted below.
module timer_unit(LDTIM0,LDTIM1,LDTIM2,STRTIM0,STRTIM1,STRTIM2,clk,data,TIM0,TIM1,TIM2
);
input [15:0]data;
input clk,LDTIM0,LDTIM1,LDTIM2,STRTIM0,STRTIM1,STRTIM2;
output TIM0,TIM1,TIM2;
timer T0(LDTMR0,STRTIM0,clk,TIM0,data);
timer T1(LDTMR1,STRTIM1,clk,TIM1,data);
timer T2(LDTMR2,STRTIM2,clk,TIM2,data);
endmodule
module timer(LDTIM,STRTIM,clk,TIM,data);
input LDTIM,STRTIM,clk;
input [15:0] data;
output reg TIM;
reg [15:0]tmr_count;
initial tmr_count=16'b0;
always@(posedge clk)
begin
if (!LDTIM)
tmr_count=16'b0;
else
tmr_count=data;
/* end
always@(posedge clk)
begin
if (STRTIM)
begin*/
while((tmr_count>0)&&STRTIM)
begin
tmr_count=tmr_count-1;
end
while(tmr_count<=0)
begin
TIM=1;
end
end
//end
endmodule
I tried to simulate a code for a timer and I got an error when I tried to synthesize on ISE. The error is as below.
"ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."
"ERROR:Xst:1312 - Loop has iterated 64 times. Use "set -loop_iteration_limit XX" to iterate more."
my code is pasted below.
module timer_unit(LDTIM0,LDTIM1,LDTIM2,STRTIM0,STRTIM1,STRTIM2,clk,data,TIM0,TIM1,TIM2
);
input [15:0]data;
input clk,LDTIM0,LDTIM1,LDTIM2,STRTIM0,STRTIM1,STRTIM2;
output TIM0,TIM1,TIM2;
timer T0(LDTMR0,STRTIM0,clk,TIM0,data);
timer T1(LDTMR1,STRTIM1,clk,TIM1,data);
timer T2(LDTMR2,STRTIM2,clk,TIM2,data);
endmodule
module timer(LDTIM,STRTIM,clk,TIM,data);
input LDTIM,STRTIM,clk;
input [15:0] data;
output reg TIM;
reg [15:0]tmr_count;
initial tmr_count=16'b0;
always@(posedge clk)
begin
if (!LDTIM)
tmr_count=16'b0;
else
tmr_count=data;
/* end
always@(posedge clk)
begin
if (STRTIM)
begin*/
while((tmr_count>0)&&STRTIM)
begin
tmr_count=tmr_count-1;
end
while(tmr_count<=0)
begin
TIM=1;
end
end
//end
endmodule