read_buffering & write_buffering: get_trigger's accesswidth and regwidth should be taken from trigger when trigger is of RegNode type, not from node

This commit is contained in:
Aylon Chaim Porat
2024-03-20 17:37:52 -04:00
committed by Alex Mykyta
parent be8d84bba0
commit cf2be63c20
2 changed files with 4 additions and 4 deletions

View File

@@ -37,8 +37,8 @@ class ReadBuffering:
if isinstance(trigger, RegNode): if isinstance(trigger, RegNode):
# Trigger is a register. # Trigger is a register.
# trigger when lowermost address of the register is written # trigger when lowermost address of the register is written
regwidth = node.get_property('regwidth') regwidth = trigger.get_property('regwidth')
accesswidth = node.get_property('accesswidth') accesswidth = trigger.get_property('accesswidth')
strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False) strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False)
if accesswidth < regwidth: if accesswidth < regwidth:

View File

@@ -49,8 +49,8 @@ class WriteBuffering:
if isinstance(trigger, RegNode): if isinstance(trigger, RegNode):
# Trigger is a register. # Trigger is a register.
# trigger when uppermost address of the register is written # trigger when uppermost address of the register is written
regwidth = node.get_property('regwidth') regwidth = trigger.get_property('regwidth')
accesswidth = node.get_property('accesswidth') accesswidth = trigger.get_property('accesswidth')
strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False) strb_prefix = self.exp.dereferencer.get_access_strobe(trigger, reduce_substrobes=False)
if accesswidth < regwidth: if accesswidth < regwidth: