Wednesday, 2025-03-19

*** tpb <[email protected]> has joined #yosys00:00
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys01:54
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)02:18
vanczCan I read somewhere about what kind of techniques are used to compile verilog to rtl? Specifically the uh...layer that implements whatever it is that is done to match the "procedural" verilog code to synthesized primizives?02:49
vanczprimitives02:49
vanczIn general, to satisfy my curiosity.02:50
vancz(and how this results in unintuitive synthesis insanity)02:53
*** emeb_mac <[email protected]> has quit IRC (Quit: Leaving.)06:12
*** FabM <FabM!~FabM@2a03:d604:106:ee00:95b8:90ed:b0b3:b4a4> has joined #yosys06:16
*** remexre <remexre!~remexre@user/remexre> has quit IRC (Read error: Connection reset by peer)07:50
*** remexre <remexre!~remexre@user/remexre> has joined #yosys07:50
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Ping timeout: 248 seconds)08:04
*** krispaul <[email protected]> has joined #yosys08:04
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys08:09
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)08:51
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys09:10
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 265 seconds)09:30
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)09:32
*** FabM <FabM!~FabM@2a03:d604:106:ee00:7e18:7779:b5d:27ed> has joined #yosys09:42
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 265 seconds)10:19
*** FabM <FabM!~FabM@2a03:d604:106:ee00:95b8:90ed:b0b3:b4a4> has joined #yosys10:31
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys10:50
*** babo67_ <babo67_!~babo67@user/babo67> has quit IRC (Remote host closed the connection)10:59
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)11:20
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys12:40
*** whitequark[cis] <whitequark[cis]!whitequark@2a01:4f8:c012:5b7:0:1:0:4> has joined #yosys12:55
whitequark[cis]basically every vendor does their own thi g12:55
whitequark[cis]s/thi g/thing/12:55
whitequark[cis]what yosys does is kind of some of the worst implementations I think12:55
whitequark[cis]just look at the recently filed memory init issue12:56
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)13:28
*** sorear <[email protected]> has quit IRC (Ping timeout: 252 seconds)13:50
*** edm <[email protected]> has quit IRC (Ping timeout: 272 seconds)13:50
*** edm <[email protected]> has joined #yosys13:53
*** sorear <[email protected]> has joined #yosys13:55
*** emeb_mac <[email protected]> has joined #yosys14:15
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys14:21
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)14:22
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys14:24
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)15:01
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys15:02
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Read error: Connection reset by peer)15:22
*** krispaul <[email protected]> has quit IRC (Quit: WeeChat 3.5)15:48
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys15:48
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys15:53
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Remote host closed the connection)16:08
vanczaw, yosys being the worst saddens me a bit16:27
vanczis there any theory on how it _should_ be done?16:29
vanczIs what Im asking about called the elaboration step?16:37
jixthere's elaboration as defined by the system verilog spec and elaboration as used in (parts of?) the industry16:57
jixthe former is just about resolving and instantiating a bunch of things16:57
jixbut often people seem to mean that + turning it into a netlist using primitives corresponding to the used HDL operations (or synthesizable patterns) but what those primitves are would already differ between tools16:59
jixvancz: if you want to see a much cleaner verilog -> RTLIL frontend than yosys's read_verilog (which I agree is bad) you could look at https://github.com/povik/yosys-slang 17:00
jixit uses an independently developed system verilog frontend that does what the standard calls elaboration and separately does the translation of precedural stuff to netlist primitives17:01
jixI haven't read too much of yosys-slang, but what I looked at was quite readable and made sense17:03
vanczfor the moment im more interested in high level descriptions, i have enough on my plate than to try to reverse engineer another codebase (right now), thanks though!17:41
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has joined #yosys17:42
*** FabM <FabM!~FabM@armadeus/team/FabM> has quit IRC (Ping timeout: 246 seconds)18:04
jixone theoretical perspective of turning procedural hdl into netlists is to view it as symbolic interpretation18:09
jixit's a specific variant of it and there are some aspects that probably don't fit super well into that framework but I think that perspective can give a lot of useful intuition on how you'd even approach this18:09
jixthe code you're interpreting is the procedural HDL and your symbolic value representation are netlists or operator DAGs or anything equivalent graph structured18:11
jixgiven the nature of HDLs and the retrofitted synthesis semantics, you also need to do some form of pattern matching for some synthesizable constructs and special case them (this is something where yosys's read_verilog does some things in the wrong order where it does some translation first and then pattern matches to detect things that shouldn't have been translated in that way...)18:14
jixuh and s/symbolic interpretation/symbolic execution/g18:16
jixthere's also a somewhat related field of abstract interpretation which has some high level similarities to symbolic execution but the application of that would be for optimization and formal verification, not translation18:18
*** hwpplayer1 <hwpplayer1!~user@user/hwpplayer1> has quit IRC (Ping timeout: 244 seconds)18:29
* vancz nods19:59
vanczis it a thing for people to write hdl based on their own primitive library, and then retarget their model to different hardware by reimplementing the library20:02
vanczwell, doing  part of the synthesis tool's job manually basically20:02
vanczso idk, having a generic adder module and then for one target implementing a ripple carry adder and for another target using built in addition primitives, idk20:03
jixI haven't really seen that for generic logic like that, but for things that you don't want synthesis to mess with or don't trust synthesis to do the right thing with that's a thing that's done, can't tell how common it is though20:04
jixit seems super common to handle clock gating that way20:05
vanczwhoops, wrong channel (hence the digression) but its fine20:06
vanczstill relevant given synthesis i guess20:06
vanczthanks20:11
vanczhm. https://dl.acm.org/doi/pdf/10.1145/362280520:16
*** emeb_mac <[email protected]> has quit IRC (Quit: Leaving.)21:01
*** so-offish <so-offish!~so-offish@2610:148:610:2b11::4> has joined #yosys21:33
*** nonchip <[email protected]> has quit IRC (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)23:06
*** nonchip <[email protected]> has joined #yosys23:06

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