diff options
| author | Alejandro Soto <alejandro@34project.org> | 2023-09-29 00:42:17 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2023-09-29 00:42:17 -0600 |
| commit | 5fe9fc82c571fff9be9ee59869cbecb56d438c9b (patch) | |
| tree | 5610328acb22ce408a8a2a336773846d4a06e8d1 /tb | |
| parent | bcd1b426a8f47c01a15769ccafeea006b564f544 (diff) | |
tb/avalon: fix line equality comparisong
Diffstat (limited to '')
| -rw-r--r-- | tb/avalon.hpp | 10 | ||||
| -rw-r--r-- | tb/avalon.impl.hpp | 2 |
2 files changed, 9 insertions, 3 deletions
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; } } |
