Guardring is a vent for reverse leakage current in a circuit to the corresponding power rail. In case of pfets, if there are any parasitic Tx formedin the layout, in order to reverse bias these parasitic Tx, the Nwell tap is connected to VDD which acts as a path for this reverse leakage current. Hence latchup is prevented .
The same holds good for nfets wherein the substrate tap is connected to GND. I believe that helps.
Guardring is a vent for reverse leakage current in a circuit to the corresponding power rail. In case of pfets, if there are any parasitic Tx formedin the layout, in order to reverse bias these parasitic Tx, the Nwell tap is connected to VDD which acts as a path for this reverse leakage current. Hence latchup is prevented .
The same holds good for nfets wherein the substrate tap is connected to GND. I believe that helps.