tools/litex_term: use 64 bytes as default payload_lengh (work for all confniguration) and add small delay between frames for FT245 FIFO.

The delay still need to be investigated.
This commit is contained in:
Florent Kermarrec 2020-03-25 09:31:51 +01:00
parent 8f2e36927d
commit ffe83ef0f3
1 changed files with 2 additions and 1 deletions

View File

@ -52,7 +52,7 @@ sfl_prompt_ack = b"\x06"
sfl_magic_req = b"sL5DdSMmkekro\n" sfl_magic_req = b"sL5DdSMmkekro\n"
sfl_magic_ack = b"z6IHG7cYDID6o\n" sfl_magic_ack = b"z6IHG7cYDID6o\n"
sfl_payload_length = 64#251 sfl_payload_length = 64
# General commands # General commands
sfl_cmd_abort = b"\x00" sfl_cmd_abort = b"\x00"
@ -224,6 +224,7 @@ class LiteXTerm:
current_address += len(frame_data) current_address += len(frame_data)
position += len(frame_data) position += len(frame_data)
remaining -= len(frame_data) remaining -= len(frame_data)
time.sleep(1e-6) # FIXME: small delay needed with FT245 FIFO ("usb_fifo"), understand why.
end = time.time() end = time.time()
elapsed = end - start elapsed = end - start
f.close() f.close()