From 08122c1a65ea8d185b8f1afdfb28339d08714a78 Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Sat, 6 Mar 2021 17:04:37 -0800 Subject: [PATCH] Use -1 instead of None for no limit --- cocotbext/axi/stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocotbext/axi/stream.py b/cocotbext/axi/stream.py index 9bca646..6c45b5c 100644 --- a/cocotbext/axi/stream.py +++ b/cocotbext/axi/stream.py @@ -274,10 +274,10 @@ class StreamSink(StreamMonitor, StreamPause): def __init__(self, bus, clock, reset=None, *args, **kwargs): super().__init__(bus, clock, reset, *args, **kwargs) - self.queue_occupancy_limit = None + self.queue_occupancy_limit = -1 def full(self): - if self.queue_occupancy_limit and len(self.queue) >= self.queue_occupancy_limit: + if self.queue_occupancy_limit > 0 and len(self.queue) >= self.queue_occupancy_limit: return True else: return False