Difference between memory arrays and signal arrays in Amaranth #1557
-
I am trying to use Amaranth (v0.5.4) to create an array of signals that can be accessed by input signals to a module, to serve as a read/write memory buffer. The documentation in the Arrays section says "An array becomes immutable after it is indexed for the first time. The elements of the array do not themselves become immutable, but it is not recommended to mutate them as the behavior can become unpredictable." When I generate verilog code using a Memory Array, the verilog code seems to just be a regular array of signals in any case. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I think there is a terminology confusion here. The
Something like a read/write buffer should use a Hope this helps! |
Beta Was this translation helpful? Give feedback.
I think there is a terminology confusion here. The
Array
becomes immutable in the Python sense: the Python object that is created by theArray()
syntax cannot be modified at compilation time any more. The values inside, however, can be modified as usual in the generated gateware.