Description
Hello,
(this is not directly an Amaranth issue, but I think it is worth noting / documenting here)
When generating Verilog code from Amaranth, Vivado fails to recognize read ports with transparency.
According to Horrible hack alert
:)
amaranth/amaranth/back/rtlil.py
Line 1067 in fd41201
It emits warning The block RAM may get collision error if read and write address collide
and leads to non-functional gateware.
Fix is to add (* rw_addr_collision = "yes" *)
attribute for memories. Without it, the default behaviour is design writes to the same address it is reading from, the RAM output is unpredictable.
Warnings are not emitted for non-transparent ports.
Should it be reported to yosys?
Tested on Vivado 2024.2, Amaranth 0.5.3