AA
Junior Member
Offline
Posts: 21
|
Two reasons: (1) I need a and b to be integers (2) I need a and b to be different numbers on every Monte Carlo iteration ,i.e., when performing MONTE sweep. For example, if a=4, then b cannot be 4. In other words, the random number generator should reject the value of b when it equals to a, and keeps regenerating b until b!=a.
The code you provided may generate the same value for a and b (especially when converted to integers) in the subsequent Monte Carlo iterations.
I hope there is a way to do this in HSPICE. Otherwise, I will probably need to write a Verilog-A module. Also, if this is not possible in HSPICE, please provide a hint on the best way to implement this functionality on Verilog-A. I especially need to know how to consume the Verilog-A module's outputs (a and b) as HSPICE parameters.
|