From af5bfd131f7bb57a700ea6af0c09c70233e2854d Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 4 Jun 2018 10:10:03 +0200 Subject: [PATCH] software/driver/analyzer: add assertions --- litescope/software/driver/analyzer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/litescope/software/driver/analyzer.py b/litescope/software/driver/analyzer.py index 8617971..007ca9b 100644 --- a/litescope/software/driver/analyzer.py +++ b/litescope/software/driver/analyzer.py @@ -91,6 +91,8 @@ class LiteScopeAnalyzerDriver: self.subsampler_value.write(value-1) def run(self, offset, length): + assert offset < self.depth + assert length <= self.depth if self.debug: print("[running]...") self.storage_offset.write(offset)