summaryrefslogtreecommitdiff
path: root/tb/avalon.hpp
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2023-09-29 00:42:17 -0600
committerAlejandro Soto <alejandro@34project.org>2023-09-29 00:42:17 -0600
commit5fe9fc82c571fff9be9ee59869cbecb56d438c9b (patch)
tree5610328acb22ce408a8a2a336773846d4a06e8d1 /tb/avalon.hpp
parentbcd1b426a8f47c01a15769ccafeea006b564f544 (diff)
tb/avalon: fix line equality comparisong
Diffstat (limited to '')
-rw-r--r--tb/avalon.hpp10
1 files changed, 8 insertions, 2 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);
}
};