mirror of
https://github.com/Silicon1602/srdl2sv.git
synced 2024-12-22 15:08:39 +00:00
Add underflow property and checker if referenced properties exist
This commit is contained in:
parent
1d5bc8b75e
commit
a74377bae7
@ -1,4 +1,5 @@
|
||||
import re
|
||||
import sys
|
||||
from itertools import chain
|
||||
from typing import NamedTuple
|
||||
from systemrdl import node
|
||||
@ -208,6 +209,15 @@ class Component():
|
||||
name.append('_')
|
||||
name.append(obj.name)
|
||||
|
||||
# This is a property. Check if the original field actually has this property
|
||||
if not obj.node.get_property(obj.name):
|
||||
self.logger.fatal("Reference to the property '{}' of instance '{}' found. "
|
||||
"This instance does hold the reference property! Please "
|
||||
"fix this if you want me to do my job properly."
|
||||
.format(obj.name, obj.node.get_path()))
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
name.append(split_name[1])
|
||||
|
||||
return ''.join(name)
|
||||
|
@ -467,11 +467,15 @@ class Field(Component):
|
||||
)
|
||||
)
|
||||
|
||||
if decr.width > 0:
|
||||
self.logger.error("Decrement signal '{}' is wider than 1-bit. "\
|
||||
"This might result in unwanted behavior and "\
|
||||
"will also cause Lint-errors.".format(
|
||||
decr.inst_name))
|
||||
try:
|
||||
if decr.width > 0:
|
||||
self.logger.error("Decrement signal '{}' is wider than 1-bit. "\
|
||||
"This might result in unwanted behavior and "\
|
||||
"will also cause Lint-errors.".format(
|
||||
decr.inst_name))
|
||||
except AttributeError:
|
||||
# 'PropRef_underflow' object has no attribute 'width'
|
||||
pass
|
||||
else:
|
||||
# Tie signal to 0
|
||||
self.rtl_footer.append(
|
||||
|
Loading…
Reference in New Issue
Block a user