Package with enums shall not be dumped if no enums are present

This commit is contained in:
Dennis Potter 2021-10-14 23:22:01 -07:00
parent 6e355c62af
commit b23ddded74
Signed by: Dennis
GPG Key ID: 186A8AD440942BAF
1 changed files with 5 additions and 1 deletions

View File

@ -371,10 +371,14 @@ class AddrMap(Component):
# Create RTL to return
for key, value in enum_rtl.items():
if not value:
# Skip if package wouldn't contain any enums
continue
package_rtl =\
AddrMap.templ_dict['package_declaration']['rtl'].format(
name = key,
pkg_content = '\n\n'.join(enum_rtl[key]))
pkg_content = '\n\n'.join(value))
rtl_return[key] = AddrMap.add_tabs(