2019-06-14 11:00:34 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
2019-06-24 04:04:55 -04:00
|
|
|
# This file is Copyright (c) 2019 kees.jongenburger <kees.jongenburger@gmail.com>
|
|
|
|
# License: BSD
|
|
|
|
|
2019-06-14 11:00:34 -04:00
|
|
|
from litex import RemoteClient
|
|
|
|
|
|
|
|
from litescope import LiteScopeAnalyzerDriver
|
|
|
|
|
|
|
|
wb = RemoteClient()
|
|
|
|
wb.open()
|
|
|
|
|
|
|
|
# # #
|
|
|
|
|
|
|
|
subsample = 1
|
|
|
|
analyzer = LiteScopeAnalyzerDriver(wb.regs, "analyzer", debug=True)
|
|
|
|
analyzer.configure_subsampler(subsample)
|
|
|
|
analyzer.configure_group(0)
|
|
|
|
analyzer.run(offset=32, length=512)
|
|
|
|
analyzer.wait_done()
|
|
|
|
analyzer.upload()
|
|
|
|
|
|
|
|
#
|
|
|
|
# Convert parallel input back to a flaten view (e.g. the 8 bits values are flattened)
|
2019-06-24 04:04:55 -04:00
|
|
|
#
|
2019-06-14 11:00:34 -04:00
|
|
|
analyzer.save("dump.vcd",flatten=True)
|
|
|
|
|
|
|
|
# # #
|
|
|
|
|
|
|
|
wb.close()
|