clifford changed the topic of #yosys to: Yosys Open SYnthesis Suite: http://www.clifford.at/yosys/ -- Channel Logs: https://irclog.whitequark.org/yosys
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
mwk has quit [Ping timeout: 246 seconds]
cr1901_modern has quit [Ping timeout: 260 seconds]
mwk has joined #yosys
cr1901_modern has joined #yosys
X-Scale` has joined #yosys
X-Scale has quit [Ping timeout: 258 seconds]
X-Scale` is now known as X-Scale
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #yosys
cr1901_modern has quit [Quit: Leaving.]
citypw has joined #yosys
cr1901_modern has joined #yosys
asinghan2 is now known as test
test is now known as Guest45652
Guest45652 has quit [Quit: leaving]
cr1901_modern has quit [Read error: Connection reset by peer]
Guest40933 has joined #yosys
<Guest40933> Hello, I'm having some trouble with inferring BRAM on ECP5 when using yosys and nextpnr-ecp5
<Guest40933> Whatever I do, I can't get it to infer a BRAM
<Guest40933> it always infers either FFs or distributed memories
<Guest40933> Relevant lines from the yosys.log : https://termbin.com/zxwz
<Guest40933> "Read port #0 is in clock domain !~async~."
<Guest40933> and this is my block RAM wrapper https://termbin.com/av32
<Guest40933> It appears to be meeting all the requirements for BRAM to be inferred
<Guest40933> But it's not being inferred
cr1901_modern has joined #yosys
Forty-Bot has quit [Ping timeout: 264 seconds]
Forty-Bot has joined #yosys
<Guest40933> also - is there any way to instantiate a block RAM-based FIFO or do i just have to implement it manually?
_whitelogger has joined #yosys
<whitequark> you have to implement a FIFO manually
<Guest40933> Hmm okay
<Guest40933> Any idea on the inference issue?
<whitequark> not sure, let me check
<whitequark> Guest40933: you want a transparent read port, right?
<Guest40933> whitequark: what exactly does that mean?
<whitequark> // During write-cycles, i_data is passed through to o_data.
<whitequark> that means "transparent read port"
<Guest40933> ah
<Guest40933> yeah that's what i need
craigo has quit [Ping timeout: 246 seconds]
josi has joined #yosys
<whitequark> Guest40933: https://paste.debian.net/1152124/
<tpb> Title: debian Pastezone (at paste.debian.net)
<whitequark> yosys uses this macro for transparent read ports
<whitequark> if you think "this will do the wrong thing if i add a read enable", well, that's correct
<whitequark> and in fact yosys can't represent correct transparent ports with read enable
_whitelogger has joined #yosys
<Guest40933> huh
<Guest40933> how should i go about implementing this then?
<Guest40933> or alternatively what if i make o_data a don't-care when i_we is high
emeb_mac has quit [Quit: Leaving.]
jakobwenzel has joined #yosys
<whitequark> do you mean transparent ports with read enable specifically, or in general?
<tnt> Guest40933: in your wrapper if you remov the 'else' and just always do "o_data <= ram[i_addr];" you will get a DP16KD
<whitequark> tnt: that's a non-transparent port
<tnt> Sure but his original code was also non-transparent.
<whitequark> are you sure?
<whitequark> seems transparent to me due to o_data <= i_data;
<whitequark>
<tnt> and he just suggested above replacing o_data with don't care when i_we is high.
<whitequark> and it's explicitly requested in the file header
<whitequark> yeah, ok, makes sense
<tnt> Oh ... I had missed the o_data <= i_data;
<tnt> Implementing it with the common transparent read patter you sugested above also yields a DP16KD.
<tnt> Which has me a bit confused because AFAIK the ECP5 can't switch between the two modes.
<tnt> (and I don't see any added logic around it)
<tnt> I guess yosys is more like "user better know what he's doing" ... because calling synth_ice40 also yield SB_RAM40_4K even thoug it's explicitely stated that read/write at the same address is undefined behavior.
<whitequark> yosys adds transparency logic for ice40
<daveshah> ECP5 does support transparent BRAM, or at least has a WRITEMODE option for that
<tnt> daveshah: Oh you're right ... nm me I'm bling apparently
Asu has joined #yosys
nurelin has quit [Ping timeout: 256 seconds]
kraiskil has joined #yosys
kraiskil has quit [Ping timeout: 256 seconds]
kraiskil has joined #yosys
jfcaron has joined #yosys
futarisIRCcloud has quit [Quit: Connection closed for inactivity]
develonepi3 has joined #yosys
craigo has joined #yosys
somlo has quit [Remote host closed the connection]
somlo has joined #yosys
daknig has joined #yosys
emeb has joined #yosys
cr1901_modern has quit [Ping timeout: 246 seconds]
cr1901_modern has joined #yosys
citypw has quit [Ping timeout: 240 seconds]
nengel has quit [Ping timeout: 256 seconds]
<Guest40933> even with the always "o_data <= ram[i_addr];" its still having the same issue
kgugala has quit [Ping timeout: 264 seconds]
<ZipCPU> Gues40933: Are you initializing o_data at all?
<ZipCPU> Try getting rid of any initial values in o_data
kgugala_ has joined #yosys
<Guest40933> ZipCPU: nope, o_data is not initialized
<Guest40933> i tried doing it with a trivial minimal example and had the same issue as well
<Guest40933> where the i_addr was just some DIP switches (2FF-syncronized of course) and the o_data was a register and it still had the same error when inferring BRAM
kgugala has joined #yosys
kgugala_ has quit [Ping timeout: 246 seconds]
kraiskil has quit [Ping timeout: 265 seconds]
<ZipCPU> Guest40933: Did you post the repository having problems somewhere?
<ZipCPU> Ok ... I'm looking at https://termbin.com/av32 ... I assume this is what's going on?
<Guest40933> yep thats the code thats having the issue
<ZipCPU> ... and your goal is a first-write-fall-through FIFO? (If I have the right name ...) where a write on one cycle is immediately available on the same cycle?
<ZipCPU> or ... immediately available on the next cycle is I think what you want, right?
<ZipCPU> Did you try using an assign, as in line 62 of https://paste.debian.net/1152124/ ?
<tpb> Title: debian Pastezone (at paste.debian.net)
FFY00 has quit [Remote host closed the connection]
FFY00 has joined #yosys
<thardin> is signed right shift defined in verilog? that is, is x>>1 == x/2 ?
<ZipCPU> Check out ">>>"
<thardin> so >>> is arithmetic shift, cool
<thardin> thanks for the tip :)
emeb_mac has joined #yosys
<Guest40933> Huh very interesting
<Guest40933> assign o_data = ram[r_addr];
<Guest40933> that seems to have fixed it
<Guest40933> but... wouldn't that be implying an async read?
<daveshah> no, if the address is registered then it is a sync, but transparent, read
<daveshah> if the address is unregistered then indeed it would be an async read
<Guest40933> oh huh
<Guest40933> so what would be on o_data on the cycle immediately after one where i_we is high?
<Guest40933> would it be the data that was just written, or is it undefined
<daveshah> it would be the data that was just written
<thardin> grmbl nextpnr doesn't exit(1) on errore
<daveshah> what error?
<Guest40933> ah
jfcaron has quit [Ping timeout: 246 seconds]
jakobwenzel has quit [Remote host closed the connection]
<thardin> daveshah: whenever a design is too big to fit
<daveshah> How is it failing in that case?
<thardin> ERROR: Failed to expand region (0, 0) |_> (13, 17) of 1318 ICESTORM_LCs
Asuu has joined #yosys
Asu has quit [Ping timeout: 246 seconds]
Asuu has quit [Remote host closed the connection]
maartenBE has joined #yosys
dys has quit [Ping timeout: 246 seconds]
emeb has quit [Quit: Leaving.]
N2TOH_ has joined #yosys
N2TOH has quit [Ping timeout: 260 seconds]