Add support for field paritycheck. #35

This commit is contained in:
Alex Mykyta
2023-05-15 22:53:17 -07:00
parent 3e691cb5fb
commit 0d82154b9d
16 changed files with 183 additions and 3 deletions

View File

@@ -106,3 +106,14 @@ class DesignScanner(RDLListener):
def enter_Field(self, node: 'FieldNode') -> None:
if node.is_sw_writable and (node.msb < node.lsb):
self.ds.has_writable_msb0_fields = True
if node.get_property('paritycheck') and node.implements_storage:
self.ds.has_paritycheck = True
if node.get_property('reset') is None:
self.msg.warning(
f"Field '{node.inst_name}' includes parity check logic, but "
"its reset value was not defined. Will result in an undefined "
"value on the module's 'parity_error' output.",
self.top_node.inst.property_src_ref.get('paritycheck', self.top_node.inst.inst_src_ref)
)