2015-05-01 14:27:31 -04:00
|
|
|
from misoclib.tools.litescope.software.driver.la import LiteScopeLADriver
|
2015-01-22 18:31:57 -05:00
|
|
|
|
2015-04-13 07:18:21 -04:00
|
|
|
|
2015-02-23 12:55:19 -05:00
|
|
|
def main(wb):
|
2015-04-13 07:09:44 -04:00
|
|
|
wb.open()
|
2015-04-13 07:46:06 -04:00
|
|
|
# # #
|
2015-04-13 07:09:44 -04:00
|
|
|
la = LiteScopeLADriver(wb.regs, "la", debug=True)
|
2015-01-22 18:31:57 -05:00
|
|
|
|
2015-04-13 07:46:06 -04:00
|
|
|
# cond = {"cnt0" : 128} # trigger on cnt0 = 128
|
2015-04-13 07:40:30 -04:00
|
|
|
cond = {} # trigger on cnt0 = 128
|
2015-04-13 07:09:44 -04:00
|
|
|
la.configure_term(port=0, cond=cond)
|
|
|
|
la.configure_sum("term")
|
|
|
|
la.configure_subsampler(1)
|
2015-04-13 07:46:06 -04:00
|
|
|
# la.configure_qualifier(1)
|
2015-04-13 07:09:44 -04:00
|
|
|
la.configure_rle(1)
|
|
|
|
la.run(offset=128, length=256)
|
2015-01-22 18:31:57 -05:00
|
|
|
|
2015-04-13 07:09:44 -04:00
|
|
|
while not la.done():
|
|
|
|
pass
|
|
|
|
la.upload()
|
2015-01-22 18:31:57 -05:00
|
|
|
|
2015-04-13 07:09:44 -04:00
|
|
|
la.save("dump.vcd")
|
|
|
|
la.save("dump.csv")
|
|
|
|
la.save("dump.py")
|
|
|
|
la.save("dump.sr")
|
2015-04-13 07:46:06 -04:00
|
|
|
# # #
|
2015-04-13 07:09:44 -04:00
|
|
|
wb.close()
|