Monday, 2020-06-15

*** tpb has joined #yosys00:00
*** mwk has quit IRC00:25
*** cr1901_modern has quit IRC00:31
*** mwk has joined #yosys00:32
*** cr1901_modern has joined #yosys01:03
*** X-Scale` has joined #yosys02:11
*** X-Scale has quit IRC02:12
*** X-Scale` is now known as X-Scale02:12
*** Degi has quit IRC02:21
*** Degi has joined #yosys02:22
*** cr1901_modern has quit IRC02:44
*** citypw has joined #yosys02:55
*** cr1901_modern has joined #yosys03:00
*** asinghan2 is now known as test03:25
*** test is now known as Guest4565203:25
*** cr1901_modern has quit IRC03:26
*** Guest40933 has joined #yosys03:26
Guest40933Hello, I'm having some trouble with inferring BRAM on ECP5 when using yosys and nextpnr-ecp503:27
Guest40933Whatever I do, I can't get it to infer a BRAM03:28
Guest40933it always infers either FFs or distributed memories03:28
Guest40933Relevant lines from the yosys.log : https://termbin.com/zxwz03:28
Guest40933"Read port #0 is in clock domain !~async~."03:28
Guest40933and this is my block RAM wrapper https://termbin.com/av3203:29
Guest40933It appears to be meeting all the requirements for BRAM to be inferred03:30
Guest40933But it's not being inferred03:30
*** cr1901_modern has joined #yosys03:35
*** Forty-Bot has quit IRC04:08
*** Forty-Bot has joined #yosys04:10
Guest40933also - is there any way to instantiate a block RAM-based FIFO or do i just have to implement it manually?04:13
*** _whitelogger has quit IRC04:18
*** _whitelogger has joined #yosys04:20
whitequarkyou have to implement a FIFO manually04:21
Guest40933Hmm okay04:22
Guest40933Any idea on the inference issue?04:22
whitequarknot sure, let me check04:24
whitequarkGuest40933: you want a transparent read port, right?04:32
Guest40933whitequark: what exactly does that mean?04:34
whitequark // During write-cycles, i_data is passed through to o_data.04:35
whitequarkthat means "transparent read port"04:35
Guest40933ah04:36
Guest40933yeah that's what i need04:36
*** craigo has quit IRC05:05
*** josi has joined #yosys05:32
whitequarkGuest40933: https://paste.debian.net/1152124/06:05
tpbTitle: debian Pastezone (at paste.debian.net)06:05
whitequarkyosys uses this macro for transparent read ports06:05
whitequarkif you think "this will do the wrong thing if i add a read enable", well, that's correct06:05
whitequarkand in fact yosys can't represent correct transparent ports with read enable06:07
*** _whitelogger has quit IRC06:42
*** _whitelogger has joined #yosys06:44
Guest40933huh06:53
Guest40933how should i go about implementing this then?06:53
Guest40933or alternatively what if i make o_data a don't-care when i_we is high06:53
*** emeb_mac has quit IRC06:55
*** jakobwenzel has joined #yosys07:04
whitequarkdo you mean transparent ports with read enable specifically, or in general?07:19
tntGuest40933: in your wrapper if you remov the 'else' and just always do "o_data <= ram[i_addr];"  you will get a DP16KD07:55
whitequarktnt: that's a non-transparent port08:17
tntSure but his original code was also non-transparent.08:18
whitequarkare you sure?08:18
whitequarkseems transparent to me due to o_data <= i_data;08:19
whitequark08:19
tntand he just suggested above replacing o_data with don't care when i_we is high.08:19
whitequarkand it's explicitly requested in the file header08:19
whitequarkyeah, ok, makes sense08:19
tntOh ... I had missed the o_data <= i_data;08:19
tntImplementing it with the common transparent read patter you sugested above also yields a DP16KD.08:23
tntWhich has me a bit confused because AFAIK the ECP5 can't switch between the two modes.08:23
tnt(and I don't see any added logic around it)08:24
tntI 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.08:29
whitequarkyosys adds transparency logic for ice4008:29
daveshahECP5 does support transparent BRAM, or at least has a WRITEMODE option for that08:30
tntdaveshah: Oh you're right ... nm me I'm bling apparently08:33
*** Asu has joined #yosys08:38
*** nurelin has quit IRC08:56
*** kraiskil has joined #yosys09:37
*** kraiskil has quit IRC10:34
*** kraiskil has joined #yosys10:48
*** jfcaron has joined #yosys10:50
*** futarisIRCcloud has quit IRC11:51
*** develonepi3 has joined #yosys12:25
*** craigo has joined #yosys13:08
*** somlo has quit IRC13:23
*** somlo has joined #yosys13:25
*** daknig has joined #yosys13:43
*** emeb has joined #yosys13:53
*** cr1901_modern has quit IRC14:50
*** cr1901_modern has joined #yosys14:51
*** citypw has quit IRC16:30
*** nengel has quit IRC17:48
Guest40933even with the always "o_data <= ram[i_addr];" its still having the same issue17:52
*** kgugala has quit IRC18:05
ZipCPUGues40933: Are you initializing o_data at all?18:06
ZipCPUTry getting rid of any initial values in o_data18:06
*** kgugala_ has joined #yosys18:10
Guest40933ZipCPU: nope, o_data is not initialized18:14
Guest40933i tried doing it with a trivial minimal example and had the same issue as well18:17
Guest40933where 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 BRAM18:18
*** kgugala has joined #yosys18:29
*** kgugala_ has quit IRC18:29
*** kraiskil has quit IRC19:15
ZipCPUGuest40933: Did you post the repository having problems somewhere?19:24
ZipCPUOk ... I'm looking at https://termbin.com/av32 ... I assume this is what's going on?19:25
Guest40933yep thats the code thats having the issue19:27
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?19:28
ZipCPUor ... immediately available on the next cycle is I think what you want, right?19:29
ZipCPUDid you try using an assign, as in line 62 of https://paste.debian.net/1152124/ ?19:33
tpbTitle: debian Pastezone (at paste.debian.net)19:33
*** FFY00 has quit IRC19:56
*** FFY00 has joined #yosys19:57
thardinis signed right shift defined in verilog? that is, is x>>1 == x/2 ?20:15
ZipCPUCheck out ">>>"20:15
thardinso >>> is arithmetic shift, cool20:20
thardinthanks for the tip :)20:20
*** emeb_mac has joined #yosys20:36
Guest40933Huh very interesting20:37
Guest40933assign o_data = ram[r_addr];20:37
Guest40933that seems to have fixed it20:37
Guest40933but... wouldn't that be implying an async read?20:39
daveshahno, if the address is registered then it is a sync, but transparent, read20:39
daveshahif the address is unregistered then indeed it would be an async read20:39
Guest40933oh huh20:40
Guest40933so what would be on o_data on the cycle immediately after one where i_we is high?20:41
Guest40933would it be the data that was just written, or is it undefined20:41
daveshahit would be the data that was just written20:42
thardingrmbl nextpnr doesn't exit(1) on errore20:44
daveshahwhat error?20:44
Guest40933ah20:46
*** jfcaron has quit IRC20:48
*** jakobwenzel has quit IRC20:59
thardindaveshah: whenever a design is too big to fit21:02
daveshahHow is it failing in that case?21:06
thardinERROR: Failed to expand region (0, 0) |_> (13, 17) of 1318 ICESTORM_LCs21:09
*** Asuu has joined #yosys22:05
*** Asu has quit IRC22:05
*** Asuu has quit IRC22:12
*** maartenBE has joined #yosys22:25
*** dys has quit IRC22:39
*** emeb has quit IRC22:56
*** N2TOH_ has joined #yosys23:30
*** N2TOH has quit IRC23:33

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!