No se puede resolver el controlador de varias constantes
Error (10028): No se pueden resolver varios controladores constantes para la red "NumOfPixCF [31]" en Pixel_Tracking.v (30)
Error (10028): No se pueden resolver varios controladores constantes para la red "NumOfPixCF [30]" en Pixel_Tracking.v (30)
Error (10028): No se pueden resolver varios controladores constantes para la red "NumOfPixCF [29]" en Pixel_Tracking.v (30)
Y así sucesivamente.
¿Alguien sabe como resolver esto? Soy un aficionado en la codificación de Verilog.
module Pixel_Tracking(
input[15:0] r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,
input start,
input clk,rst,
output reg[5:0] Object_Shift=0
);
reg[15:0] R1,R2,R3,R4,R5,R6,R7,R8,R9,R10;
integer i=0;
integer NumOfPixCF=0,NumOfPixNF=0;
integer reposition = 0;
reg[15:0] AreaCF = 0,AreaNF = 0;
always@(posedge clk )
begin
if(rst)
begin
reposition <= 0;
Object_Shift <= 0;
end
else
begin
for(i=0;i<=15;i=i+1)
begin
NumOfPixCF = NumOfPixCF + R1[i] + R2[i] + R3[i] + R4[i] + R5[i] + R6[i] + R7[i] + R8[i] + R9[i] + R10[i];
NumOfPixNF = NumOfPixNF + r1[i] + r2[i] + r3[i] + r4[i] + r5[i] + r6[i] + r7[i] + r8[i] + r9[i] + r10[i];
end
if(NumOfPixCF > NumOfPixNF)
begin
Object_Shift <= 6'b000100; //Object moved away
end
else if(NumOfPixCF < NumOfPixNF)
begin
Object_Shift <= 6'b001000; //Object moved forward
end
else
begin
AreaCF = AreaCF + R1 + R2 + R3 + R4 + R5 + R6 + R7 + R8 + R9 + R10;
AreaNF = AreaNF + r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10;
if(AreaCF < AreaNF) //Object moved to the right
begin
Object_Shift <= 6'b000010;
//reposition <= 1;
end
else if(AreaCF > AreaNF) //Object moved to the left
begin
Object_Shift <= 6'b000001;
//reposition <= 1;
end
else //Object did not move
begin
Object_Shift <= 6'b000000;
end
end
end
reposition <= ~reposition;
end
always@(reposition,start)
begin
if(start == 1)
begin
R1 <= r1;
R2 <= r2;
R3 <= r3;
R4 <= r4;
R5 <= r5;
R6 <= r6;
R7 <= r7;
R8 <= r8;
R9 <= r9;
R10 <= r10;
end
if(reposition == -1)
begin
NumOfPixCF <= 0;
NumOfPixNF <= 0;
AreaCF <= 0;
AreaNF <= 0;
end
end
endmodule