I searched the Cadence Manual but I can't find the right command/solution to check if a pcell instance got PcellEvalFailed.
In IC6.x failed evaluation will put a marker in the master of the instance. Check the master for markers:
If any exist, you may have to check the owner/value of the marker to make sure it is a pcellEvaFailed marker.
To create a test marker, use printf inside your pcell code. The print statement will create a marker with the pcellEvalFailed attributes.
I instantiated a pcell with wrong parameter value then type this in CIW, which gets nil.
Actually, pcellEvalFailed messages are added using "old school" markers (i.e. a shape on the marker/error layer) rather than using OA markers.
car(exists(lpp car(geGetSelSet())~>master~>lpps lpp~>layerName=="marker" && lpp~>purpose=="error"))~>shapes
If this is non-nil, there are shapes on the marker/error layer. You can do the above with ~>errorDesc on the end to get the description of the error:
car(exists(lpp car(geGetSelSet())~>master~>lpps lpp~>layerName=="marker" && lpp~>purpose=="error"))~>shapes~>errorDesc
("(\"quotient\" 0 t nil (\"*Error* quotient: Attempted to divide by zero\" (0 0)))")