2014-12-19 14:16:37 -05:00
|
|
|
import time
|
2014-12-19 13:02:31 -05:00
|
|
|
from config import *
|
2014-12-20 10:06:02 -05:00
|
|
|
from tools import *
|
2014-12-19 13:02:31 -05:00
|
|
|
from miscope.host.drivers import MiLaDriver
|
|
|
|
|
2014-12-20 10:06:02 -05:00
|
|
|
mila = MiLaDriver(wb.regs, "mila")
|
2014-12-19 13:02:31 -05:00
|
|
|
wb.open()
|
2014-12-19 14:16:37 -05:00
|
|
|
regs = wb.regs
|
2014-12-19 13:02:31 -05:00
|
|
|
###
|
2014-12-20 10:25:05 -05:00
|
|
|
|
|
|
|
#trigger0 = mila.sata_con_sink_payload_identify_o*1
|
|
|
|
#mask0 = mila.sata_con_sink_payload_identify_m
|
|
|
|
|
2014-12-20 10:06:02 -05:00
|
|
|
#trigger0 = mila.sata_phy_source_source_payload_data_o*primitives["R_OK"]
|
|
|
|
#mask0 = mila.sata_phy_source_source_payload_data_m
|
|
|
|
|
2014-12-20 10:25:05 -05:00
|
|
|
trigger0 = mila.sata_phy_source_source_payload_data_o*primitives["X_RDY"]
|
|
|
|
mask0 = mila.sata_phy_source_source_payload_data_m
|
2014-12-19 13:02:31 -05:00
|
|
|
|
|
|
|
mila.prog_term(port=0, trigger=trigger0, mask=mask0)
|
|
|
|
mila.prog_sum("term")
|
|
|
|
|
|
|
|
# Trigger / wait / receive
|
2014-12-20 10:06:02 -05:00
|
|
|
mila.trigger(offset=32, length=512)
|
|
|
|
regs.command_generator_identify.write(1)
|
2014-12-19 13:02:31 -05:00
|
|
|
mila.wait_done()
|
|
|
|
mila.read()
|
|
|
|
mila.export("dump.vcd")
|
|
|
|
###
|
|
|
|
wb.close()
|
2014-12-19 19:26:58 -05:00
|
|
|
|
2014-12-20 10:06:02 -05:00
|
|
|
print_link_trace(mila,
|
|
|
|
tx_data_name="sata_phy_sink_sink_payload_data",
|
|
|
|
rx_data_name="sata_phy_source_source_payload_data"
|
|
|
|
)
|