-
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ROHD takes a different approach to how signals, values, and equality checks work than SystemVerilog. Comparing the values of two Comparing whether two Comparing whether two There's also These mechanisms for comparison make it easy to tell when you're dealing with a value versus a signal, and hard to accidentally use something non-synthesizable in a hardware design. |
Beta Was this translation helpful? Give feedback.
ROHD takes a different approach to how signals, values, and equality checks work than SystemVerilog.
Comparing the values of two
Logic
signals in a synthesizable way is done usingLogic.eq
. This will always represent a synthesizable comparison. In simulation, if either value is not valid, the resulting equality check will also be invalid.Comparing whether two
Logic
objects are exactly the same is done usingLogic.==
. This is a pure-software object reference comparison.Comparing whether two
LogicValue
s have the same value is done usingLogicValue.==
. This checks that every bit of the value is identical, including invalid bits likex
andz
. Note thatLogicValue
is sort of like an arbitrar…