Я-то, наивный, полдня пытался реализовать Simple Dual-Port Block RAM..
Из общения на форуме ксайлинка:
Re: How to read and write to the same BRAM concurrently?
An: It's definitely possible, but with limitations.
(1) Apart from dataflow FIFOs, HLS will only connect a RAM to one function at a time. That function can do simultaneous reads/writes to the RAM. You cannot have one function writing to a RAM while another reads from
it. You can't have two functions writing to the same RAM. I don't think you can even persuade HLS to let two functions read from the same ROM simultaneously.
(2) For AXI Lite ports that connect to a BRAM (ie arrays on AXI Lite), one RAM port is permanently connected to the AXI Lite interface. This only leaves one port available for other tasks.
(3) HLS has to understand your access pattern.
If you write randomly and read randomly, HLS is not going to be able to achieve II=1. This is because after HLS has set a value to be written, the RAM takes at least one cycle to store that before it can be read out again. On the other hand, if you have a loop where you write to value [i] and read from value [i-10] then HLS will easily achieve II=1 (although in this case a shift register may be more appropriate).
Лёгким движением руки разработчика Vivado HLS двухпортовая память превращается в однопортовую! Ничего не скажешь - эффективно!