Quantcast
Channel: Cadence RF Design Forum
Viewing all articles
Browse latest Browse all 956

Hidden state problem / HB analysis

$
0
0

Hello everyone,


I am new to VerilogA and have a little problem figuring out what's wrong with my module. The error message says that my module is not supported in PSS analysis because it is a behavior module component with hidden states:

line 24: Hidden state variable: x

line 24: Hidden state variable: sig

I red Ken kunderts document about avoiding hidden states but I didn't see how to avoid them in my case

Could you please help me figure out how to avoid the hidden states on the variables x and sig?

Best regards

/////////////////////////////////////////////////////////////

module Count(Prog, clk, X, E);
input  Prog,clk;
output X,E;
electrical Prog,clk,X,E ;
parameter n = 8 ;
real x,sig;

analog begin
    @(initial_step)
    begin
        x=0;
        sig=0;
    end

    @(cross(V(clk),+1))
    begin
        x = x + V(Prog) ;
        if (x > pow(2,n-1)-1)
            sig = 1 ;
        else
            sig=0;

        if (x > pow(2,n)-1)
        begin
            x = x - pow(2,n) ;
            sig = 0 ;
        end
    end

    V(E) <+ sig ;
    V(X) <+ x ;
end

///////////////////////////////////////////////////////////////


Viewing all articles
Browse latest Browse all 956

Trending Articles