mirror of
https://github.com/litex-hub/litex-boards.git
synced 2025-01-03 03:43:36 -05:00
sispeed_tang_nano: Add simple UART loopback test... (Not working...)
This commit is contained in:
parent
5955a35372
commit
28571308bc
2 changed files with 14 additions and 2 deletions
|
@ -26,8 +26,15 @@ _io = [
|
||||||
("user_led", 2, Pins("18"), IOStandard("LVCMOS33")),
|
("user_led", 2, Pins("18"), IOStandard("LVCMOS33")),
|
||||||
|
|
||||||
# Buttons.
|
# Buttons.
|
||||||
("user_btn", 0, Pins("15"), IOStandard("LVCMOS18")),
|
("user_btn", 0, Pins("15"), IOStandard("LVCMOS33")),
|
||||||
("user_btn", 0, Pins("14"), IOStandard("LVCMOS18")),
|
("user_btn", 0, Pins("14"), IOStandard("LVCMOS33")),
|
||||||
|
|
||||||
|
# Serial
|
||||||
|
("serial", 0,
|
||||||
|
Subsignal("tx", Pins("8")),
|
||||||
|
Subsignal("rx", Pins("9")),
|
||||||
|
IOStandard("LVCMOS33")
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
# Connectors ---------------------------------------------------------------------------------------
|
# Connectors ---------------------------------------------------------------------------------------
|
||||||
|
@ -42,6 +49,7 @@ class Platform(GowinPlatform):
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
GowinPlatform.__init__(self, "GW1N-LV1QN48C6/I5", _io, _connectors, toolchain="gowin", devicename="GW1N-1")
|
GowinPlatform.__init__(self, "GW1N-LV1QN48C6/I5", _io, _connectors, toolchain="gowin", devicename="GW1N-1")
|
||||||
|
self.toolchain.options["use_done_as_gpio"] = 1
|
||||||
|
|
||||||
def create_programmer(self):
|
def create_programmer(self):
|
||||||
return OpenFPGALoader("tangnano")
|
return OpenFPGALoader("tangnano")
|
||||||
|
|
|
@ -44,6 +44,10 @@ class BaseSoC(SoCCore):
|
||||||
kwargs["cpu_type"] = None
|
kwargs["cpu_type"] = None
|
||||||
kwargs["with_uart"] = False
|
kwargs["with_uart"] = False
|
||||||
|
|
||||||
|
# UART loopback.
|
||||||
|
serial_pads = platform.request("serial")
|
||||||
|
self.comb += serial_pads.tx.eq(serial_pads.rx)
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
SoCCore.__init__(self, platform, sys_clk_freq,
|
SoCCore.__init__(self, platform, sys_clk_freq,
|
||||||
ident = "LiteX SoC on Tang Nano",
|
ident = "LiteX SoC on Tang Nano",
|
||||||
|
|
Loading…
Reference in a new issue