Wednesday, 2020-04-22

*** tpb has joined #yosys00:00
*** az0re has quit IRC00:00
*** Degi_ has joined #yosys00:11
*** Degi has quit IRC00:13
*** Degi_ is now known as Degi00:13
*** janrinze has quit IRC00:18
*** emeb_mac has joined #yosys00:27
*** az0re has joined #yosys00:33
*** futarisIRCcloud has joined #yosys01:48
*** citypw has joined #yosys01:52
*** emeb has quit IRC01:52
*** Cerpin has quit IRC01:54
*** Stary has quit IRC02:13
*** npe has joined #yosys02:17
*** Stary has joined #yosys02:22
*** Cerpin has joined #yosys03:29
*** npe has quit IRC03:51
*** npe has joined #yosys03:55
*** Cerpin has quit IRC04:29
*** Cerpin has joined #yosys04:37
*** vidbina_ has joined #yosys05:17
*** az0re has quit IRC05:30
*** npe has quit IRC05:44
*** craigo has joined #yosys05:55
*** _whitelogger has quit IRC06:03
*** _whitelogger has joined #yosys06:05
*** Vinalon has quit IRC06:05
*** Vinalon has joined #yosys06:32
*** emeb_mac has quit IRC06:59
*** jakobwenzel has joined #yosys07:55
*** ZipCPU has quit IRC08:05
*** ZipCPU has joined #yosys08:06
*** Asu has joined #yosys08:28
*** mirage335 has quit IRC09:12
*** mirage335 has joined #yosys09:21
*** futarisIRCcloud has quit IRC09:56
*** agg has joined #yosys10:27
*** Ekho has quit IRC10:31
*** Vinalon has quit IRC10:36
*** Ekho has joined #yosys10:53
aggwhitequark: as a data point, cxxrtl generates 1/7th the C++ code but takes 2.3x the execution time as verilator on my dsp design (and produces identical output, but also, caught an out of bounds bram read)10:56
aggcan it/are there plans for it to output a vcd?10:56
aggi would also rate it as "easier to get working" although it took a little while to figure out the api for getting/setting port values10:57
ZirconiumXagg: Is this before or after the go-faster branch?10:59
aggsorry yes this is on the current pr branch10:59
aggyosys 1d5b6ac211:00
aggand write_cxxrtl at default -O6, g++ at -O2, I'll see if clang makes an appreciable difference11:00
aggclang actually gets it down to 1.83x though a slightly unfair comparison since verilator times are using gcc :p11:03
ZirconiumXWhat are you calling before write_cxxrtl?11:04
aggread_ilang; write_cxxrtl11:04
agg(I thought write_cxxrtl with -O6 takes care of any other passes that are useful?)11:05
ZirconiumXTry `read_ilang; proc; flatten; write_cxxrtl`11:05
aggdoesn't seem to make any difference11:06
aggI believe write_cxxrtl -O6 does proc;flatten though, and -O6 is the default11:06
ZirconiumXOkay, yeah, sorry11:08
aggto be clear i'm not complaining about the current speed, it's still like 600ms cpu time to simulate 100ms of design clock time, which is more than enough11:08
ZirconiumXThe copy of Yosys I have in front of me only has -O511:09
aggthough the verilator vcd dump is very useful :p mostly i am very looking forward to this being integrated in nmigen11:09
ZirconiumXOh yeah, definitely11:10
aggthis module needs to do around 5M clocks to settle, so it's one of the only things in my design that pysim won't really cope with, and my current test strategy for it is "check the verilator vcd in gtkwave"11:10
aggmostly because i haven't faced writing c++ to properly test the outputs for it :P11:10
SarayanWhat do you put in the vcd?11:14
Sarayanwith verilator, that is11:15
ZirconiumXAlso have you tried voiding your warranty?11:15
Sarayaneverythng, like pysim?  Everything starting at a point?  A selection of signals or modules?11:15
*** enigma has joined #yosys11:20
aggI have verilator dump all signals to the vcd11:20
agg(not in the time benchmark above, I took out vcd writing for that)11:20
aggi find that's the most useful way of looking at it in gtkwave to see what's going on, rather than realising i wanna see something else and having to re-add that, rebuild, rerun, etc. doesn't take that long or produce especially huge vcds in this instance11:21
aggthis design is annoying because i need to run for many clocks but it's not got that many moving parts11:21
agg(very high order decimator)11:21
whitequarkagg: try using g++/clang++ -O3; also, clang++ -flto seems to produce better results depending on your exact use case11:23
whitequarkthere is also one thing i realized i did that might not be entirely optimal, i'll try to fix it soon11:24
aggwith clang++ -O3 -march=native -flto I get to 1.6x verilator11:25
Sarayanwhitequark: is there enough information left at the cxxrtl level to make every signal visible to a potential vcd writer?11:25
Sarayanlto can help even if everything is single-file?11:26
whitequarkSarayan: (every signal visible to vcd) not sure if "every", but the majority of them, yes. i will see exactly how well i can get it to work11:26
whitequarkthe current plan is to add debug info to cxxrtl output without sacrificing optimization, sort of like DWARF is supposed to work (but it usually just gives you <value optimized out> insead)11:27
whitequark(lto) cxxrtl has black boxes now11:27
whitequarkamong other things11:27
whitequarkagg: so, there is one more thing you could do if you wanted every last drop of performance11:29
whitequarkrun yosys with CXXRTL_VOID_MY_WARRANTY=1 set in the envirnonment, and replace your *two* calls to .step() with *one* line like this: top.prev_p_clk = value<1>{0u}; top.p_clk = value<1>{1u}; top.step();11:29
aggwhitequark: using clang for the verilator build with the same flags actually makes verilator slightly slower :p11:31
whitequarkagg: i find that with minerva sram soc, g++ works a bit better than clang++11:32
aggso with clang++ -O3 -march=native -flto, verilator is 455ms and cxxrtl is 383ms11:36
aggbut verilator with g++ -O3 gets 343ms11:36
aggwhereas cxxrtl gets 648ms with g++ -O3, go figure11:37
agg(cxxrtl numbers there using VOID_MY_WARRANTY)11:37
aggwith the best settings so far for each, verilator is 1.1x faster, but still generating 7x the amount of c++ faff and requiring its own makefile11:38
Sarayanpure sync design without comb loops?11:40
aggno deliberate comb loops :p11:40
whitequarkSarayan: the backend would complain if it would find comb loops11:41
whitequarkalso, it now automatically optimizes out useless delta cycles if it can schedule the entire thing statically11:42
whitequarkso you can remove all the "optimized" versions of the code i gave you before, not necessary11:42
*** vidbina_ has quit IRC12:01
*** vidbina_ has joined #yosys12:17
*** enigma has quit IRC12:18
*** strongsaxophone has joined #yosys12:21
*** enigma has joined #yosys12:23
Asuwhitequark: so i've been messing a bit with compile flags of the generated c++ for that SoC from that archive on the gas gas gas PR12:45
Asu> i find that with minerva sram soc, g++ works a bit better than clang++12:45
Asuso that is interesting because i get absolutely the opposite12:46
whitequarkagg: please try the latest commit from the PR again12:49
Asuall -O3, clang-9 w/ lto+pgo 0.8s, clang-9 w/ lto 0.9s, clang-9 without lto or pgo 1.2s, g++ 9.3 both with and without lto are around 1.35s~1.45s12:50
whitequarkAsu: sorry, i misspoke12:50
Asuoh, right12:50
whitequarkg++ works a bit better than clang++ *without LTO*12:50
whitequarkwith LTO, clang++ is absolutely much better12:50
Asuclang -O3 slightly outperforms gcc -O3 for me12:52
Sarayanwhich clang, 9, 10?12:52
Asu9.0.112:52
Sarayanoh, you said before12:52
Asui think wq tests with clang-7 so that might be it? that or a cpu difference12:53
whitequarkyup12:53
aggwhitequark: with g++ -O3, new commit 648ms->478ms, clang++ -flto -march=native -O3 is same as before at 385ms13:06
aggwithout -march=native actually a bit of a speedup to 376ms13:06
whitequarkagg: oh fascinating, so clang could do my optimization on its own13:09
aggseems like it13:10
whitequarkdoes -march=native use avx?13:10
whitequarkthat could bump down your multiplier, causing the slowdown13:10
ZirconiumXx86 vendors for the past 30 years: SIMD is great13:14
ZirconiumXx86 vendors now: actually don't use SIMD13:14
aggi think march=native will use all available features including avx13:15
aggthis is a ryzen 7 2700x13:15
whitequarkoh, not sure if ryzen has avx offset13:15
Sarayanpower management is complicated13:17
ZirconiumXXFR will probably throttle things down with AVX, but that's mostly heat and power management13:17
aggstill more than fast enough to replace verilator for me though, even without the warranty-voiding13:18
whitequarkfun fact: i developed cxxrtl with a focus on correctness and flexibility, not performance13:18
aggand you started it what, a couple months ago?13:19
whitequarkthat it runs almost as fast as verilator is more of a side effect13:19
aggand now it's the same speed as verilator, more correct, easier to use, generates less code13:19
whitequarki think about a month of development time total went into it13:19
whitequarkmaybe two13:19
aggpoor verilator13:19
whitequarkno, less than a month, judging by commit logs13:19
*** enigma has quit IRC13:23
*** enigma has joined #yosys13:24
*** vidbina_ has quit IRC13:43
*** mirage335 has quit IRC13:44
*** enigma has quit IRC13:45
*** strongsaxophone has quit IRC13:49
*** mirage335 has joined #yosys14:01
*** jfcaron has joined #yosys14:05
*** Thorn has quit IRC14:40
*** citypw has quit IRC14:46
*** Cerpin has quit IRC14:51
*** Cerpin has joined #yosys14:52
*** npe has joined #yosys15:05
*** Thorn has joined #yosys15:17
*** yosys-questions has joined #yosys15:32
Asuwhitequark: for this SoC i found merging most of the if (posedge_p_clk()) manually in the generated code improves run times by ~13% for me and the compile time of the cxxrtl by ~10% (results with clang -O3 -flto)15:33
whitequarkAsu: that's already upstream in cxxrtl15:33
Asunot sure if that's helpful, i'm kind of curious why this improves performance though (is it unable to deduce that the expression remains constant or just doesn't know how to merge the branches?)15:33
Asuoh15:33
whitequarki also got 13-15% improvmement15:33
yosys-questionsHi, quick q: When I look at the output of write_json command, I don't see that the ports/nets have their "signed/unsigned"-ness prevailed. I understand that once RTL is fully understood, signed/unsigned doesn't matter, but at what stage is it possible to recover this information? I would like to have it for some automation that I am doing15:34
*** vidbina_ has joined #yosys15:34
ZirconiumXyosys-questions: you shouldn't use JSON as a Yosys parsing format, really15:36
mwkyosys-questions: the wire/register signedness is already lost by the time read_verilog is done15:37
*** emeb has joined #yosys15:37
ZirconiumXIt should be in the cells though?15:37
mwkhowever, cell input/output signedness is preserved until actual synthesis15:37
mwkso you could look at the A_SIGNED/B_SIGNED/Y_SIGNED/... attributes of cells15:37
yosys-questions@mwk: Let me look15:37
ZirconiumXSo basically "this wire is signed" becomes "this cell input is signed", right?15:37
mwkyeah15:38
mwkexcept, well, casts can happen15:38
yosys-questionsZirconiumX: what stage should I tap in to get access to the parse tree?15:42
mwkast15:42
ZirconiumX^15:43
daveshahBut there may well be better frameworks than Yosys if you just want the parse tree15:43
mwkread_verilog has a "dump ast" option, but it's not really intended for machine consumption, so perhaps your best bet would be to throw in some C++ code that walks the AST tree15:43
yosys-questionsOk. Let me take a look at that. It's a bummer for me, as I pretty much have EVERYthing else that I need :)15:44
mwkalso I kind of wonder if we should just add preserving wire signedness information in yosys15:45
daveshahIt might be useful during vcd generation15:45
mwkI mean, we already have the "upto" and "start_offset" attributes which are basically semanticless HDL leftovers15:45
daveshahas much as anything else15:45
mwkand yeah15:45
mwkvcd15:45
daveshahThey are needed for correct pin constraints15:45
yosys-questionsLet me know if you all are interested, I wouldn't mind making the modification and sending a PR15:46
mwkI'd say it sounds reasonable15:47
yosys-questionsat least taking a stab at it15:47
yosys-questionsI have used write_json for a little bit of automation in the past, and it is really powerful I think15:47
ZirconiumXIt is, but it's not really a stable interface AIUI15:49
daveshahMost of the changes haven't actually been breaking if you language-lawyer the original spec15:49
daveshahThe bigger problem is the spec has been fairly poor15:50
*** citypw has joined #yosys15:53
*** Vinalon has joined #yosys15:55
*** cr1901_modern has quit IRC15:57
yosys-questionsZirconiumX What you said worries me a little bit. Do you mind elaborating in what ways? Is it that the write_json "API" isn't always updated and is missing some tests?15:59
*** citypw has quit IRC16:00
daveshahIt has seen some changes fairly recently that have broken some tools using it, partly correcting some original bad design decisions16:00
daveshahIt should never be broken itself for long, given it is used for nextpnr16:00
ZirconiumXyosys-questions: daveshah says there's a poor specification for it, but my own understanding of write_json is that it's subject to change16:00
ZirconiumXNot stable as in "API stability" rather than "bugs"16:01
*** anticw has quit IRC16:01
yosys-questionsOk, thanks!16:01
*** anticw has joined #yosys16:03
yosys-questionsTo summarize here: API will exist, it's form may change, use with caution (?)16:03
daveshahYes16:03
daveshahThe most likely changes are new fields being added16:04
daveshahwhich it is important your application can gracefully ignore16:04
daveshahChanges in the format used to encode parameter/attribute values are still possible16:04
daveshahbut hopefully have settled down16:04
* mwk mutters something about floats16:08
daveshahOh yeah16:08
whitequarkpersonally i would parse RTLIL16:09
whitequarkbut it's true that parsing JSON is easier for most people16:09
yosys-questionsIt really depends on the application: I mean for 200 lines of python that automates a register bus, my question was wheter it is worth it to parse RTLIL. But16:10
yosys-questionsIt really depends on the application: I mean for 200 lines of python that automates a register bus, my question was wheter it is worth it to parse RTLIL. But if it's worth parsing RTLIL for future benefits I will look into it16:11
daveshahParsing RTLIL has the big advantage that you can support unelaborated processes16:11
*** X-Scale` has joined #yosys16:11
daveshah(ie always blocks before they become latches, FFs or mux trees, more or less)16:12
mwk... RTLIL is also not entirely stable, and harder to extend in backwards-compatible way than JSON16:14
*** X-Scale has quit IRC16:14
*** X-Scale` is now known as X-Scale16:14
whitequarkyosys-questions: well, personally, i find writing parsers easy and relaxing, but that's just me16:20
whitequarkdaveshah: speaking of which, any idea if we can extend write_verilog so it'd stop complaining about unelaborated processes?16:21
whitequarkit whines because some processes are inexpressible in verilog, but i doubt that we can't juts detect which16:21
whitequarkmwk: the syntax or the cells?16:22
daveshahYeah, if you can detect the broken cases then that seems the best option16:22
mwkwhitequark: syntax16:22
daveshahI don't know the Verilog backend well though16:22
mwk... and the latest break is my fault16:22
whitequarkmwk: hang on what16:22
mwk(default parameter values)16:22
whitequarki mean i did also break RTLIL16:22
whitequarkoh16:22
whitequarklink to diff?16:22
mwkhttps://github.com/YosysHQ/yosys/pull/194516:23
tpbTitle: Add parameter positional and default value information. by mwkmwkmwk · Pull Request #1945 · YosysHQ/yosys · GitHub (at github.com)16:23
mwkor actually https://github.com/YosysHQ/yosys/pull/1945/commits/38db8749b1032bfa5685e4792fd1ea311016958916:23
tpbTitle: Add parameter positional and default value information. by mwkmwkmwk · Pull Request #1945 · YosysHQ/yosys · GitHub (at github.com)16:23
mwk(also the same PR subtly changes RTLIL semantics by making parameter order actually meaningful)16:24
whitequarkoh i see16:25
yosys-questionswhitequark after I did a dump_rtilil, I notice that port signed information is already lost :-/16:34
whitequarkyosys-questions: do you mean on module ports?16:47
whitequarkyosys does not preserve any signedness information for nets after the frontend; it only has signedness information in the netlist when it is required for arithmetics and that's it16:48
whitequarkit sounds like you want a tooling grade parser rather than a compiler frontend16:48
*** Vinalon has quit IRC16:51
*** Vinalon has joined #yosys16:52
*** jakobwenzel has quit IRC16:56
*** N2TOH_ has joined #yosys17:12
*** N2TOH has quit IRC17:14
*** npe has quit IRC17:32
*** npe has joined #yosys17:34
yosys-questionsdaveshah whitequark I am looking into adding signedness as a field to RTLIL and make it a part of exports. Let me know if you think it's a bad idea!17:39
mwktbh I think it shouldn't be a field17:39
yosys-questionsmwk ZirconiumX ^17:39
mwkit'd be perfectly servicable and much less work to just slap it as an attribute on the wire17:39
ZirconiumX^17:40
mwkthe whole patch would probably be just a few lines of code in ast.cc17:40
yosys-questionsthat works as well ..17:40
*** N2TOH has joined #yosys17:42
Asuwhitequark: might have found a ~+7% performance opportunity after a bit of profiling. i need to double check that my implementation is correct and make my benchmarking more robust but it seems that inserting the memory write in ::update() at the right position in the queue to keep the vector sorted is quite more efficient than performing a sort in ::commit(). do you want me to do a PR?17:42
*** N2TOH_ has quit IRC17:43
*** emeb has quit IRC17:53
*** emeb has joined #yosys17:54
*** cr1901_modern has joined #yosys18:02
whitequarkAsu: absolutely18:08
whitequarkI only wrote that memory code to be correct18:09
*** futarisIRCcloud has joined #yosys18:11
Asualright18:14
*** adjtm has quit IRC18:23
*** adjtm has joined #yosys18:25
anuejnis there a way to disable the execution of the SHARE pass in synth_xilinx?19:36
anuejnit takes a long time for me (hasnt finished yet; started 5m ago) and I would rather get a less optimal synthesis result that waiting ;)19:37
ZirconiumXanuejn: That sounds like a bug, but I don't know how big your input design is19:38
anuejnit shouldnt be that big19:39
ZirconiumXHow many lines of input source?19:39
ZirconiumXI'm inclined to assume you might have hit a bug in that pass19:40
anuejnabout 20k lines of rtlil19:41
ZirconiumXThat should be fine, then19:41
daveshahI've never seen that bad a case so this should definitely be looked at, but I think there is a general issue in Yosys that some of the SAT-based stuff can get stuck on difficult problems with minimal reward19:41
daveshahbecause there is no timeout at present, I think19:42
daveshahtimeouts are slightly tricky to implement in a deterministic way19:42
anuejnmaybe the problem is that i run the expose pass before?19:42
daveshahit would need to be based on some kind of iteration count inside the SAT solver, not a wall-clock timeout19:42
daveshahThat shouldn't cause a major performance change afaik19:43
daveshahif it does, then it definitely sounds like a bug19:43
anuejninteresting, will try19:44
daveshahOtherwise, the way to disable it for test purposes (e.g. to make sure that the design isn't exploding for some other reason) is to comment out https://github.com/YosysHQ/yosys/blob/master/techlibs/xilinx/synth_xilinx.cc#L46319:45
tpbTitle: yosys/synth_xilinx.cc at master · YosysHQ/yosys · GitHub (at github.com)19:45
anuejnok, thanks :)19:48
anuejnit works if i use expose correctly and let it only expose signals from the toplevel :)19:52
anuejnso it was mostly my thumbness19:52
*** zkms has quit IRC19:54
*** zkms has joined #yosys19:56
ZirconiumX5000. Executing Verilog backend.20:26
ZirconiumXI managed it20:26
*** Cerpin has quit IRC21:09
*** Cerpin has joined #yosys21:09
*** jfcaron has quit IRC21:39
*** Asu has quit IRC21:45
*** somlo has quit IRC21:47
*** vidbina_ has quit IRC21:47
*** vidbina_ has joined #yosys21:48
*** craigo has quit IRC21:58
ZirconiumXmwk: you around22:38
ZirconiumX?22:38
mwkyes22:38
ZirconiumXI have spent literally all day trying to bugpoint a Quartus ICE22:38
ZirconiumXI think I found the cause22:39
ZirconiumX  wire [31:0] \cpu.cpuregs.regs[10] ;22:39
ZirconiumXAnd then later22:39
ZirconiumX    .q(\cpu.cpuregs.regs[10] [31]),22:39
ZirconiumXAnd I'm *sure* that's not going to cause problems22:39
mwkso what, you're saying that their verilog^Wvqm parser is so shit, it cannot deal with [ in backslashed name?22:40
ZirconiumXBoth, actually22:40
ZirconiumXI checked: it's not a parser bug, but an elaboration bug, I think22:40
mwkalright, but... is it about the name?22:41
ZirconiumXIf I rename the variable I get a syntax error. Which I'm not sure if it's a good thing or bad thing22:41
ZirconiumXEqually I'm not sure if this is actually trying to represent a memory or something22:41
* mwk is still not quite sure what you're saying22:43
ZirconiumX"Quartus ICEs and I think it's because of the variable name, but I don't know Verilog enough to tell if this is a literal [10] or referring to a memory in this context"22:43
ZirconiumXBecause for example, `reg [31:0] foo[10]` is a memory, right?22:44
mwkshould be literal [10]22:44
mwkthis is post-yosys-synthesis, right?22:44
ZirconiumXYes22:44
mwkthen I'd guess the wire is a result of yosys implementing a memory by flops22:45
mwkand it *was* a memory at some point, but is now just a plain wire22:45
mwk(with a strange-ish name)22:46
whitequarkmwk: fun fact: yosys has similar issues, and i hate that it does22:46
whitequarkhttps://github.com/YosysHQ/yosys/issues/167622:47
tpbTitle: Preservation of escaped identifier · Issue #1676 · YosysHQ/yosys · GitHub (at github.com)22:47
ZirconiumX<mwk> then I'd guess the wire is a result of yosys implementing a memory by flops <-- yes, this is a case of memory inference being disabled22:47
whitequarkactually, the exact same issue, i think22:47
mwkI mean, uhhh22:49
mwkisn't that just a problem with flatten having to call the flattened wires *something*?22:49
whitequarkthe problem in both cases is that the names are treated as having internal structure22:50
whitequarki.e. in-band signaling22:50
whitequarkwhereas in fact there is no way for them to have any self-consistent internal structure22:51
mwk.. right22:52
ZirconiumXCan we blacklist [] in variable names for write_verilog then?22:52
mwkZirconiumX: blacklist and do what?22:52
ZirconiumXescape, presumably22:53
whitequarkescape how?22:53
ZirconiumXwire [31:0] \foo_left_square_bracket_10_right_square_bracket;22:53
whitequarkwhat happens when i have an identifier that's called that in first place?22:54
ZirconiumXIt also gets escaped22:54
whitequarkto what?22:54
ZirconiumX"left and right square brackets get renamed to something that does not contain a left or right square bracket"22:55
ZirconiumX"actual name to be bikeshedded later"22:55
whitequarkwhat i'm trying to lead you to is that you have to choose another prefix you'll ban from names22:55
ZirconiumXwrite_verilog can already make names unique22:56
whitequarkwhich means, among other things, that write_verilog will no longer roundtrip22:56
ZirconiumXAnd the alternative is, what, exactly?22:56
ZirconiumX"wontfix" and I sit here with a broken flow?22:56
whitequarkyou could make it an opt-in for broken toolchains22:56
daveshahYeah22:56
daveshahI suspect write_verilog -vqm is inevitable22:57
ZirconiumXI wasn't expecting it to be made the default, just another workaround22:57
mwk... actually write_verilog already has logic to rename cursed names22:57
mwkI can't quite figure out how it works right now, but the logic is there22:57
mwk(see reset_auto_counter_id)22:57
mwkprobably could add an extra flag here for shit parsers to use it for more identifiers22:58
whitequarkmwk: i *think* it's trying to make renames roundtrippable22:58
mwk... it actually calls the renamed things "_123_"22:58
whitequarkoh, right22:59
whitequarksame as the $identifier22:59
mwknot the prettiest22:59
mwkbut it should work22:59
daveshahI'm not convinced write_verilog should rename $identifiers by default at all22:59
daveshahBut changing that now would be too much brokenness23:00
whitequarkwould it?23:00
whitequarkwait, do you mean it should output them as \$identifier ?23:00
whitequarkor something else?23:00
daveshahimo, yes23:00
daveshahI tend to have -norename whenever I use write_verilog23:01
mwk... are we going to add -rename-harder23:01
daveshahBut perhaps that's mostly because write_verilog usually means I'm debugging Yosys or nextpnr23:01
whitequarkthe use of \ and $ for basically unrelated things in the frontend and the middle end is more aggravating the more i encounter it23:01
whitequarkhot take: net names shouldn't even be IdString23:02
whitequarkstruct NetName { bool public; vector<string> name; } // maybe IdString, not string23:03
mwkZirconiumX: if you want a quick check whether it's names that cause problems for quartus, go to backends/verilog/verilog_backend.cc line 50 and change "if (*str == '$' && may_rename && !norename)" to "if (may_rename)"23:03
mwk... not quite sure if that's correct yet though, let's see23:04
whitequarkZirconiumX: or try `rename -hide *[* *]*`23:04
mwkoh23:04
mwknice pass23:04
mwkyeah, that's even better23:04
ZirconiumXhttps://twitter.com/ZirconiumX/status/1253098172660023296 <-- here's the testcase I narrowed it down to23:07
ZirconiumXwhitequark: Warning: Selection "*[*" did not match any module.23:10
whitequarker, hang on23:12
whitequarkw:*[* ?23:12
ZirconiumXwhitequark: Yep, Quartus builds it with `rename -hide w:*[* w:*]*`23:13
whitequarkyay, no need to patch write_verilog23:14
whitequark(well, unless you specifically want a patch that does better than mwk's)23:14
mwkhm23:14
mwksynth_intel_alm already has a "post-process for quartus" step23:15
mwkthrowing the rename command in there would be quite natural23:15
ZirconiumXIndeed23:16
ZirconiumXIt was suggested to me that the EDIF input is probably better tested because it's used by other third-party vendors23:16
ZirconiumXBut, uh, I don't feel like touching *that* hornet's nest23:17
* whitequark shudders23:17
ZirconiumX*the Quartus EDIF input23:17
ZirconiumXAnd all it took was *twelve hours* of bugpoint23:18
*** yosys-questions has quit IRC23:18
mwk... it was tested, nobody said it passed the test23:18
*** vidbina_ has quit IRC23:34
*** emeb has quit IRC23:55
*** emeb_mac has joined #yosys23:57

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