Fix generation of documentation of `atomic_write` CSRStorage

Can't decrement a range by 1, this (probably) never worked.

Also improves the generated text.
This commit is contained in:
David Sawatzke 2022-01-30 18:05:52 +01:00
parent c13be522ce
commit a981f935f2
1 changed files with 3 additions and 3 deletions

View File

@ -346,8 +346,8 @@ 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."
if i == 0: