Fix misinterpretation of swacc behavior. Is asserted on both sw read and write. #21
This commit is contained in:
@@ -42,9 +42,9 @@ swacc
|
|||||||
^^^^^
|
^^^^^
|
||||||
|OK|
|
|OK|
|
||||||
|
|
||||||
If true, infers an output signal ``hwif_out..swacc`` that is asserted on the
|
If true, infers an output signal ``hwif_out..swacc`` that is asserted when
|
||||||
same clock cycle that the field is being sampled during a software read
|
accessed by software. Specifically, on the same clock cycle that the field is
|
||||||
operation.
|
being sampled during a software read operation, or as it is being written.
|
||||||
|
|
||||||
.. wavedrom::
|
.. wavedrom::
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ field -> swacc
|
|||||||
^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^
|
||||||
|EX|
|
|EX|
|
||||||
|
|
||||||
Single-cycle strobe that indicates the field is being sampled during a software
|
Single-cycle strobe that indicates the field is being accessed by software
|
||||||
read operation.
|
(read or write).
|
||||||
|
|
||||||
|
|
||||||
field -> swmod
|
field -> swmod
|
||||||
|
|||||||
@@ -173,15 +173,25 @@ class FieldLogic:
|
|||||||
|
|
||||||
def get_swacc_identifier(self, field: 'FieldNode') -> str:
|
def get_swacc_identifier(self, field: 'FieldNode') -> str:
|
||||||
"""
|
"""
|
||||||
Asserted when field is software accessed (read)
|
Asserted when field is software accessed (read or write)
|
||||||
"""
|
"""
|
||||||
buffer_reads = field.parent.get_property('buffer_reads')
|
buffer_reads = field.parent.get_property('buffer_reads')
|
||||||
if buffer_reads:
|
buffer_writes = field.parent.get_property('buffer_writes')
|
||||||
|
if buffer_reads and buffer_writes:
|
||||||
rstrb = self.exp.read_buffering.get_trigger(field.parent)
|
rstrb = self.exp.read_buffering.get_trigger(field.parent)
|
||||||
return rstrb
|
wstrb = self.exp.write_buffering.get_write_strobe(field)
|
||||||
|
return f"{rstrb} || {wstrb}"
|
||||||
|
elif buffer_reads and not buffer_writes:
|
||||||
|
strb = self.exp.dereferencer.get_access_strobe(field)
|
||||||
|
rstrb = self.exp.read_buffering.get_trigger(field.parent)
|
||||||
|
return f"{rstrb} || ({strb} && decoded_req_is_wr)"
|
||||||
|
elif not buffer_reads and buffer_writes:
|
||||||
|
strb = self.exp.dereferencer.get_access_strobe(field)
|
||||||
|
wstrb = self.exp.write_buffering.get_write_strobe(field)
|
||||||
|
return f"{wstrb} || ({strb} && !decoded_req_is_wr)"
|
||||||
else:
|
else:
|
||||||
strb = self.exp.dereferencer.get_access_strobe(field)
|
strb = self.exp.dereferencer.get_access_strobe(field)
|
||||||
return f"{strb} && !decoded_req_is_wr"
|
return strb
|
||||||
|
|
||||||
def get_swmod_identifier(self, field: 'FieldNode') -> str:
|
def get_swmod_identifier(self, field: 'FieldNode') -> str:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user