Hi all, I'm trying to evaluate a clocked comparator's offset. I need to run transient analysis while sweeping the input and then perform Monte-Carlo. This is the code that I'm working on it. I'd appreciate if you could help me.
name=s1 only_toplevel=false value=" .param start_v=0
.param stop_v=0
.param delta_v=0
.param v_act=0
*tran 10u 400m
. control
let start_v = 0
let stop_v = 0
let delta_v = 0.1
let v_act = start_v
* loop
while "v(OP)-v(ON)" le stop_v
alter v8 v_act
tran 10u 400m
write test_offset.raw
print v (start_v)
let v_act = "v_act + delta_v"
end
. endc