Rich (BB code):
module booth_encoder(a,b,s);
input [3:0] b;
output [3:0] a;
output [3:0] s;
reg [4:0] y;
integer count=0;
initial
begin
y = {a,1'b0};
end
always@(a or b)
begin
while(count<5)//counter is less than no of bits of multiplicand+1
begin
case(y[1:0])
2'b00:begin a[count]=1'b0; s[count]=1'b0; end //<---this is line 36
2'b01:begin a[count]=1'b1; s[count]=1'b0; end
2'b11:begin a[count]=1'b0; s[count]=1'b0; end
2'b10:begin a[count]= 1'b-1; s[count]= 1'b1; end
endcase
y=y>>1;
count=count+1;
end
end
endmodule
line 36 expecting 'IDENTIFIER', found '3'
line 36 expecting 'endmodule', found ';'
Last edited by a moderator: