I always seem to have trouble reading current's in VerilogAMS.
I have "IBP2U" input pin which stays at 2uA from time zero until the end of simulation, however in below code, IBP2U_ok signal never changes to "1" from "0". Any ideas why?
Code:reg IBP2U_ok=1'b0;
parameter real IBP2U_high=4.0u;
parameter real IBP2U_low=1.0u;
always @(cross(I(IBP2U,AGND)-IBP2U_high,0) or cross(I(IBP2U,AGND)-IBP2U_low,0) or above(I(IBP2U,AGND)-IBP2U_low)) begin
if( (I(IBP2U,AGND) > 1.0u) && (I(IBP2U,AGND) < 4.0u) )
IBP2U_ok=1'b1;
else
IBP2U_ok=1'b0;
end