projects
/
nmigen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d9e83b
)
examples/basic/uart: document `divisor` parameter.
author
Reto Kramer
<kramer@acm.org>
Thu, 22 Aug 2019 19:28:40 +0000
(12:28 -0700)
committer
whitequark
<cz@m-labs.hk>
Thu, 22 Aug 2019 19:28:40 +0000
(19:28 +0000)
examples/basic/uart.py
patch
|
blob
|
history
diff --git
a/examples/basic/uart.py
b/examples/basic/uart.py
index bb5478e5ae287d5746debc55437554d67286cae6..060d2f9cd466439f32138be3f3b48dc618589669 100644
(file)
--- a/
examples/basic/uart.py
+++ b/
examples/basic/uart.py
@@
-2,6
+2,13
@@
from nmigen import *
class UART(Elaboratable):
+ """
+ Parameters
+ ----------
+ divisor : int
+ Set to ``round(clk-rate / baud-rate)``.
+ E.g. ``12e6 / 115200`` = ``104``.
+ """
def __init__(self, divisor, data_bits=8):
assert divisor >= 4