diff --git a/amaranth/lib/wiring.py b/amaranth/lib/wiring.py index 1122a625f..17a02a442 100644 --- a/amaranth/lib/wiring.py +++ b/amaranth/lib/wiring.py @@ -1277,6 +1277,9 @@ def __eq__(self, other): """ return type(self) is type(other) and self.__unflipped == other.__unflipped + def __hash__(self): + return hash(self.__unflipped) + # See the note in `FlippedSignature`. In addition, these accessors also handle flipping of # an interface member.