You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a field is defined as intr, the next field can be used to set a bit (assuming the default sticky behaviour). In the current implementation the next value is ignored on a cycle when a SW write is happening to the register. The systemRDL spec seems to imply this behaviour in the general case, but it feels as though it is contrary to the interrupt case.
Expected behavior
Option 1: For a given field, bits set in next should be set unless they are being cleared by the write
Option 2: For a given field, bit set in next should be set unless at least 1 bit in the field is being cleared
Option1 and 2 are the same for single bit fields.
Additional context
Option 2 could be achieved by overriding get_predicate in WriteOneClear and sibling classes (untested code below):
classWriteOneClear(_OnWrite):
comment="SW write 1 clear"onwritetype=OnWriteType.woclrdefget_onwrite_rhs(self, reg: str, data: str, strb: str) ->str:
returnf"{reg} & ~({data} & {strb})"defget_predicate(self, field: 'FieldNode') ->str:
# only treat as a write if one of the bits is highreturnf"{super.get_predicate(field)} && |({data} & {strb})"
I'm happy to work on a fix, but thought it wise to get input on whether a fix is appropriate, and which way to fix it.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a field is defined as intr, the next field can be used to set a bit (assuming the default sticky behaviour). In the current implementation the next value is ignored on a cycle when a SW write is happening to the register. The systemRDL spec seems to imply this behaviour in the general case, but it feels as though it is contrary to the interrupt case.
Details like these can be helpful:
Gives
Expected behavior
Option 1: For a given field, bits set in next should be set unless they are being cleared by the write
Option 2: For a given field, bit set in next should be set unless at least 1 bit in the field is being cleared
Option1 and 2 are the same for single bit fields.
Additional context
Option 2 could be achieved by overriding get_predicate in WriteOneClear and sibling classes (untested code below):
I'm happy to work on a fix, but thought it wise to get input on whether a fix is appropriate, and which way to fix it.
The text was updated successfully, but these errors were encountered: