so I managed to write a .MEASURE command to give me 0 or 1 based on a certain event, and saves it in a result variable called "passfail". I do not have that command on me at the moment, but lets say this is what I am measuring for the sake of an example:
.MEASURE TRAN passfail TRIG V(1) VAL = 2.5 TD = 10n RISE = 2
* I am aware that this does not produce a 1 | 0 output.
Now, I am running a 100 Monte Carlo Simulation and wish for it to simply add these 100 passfails together. Since the original measure command produces 0 or 1, I figure it is a simple addition of all 100 passfail variables.
Is there a way to tell hspice to perform arithmetic after all Monte Carlo runs are over? if so, how to I expand its context awareness to include results from past Monte Carlo runs? what's the syntax to read this.. array!?
I am currently doing this in a post processing python script (after parsing yada yada yada), but it is clearly inefficient