Saturday, 2024-02-24

*** tpb <[email protected]> has joined #yosys00:00
*** bjorkintosh <bjorkintosh!~bjork@user/bjorkintosh> has quit IRC (Quit: Leaving)00:55
*** lexano <[email protected]> has quit IRC (Ping timeout: 256 seconds)01:07
*** puddingpimp <[email protected]> has joined #yosys01:13
*** citypw <citypw!~citypw@gateway/tor-sasl/citypw> has joined #yosys05:06
*** dkc <dkc!~dan@user/dkc> has quit IRC (Read error: Connection reset by peer)06:05
*** dkc <dkc!~dan@user/dkc> has joined #yosys06:09
*** emeb_mac <[email protected]> has quit IRC (Quit: Leaving.)06:57
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Ping timeout: 255 seconds)13:06
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys13:08
*** lexano <[email protected]> has joined #yosys13:29
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Ping timeout: 240 seconds)14:08
*** bjorkintosh <bjorkintosh!~bjork@2600:1700:5400:c80:5d9:1090:ac54:d912> has joined #yosys14:25
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys14:42
*** emeb_mac <[email protected]> has joined #yosys15:15
*** citypw <citypw!~citypw@gateway/tor-sasl/citypw> has quit IRC (Ping timeout: 255 seconds)15:42
*** pbsds <[email protected]> has quit IRC (Quit: The Lounge - https://thelounge.chat)18:42
*** pbsds <[email protected]> has joined #yosys18:43
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has quit IRC (Ping timeout: 260 seconds)19:03
*** GenTooMan <GenTooMan!~cyberman@2601:547:437f:e5c6:21f:5bff:fefe:a883> has joined #yosys19:36
darklingNeophyte question: Is there any good documentation on how to actually use yosys? The docs aren't exactly brimming with information, and I've found one "tutorial" that doesn't explain anything, just gives a couple of commands ex cathedra.20:40
loftydarkling: have you read the manual and/or the command reference?20:58
loftyhttps://yosyshq.readthedocs.io/projects/yosys/en/latest/ and https://yosyshq.readthedocs.io/projects/yosys/en/latest/cmd_ref.html20:58
tpbTitle: Yosys manual (at yosyshq.readthedocs.io)20:58
darklingI've read the manual. It gives one example of a script. The command reference is just that... reference, not tutorial.20:58
loftywhat are you trying to do? use it to synthesise for an FPGA?20:59
darklingI'd like to simulate first, and then synthesise.20:59
loftyfor simulation, consider something like icarus verilog or verilator21:00
darklingSo I can't use yosys as a single all-in-one solution?21:01
loftythere technically is `sim`, but I've never used it or seen anybody directly use it21:01
loftyand there's also write_cxxrtl, which builds a C++ simulation of your HDL21:02
loftybut whitequark would be the person to ask about that.21:02
darklingOK. Nevertheless, the yosys docs are distinctly impenetrable. It's landed straight in the usual failure mode of "here's all the things in alphabetical order", without explaining what the different types of things are, what the expected operational structures are, or how to fit them together in common use cases.21:03
loftyOkay.21:06
loftySo, the manual talks about script-based synthesis flows, which is how Yosys is typically used21:06
loftyat its core, Yosys represents the netlist as RTLIL21:07
loftyand all the commands are passed to operate or transform that RTLIL21:07
darklingI got the overall idea -- that you're passing netlists from one stage to the next.21:07
loftyThere are no explicit stages.21:08
darklingOther than the one example script, there's nothing about how you should put things together, what steps you might want to take for different situations, what order they'd be useful to run in...21:08
loftyhave you looked at something like synth_ecp5?21:09
darklingNot relevant for me -- I don't have that hardware. (I've got an Ice40, and a Xilinx6 in a SpecNext -- and I need to track down the docs on that latter one to work out how it's put together)21:10
loftybut as an example of how you should put things together, it is absolutely relevant to you21:11
loftyHell; I wrote synth_intel_alm, and I can directly answer every question you have about what that script does21:11
darklingI still don't understand why the individual pieces of that are put together like that.21:13
loftywould you like me to walk you through how it works?21:13
darklingOr, if I don't need to know that, then what are the higher-level elements such as synth_ecp5 that I should be looking at?21:14
loftythe user-facing scripts are the `synth_xxx` passes21:14
darklingIt seems that there's a bunch of low-level things (used in the ecp5 synth), but then those are combined into high-level things (like ecp5).21:15
loftyyes.21:15
darklingThose are thrown together in the docs without highlighting which pieces are which.21:15
darklingSo, again, we come back to: what should someone be using, and how?21:15
*** bjorkintosh <bjorkintosh!~bjork@user/bjorkintosh> has quit IRC (Quit: Leaving)21:16
darklingEven "<lofty> the user-facing scripts are the `synth_xxx` passes" is an important piece of information that I didn't see in the docs.21:16
darklingI know I'm being grumpy about this, and I'm sorry, but it's a general problem in docs that I see frequently, and it's been annoying me for at lesat 20 years. :)21:17
loftyfor ice40, use `yosys -p "synth_ice40 -top <your top-level modules> -json filename.json" <your verilog files>`, for xilinx use `synth_xilinx -flatten -top <your top level module> -json filename.json` instead of `synth_ice40`21:17
darklingWhy is there -flatten in the xilinx one, but not in the ice40?21:18
loftybecause for maintainer-related reasons, xilinx does not flatten the module hierarchy when everybody else does21:19
lofty(by default, I mean)21:19
loftyand nobody seems to use synth_xilinx enough to complain about that annoyance21:20
darklingOK. :)21:21
loftyactually, I should be more specific21:21
loftyyou also need `-family xc6s` to instruct the pass to synthesise for spartan 621:21
darklingI'm a long way off being anywhere near needing to target the SpecNext. I'm still at the stage of two buttons, and AND gate, and an LED. :)21:22
darklingBut I'll keep that in mind.21:22
lofty(I think the distinction between xc7 and xc6s from a synthesis point of view is the DSPs, but don't quote me on that)21:23
loftyI would be genuinely happy to explain how the synthesis scripts work, if you're interested21:24
darklingThe "tutorial" I've found is https://eecs.blog/lattice-ice40-fpga-icestorm-tutorial/, and that uses arachne for place-and-route, and some chip-specific tooling for generating and uploading the bitstream. Is that normal procedure?21:24
loftyarachne-pnr is horrendously obsolete; you should use nextpnr-ice40 instead21:25
loftybut uploading generally has some kind of chip-specific tooling in some way21:25
darklingNot unexpected, but good to have confirmation.21:27
darklingOh, and thanks for the offer on explanation of the synthesis scripts, but it's probably a step too far for me right now.21:28
darklingI'm sure I'll be back with those questions at some point, but right now if I can get two buttons and an LED working, it'll be a major advance for me.21:29
*** bjorkintosh <bjorkintosh!~bjork@2600:1700:5400:c80:5d9:1090:ac54:d912> has joined #yosys21:40
*** bangcat <bangcat!13039@2a01:4f8:141:1272::2> has quit IRC (Quit: WeeChat 4.1.2)22:54
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)23:26
*** nonchip <[email protected]> has joined #yosys23:26

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