Monday, 2020-03-02

*** tpb has joined #yosys00:11
*** X-Scale has quit IRC00:13
*** X-Scale` is now known as X-Scale00:13
*** N2TOH has joined #yosys00:59
*** N2TOH_ has quit IRC01:00
*** N2TOH_ has joined #yosys01:00
*** N2TOH has quit IRC01:03
*** emeb_mac has joined #yosys01:11
*** twnqx has quit IRC01:13
*** citypw_ has joined #yosys01:40
*** emeb has left #yosys02:12
*** Cerpin has quit IRC06:54
*** emeb_mac has quit IRC06:56
*** dys has quit IRC06:57
*** Cerpin has joined #yosys07:04
*** dys has joined #yosys07:29
*** dys has quit IRC07:32
*** m4ssi has joined #yosys07:52
*** FabM has joined #yosys07:55
lambdaif 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 is08:00
lambdapacked in front of them, which of course won't work: http://ix.io/2d9r08:00
lambdais 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
daveshahlambda: try either -flatten (to work with a flat netlist instead) or -noiopad (to disable obuf insertion)08:11
lambdadaveshah: I'm already using -flatten with synth_xilinx - is nextpnr-xilinx ok with no iopads in the json?08:14
lambdaalso, no tristate buffers with -noiopad :/08:17
daveshahYeah, nextpnr-xilinx prefers iopad08:19
daveshahI think the problem is attributes are being lost here08:20
daveshahCan you try read_verilog +/xilinx/cells_xtra.v _before_ any GHDL stuff?08:20
lambdadaveshah: no change08:25
lambdacurrently trying some `select` magic to drop all OBUFs after OBUFDS08:26
daveshahIncidentally, what do you mean by "map the mangled component names"?08:27
daveshahThe problem is almost certainly that the attribute telling Yosys not to insert OBUFs on OBFUDS top level pins is being lost08:27
lambdadaveshah: 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
daveshahlambda: and just to check, your Yosys is reasonably up to date?08:32
lambdadaveshah: 69c2d384, latest master08:37
daveshahlambda: 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 #yosys08:38
*** rohitksingh has quit IRC08:41
lambdadaveshah: 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
daveshahI think the submodule might be confusing things08:43
daveshahIf you remove that module and have  read_verilog +/xilinx/cells_xtra.v before GHDL, does it fix the capitalisation issue?08:43
lambdano, 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
lambdathat is, IBUF + obufds + 2x OBUF, which makes sense since it can't know obufds is anything special08:46
lambdaoh 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 IRC09:24
*** dormito has joined #yosys09:26
lambdanevermind, that was a false flag.09:28
*** twnqx has joined #yosys09:29
lambdahrmm, `flatten` seems to add BUFs itself, can I get it to not do that?10:00
ZirconiumXIt's probably doing it for things like tristate logic10:09
mwkhmm.10:11
mwklambda: ... you know what, I'll cook a patch10:11
mwkgive me an hour or so10:11
lambdamwk: awesome, thanks :)10:19
lambdamwk: 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 workaround10:26
mwkyes, we'd have to trace the wire from the top-level port10:29
mwkthrough assigns and submodule ports10:29
mwk*wires10:29
*** dormito has quit IRC10:29
mwkwhich 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, etc10:30
mwkbut I think I'll just solve the simple case and call it a day10:31
lambdait's definitely an improvement already, yeah10:33
*** dormito has joined #yosys10:49
*** strubi has joined #yosys11:30
*** doubleyou has quit IRC15:05
mwklambda: try out https://github.com/YosysHQ/yosys/pull/1731 (WARNING: completely untested)15:23
tpbTitle: iopadmap: Look harder for already-present buffers. by mwkmwkmwk · Pull Request #1731 · YosysHQ/yosys · GitHub (at github.com)15:23
mwksorry it took so long15:23
lambdamwk: 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 bit15:30
*** emeb has joined #yosys15:34
*** cr1901_modern has quit IRC15:38
*** cr1901_modern has joined #yosys15:39
lambdamwk: 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/2dbp15:52
daveshahThey 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
mwklambda: BUFs are verilog "assign" statements, more or less15:53
lambdaah, I see15:53
mwkthey... kind of don't have well-defined semantics in yosys, which annoys me greatly15:53
mwkanyway, good to know15:55
mwkI'll add some tests to this PR and get it merged15:55
*** FabM has quit IRC15:58
*** citypw_ has quit IRC16:06
strubidaveshah, 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 IRC16:48
*** alexhw has joined #yosys16:49
*** alexhw has quit IRC16:53
*** alexhw has joined #yosys16:55
ZirconiumXMemory is a pretty difficult thing to test as such17:07
strubiI was just trying to co-simulate against a DP16KD (ECP5) to see if I got the wiring and /CS right17:15
strubithat kinda works, but for the big picture (not breaking stuff..) I was wondering on how to proceed17:20
*** twnqx has quit IRC17:25
*** m4ssi has quit IRC17:27
*** dys has quit IRC17:27
*** dys has joined #yosys17:34
*** rohitksingh has joined #yosys17:38
*** gmc has quit IRC17:58
*** gmc has joined #yosys18:05
*** twnqx has joined #yosys18:27
*** strubi has quit IRC19:05
*** rohitksingh has quit IRC19:07
*** somlo has quit IRC19:09
*** gmc has quit IRC19:09
*** rohitksingh has joined #yosys19:12
*** twnqx has quit IRC19:15
*** somlo has joined #yosys19:19
*** gmc has joined #yosys19:22
*** dys has quit IRC19:52
*** Cerpin has quit IRC20:09
*** N2TOH_ is now known as N2TOH20:17
*** TFKyle has joined #yosys20:21
*** rohitksingh has quit IRC20:52
*** dys has joined #yosys20:53
*** twnqx has joined #yosys20:55
*** rohitksingh has joined #yosys21:08
*** Cerpin has joined #yosys21:29
*** rohitksingh has quit IRC21:42
*** rohitksingh has joined #yosys22:08
*** dormito has quit IRC22:44
*** rohitksingh has quit IRC22:45
*** dormito has joined #yosys22:57
mwklambda: the PR is now in master, btw23:06
*** cr1901_modern has quit IRC23:12
*** cr1901_modern has joined #yosys23:13
*** dormito has quit IRC23:24
*** dormito has joined #yosys23:44

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