Skip to content

Vivado transparent memory issue #1589

Open
@piotro888

Description

@piotro888

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 :)

# Horrible hack alert: Yosys has two different Verilog code patterns it can emit for
, I verified that Yosys generates the "old" code pattern with register at address port, that should be more compatible, but (in new versions?) Vivado fails handle it correctly.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions