LiteXXX cores: convert port parameter to int if is digit in test/make.py

This commit is contained in:
Florent Kermarrec 2015-03-17 15:58:21 +01:00
parent 2327710387
commit d2cb41bc63
3 changed files with 6 additions and 3 deletions

View File

@ -18,7 +18,8 @@ if __name__ == "__main__":
args = _get_args() args = _get_args()
if args.bridge == "uart": if args.bridge == "uart":
from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver
wb = LiteScopeUARTDriver(args.port, args.baudrate, "./csr.csv", int(args.busword), debug=False) port = args.port if not args.port.isdigit() else int(args.port)
wb = LiteScopeUARTDriver(port, args.baudrate, "./csr.csv", int(args.busword), debug=False)
elif args.bridge == "etherbone": elif args.bridge == "etherbone":
from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver
wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False) wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False)

View File

@ -18,7 +18,8 @@ if __name__ == "__main__":
args = _get_args() args = _get_args()
if args.bridge == "uart": if args.bridge == "uart":
from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver
wb = LiteScopeUARTDriver(args.port, args.baudrate, "./csr.csv", int(args.busword), debug=False) port = args.port if not args.port.isdigit() else int(args.port)
wb = LiteScopeUARTDriver(port, args.baudrate, "./csr.csv", int(args.busword), debug=False)
elif args.bridge == "etherbone": elif args.bridge == "etherbone":
from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver
wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False) wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False)

View File

@ -18,7 +18,8 @@ if __name__ == "__main__":
args = _get_args() args = _get_args()
if args.bridge == "uart": if args.bridge == "uart":
from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver from misoclib.tools.litescope.host.driver.uart import LiteScopeUARTDriver
wb = LiteScopeUARTDriver(args.port, args.baudrate, "./csr.csv", int(args.busword), debug=False) port = args.port if not args.port.isdigit() else int(args.port)
wb = LiteScopeUARTDriver(port, args.baudrate, "./csr.csv", int(args.busword), debug=False)
elif args.bridge == "etherbone": elif args.bridge == "etherbone":
from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver from misoclib.tools.litescope.host.driver.etherbone import LiteScopeEtherboneDriver
wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False) wb = LiteScopeEtherboneDriver(args.ip_address, int(args.udp_port), "./csr.csv", int(args.busword), debug=False)