From a981f935f2e66a41c934c6a12bfc7ffe8aef8502 Mon Sep 17 00:00:00 2001 From: David Sawatzke Date: Sun, 30 Jan 2022 18:05:52 +0100 Subject: [PATCH] Fix generation of documentation of `atomic_write` CSRStorage Can't decrement a range by 1, this (probably) never worked. Also improves the generated text. --- litex/soc/doc/csr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/litex/soc/doc/csr.py b/litex/soc/doc/csr.py index 417109f12..b18b0b8a4 100644 --- a/litex/soc/doc/csr.py +++ b/litex/soc/doc/csr.py @@ -346,10 +346,10 @@ class DocumentedCSRRegion: sub_name = self.name.upper() + "_" + name bits_str = "Bits {}-{} of `{}`.".format(start, start+length, full_name) if atomic_write: - if i == (range(len(csr.simple_csrs))-1): - bits_str += "Writing this register triggers an update of " + full_name + if i == (len(csr.simple_csrs)-1): + bits_str += " Writing this register triggers an update of `" + full_name + "`." else: - bits_str += "The value won't take effect until `" + full_name + "0` is written." + bits_str += " The value won't take effect until `" + full_name + "0` is written." if i == 0: d = description if description is None: