Fix assignment of overflow to increment input of counter

This commit is contained in:
Dennis Potter 2021-08-15 12:28:07 -07:00
parent fd75e4c84c
commit 1d5bc8b75e
Signed by: Dennis
GPG Key ID: 186A8AD440942BAF
2 changed files with 10 additions and 6 deletions

View File

@ -205,7 +205,7 @@ class Component():
self.ports['input'][obj.inst_name] =\
("logic" if obj.width == 1 else 'logic [{}:0]'.format(obj.width), [])
else:
name.append('__')
name.append('_')
name.append(obj.name)
name.append(split_name[1])

View File

@ -426,11 +426,15 @@ class Field(Component):
)
)
if incr.width > 0:
self.logger.error("Increment signal '{}' is wider than 1-bit. "\
"This might result in unwanted behavior and "\
"will also cause Lint-errors.".format(
incr.inst_name))
try:
if incr.width > 0:
self.logger.error("Increment signal '{}' is wider than 1-bit. "\
"This might result in unwanted behavior and "\
"will also cause Lint-errors.".format(
incr.inst_name))
except AttributeError:
# 'PropRef_overflow' object has no attribute 'width'
pass
else:
# Tie signal to 0
self.rtl_footer.append(