projects
/
utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a03549c
)
add baud arg to UartDemo so that sim can run it at 9600
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sat, 23 Apr 2022 13:59:57 +0000
(14:59 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sat, 23 Apr 2022 13:59:57 +0000
(14:59 +0100)
uart_demo.py
patch
|
blob
|
history
diff --git
a/uart_demo.py
b/uart_demo.py
index 22eecaf428a911f518902ba6603520edf5b6a998..cf318d507b23d94032b05822db7f4ab790faf030 100755
(executable)
--- a/
uart_demo.py
+++ b/
uart_demo.py
@@
-100,8
+100,8
@@
class SimpleUART(Elaboratable):
class UartDemo(Elaboratable):
- def __init__(self, text):
- self.simple_uart = SimpleUART()
+ def __init__(self, text
, baud=115200
):
+ self.simple_uart = SimpleUART(
baud_rate=baud
)
self.text = str(text)
self.text_bytes = list(self.text.encode())
@@
-152,7
+152,7
@@
class TestUartDemo(unittest.TestCase):
STOP = enum.auto()
m = Module()
- dut = UartDemo("test text")
+ dut = UartDemo("test text"
, baud=9600
)
sample_event = Signal()
expected_state = Signal(ExpectedState)
m.submodules.dut = dut