This is my first time designing an op amp, using 180nm in Cadence. Two stage design, 1st stage is NMOS differential pair with PMOS current mirror load, second stage is PMOS CS with Miller capacitor. Here's the DC operating points.
I have 1V common going into both inputs for the open loop. The current source is set to 20uA, the Vdd is 1.8V. Here's my open loop AC analysis.
As you can see from the graph, the gain is 73dB in open loop, which should be high enough, and the gain margin is great. At DC, the output is nearly Vdd/2, so that should be okay. Now all I've done is connect the output back to the input as a unity buffer, which should give me a gain of 0dB or close to it, and instead I am getting baffling gains of -200dB or -400dB. The output seems to immediately saturate to one of the rails when I look at a transient simulation.
Am I just running the testbench wrong? It feels like it should be very simple and that I'm making some simulation mistake that's causing a convergence error or something in Cadence. Any insight or help appreciated, let me know if you need more details from me.