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] =\ self.ports['input'][obj.inst_name] =\
("logic" if obj.width == 1 else 'logic [{}:0]'.format(obj.width), []) ("logic" if obj.width == 1 else 'logic [{}:0]'.format(obj.width), [])
else: else:
name.append('__') name.append('_')
name.append(obj.name) name.append(obj.name)
name.append(split_name[1]) name.append(split_name[1])

View File

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