2015-09-27 13:14:46 -04:00
|
|
|
import time
|
|
|
|
from litescope.software.driver.logic_analyzer import LiteScopeLogicAnalyzerDriver
|
|
|
|
|
|
|
|
|
|
|
|
def main(wb):
|
2015-10-13 15:36:37 -04:00
|
|
|
logic_analyzer = LiteScopeLogicAnalyzerDriver(wb.regs, "logic_analyzer", debug=True)
|
2015-09-27 13:14:46 -04:00
|
|
|
|
|
|
|
wb.open()
|
|
|
|
regs = wb.regs
|
|
|
|
# # #
|
|
|
|
conditions = {}
|
|
|
|
logic_analyzer.configure_term(port=0, cond=conditions)
|
|
|
|
logic_analyzer.configure_sum("term")
|
|
|
|
# Run Logic Analyzer
|
|
|
|
logic_analyzer.run(offset=2048, length=4000)
|
|
|
|
|
|
|
|
while not logic_analyzer.done():
|
|
|
|
pass
|
|
|
|
|
|
|
|
logic_analyzer.upload()
|
|
|
|
logic_analyzer.save("dump.vcd")
|
|
|
|
# # #
|
|
|
|
wb.close()
|