Geoffrey_Coram
|
Another approach would be this:
V(p,n) <+ white_noise(4*`P_K*$temperature*ron, "thermal"); // (A) if ( V(ps,ns) > thresh ) V(p,n) <+ ron * I(p,n); // (A) else I(p,n) <+ 0;
Verilog-A's value-retention rules say that, if you contribute to the flow (I), then all potential contributions are discarded. Now your white_noise call is not inside the if() statement.
BTW: I personally believe the error from your simulator is incorrect. white_noise is *not* an analog operator along the lines of idt() or absdelay(); it appears in "4.5 Analysis dependent funtions" rather than "4.4 Analog operators" in the Verilog-AMS language reference manual (2.2).
|