2015-09-27 12:47:30 -04:00
|
|
|
from litescope.software.driver.logic_analyzer import LiteScopeLogicAnalyzerDriver
|
2015-09-07 05:49:54 -04:00
|
|
|
|
|
|
|
|
|
|
|
def main(wb):
|
|
|
|
wb.open()
|
|
|
|
# # #
|
2015-09-27 12:47:30 -04:00
|
|
|
la = LiteScopeLogicAnalyzerDriver(wb.regs, "logic_analyzer", debug=True)
|
2015-09-07 05:49:54 -04:00
|
|
|
|
2015-09-27 12:47:30 -04:00
|
|
|
cond = {} # immediate trigger
|
2015-09-07 05:49:54 -04:00
|
|
|
la.configure_term(port=0, cond=cond)
|
|
|
|
la.configure_sum("term")
|
|
|
|
la.configure_subsampler(1)
|
|
|
|
# la.configure_qualifier(1)
|
|
|
|
la.configure_rle(1)
|
|
|
|
la.run(offset=128, length=256)
|
|
|
|
|
|
|
|
while not la.done():
|
|
|
|
pass
|
|
|
|
la.upload()
|
|
|
|
|
|
|
|
la.save("dump.vcd")
|
|
|
|
la.save("dump.csv")
|
|
|
|
la.save("dump.py")
|
|
|
|
la.save("dump.sr")
|
|
|
|
# # #
|
|
|
|
wb.close()
|