I posted this in a reply to the same question (from the same person) on the Community Forums on the Cadence web site, but unfortunately it's down at the moment so I can't post a link.
You do this by using the cds_inherited_parameter attribute in your veriloga model, and then you can define a mismatch variation for that in the statistics block when you run a simulation. So here's the VerilogA model:
Code:`include "disciplines.vams"
module res(vp, vn);
inout vp, vn;
electrical vp, vn;
(* cds_inherited_parameter *) parameter real monteres = 0;
parameter real r = 1k;
localparam real r_effective = r + monteres; // nominal resistance plus
// monte-carlo mismatch effect
analog
V(vp, vn) <+ (r_effective)*I(vp, vn);
endmodule
And here's a spectre netlist to show it being used - just run "spectre monteres.scs" or whatever you've called it:
Code://
parameters monteres=0
statistics {
mismatch {
vary monteres dist=gauss std=5
}
}
R1 (n1 0) res
I1 (n1 0) isource dc=1m
ahdl_include "monteres.va"
monte montecarlo numruns=10 variations=mismatch {
dc dc
export vdc=oceanEval("v(\"n1\" ?result 'dc)")
}
If you were running from within ADE, you'd probably just create an include file (which you can reference with Setup->Model Libraries) containing the
parameters and
statistics statements from above.
Kind Regards,
Andrew.