(no subject)

From: vanessa goyal (vanessa_goyal@rediffmail.com)
Date: Tue Aug 28 2001 - 03:40:30 MDT

  • Next message: Fabio Somenzi: "Undeclared Variable"

    Sir
    For the following code,error coming is,

    "Variable J not declared while used as LHS".

    Please tell me What is the problem with the code?

    Thanking you
    Vanessa

    ******************************************
    module selectext (a, b,clk, out) ;

    input [3:0] a ;
    input [3:0] b ;
    input clk ;
    output [3:0] out ;

    reg [3:0] alatched ;
    reg [3:0] blatched ;
    reg [3:0] out ;
    integer j;

    always@ (posedge clk)
    begin
    alatched=a; blatched=b;
    end

    always@ (posedge clk)
    begin
    j=j+1;
    if(alatched[j]==1) out = blatched;
    else out= 0;
    end

    endmodule

     



    This archive was generated by hypermail 2b30 : Tue Aug 28 2001 - 03:53:03 MDT