From: Reto Kramer Date: Thu, 22 Aug 2019 19:28:40 +0000 (-0700) Subject: examples/basic/uart: document `divisor` parameter. X-Git-Tag: locally_working~5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0ef53e095f7a26d161781c0e7f70daa5760c4be;p=nmigen.git examples/basic/uart: document `divisor` parameter. --- diff --git a/examples/basic/uart.py b/examples/basic/uart.py index bb5478e..060d2f9 100644 --- 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