I wanted to know why my Iverilog Compiler throws the "I give up" error at the end of the module. The error is:
DivisionsSchaltwerk.v:64: syntax error I give up
There is the Verilog code for my Divisior using a changed version of the AQ shift unsigned non-restoring division algorithm. Column 64 is at the endmodule
part.
module Division(
input clock,
input start,
input [31:0] a,
input [31:0] b,
output [31:0] q,
output [31:0] r
);
reg[31:0] AQ;
reg[31:0] B;
reg[31:0] R;
reg[5:0] count;
reg running;
assign q = AQ;
assign r = R;
always @(posedge clock) begin
if (start) begin
R <= 0;
AQ <= a;
B <= b;
count <= 6'd32;
running <= 1;
end
else if (count == 0) begin
running <=0;
if(R<0) begin
R <= R + B;
end
else begin
R <= R - B;
end
end
if (running) begin
if (R<0) begin
R <= R<<1;
R[0] <= AQ[32];
AQ <= AQ<<1;
end
if(R<0) begin
AQ[0] <= 0;
R <= R + B;
count <= count -6'd1;
end
else begin
AQ[0] <= 1;
R <= R - B;
count <= count - 6'd1;
end
end
else begin
R <= R<<1;
R[0] <= AQ[32];
AQ <= AQ<<1;
end
if(R<0) begin
AQ[0] <= 0;
R <= R + B;
count <= count -6'd1;
end
else begin
AQ[0] <= 1;
R <= R - B;
count <= count - 6'd1;
end
endmodule