Skip to content

Commit

Permalink
read_buffering & write_buffering: get_trigger's accesswidth and `…
Browse files Browse the repository at this point in the history
…regwidth` should be taken from `trigger` when `trigger` is of `RegNode` type, not from `node`
  • Loading branch information
apstrike authored and amykyta3 committed Mar 21, 2024
1 parent be8d84b commit cf2be63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/peakrdl_regblock/read_buffering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def get_trigger(self, node: RegNode) -> str:
if isinstance(trigger, RegNode):
# Trigger is a register.
# trigger when lowermost address of the register is written
regwidth = node.get_property('regwidth')
accesswidth = node.get_property('accesswidth')
regwidth = trigger.get_property('regwidth')
accesswidth = trigger.get_property('accesswidth')
strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False)

if accesswidth < regwidth:
Expand Down
4 changes: 2 additions & 2 deletions src/peakrdl_regblock/write_buffering/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def get_raw_trigger(self, node: 'RegNode') -> Union[SVInt, str]:
if isinstance(trigger, RegNode):
# Trigger is a register.
# trigger when uppermost address of the register is written
regwidth = node.get_property('regwidth')
accesswidth = node.get_property('accesswidth')
regwidth = trigger.get_property('regwidth')
accesswidth = trigger.get_property('accesswidth')
strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False)

if accesswidth < regwidth:
Expand Down

0 comments on commit cf2be63

Please sign in to comment.