This commit is contained in:
Florent Kermarrec 2020-09-30 17:29:04 +02:00
commit ed21c983cb
1 changed files with 11 additions and 0 deletions

View File

@ -428,6 +428,17 @@ def get_csr_svd(soc, vendor="litex", name="soc", description=None):
svd.append(' </interrupt>')
svd.append(' </peripheral>')
svd.append(' </peripherals>')
if len(soc.mem_regions) > 0:
svd.append(' <vendorExtensions>')
svd.append(' <memoryRegions>')
for name, region in soc.mem_regions.items():
svd.append(' <memoryRegion>')
svd.append(' <name>{}</name>'.format(name.upper()))
svd.append(' <baseAddress>0x{:08X}</baseAddress>'.format(region.origin))
svd.append(' <size>0x{:08X}</size>'.format(region.size))
svd.append(' </memoryRegion>')
svd.append(' </memoryRegions>')
svd.append(' </vendorExtensions>')
svd.append('</device>')
return "\n".join(svd)