mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
tools/litex_term/crossover: use burst to speed up reads.
This commit is contained in:
parent
48dc574703
commit
384041affb
1 changed files with 10 additions and 3 deletions
|
@ -80,9 +80,16 @@ class CrossoverBridge:
|
||||||
|
|
||||||
def crossover2pty(self):
|
def crossover2pty(self):
|
||||||
while True:
|
while True:
|
||||||
if self.bus.regs.uart_xover_rxempty.read() == 0:
|
if self.bus.regs.uart_txfull.read():
|
||||||
r = self.bus.regs.uart_xover_rxtx.read()
|
length = 16
|
||||||
os.write(self.file, bytes(chr(r).encode("utf-8")))
|
elif not self.bus.regs.uart_xover_rxempty.read():
|
||||||
|
length = 1
|
||||||
|
else:
|
||||||
|
length = 0
|
||||||
|
if length:
|
||||||
|
r = self.bus.read(self.bus.regs.uart_xover_rxtx.addr, length=length, burst="fixed")
|
||||||
|
for v in r:
|
||||||
|
os.write(self.file, bytes(chr(v).encode("utf-8")))
|
||||||
|
|
||||||
# SFL ----------------------------------------------------------------------------------------------
|
# SFL ----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue