From: Luke Kenneth Casson Leighton Date: Sat, 23 Apr 2022 13:07:22 +0000 (+0100) Subject: couple of minor changes make life easier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a03549c861a770ec656d4d1a368fa4009aa49262;p=utils.git couple of minor changes make life easier * minicom and screen typically expect 115200 baud rate * carriage-return line-feed otherwise minicom scrolls off edge --- 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"""