If you need to compare two signals it’s easy to do so using XOR (Tips & Tricks 15. Check if signals are equal using XOR).
This define will compare signals A and B, detect the glitches in B, and the checker will ignore them.
What this define is doing is comparing signal A with signal B, while using continuous assign statements to delay the change in compare_xor_chk, and avoiding the glitch. We need the id if we want to have multiple instances of this define.
2. Compare equal signals that have a small delay
Example: If B is equal to A and is delayed by 0.1ns, then we work on the assign with delay >0.1 then the compare_xor_chk will stay low and the check will pass.