Skip to content

Vivado transparent memory issue #1589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
piotro888 opened this issue May 1, 2025 · 1 comment
Open

Vivado transparent memory issue #1589

piotro888 opened this issue May 1, 2025 · 1 comment

Comments

@piotro888
Copy link

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

@whitequark
Copy link
Member

Yeah, I would say it should be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants