From a559fc77c89895e2f71039f14c46aeeff8920e55 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 24 Feb 2015 17:58:54 +0100 Subject: [PATCH] remove upload optimization (we will use wishbone later for performance) --- litescope/core/storage.py | 7 ++----- litescope/host/driver/la.py | 8 +++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/litescope/core/storage.py b/litescope/core/storage.py index 930ea31d..30aab161 100644 --- a/litescope/core/storage.py +++ b/litescope/core/storage.py @@ -97,7 +97,6 @@ class LiteScopeRecorderUnit(Module): self.post_hit = Signal() self.source = Source(data_layout(dw)) - self.source_level = Signal(bits_for(depth)) ### @@ -138,7 +137,6 @@ class LiteScopeRecorderUnit(Module): If(~fifo.sink.ack | (fifo.fifo.level >= self.length), NextState("IDLE")) ) - self.comb += self.source_level.eq(fifo.fifo.level) class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR): def __init__(self, dw, depth): @@ -151,7 +149,7 @@ class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR): self._done = CSRStatus() self._source_stb = CSRStatus() - self._source_level = CSRStatus(bits_for(depth)) + self._source_ack = CSR() self._source_data = CSRStatus(dw) ### @@ -164,7 +162,6 @@ class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR): self._done.status.eq(self.done), self._source_stb.status.eq(self.source.stb), - self._source_level.status.eq(self.source_level), self._source_data.status.eq(self.source.data), - self.source.ack.eq(self._source_data.sel), + self.source.ack.eq(self._source_ack.re) ] diff --git a/litescope/host/driver/la.py b/litescope/host/driver/la.py index 4a967734..a60d5d72 100644 --- a/litescope/host/driver/la.py +++ b/litescope/host/driver/la.py @@ -111,11 +111,9 @@ class LiteScopeLADriver(): def upload(self): if self.debug: print("uploading") - level = self.recorder_source_level.read() - while level: - length = self.recorder_source_data.length - self.data += self.recorder_source_data.read(repeats=min(128//length, level)) - level = self.recorder_source_level.read() + while self.recorder_source_stb.read(): + self.data.append(self.recorder_source_data.read()) + self.recorder_source_ack.write(1) if self.with_rle: if self.rle_enable.read(): self.data = self.data.decode_rle() -- 2.30.2