How to Check if Signals are Equal Using XOR

If you have two signals that MUST be equal to one another all the time, and you need to write a checker for this, you can use the following:
Vtool_How_to_check_if_signals_are_equal_using_xor
If A and B are no longer equal, then the result of xor operation will become 1, and an error will be triggered. By using an additional signal and XOR you can minimize simulation time and remove the need for checking on each edge of the clock. The code above is also useful if you have additional conditions for checking the signal, and when writing an assertion becomes complicated.
Vtool_How_to_check_if_signals_are_equal_using_xor

Contact Us

Please, enter your details below. We will get back to you as fast as we can.

This website uses cookies to ensure you get the best experience on our website.

Get Cogita

Please, enter your details below. We will get back to you as fast as we can.

Thank you!

We will get in touch soon.

Get a Quote

Please, enter your details below. We will get back to you as fast as we can.