mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
use new Migen sel signal to change the way we upload data (will enable fifo bursts)
This commit is contained in:
parent
d3486dba91
commit
e309ba55ea
3 changed files with 7 additions and 5 deletions
|
@ -97,6 +97,7 @@ class LiteScopeRecorderUnit(Module):
|
||||||
self.post_hit = Signal()
|
self.post_hit = Signal()
|
||||||
|
|
||||||
self.source = Source(data_layout(dw))
|
self.source = Source(data_layout(dw))
|
||||||
|
self.source_level = Signal(bits_for(depth))
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
@ -137,6 +138,7 @@ class LiteScopeRecorderUnit(Module):
|
||||||
|
|
||||||
If(~fifo.sink.ack | (fifo.fifo.level >= self.length), NextState("IDLE"))
|
If(~fifo.sink.ack | (fifo.fifo.level >= self.length), NextState("IDLE"))
|
||||||
)
|
)
|
||||||
|
self.comb += self.source_level.eq(fifo.fifo.level)
|
||||||
|
|
||||||
class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR):
|
class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR):
|
||||||
def __init__(self, dw, depth):
|
def __init__(self, dw, depth):
|
||||||
|
@ -149,7 +151,7 @@ class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR):
|
||||||
self._done = CSRStatus()
|
self._done = CSRStatus()
|
||||||
|
|
||||||
self._source_stb = CSRStatus()
|
self._source_stb = CSRStatus()
|
||||||
self._source_ack = CSR()
|
self._source_level = CSRStatus(bits_for(depth))
|
||||||
self._source_data = CSRStatus(dw)
|
self._source_data = CSRStatus(dw)
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -162,6 +164,7 @@ class LiteScopeRecorder(LiteScopeRecorderUnit, AutoCSR):
|
||||||
self._done.status.eq(self.done),
|
self._done.status.eq(self.done),
|
||||||
|
|
||||||
self._source_stb.status.eq(self.source.stb),
|
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_data.status.eq(self.source.data),
|
||||||
self.source.ack.eq(self._source_ack.re)
|
self.source.ack.eq(self._source_data.sel),
|
||||||
]
|
]
|
||||||
|
|
|
@ -111,9 +111,8 @@ class LiteScopeLADriver():
|
||||||
def upload(self):
|
def upload(self):
|
||||||
if self.debug:
|
if self.debug:
|
||||||
print("uploading")
|
print("uploading")
|
||||||
while self.recorder_source_stb.read():
|
while self.recorder_source_level.read():
|
||||||
self.data.append(self.recorder_source_data.read())
|
self.data.append(self.recorder_source_data.read())
|
||||||
self.recorder_source_ack.write(1)
|
|
||||||
if self.with_rle:
|
if self.with_rle:
|
||||||
if self.rle_enable.read():
|
if self.rle_enable.read():
|
||||||
self.data = self.data.decode_rle()
|
self.data = self.data.decode_rle()
|
||||||
|
|
|
@ -9,7 +9,7 @@ la = LiteScopeLADriver(wb.regs, "la", debug=True)
|
||||||
cond = {} # trigger on cnt0 = 128
|
cond = {} # trigger on cnt0 = 128
|
||||||
la.configure_term(port=0, cond=cond)
|
la.configure_term(port=0, cond=cond)
|
||||||
la.configure_sum("term")
|
la.configure_sum("term")
|
||||||
la.configure_subsampler(8)
|
la.configure_subsampler(1)
|
||||||
#la.configure_qualifier(1)
|
#la.configure_qualifier(1)
|
||||||
la.configure_rle(1)
|
la.configure_rle(1)
|
||||||
la.run(offset=128, length=256)
|
la.run(offset=128, length=256)
|
||||||
|
|
Loading…
Reference in a new issue