From a03549c861a770ec656d4d1a368fa4009aa49262 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 23 Apr 2022 14:07:22 +0100 Subject: [PATCH] couple of minor changes make life easier * minicom and screen typically expect 115200 baud rate * carriage-return line-feed otherwise minicom scrolls off edge --- uart_demo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uart_demo.py b/uart_demo.py index 89c40e7..22eecaf 100755 --- a/uart_demo.py +++ b/uart_demo.py @@ -63,7 +63,7 @@ class TickGenerator(Elaboratable): class SimpleUART(Elaboratable): """Simple transmit-only UART""" - def __init__(self, baud_rate=9600): + def __init__(self, baud_rate=115200): # default for minicom/screen: 115200 self.__tick_gen = TickGenerator(baud_rate) self.data_in = Signal(8) self.data_in_valid = Signal() @@ -219,7 +219,7 @@ class TestUartDemo(unittest.TestCase): def build(platform, do_program): - platform.build(UartDemo("Hello World!\n"), do_program=do_program) + platform.build(UartDemo("Hello World!\r\n"), do_program=do_program) PLATFORMS = { @@ -229,7 +229,7 @@ PLATFORMS = { DEFAULT_PLATFORM = next(iter(PLATFORMS.keys())) DEFAULT_TOOLCHAIN = "yosys_nextpnr" -DEFAULT_TEXT = "Hello World!\n" +DEFAULT_TEXT = "Hello World!\r\n" # carriage-return line-feed PLATFORMS_TEXT = '\n'.join(PLATFORMS.keys()) HELP_TEXT = f""" -- 2.30.2