From: Florent Kermarrec Date: Wed, 12 Feb 2020 20:55:30 +0000 (+0100) Subject: soc/CSR: show alignment in report and add info when updating. X-Git-Tag: 24jan2021_ls180~672 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1620f9c5b01e3e34efb52ff9b483f81a0ee9a4d4;p=litex.git soc/CSR: show alignment in report and add info when updating. --- diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index c72e4469..43a03bff 100755 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -482,8 +482,9 @@ class SoCCSRHandler(SoCLocHandler): self.paging = paging self.masters = {} self.regions = {} - self.logger.info("{}-bit CSR Bus, {}KiB Address Space, {}B Paging (Up to {} Locations).".format( + self.logger.info("{}-bit CSR Bus, {}-bit Aligned, {}KiB Address Space, {}B Paging (Up to {} Locations).".format( colorer(self.data_width), + colorer(self.alignment), colorer(2**self.address_width/2**10), colorer(self.paging), colorer(self.n_locs))) @@ -504,6 +505,10 @@ class SoCCSRHandler(SoCLocHandler): colorer(alignment), colorer(", ".join(str(x) for x in self.supported_alignment)))) raise + self.logger.info("Alignment {} from {}-bit to {}-bit.".format( + colorer("updated", color="cyan"), + colorer(self.alignment), + colorer(alignment))) self.alignment = alignment # Add Master ----------------------------------------------------------------------------------- @@ -547,8 +552,9 @@ class SoCCSRHandler(SoCLocHandler): # Str ------------------------------------------------------------------------------------------ def __str__(self): - r = "{}-bit CSR Bus, {}KiB Address Space, {}B Paging (Up to {} Locations).\n".format( + r = "{}-bit CSR Bus, {}-bit Aligned, {}KiB Address Space, {}B Paging (Up to {} Locations).\n".format( colorer(self.data_width), + colorer(self.alignment), colorer(2**self.address_width/2**10), colorer(self.paging), colorer(self.n_locs))