This is relatively straight forward design question, so thanks to anyone who can help me.

I am trying to calculate the CMIR for an op amp. At present, I have set up a testbench, where I use the op amp as a unity gain buffer and then I sweep the V+ input from 0V -> Vdd. Because I have a unity gain buffer, I am calculating the common mode input range as the range of V+ values, resulting in unity gain on the output, i.e where V+ = V-.

My question is ... is there a standard way of actually taking the measurement, where I can measure the CMIR (Vcmin, Vcmax)automatically, with an ocean command say. At the moment, I am plotting V+ and V- and estimating the CMIR values when V- deviates from a gain of 1. This is not really a very consistant method, so if anyone has any more "mainstream" methods of calculating these values, I would be very grateful.

Thanks in advance

coco009