From b0ef53e095f7a26d161781c0e7f70daa5760c4be Mon Sep 17 00:00:00 2001 From: Reto Kramer Date: Thu, 22 Aug 2019 12:28:40 -0700 Subject: [PATCH] examples/basic/uart: document `divisor` parameter. --- examples/basic/uart.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.30.2