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 ++++++++-- tb/avalon.impl.hpp | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'tb') 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); } }; diff --git a/tb/avalon.impl.hpp b/tb/avalon.impl.hpp index 5dd9822..d6dac11 100644 --- a/tb/avalon.impl.hpp +++ b/tb/avalon.impl.hpp @@ -62,7 +62,7 @@ namespace taller::avalon try { tick_rising(); return true; - } catch(const avl_bus_error&) { + } catch (const avl_bus_error&) { return false; } } -- cgit v1.2.3