core: use new CSRStatus.we signal to speed-up Storage upload (>10x speedup over ethernet)
This commit is contained in:
parent
284253d558
commit
7a9fa9d3b1
|
@ -147,8 +147,7 @@ class _Storage(Module, AutoCSR):
|
|||
self.offset = CSRStorage(bits_for(depth))
|
||||
|
||||
self.mem_valid = CSRStatus()
|
||||
self.mem_ready = CSR()
|
||||
self.mem_data = CSRStatus(data_width)
|
||||
self.mem_data = CSRStatus(data_width)
|
||||
|
||||
# # #
|
||||
|
||||
|
@ -223,7 +222,7 @@ class _Storage(Module, AutoCSR):
|
|||
# memory read
|
||||
self.comb += [
|
||||
self.mem_valid.status.eq(cdc.source.valid),
|
||||
cdc.source.ready.eq(self.mem_ready.re | ~self.enable.storage),
|
||||
cdc.source.ready.eq(self.mem_data.we | ~self.enable.storage),
|
||||
self.mem_data.status.eq(cdc.source.data)
|
||||
]
|
||||
|
||||
|
|
|
@ -125,8 +125,9 @@ class LiteScopeAnalyzerDriver:
|
|||
' ' * (20-20*position//length),
|
||||
100*position//length))
|
||||
sys.stdout.flush()
|
||||
if not self.storage_mem_valid.read():
|
||||
break
|
||||
self.data.append(self.storage_mem_data.read())
|
||||
self.storage_mem_ready.write(1)
|
||||
if self.debug:
|
||||
print("")
|
||||
return self.data
|
||||
|
|
Loading…
Reference in New Issue