YosysHQ / yosys

Yosys Open SYnthesis Suite
https://yosyshq.net/yosys/
ISC License
3.51k stars 895 forks source link

Add simulation model for Xilinx BRAM #4663

Open sifferman opened 1 month ago

sifferman commented 1 month ago

Feature Description

Hello.

My RTL's post-synthesis simulation was failing regression, and I tracked it down to an issue with the BRAM. I just realized that the Xilinx RAMB modules in techlibs/xilinx/cells_sim.v are not implemented for simulation.

Ideally, techlibs/xilinx/cells_sim.v should implement a simulation model for all BRAMs, which can basically be copied from Xilinx's Unisim Library (under Apache 2.0).

However, Xilinx's models can't be used directly because they are incompatible with Icarus and Verilator.

Any thoughts on this? I would be happy to do a pull if it would be helpful.