The SDI core continually loops through the possible formats and searches for specific patterns on the incoming data to determine the mode of the incoming data.
Due to random noise, it is possible that the core briefly sees the pattern for a particular format and temporarily asserts rx_locked.
On Xilinx SDI platforms, there is a bit from the external cable driver chip on the board that indicates when it is locked.
This is usually a reliable indicator of whether a cable is connected or not.
If that does not work for some reason, you will need to try to filter out the glitch on rx_locked to detect cable connection:
The simplest method is to consider the cable unplugged until rx_locked stays high for n clocks.
Alternatively, look for a known pattern, in concert with the rx_locked.
For example a SR-FF to produce a connected symbol
o Set = trs & eav & xyz & rx_locked
o Reset = rx_locked
In other words, add some other conditions which are met during normal operation, but which are impossible when the cable is disconnected.
This will be much more reliable than basing it on a single signal.