Fix accidental blocking assignment in always_ff for read buffering storage elements

This commit is contained in:
Alex Mykyta
2024-01-05 19:57:47 -08:00
parent 6433cd1fc8
commit 6a550abc69
2 changed files with 4 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ Install from `PyPi`_ using pip
Example
-------
The easiest way is to use the `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_:
The easiest way to use PeakRDL-regblock is via the `PeakRDL command line tool <https://peakrdl.readthedocs.io/>`_:
.. code-block:: bash

View File

@@ -41,19 +41,19 @@ class RBufLogicGenerator(RDLForLoopGenerator):
for field in node.fields():
if bidx < field.low:
# zero padding before field
s.append(f"{data}[{field.low-1}:{bidx}] = '0;")
s.append(f"{data}[{field.low-1}:{bidx}] <= '0;")
value = self.exp.dereferencer.get_value(field)
if field.msb < field.lsb:
# Field gets bitswapped since it is in [low:high] orientation
value = f"{{<<{{{value}}}}}"
s.append(f"{data}[{field.high}:{field.low}] = {value};")
s.append(f"{data}[{field.high}:{field.low}] <= {value};")
bidx = field.high + 1
regwidth = node.get_property('regwidth')
if bidx < regwidth:
# zero padding after last field
s.append(f"{data}[{regwidth-1}:{bidx}] = '0;")
s.append(f"{data}[{regwidth-1}:{bidx}] <= '0;")
return "\n".join(s)