From 5fe9fc82c571fff9be9ee59869cbecb56d438c9b Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Fri, 29 Sep 2023 00:42:17 -0600 Subject: tb/avalon: fix line equality comparisong --- tb/avalon.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tb/avalon.hpp') diff --git a/tb/avalon.hpp b/tb/avalon.hpp index dc550f5..e286786 100644 --- a/tb/avalon.hpp +++ b/tb/avalon.hpp @@ -39,9 +39,15 @@ namespace taller::avalon return this->verilated; } - inline bool operator==(VlWide<4> verilated) const noexcept + inline bool operator==(const VlWide<4> &verilated) const noexcept { - return this->verilated == verilated; + line verilated_line{verilated}; + return this->hi == verilated_line.hi && this->lo == verilated_line.lo; + } + + inline bool operator!=(const VlWide<4> &verilated) const noexcept + { + return !(*this == verilated); } }; -- cgit v1.2.3