tangnano9k: use builtin UART.

This commit is contained in:
Bastian Löher
2024-07-21 00:53:10 +02:00
parent db58556e6c
commit 06ceaf0862

View File

@@ -6,13 +6,6 @@ from top import Top
if __name__ == "__main__":
platform = TangNano9kPlatform(toolchain="Gowin") # toolchain = (Gowin, Apicula)
gpio = ("gpio", 0)
platform.add_resources([
Resource("uart", 1,
Subsignal("rx", Pins("42", conn=gpio, dir='i')),
Subsignal("tx", Pins("43", conn=gpio, dir='o')),
Attrs(IO_TYPE="LVCMOS33")
)])
# The platform allows access to the various resources defined by the board
# definition from amaranth-boards.
led0 = platform.request('led', 0)
@@ -21,7 +14,7 @@ if __name__ == "__main__":
led3 = platform.request('led', 3)
led4 = platform.request('led', 4)
leds = [led0, led1, led2, led3, led4]
uart = platform.request('uart', 1)
uart = platform.request('uart', 0)
platform.build(Top(leds, uart), do_program=True)