*** tpb has joined #yosys | 00:11 | |
*** X-Scale has quit IRC | 00:13 | |
*** X-Scale` is now known as X-Scale | 00:13 | |
*** N2TOH has joined #yosys | 00:59 | |
*** N2TOH_ has quit IRC | 01:00 | |
*** N2TOH_ has joined #yosys | 01:00 | |
*** N2TOH has quit IRC | 01:03 | |
*** emeb_mac has joined #yosys | 01:11 | |
*** twnqx has quit IRC | 01:13 | |
*** citypw_ has joined #yosys | 01:40 | |
*** emeb has left #yosys | 02:12 | |
*** Cerpin has quit IRC | 06:54 | |
*** emeb_mac has quit IRC | 06:56 | |
*** dys has quit IRC | 06:57 | |
*** Cerpin has joined #yosys | 07:04 | |
*** dys has joined #yosys | 07:29 | |
*** dys has quit IRC | 07:32 | |
*** m4ssi has joined #yosys | 07:52 | |
*** FabM has joined #yosys | 07:55 | |
lambda | if I want to use yosys primitives from VHDL via ghdl, I have to find some way to map the mangled component names from ghdl back to the actual primitive names. until now I've just written simple verilog wrapper modules, which works great for the likes of PLLs, but I've hit a snag with OBUFDS: the top module creates OBUFs for all its outputs, and the inner (verilog) module containing the OBUFDS is | 08:00 |
---|---|---|
lambda | packed in front of them, which of course won't work: http://ix.io/2d9r | 08:00 |
lambda | is there either a way to remove the OBUFs, or even better, map the mangled names to the primitives directly without a separate module (in the case of OBUFDS, the mangling is just everything being turned to lowercase) | 08:03 |
daveshah | lambda: try either -flatten (to work with a flat netlist instead) or -noiopad (to disable obuf insertion) | 08:11 |
lambda | daveshah: I'm already using -flatten with synth_xilinx - is nextpnr-xilinx ok with no iopads in the json? | 08:14 |
lambda | also, no tristate buffers with -noiopad :/ | 08:17 |
daveshah | Yeah, nextpnr-xilinx prefers iopad | 08:19 |
daveshah | I think the problem is attributes are being lost here | 08:20 |
daveshah | Can you try read_verilog +/xilinx/cells_xtra.v _before_ any GHDL stuff? | 08:20 |
lambda | daveshah: no change | 08:25 |
lambda | currently trying some `select` magic to drop all OBUFs after OBUFDS | 08:26 |
daveshah | Incidentally, what do you mean by "map the mangled component names"? | 08:27 |
daveshah | The problem is almost certainly that the attribute telling Yosys not to insert OBUFs on OBFUDS top level pins is being lost | 08:27 |
lambda | daveshah: well, ghdl(synth) converts all identifiers to lowercase, so OBUFDS(I, O, OB) becomes obufds(i, o, ob). I somehow need to get from that back to the proper primitive name, so I just create a verilog module 'obufds' that passes all its ports through to an OBUFDS component. | 08:29 |
daveshah | lambda: and just to check, your Yosys is reasonably up to date? | 08:32 |
lambda | daveshah: 69c2d384, latest master | 08:37 |
daveshah | lambda: If you run synth_xilinx just on your obufds verilog module with no GHDL involved, do you still get spurious OBUFs? | 08:38 |
*** dys has joined #yosys | 08:38 | |
*** rohitksingh has quit IRC | 08:41 | |
lambda | daveshah: nope, that's just IBUF + OBUFDS. doesn't seem to be exclusive the ghdl though, if I recreate the same in verilog (top verilog module includes the wrapper obufds module), I also get the extra OBUFs. | 08:42 |
daveshah | I think the submodule might be confusing things | 08:43 |
daveshah | If you remove that module and have read_verilog +/xilinx/cells_xtra.v before GHDL, does it fix the capitalisation issue? | 08:43 |
lambda | no, then I just get an obufds blackbox in the output, I don't think ghdlsynth looks at the available components in yosys at all yet. | 08:45 |
lambda | that is, IBUF + obufds + 2x OBUF, which makes sense since it can't know obufds is anything special | 08:46 |
lambda | oh hey, if I flatten *before* synth_xilinx, it works! I'm guessing it's just that OBUFs are added to all the top module's outputs before flattening, where it doesn't know those outputs are connected to an OBUFDS - if I flatten first, no OBUFs are added in the first place. | 08:53 |
*** dormito has quit IRC | 09:24 | |
*** dormito has joined #yosys | 09:26 | |
lambda | nevermind, that was a false flag. | 09:28 |
*** twnqx has joined #yosys | 09:29 | |
lambda | hrmm, `flatten` seems to add BUFs itself, can I get it to not do that? | 10:00 |
ZirconiumX | It's probably doing it for things like tristate logic | 10:09 |
mwk | hmm. | 10:11 |
mwk | lambda: ... you know what, I'll cook a patch | 10:11 |
mwk | give me an hour or so | 10:11 |
lambda | mwk: awesome, thanks :) | 10:19 |
lambda | mwk: I guess the "proper" thing to do would be to respect that attribute of OBUFDS even when it's somewhere deeper in the hierarchy, the manual flatten was just an attempt at a workaround | 10:26 |
mwk | yes, we'd have to trace the wire from the top-level port | 10:29 |
mwk | through assigns and submodule ports | 10:29 |
mwk | *wires | 10:29 |
*** dormito has quit IRC | 10:29 | |
mwk | which is messy to do fully correctly, because in theory you could have "pass thru" modules that connect the top level port to a random wire in the top module, which is then buffered by *another* module, etc | 10:30 |
mwk | but I think I'll just solve the simple case and call it a day | 10:31 |
lambda | it's definitely an improvement already, yeah | 10:33 |
*** dormito has joined #yosys | 10:49 | |
*** strubi has joined #yosys | 11:30 | |
*** doubleyou has quit IRC | 15:05 | |
mwk | lambda: try out https://github.com/YosysHQ/yosys/pull/1731 (WARNING: completely untested) | 15:23 |
tpb | Title: iopadmap: Look harder for already-present buffers. by mwkmwkmwk · Pull Request #1731 · YosysHQ/yosys · GitHub (at github.com) | 15:23 |
mwk | sorry it took so long | 15:23 |
lambda | mwk: no problem at all, we all know this is way better support than most commercial tools can offer :) I'll try it in just a bit | 15:30 |
*** emeb has joined #yosys | 15:34 | |
*** cr1901_modern has quit IRC | 15:38 | |
*** cr1901_modern has joined #yosys | 15:39 | |
lambda | mwk: it works now! there are some BUFs left in the final output, are they just for renaming the signal? nextpnr-xilinx doesn't seem to care about them, so it's all good. http://ix.io/2dbp | 15:52 |
daveshah | They aren't actually cells at all, just how `show` visualises connections. They don't end up in the JSON netlist at all (instead two netnames just point to the same net index) | 15:53 |
mwk | lambda: BUFs are verilog "assign" statements, more or less | 15:53 |
lambda | ah, I see | 15:53 |
mwk | they... kind of don't have well-defined semantics in yosys, which annoys me greatly | 15:53 |
mwk | anyway, good to know | 15:55 |
mwk | I'll add some tests to this PR and get it merged | 15:55 |
*** FabM has quit IRC | 15:58 | |
*** citypw_ has quit IRC | 16:06 | |
strubi | daveshah, is there actually a BRAM test suite apart from tests/bram that checks against vendor primitive models, do you know? | 16:32 |
*** alexhw has quit IRC | 16:48 | |
*** alexhw has joined #yosys | 16:49 | |
*** alexhw has quit IRC | 16:53 | |
*** alexhw has joined #yosys | 16:55 | |
ZirconiumX | Memory is a pretty difficult thing to test as such | 17:07 |
strubi | I was just trying to co-simulate against a DP16KD (ECP5) to see if I got the wiring and /CS right | 17:15 |
strubi | that kinda works, but for the big picture (not breaking stuff..) I was wondering on how to proceed | 17:20 |
*** twnqx has quit IRC | 17:25 | |
*** m4ssi has quit IRC | 17:27 | |
*** dys has quit IRC | 17:27 | |
*** dys has joined #yosys | 17:34 | |
*** rohitksingh has joined #yosys | 17:38 | |
*** gmc has quit IRC | 17:58 | |
*** gmc has joined #yosys | 18:05 | |
*** twnqx has joined #yosys | 18:27 | |
*** strubi has quit IRC | 19:05 | |
*** rohitksingh has quit IRC | 19:07 | |
*** somlo has quit IRC | 19:09 | |
*** gmc has quit IRC | 19:09 | |
*** rohitksingh has joined #yosys | 19:12 | |
*** twnqx has quit IRC | 19:15 | |
*** somlo has joined #yosys | 19:19 | |
*** gmc has joined #yosys | 19:22 | |
*** dys has quit IRC | 19:52 | |
*** Cerpin has quit IRC | 20:09 | |
*** N2TOH_ is now known as N2TOH | 20:17 | |
*** TFKyle has joined #yosys | 20:21 | |
*** rohitksingh has quit IRC | 20:52 | |
*** dys has joined #yosys | 20:53 | |
*** twnqx has joined #yosys | 20:55 | |
*** rohitksingh has joined #yosys | 21:08 | |
*** Cerpin has joined #yosys | 21:29 | |
*** rohitksingh has quit IRC | 21:42 | |
*** rohitksingh has joined #yosys | 22:08 | |
*** dormito has quit IRC | 22:44 | |
*** rohitksingh has quit IRC | 22:45 | |
*** dormito has joined #yosys | 22:57 | |
mwk | lambda: the PR is now in master, btw | 23:06 |
*** cr1901_modern has quit IRC | 23:12 | |
*** cr1901_modern has joined #yosys | 23:13 | |
*** dormito has quit IRC | 23:24 | |
*** dormito has joined #yosys | 23:44 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!