whitequark changed the topic of #yosys to: Yosys Open SYnthesis Suite: https://github.com/YosysHQ/yosys/ | Channel logs: https://libera.irclog.whitequark.org/yosys/ | Bridged to #yosys:matrix.org
tpb has quit [Remote host closed the connection]
tpb has joined #yosys
ec has quit [Remote host closed the connection]
ec has joined #yosys
xutaxkamay has quit [Ping timeout: 248 seconds]
xutaxkamay has joined #yosys
FabM has joined #yosys
FabM has joined #yosys
krispaul has joined #yosys
kristianpaul has quit [Ping timeout: 252 seconds]
krispaul has quit [Ping timeout: 252 seconds]
orhosko has joined #yosys
so-offish has quit [Read error: Connection reset by peer]
so-offish has joined #yosys
<orhosko> Hello everyone, I was using nextpnr-himbaechel and I kinda stuck. Is this the right place to ask for?
<orhosko> My problem was using ROM16 modules is possible in gowin ide but I couldn't managed to use with nextpnr. I haven't found any issues about it. Is it not implemented or am I missing something?
<Semisol[m]> orhosko: ROM16 is a LUT with all inputs as address select
<Semisol[m]> It will synthesize like regular LUTs, and I believe Yosys can infer it if you use an asynchronous read-only memory
<lofty> yeah, the answer is to just use soft logic for it
<orhosko> firstly thanks a lot for quick response. I was getting 'ERROR: Unable to place cell 'rom.rom16_inst_5', no BELs remaining to implement cell type 'ROM16'' and there are many LUTs available(using only 1%). If I understand correctly its due to my implementation. I was trying the IP generator from the gowin ide so maybe I need to look into produced
<orhosko> module..
<Semisol[m]> orhosko: `ROM16` is an abstraction
<Semisol[m]> if possible, you should use a platform-independent async ROM
<Semisol[m]> that, and things like case statements, will automatically get turned into ROMs, and could get further optimized by yosys
<Semisol[m]> if you must manually do it, use a platform LUT, set the init values to the ROM contents, and use I0-I3 as address select
<orhosko> Ohh thanks it makes sense now. The produced IP from the IDE looks something like this
<orhosko> ```
<orhosko> ROM16 rom16_inst_0 (
<orhosko>     .DO(dout[0]),
<orhosko>     .AD(ad[3:0])
<orhosko> );
<orhosko> defparam rom16_inst_0.INIT_0 = 16'h0002;
<orhosko> ```
<orhosko> and if I understand correctly I can implement this by myself easily. It is just LUTs. However there are still some points I haven't understood. First one is why i can use similarly complex generated pROM directly but not ROM16. If someone creates that abstraction, can/should it be implemented. Here is the pROM implementation its similarly complex:
<orhosko> ```
<orhosko> pROM prom_inst_0 (
<orhosko>     .DO({prom_inst_0_dout_w[23:0],dout[7:0]}),
<orhosko>     .CLK(clk),
<orhosko>     .OCE(oce),
<orhosko>     .CE(ce),
<orhosko>     .RESET(reset),
<orhosko>     .AD({gw_gnd,gw_gnd,gw_gnd,gw_gnd,gw_gnd,gw_gnd,gw_gnd,ad[3:0],gw_gnd,gw_gnd,gw_gnd})
<orhosko> );
lofty[m] has joined #yosys
<lofty[m]> from some quick browsing through the nextpnr source and the gowin primitive guide: pROM maps to BSRAM (block RAM), but ROM16 maps to SSRAM (LUT RAM).
orhosko97 has joined #yosys
orhosko has quit [Ping timeout: 240 seconds]
orhosko97 has quit [Client Quit]
orhosko has joined #yosys
<orhosko> I also looked for nextpnr source code and couldn't find anything about ROM16. Thats why I thought it's not implemented. Did you find anything in source code or is it from the primitive guide?
<lofty[m]> from the primitive guide: https://cdn.gowinsemi.com.cn/UG285E.pdf
<orhosko> Thanks a lot to both of you. I will try to implement myself now. I still not sure whether ROM16 should be part of the nextpnr since IDE provides it directly. Maybe I will open a issue/pr later. thx again
krispaul has joined #yosys
krispaul has quit [Read error: Connection reset by peer]
kristianpaul has joined #yosys
orhosko has quit [Quit: Client closed]
<gatecat> the easiest option to implement it would probably just be a yosys techmap rule that converts it to a LUT, given that's all that's happening in any case
<gatecat> it's the kind of thing techmap rules are very nice for
ec has quit [Ping timeout: 264 seconds]
ec has joined #yosys
FabM has quit [Ping timeout: 246 seconds]
so-offishul has joined #yosys
so-offish has quit [Ping timeout: 260 seconds]
so-offishul has quit [Quit: Leaving]
mithro has quit [Ping timeout: 260 seconds]
sorear has quit [Ping timeout: 260 seconds]
MoeIcenowy has quit [Ping timeout: 260 seconds]
jleightcap has quit [Ping timeout: 260 seconds]
dnm has quit [Ping timeout: 260 seconds]
Guest408 has quit [Ping timeout: 260 seconds]
MoeIcenowy has joined #yosys
root1 has joined #yosys
jleightcap has joined #yosys
dnm has joined #yosys
sorear has joined #yosys
mithro has joined #yosys
peepsalot has quit [Remote host closed the connection]
peepsalot has joined #yosys
bjorkintosh has quit [Ping timeout: 276 seconds]
orhosko has joined #yosys
berkay_ has joined #yosys
orhosko has quit [Client Quit]
berkay_ is now known as orhosko
orhosko has quit [Quit: orhosko]
berkay_ has joined #yosys
nonchip has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nonchip has joined #yosys