From 6a0a896e9660a255f273b5002eacba2e96adb94a Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 15 Nov 2020 17:07:33 +0800 Subject: [PATCH] improve documentation output --- litex/soc/interconnect/csr_eventmanager.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/litex/soc/interconnect/csr_eventmanager.py b/litex/soc/interconnect/csr_eventmanager.py index b7bc664fe..53cb3884d 100644 --- a/litex/soc/interconnect/csr_eventmanager.py +++ b/litex/soc/interconnect/csr_eventmanager.py @@ -145,8 +145,16 @@ class EventManager(Module, AutoCSR): fields = [] for i, source in enumerate(sources): - fields += [CSRField(source.name, size=1, description="Mask bit for {}".format(str(source.name)))] + if source.description == None: + desc = "Mask bit for {}".format(str(source.name)) + else: + desc = source.description + fields += [CSRField(source.name, size=1, description=desc)] self.status = CSRStatus(n, fields=fields) + fields = [] + for i, source in enumerate(sources): + desc = "Mask bit for {}".format(str(source.name)) + fields += [CSRField(source.name, size=1, description=desc)] self.pending = CSRStatus(n, fields=fields) self.enable = CSRStorage(n, fields=fields)