From: Reto Kramer Date: Thu, 22 Aug 2019 19:28:40 +0000 (-0700) Subject: examples/basic/uart: document `divisor` parameter. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ceb99ca62aa9ed326d571fb55ff3e69f0bc96db;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