<st3llar>
on ice40's EBR is it not possible to read and write on the same clock edge?
<st3llar>
doing so creates a bunch of extra luts and dffs
<lofty>
st3llar: what's the read vs write priority of your code?
<lofty>
Or in other words: if you read and write to the same address, does the read get the old data, the new data or is it undefined?
<st3llar>
oh, thought about that and so i tried different addresses, same result
<st3llar>
always @(posedge clk) begin mem[waddr] <= wdata; rdata <= mem[raddr]; end
<lofty>
st3llar: that's the source of the extra logic then; iCE40 doesn't natively support that so Yosys adds logic to catch and pass through values
<tnt>
If your design doesn't care about what happens if read and write at the same address occur (because either it doesn't matter or by design this will never occur), you can use the (* no_rw_check *) attribute on the memory.
<st3llar>
thanks! is this what's meant by *pseudo* dual port?
<tnt>
No.
<st3llar>
oh thanks for the tip
<tnt>
Pseudo dual port is because one port is read and the other is write.
<tnt>
(as opposed to some BRAM that can have two fully read/write ports).
<st3llar>
because i couldn't find any mention of the limit to read/write on the same clock edge in the datasheets, unless this is always the case?
unkraut has quit [Remote host closed the connection]
unkraut has joined #yosys
nelgau has joined #yosys
_whitelogger has joined #yosys
_whitelogger has joined #yosys
nelgau has quit [Read error: Connection reset by peer]
nelgau has joined #yosys
FabM has quit [Ping timeout: 256 seconds]
bjorkintosh has quit [Remote host closed the connection]