diff --git a/litex/soc/integration/export.py b/litex/soc/integration/export.py index 9e515796d..ce75c8362 100644 --- a/litex/soc/integration/export.py +++ b/litex/soc/integration/export.py @@ -33,6 +33,10 @@ from litex.soc.doc.module import gather_submodules, ModuleNotDocumented, Documen from litex.soc.doc.csr import DocumentedCSRRegion from litex.soc.interconnect.csr import _CompoundCSR +# for generating a timestamp in the description field, if none is otherwise given +import datetime +import time + # CPU files ---------------------------------------------------------------------------------------- def get_cpu_mak(cpu, compile_software): @@ -397,6 +401,10 @@ def get_csr_svd(soc, vendor="litex", name="soc", description=None): svd.append(' {}'.format(name.upper())) if description is not None: svd.append(' '.format(reflow(description))) + else: + fmt = "%Y-%m-%d %H:%M:%S" + build_time = datetime.datetime.fromtimestamp(time.time()).strftime(fmt) + svd.append(' '.format(reflow("Litex SoC " + build_time))) svd.append('') svd.append(' 8') svd.append(' 32')