Skip to content

Commit

Permalink
Merge pull request #1433 from tpwrules/faster-jtaguart
Browse files Browse the repository at this point in the history
Increase JTAG UART upload speed
  • Loading branch information
enjoy-digital authored Dec 13, 2023
2 parents 5dac2fc + 5b52448 commit cdd80a5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions litex/build/openocd.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,8 @@ def stream(self, port=20000, chain=1):
proc jtagstream_rxtx {tap client is_poll} {
if {![$client eof]} {
if {!$is_poll} {
set tx [$client read 1]
} else {
set tx ""
}
set rx [jtagstream_drain $tap $tx 64 4096]
set tx [$client read 512]
set rx [jtagstream_drain $tap $tx 512 4096]
if {[string length $rx]} {
#echo [string length $rx]
$client puts -nonewline $rx
Expand All @@ -167,6 +163,7 @@ def stream(self, port=20000, chain=1):
proc jtagstream_client {tap sock} {
set client [$sock accept]
fconfigure $client -buffering none
fconfigure $client -blocking 0
$client readable [list jtagstream_rxtx $tap $client 0]
$client onexception [list $client close]
after 1 [list jtagstream_rxtx $tap $client 1]
Expand Down

0 comments on commit cdd80a5

Please sign in to comment.