Need help with an error.

Thread Starter

abhijit1

Joined Mar 17, 2012
1
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
I am getting the following errors
line 36 expecting 'IDENTIFIER', found '3'
line 36 expecting 'endmodule', found ';'
 
Last edited by a moderator:

spinnaker

Joined Oct 29, 2009
7,830
What language is this? Pascal?
What compiler What version?

Which line is line 36?

Post with code tags so you can show indents.
 
Top