Skip to content

Commit 1784f29

Browse files
committed
Bypass irrelevant storage-related rule checks for alias registers. #173
1 parent 0c7bfcc commit 1784f29

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

systemrdl/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.25.7"
1+
__version__ = "1.26.0"

systemrdl/core/validate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ def enter_Field(self, node: FieldNode) -> None:
410410
# but the user never specified its value, so its readback value is
411411
# ambiguous.
412412
if (
413-
not node.implements_storage and node.is_sw_readable and (node.get_property('reset') is None)
413+
not node.is_alias
414+
and not node.implements_storage and node.is_sw_readable and (node.get_property('reset') is None)
414415
and (node.get_property('hw') in {rdltypes.AccessType.na, rdltypes.AccessType.r})
415416
):
416417
node.env.msg.message(

systemrdl/properties/builtin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ def validate(self, node: m_node.Node, value: Any) -> None:
881881
self.get_src_ref(node)
882882
)
883883

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

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

0 commit comments

Comments
 (0)