Need help with an error.

Discussion in 'Programmer's Corner' started by abhijit1, Mar 17, 2012.

  1. abhijit1

    Thread Starter New Member

    Mar 17, 2012
    1
    0
    Code ( (Unknown Language)):
    1.  
    2. module booth_encoder(a,b,s);
    3. input [3:0] b;
    4. output [3:0] a;
    5. output [3:0] s;
    6. reg [4:0] y;
    7. integer count=0;
    8. initial
    9. begin
    10. y = {a,1'b0};
    11. end
    12. always@(a or b)
    13. begin
    14. while(count<5)//counter is less than no of bits of multiplicand+1
    15. begin
    16. case(y[1:0])
    17. 2'b00:begin a[count]=1'b0; s[count]=1'b0; end    //<---this is line 36
    18. 2'b01:begin a[count]=1'b1; s[count]=1'b0; end
    19. 2'b11:begin a[count]=1'b0; s[count]=1'b0; end
    20. 2'b10:begin a[count]= 1'b-1; s[count]= 1'b1; end
    21. endcase
    22. y=y>>1;
    23. count=count+1;
    24. end
    25. end
    26.  
    27. endmodule
    28.  
    I am getting the following errors
    line 36 expecting 'IDENTIFIER', found '3'
    line 36 expecting 'endmodule', found ';'
     
    Last edited by a moderator: Mar 18, 2012
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
    What language is this? Pascal?
    What compiler What version?

    Which line is line 36?

    Post with code tags so you can show indents.
     
Loading...