Skip to content

Commit

Permalink
Bypass irrelevant storage-related rule checks for alias registers. #173
Browse files Browse the repository at this point in the history
  • Loading branch information
amykyta3 committed Jun 9, 2023
1 parent 0c7bfcc commit 1784f29
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion systemrdl/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.25.7"
__version__ = "1.26.0"
3 changes: 2 additions & 1 deletion systemrdl/core/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ def enter_Field(self, node: FieldNode) -> None:
# but the user never specified its value, so its readback value is
# ambiguous.
if (
not node.implements_storage and node.is_sw_readable and (node.get_property('reset') is None)
not node.is_alias
and not node.implements_storage and node.is_sw_readable and (node.get_property('reset') is None)
and (node.get_property('hw') in {rdltypes.AccessType.na, rdltypes.AccessType.r})
):
node.env.msg.message(
Expand Down
4 changes: 2 additions & 2 deletions systemrdl/properties/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ def validate(self, node: m_node.Node, value: Any) -> None:
self.get_src_ref(node)
)

if uses_we and not node.implements_storage:
if uses_we and not node.implements_storage and not node.is_alias:
self.env.msg.error(
"Use of 'we' property on field '%s' that does not implement storage does not make sense"
% (node.inst_name),
Expand Down Expand Up @@ -914,7 +914,7 @@ def validate(self, node: m_node.Node, value: Any) -> None:
self.get_src_ref(node)
)

if uses_we and not node.implements_storage:
if uses_we and not node.implements_storage and not node.is_alias:
self.env.msg.error(
"Use of 'wel' property on field '%s' that does not implement storage does not make sense"
% (node.inst_name),
Expand Down

0 comments on commit 1784f29

Please sign in to comment.