Tuesday, 2020-04-14

*** tpb has joined #yosys00:00
*** emeb_mac has joined #yosys00:24
*** Degi has quit IRC00:29
*** Degi has joined #yosys00:30
*** X-Scale` has joined #yosys00:57
*** X-Scale has quit IRC00:58
*** X-Scale` is now known as X-Scale00:58
*** emeb has quit IRC01:22
*** citypw has joined #yosys02:54
*** whitequark has joined #yosys03:06
*** npe has quit IRC03:07
*** Stary has quit IRC03:20
*** Stary has joined #yosys03:23
*** N2TOH_US has quit IRC03:32
*** N2TOH_US has joined #yosys03:33
*** npe has joined #yosys03:52
*** smarter_ has joined #yosys04:34
*** vup2 has joined #yosys04:34
*** daniellimws has joined #yosys04:37
*** vup has quit IRC04:40
*** m_hackerfoo has quit IRC04:40
*** anuejn has quit IRC04:40
*** grazfather has quit IRC04:40
*** m_hackerfoo has joined #yosys04:47
*** npe has quit IRC06:22
*** emeb_mac has quit IRC06:31
*** anuejn_ has joined #yosys07:03
*** dys has joined #yosys07:20
SarayanHow can I have yosys tell me the exact compiler invocaitons on make?07:38
SarayanV=1 doesn't do a thing and neither VERBOSE=107:39
*** vidbina_ has joined #yosys07:39
whitequarkSarayan: make PRETTY=07:40
Sarayanthanks :-)07:41
sensilleis there a preferred way to get warnings from yosys/nextpnr? it's rather noisy08:02
daveshah-q08:03
whitequarkhave i mentioned the cxxrtl backend here yet? it's a backend i'm working on that emits C++ simulating ~arbitrary RTLIL netlists https://github.com/YosysHQ/yosys/pull/156208:05
tpbTitle: write_cxxrtl: new backend by whitequark · Pull Request #1562 · YosysHQ/yosys · GitHub (at github.com)08:05
whitequarkif any of you have use case for it, i'd be quite curious to hear08:05
daveshahI plan to try it for some mixed language sim fairly soon08:06
sensilledaveshah: nice, thanks. to you normally aim for zero warnings?08:06
daveshahYes08:06
daveshahFor designs not doing anything particularly odd, zero warnings should be achievable with nextpnr and Yosys08:06
sensillemy fear would be that the design changes be yosys-specific08:07
daveshahWhat warnings are you talking about?08:08
whitequarkdaveshah: nice!08:08
sensillelike "Replacing memory ... with list of registers."08:08
sensilleor "Resizing cell port ... from 5 bits to 8 bits."08:08
daveshahThe resizing cell port one sounds like it would be good practice to fix08:08
sensille"Yosys has only limited support for tri-state logic at the moment."08:09
daveshahThe replacing memory with list of registers is probably one that can be ignored (in the worst case it is a QoR issue, if you intended a memory to be used)08:09
whitequarkyou can mark the memory with (* ram_block *) if you intend a BRAM to be always used08:09
daveshahDoes the frontend look at this?08:10
daveshah "Replacing memory ... with list of registers." means $memrd/$memwr and then $mem will never be created08:10
whitequarkoh08:10
whitequarkI have to fix that sometime08:10
whitequarkI totally forgot that the Verilog frontend does that *too* for some reason08:10
daveshahIt's for patterns that don't even make sense as $memrd/$memwr08:12
daveshahI think mostly things that involve continuous/async writes08:12
whitequarkah I see08:12
daveshahUsually, it is when the concept is an array rather than a memory anyway08:12
whitequarkhm, $memwr does have a \CLK_ENABLE port08:12
daveshahI have a feeling from discussions with Claire in the past that there are a few other cases that need to be mem2reg'd in the frontend08:13
daveshahbut I can't remember any details, just that there was a bug around this at one point08:14
whitequarkyes, that's my impression too08:14
sensilleit might be nice to see the utilization summary from nextpnr even with -q08:14
whitequarki also understand that the Verilog frontend in Yosys is perhaps one step above a proof of concept08:14
daveshahYes, I think it was always intended to be rewritten but never was08:15
daveshahThere are various talks of a new SV frontend based on one of the new parsers but I don't know if anything is actually happening08:15
daveshahime, parsing is easy, elaborating is hard08:15
whitequarkyup08:15
whitequarkI feel like Yosys would be better off completely ditching the Verilog frontend and using some external project focusing on that specifically08:16
whitequarknot only would this result in a much better frontend, but also it would reduce the intertwinedness of the Verilog frontend and optimization passe08:17
daveshahYeah, ghdlsynth has shown this can be done08:17
whitequarkand connect_rpc shows this can be done even if your frontend isn't in C++ :)08:18
*** jakobwenzel has joined #yosys08:20
whitequarkdaveshah: oh btw, any idea if transparent ports with RE can be supported by yosys reaonably easily?08:22
whitequarkI feel like we discussed this before08:22
daveshahI'm tempted to automatically reply no for anything memory-related in yosys...08:22
whitequarkoh yeah, they can't be, because the way it handles transparency groups at the moment is flawed08:23
whitequarkblech08:23
daveshahI can't remember, I think it gets a bit complicated across clocks08:23
daveshahYes08:23
Sarayanwq: I'm working today on seeing if I can integrate slang08:23
whitequarkslang?08:24
whitequarkoh the SV thing08:24
daveshahHow much elaboration does it do?08:24
SarayanGood question, it's on the way to integrate llvm, which I find, err, interesting :-)08:26
Sarayan(it's optional, so not an issue)08:26
whitequarkllvm would not help you elaborate SV08:27
SarayanCan you do sim-related code generation without having done elaboration first?08:29
whitequarkno08:29
SarayanFeatures08:29
Sarayan    Fully parse, analyze, and elaborate all SystemVerilog features - see this page for current status.08:29
whitequarkthat sounds quite good08:29
Sarayanyeah08:29
whitequarkperhaps too good? it took how many years for synopsys to implement all of SV?08:29
Sarayanno idea08:30
Sarayanit will be better than what's currently in there in any case08:30
whitequarkindeed08:30
SarayanStatus page: https://sv-lang.com/language-support.html08:32
tpbTitle: Language Support | slang C++ docs (at sv-lang.com)08:32
Sarayanthere's a lot of red, but there's also a lot of green08:33
*** daniellimws has left #yosys08:33
SarayanI'm not capable of seeing what's significant in there08:34
whitequarkseems reasonable to me08:34
whitequarkSVA seems to be largely missing08:34
SarayanI don't even know what sva means :-)08:35
whitequarksystemverilog assertions08:35
whitequarkformal verification features, one of the most directly useful parts of systemverilog08:35
daveshahI think the big problem with anything like slang is the netlist generation side08:35
daveshahWhich I can't see much of atm, but may be missing08:35
daveshahCertainly with adding synthesis to ghdl that has looked to have been fairly complicated08:36
*** jryans has quit IRC08:39
*** promach3 has quit IRC08:39
*** fevv8[m] has quit IRC08:39
*** rjo has quit IRC08:39
*** emily has quit IRC08:39
Sarayanhmmm, annoying caveat, slang really requires c++1708:44
*** oldtopman has joined #yosys08:44
sensillehm. -defer does not help with default parameters set to invalid values for the design08:50
*** Vinalon has quit IRC08:51
*** rjo has joined #yosys08:52
sensillethe "Resizing cell port" warning is also from a difference in default parameters08:54
daveshahIn what context are you using -defer?08:54
daveshahThis is exactly what it is intended for08:54
sensilleyou recommended it to me a few days ago08:55
sensillei initially set all default parameters to 0, which led to errors08:55
daveshahSo you are using read_verilog -defer and you still get a warning based on the default parameters?08:55
sensilleyosys -defer -p "synth_ecp5 -json $(TARGET).json" $(SRC)08:56
sensilleoh, it's an option to read_verilog08:57
sensillei'm afraid i have to understand more of yosys08:57
daveshahIt's an unfortunate consequence of getopt that -defer is accepted (it is parsed as -d -e fer)09:02
sensillei was shortly wondering about that09:03
sensilleso yosys -p "verilog_defaults -add -defer" -p "synth_ecp5 -json $(TARGET).json" $(SRC)?09:04
sensilleprobably not, still complains09:04
*** futarisIRCcloud has quit IRC09:05
sensilledoing that on the command line works, though09:06
*** jryans has joined #yosys09:31
*** promach3 has joined #yosys09:31
*** fevv8[m] has joined #yosys09:31
*** emily has joined #yosys09:31
*** jakobwenzel has quit IRC09:55
sensillei have no idea where the read_verilog comes from on my current command line10:00
ZirconiumXsensille: if you specify a .v file for Yosys it'll invoke read_verilog on it10:02
sensilleok, then the next question is why verilog_defaults doesn't work on that10:03
daveshahBecause -p runs after command line frontends10:04
daveshahI think -f "verilog -defer" should use read_verilog -defer for command line files10:04
*** jakobwenzel has joined #yosys10:06
sensillewith this i get less warnings, but an error "Module ... is not part of the design"10:07
sensilleso it probably replaces more than just the read_verilog10:07
daveshahWhen using defer, you need to pass -top to synth_ecp510:09
*** vidbina_ has quit IRC10:11
sensillefinally :) most warnings are gone, and now i can see that the "Resizing cell size" warnings are my own fault10:13
*** vidbina_ has joined #yosys11:13
*** lambda has quit IRC11:41
*** lambda has joined #yosys11:44
*** lambda has quit IRC11:45
*** lambda has joined #yosys11:47
Sarayanok, slang compiles in a yosys tree, now for the fun part, plugging it in11:58
*** vup2 is now known as vup12:23
*** vidbina_ has quit IRC12:41
*** vidbina_ has joined #yosys12:51
*** jfcaron has joined #yosys13:05
*** vidbina_ has quit IRC13:15
*** vidbina_ has joined #yosys13:45
*** sorear has quit IRC13:50
SarayanSo, sv is parsed into... something13:51
*** sorear has joined #yosys13:52
Sarayannow to see how to introduce that somthing to yosys13:52
whitequarkthat was fast13:53
Sarayan:-)13:53
Sarayanit's rather minimal for now, as in I don't parse options (but that will be trivial, I just want to make the rest work first)13:54
Sarayanok, terminology, elaboration, that's something that happens before or after the ast?13:57
ZirconiumXelaboration is turning a generic module into a concrete instance, AIUI13:57
Sarayane.g. if I use whatever elaboration support is in slang, do I hook at the ast level or, i guess, at the rtlil level?13:58
ZirconiumXYosys would take in concrete RTLIL, I think.13:58
whitequarkideally at rtlil level13:58
ZirconiumXSo I think you'd want to elaborate before feeding into Yosys, right?13:59
SarayanZX: I'm into yosys in the first place13:59
whitequarkrtlil is a relatively clean and well documented boundary, using it saves you a lot of trouble extending ast to suit slang's needs13:59
whitequarkby using rtlil at the interface you leave both slang and yosys doing what they do best13:59
Sarayanok, makes sense13:59
Sarayanalso, are you supposed to be able to have multiple files in a read_* command?14:02
Sarayanif yes, how do that jive with the frontend execute interface, if no how do you input a design that is in three files?14:03
ZirconiumXSarayan: I think order matters a fair bit in that respect14:04
ZirconiumXEither you can do what e.g. read_verilog -defer does, which resolves modules later, or you can require the user to input in topological order14:04
Sarayanhmmm ok14:05
Sarayangonna try for topo order for now, once everything else works it gets easier to refine that kind of questions14:05
*** Vinalon has joined #yosys14:31
*** vidbina_ has quit IRC14:32
*** Cerpin has quit IRC14:38
whitequarkdoes anyone here have strong opinions on the way cxxrtl should be emitting blackbox cells that are replaced with C++ models?14:52
whitequarki'm primarily deciding between making it a property of the *module* (therefore necessitating creation of blackbox modules) or a property of the *cell*14:52
whitequarki.e. if it is a property of the cell, then any undefined cell can be marked so that it turns into a C++ blackbox14:53
whitequarkif it is a property of the module, something somewhere in the design flow has to create the blackbox modules14:53
*** miek has joined #yosys14:55
*** emeb has joined #yosys15:01
ZirconiumXIt seems to me like it should be a property of the module, whitequark15:04
ZirconiumXEven though it requires more effort, I'd prefer it goes "hey, this module isn't defined" sooner in the event of a problem than have to wade through, what, linker errors?15:05
whitequarkthat was what I thought at first, but here is an issue with it: parametric blackboxes15:07
whitequarkthe thing is that I can't really generate a C++ class parameterized by port widths, at least not easily and possibly not at all15:12
Sarayanok ,cat is gone, I can work on the code again15:40
qu1j0t3rm /bin/cat15:41
Sarayanqu1j0t3: more like spontaneous relocation15:44
Sarayandoes somebody have a non-entirely-trivial systemverilog example that works with yosys?15:50
*** dys has quit IRC15:54
Sarayanah, found something16:01
*** npe has joined #yosys16:04
*** az0re has quit IRC16:08
*** jakobwenzel has quit IRC16:12
Sarayanwhat is the attribute ID::cells_not_processed ?  I don't find it in the yosys manual16:30
*** vidbina_ has joined #yosys16:37
*** Cerpin has joined #yosys16:57
*** vidbina_ has quit IRC17:03
*** citypw has quit IRC17:07
*** az0re has joined #yosys17:25
*** vidbina_ has joined #yosys17:25
*** futarisIRCcloud has joined #yosys17:31
*** npe has quit IRC18:13
*** az0re has quit IRC18:21
*** npe has joined #yosys18:47
*** futarisIRCcloud has quit IRC19:41
*** dh73 has joined #yosys19:48
*** dh73 has joined #yosys19:49
*** FFY00 has quit IRC20:10
*** FFY00 has joined #yosys20:11
*** smarter_ is now known as smarter20:17
*** Cerpin has quit IRC21:23
*** Cerpin has joined #yosys21:23
*** jfcaron has quit IRC22:13
*** dh73 has quit IRC22:58
*** emeb has quit IRC23:35
*** emeb_mac has joined #yosys23:58

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