*** tpb has joined #yosys | 00:00 | |
*** lf has quit IRC | 00:19 | |
*** lf has joined #yosys | 00:19 | |
*** modwizcode has quit IRC | 00:26 | |
*** Jay_jayjay has quit IRC | 01:36 | |
*** Jay_jayjay has joined #yosys | 01:38 | |
*** GenTooMan has quit IRC | 01:57 | |
*** GenTooMan has joined #yosys | 02:00 | |
*** Jay_jayjay has quit IRC | 02:06 | |
*** futarisIRCcloud has joined #yosys | 03:53 | |
*** Degi_ has joined #yosys | 04:32 | |
*** Degi has quit IRC | 04:33 | |
*** Degi_ is now known as Degi | 04:33 | |
*** elGamal has quit IRC | 05:23 | |
*** jfcaron_ has quit IRC | 05:27 | |
*** flaviusb has joined #yosys | 06:32 | |
*** emeb_mac has quit IRC | 06:43 | |
*** sensille has joined #yosys | 06:56 | |
*** vidbina_ has joined #yosys | 08:41 | |
*** jakobwenzel has joined #yosys | 08:51 | |
*** vidbina_ has quit IRC | 08:59 | |
*** vidbina_ has joined #yosys | 09:03 | |
*** jakobwenzel has quit IRC | 09:45 | |
*** blunaxela has quit IRC | 11:57 | |
*** blunaxela has joined #yosys | 11:57 | |
*** stzsch has joined #yosys | 12:04 | |
*** Jay_jayjay has joined #yosys | 13:00 | |
*** _whitelogger has quit IRC | 13:55 | |
*** _whitelogger has joined #yosys | 13:57 | |
*** kristian1 has quit IRC | 14:16 | |
*** kristianpaul has joined #yosys | 14:16 | |
*** _whitelogger has quit IRC | 14:46 | |
*** flaviusb has quit IRC | 14:46 | |
*** flaviusb has joined #yosys | 14:47 | |
*** emeb has joined #yosys | 14:49 | |
*** modwizcode has joined #yosys | 16:13 | |
*** acomodi has joined #yosys | 16:49 | |
*** aquijoule_ has quit IRC | 16:57 | |
*** richbridger has joined #yosys | 16:58 | |
*** modwizcode has quit IRC | 17:04 | |
*** jakobwenzel has joined #yosys | 17:22 | |
Jay_jayjay | why does instantiating `\$lut` not give the result as instantiating `SB_LUT4` ? | 17:31 |
---|---|---|
Lofty | Jay_jayjay: it should, unless you're not matching the techmap rule | 17:32 |
Lofty | On the other hand we generally suggest *not* using \$lut directly | 17:32 |
Jay_jayjay | if (NATIVE) begin | 17:32 |
Jay_jayjay | SB_LUT4 #(.LUT_INIT(LUT)) main (.O(o), | 17:32 |
Jay_jayjay | .I0(a), .I1(b), .I2(c), .I3(d)); | 17:32 |
Jay_jayjay | end | 17:32 |
Jay_jayjay | else begin | 17:32 |
Jay_jayjay | \$lut #(.WIDTH(4), .LUT(LUT)) main (.A({a, b, c, d}), .Y(o)); | 17:32 |
Jay_jayjay | end | 17:32 |
Jay_jayjay | here's my code | 17:32 |
Jay_jayjay | i checked, and it matches the rule | 17:32 |
Lofty | .WIDTH should be 16 | 17:33 |
Lofty | As in, 2^4 | 17:33 |
Lofty | Not 4 | 17:33 |
Jay_jayjay | Lofty: I need specific low-level access to control timing | 17:33 |
Lofty | Jay_jayjay: ...suffice it to say in my experience that's almost certainly not what ends up happening | 17:33 |
Jay_jayjay | oh, width should be 16? that's odd, usually its the # of inputs | 17:33 |
Lofty | Hmm | 17:34 |
Lofty | No, it should indeed be 4 | 17:34 |
Jay_jayjay | Lofty: if you really want the reason, I'm experimenting in asynchronous (unclocked) logic | 17:34 |
Lofty | Jay_jayjay: not with Yosys you aren't ;) | 17:34 |
Lofty | asynchronous logic means logic loops | 17:35 |
Jay_jayjay | yes, can't yosys handle those? | 17:35 |
Lofty | Which are Undefined Behaviour for Yosys | 17:35 |
Lofty | The entirety of the compiler assumes it will not encounter logic loops | 17:35 |
Jay_jayjay | well rn I'm trying a combinatorical logic thing, it should work | 17:35 |
Lofty | It is in fact an invariant of RTLIL that there are no combinational loops | 17:36 |
Jay_jayjay | i need to verify my lut module to get anything useful | 17:36 |
Lofty | You could just use a right shift. | 17:36 |
Lofty | Which is going to reduce to a LUT of the right size | 17:36 |
Jay_jayjay | also, I don't think any tool, for that matter, supports async logic | 17:37 |
Lofty | Some do | 17:37 |
Lofty | But not Yosys | 17:37 |
Jay_jayjay | besides very specialized and probably deprecated tools | 17:37 |
daveshah | Yosys is fine with it so long as you stick to arch primitives | 17:37 |
daveshah | ie SB_LUT4 | 17:38 |
Lofty | I suspect nextpnr will not time it though | 17:38 |
Jay_jayjay | oh, that i use `--force` | 17:38 |
Lofty | Since it does sync-to-sync | 17:38 |
daveshah | Yes, that's correct nextpnr timing analysis won't work | 17:38 |
daveshah | You should use --ignore-loops not --force though to avoid overriding other unrelated issues | 17:39 |
Jay_jayjay | yes, i've encountered the issue, but no timing analysis usually works anyway | 17:39 |
Jay_jayjay | oh, thanks for the advice | 17:39 |
daveshah | The result it gives is meaningless once you have loops | 17:39 |
daveshah | (very loosely, imagine its behaviour as breaking the loop in some arbitrary and undefined point) | 17:40 |
Jay_jayjay | yes, I've expected that | 17:40 |
Jay_jayjay | I don't care about timing analysis atm | 17:40 |
Lofty | <Jay_jayjay> \$lut #(.WIDTH(4), .LUT(LUT)) main (.A({a, b, c, d}), .Y(o)); <-- I should point out this is not equivalent with the direct SB_LUT4 instantiation | 17:42 |
Jay_jayjay | yes, it optimizes it | 17:43 |
Lofty | Because the techmap rule would map that as .I0(d), .I1(c), ... | 17:43 |
Jay_jayjay | oh, that | 17:43 |
Jay_jayjay | I'll reverse the order, would that work? | 17:43 |
Lofty | I might be a bit clueless, at times, but have a little faith | 17:43 |
Lofty | Reversing the order works | 17:43 |
daveshah | No, because $lut is not just techmapped to a LUT but also subject to optimisations in earlier phases | 17:43 |
Lofty | https://github.com/YosysHQ/yosys/blob/master/techlibs/ice40/cells_map.v#L27 | 17:43 |
daveshah | And those optimisations might be unsound once you take into account async behaviour, they aren't going to consider things like glitches or delays | 17:44 |
Jay_jayjay | yes, I typically use SB_LUT4 for things that absolutely can't change, and \$lut for optimizable signals | 17:44 |
daveshah | That's reasonable enough | 17:45 |
daveshah | But yeah, as Lofty says be careful with the ordering | 17:46 |
*** jakobwenzel has quit IRC | 17:48 | |
Jay_jayjay | yes, I had to mess around with the ordering a lot | 17:48 |
Jay_jayjay | tada! it works | 17:51 |
*** jakobwenzel has joined #yosys | 18:01 | |
*** jakobwenzel has quit IRC | 18:12 | |
*** Jay_jayjay has quit IRC | 18:15 | |
*** jakobwenzel has joined #yosys | 18:16 | |
*** jakobwenzel has quit IRC | 18:27 | |
*** jakobwenzel has joined #yosys | 18:32 | |
*** kraiskil has joined #yosys | 18:56 | |
*** jakobwenzel has quit IRC | 19:09 | |
*** acomodi has quit IRC | 19:28 | |
*** Jay_jayjay has joined #yosys | 20:04 | |
*** vidbina_ has quit IRC | 20:10 | |
*** mkru has joined #yosys | 20:18 | |
*** emeb_mac has joined #yosys | 20:43 | |
*** kraiskil has quit IRC | 20:54 | |
*** Jay_jayjay has quit IRC | 20:59 | |
*** Jay_jayjay has joined #yosys | 21:04 | |
*** kraiskil has joined #yosys | 21:07 | |
*** mkru has quit IRC | 21:42 | |
*** kraiskil has quit IRC | 21:43 | |
*** kraiskil has joined #yosys | 21:56 | |
*** jfcaron_ has joined #yosys | 22:34 | |
*** kraiskil has quit IRC | 22:36 | |
*** jfcaron_ is now known as jfcaron | 22:39 | |
*** jfcaron has quit IRC | 22:52 | |
*** jfcaron has joined #yosys | 22:52 | |
philtor | Anybody use the ghdl-yosys-plugin? Does it work reasonably well - how about missing features? | 23:03 |
*** Jay_jayjay has quit IRC | 23:20 | |
Lofty | philtor: it does work pretty well | 23:25 |
Lofty | But I'm not experienced enough to know what features are/aren't there | 23:25 |
*** emeb has left #yosys | 23:26 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!