tools/litex_server: fix comms import

This commit is contained in:
Florent Kermarrec 2019-04-23 14:25:27 +02:00
parent 68f12495cf
commit 0f60ec35e2
1 changed files with 4 additions and 4 deletions

View File

@ -141,7 +141,7 @@ def main():
if args.uart: if args.uart:
from litex.tools.remote import CommUART from litex.tools.remote.comm_uart import CommUART
if args.uart_port is None: if args.uart_port is None:
print("Need to specify --uart-port, exiting.") print("Need to specify --uart-port, exiting.")
exit() exit()
@ -150,13 +150,13 @@ def main():
print("[CommUART] port: {} / baudrate: {} / ".format(uart_port, uart_baudrate), end="") print("[CommUART] port: {} / baudrate: {} / ".format(uart_port, uart_baudrate), end="")
comm = CommUART(uart_port, uart_baudrate) comm = CommUART(uart_port, uart_baudrate)
elif args.udp: elif args.udp:
from litex.tools.remote import CommUDP from litex.tools.remote.comm_udp import CommUDP
udp_ip = args.udp_ip udp_ip = args.udp_ip
udp_port = int(args.udp_port) udp_port = int(args.udp_port)
print("[CommUDP] ip: {} / port: {} / ".format(udp_ip, udp_port), end="") print("[CommUDP] ip: {} / port: {} / ".format(udp_ip, udp_port), end="")
comm = CommUDP(udp_ip, udp_port) comm = CommUDP(udp_ip, udp_port)
elif args.pcie: elif args.pcie:
from litex.tools.remote import CommPCIe from litex.tools.remote.comm_pcie import CommPCIe
pcie_bar = args.pcie_bar pcie_bar = args.pcie_bar
if args.pcie_bar is None: if args.pcie_bar is None:
print("Need to speficy --pcie-bar, exiting.") print("Need to speficy --pcie-bar, exiting.")
@ -164,7 +164,7 @@ def main():
print("[CommPCIe] bar: {} / ".format(args.pcie_bar), end="") print("[CommPCIe] bar: {} / ".format(args.pcie_bar), end="")
comm = CommPCIe(args.pcie_bar) comm = CommPCIe(args.pcie_bar)
elif args.usb: elif args.usb:
from litex.tools.remote import CommUSB from litex.tools.remote.comm_usb import CommUSB
if args.usb_pid is None and args.usb_vid is None: if args.usb_pid is None and args.usb_vid is None:
print("Need to speficy --usb-vid or --usb-pid, exiting.") print("Need to speficy --usb-vid or --usb-pid, exiting.")
exit() exit()