Sunday, 2021-10-31

*** tpb <[email protected]> has joined #yosys00:00
*** strobo <[email protected]> has quit IRC (Ping timeout: 245 seconds)02:30
*** strobo <[email protected]> has joined #yosys02:32
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has joined #yosys03:18
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has quit IRC (Ping timeout: 264 seconds)03:19
*** indy <[email protected]> has quit IRC (Ping timeout: 260 seconds)06:49
*** indy <[email protected]> has joined #yosys06:55
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has quit IRC (Read error: Connection reset by peer)07:02
*** kristianpaul <kristianpaul!~paul@user/kristianpaul> has joined #yosys07:06
*** kraiskil <[email protected]> has joined #yosys08:48
*** kraiskil <[email protected]> has quit IRC (Ping timeout: 264 seconds)09:06
*** kraiskil <[email protected]> has joined #yosys10:03
*** kraiskil <[email protected]> has quit IRC (Ping timeout: 268 seconds)10:10
cr1901I'm guessing the answer is "no", but is it possible to get yosys to give more precise src information than "where the beginning of the always block the signal is used in is located"?14:10
*** peeps[zen] <peeps[zen]!~peepsalot@openscad/peepsalot> has quit IRC (Ping timeout: 260 seconds)14:42
*** peepsalot <peepsalot!~peepsalot@openscad/peepsalot> has joined #yosys14:58
*** dlobato <[email protected]> has joined #yosys16:20
mwknot really, src information is kept on a kind-of best-effort basis16:24
mwk(without all that much effort in the first place)16:24
mwkbut, could you describe your usecase a little more?16:24
cr1901mwk: Sure. I have a bitstream that nextpnr-machxo2 creates successfully, but the behavior on FPGA does not match simulation behavior. 1/216:31
cr1901And I have done a, pre-yosys, post-yosys/pre-pnr, and post-pnr simulation of an input stimulus that fails on FPGA16:31
cr1901All three simulations agree w/ each other in iverilog16:31
cr1901I've isolated at least _one_ signal in the original verilog whose behavior on the FPGA isn't matching (it's stuck low)16:32
cr1901and I want to trace this signal from which slice it's stored in backwards to isolate why the signal is stuck low16:33
mwkcan you match the name of the signal to something?16:34
cr1901I can't add an internal LA to probe the signals because disturbing the original Verilog file moves the design around too much and makes the offending signal unstuck16:34
cr1901Yes, at the post-yosys/pre-pnr level, I've matched the signal, or at least "the signal after ABC has potentially merged it w/ other crap"16:35
cr1901Would you like the v file and the json yosys produces?16:36
mwk... huh, the yosys backend involved really only supports a LUT4 and the plainest DFF possible?16:37
cr1901mwk: Yes, I've not had a good year16:37
mwkwell16:37
cr1901And I don't think I should add more until I make sure the absolute basics are working16:38
mwkfirst thing I'd try is to approach this from the flow feature side, not test design side16:38
mwkie. disable flow features until it stops breaking16:38
mwkbut it seems you can't really simplify the yosys side, LUT4+DFF is as simple as it gets16:38
mwkis there some non-trivial logic in the packer?16:39
cr1901No, but there's a caveat I haven't mentioned yet:16:39
cr1901I'm testing against an old nextpnr version from February (long story). The bug isn't in nextpnr HEAD- nextpnr HEAD generates a proper bitstream. Problem solved, right?16:40
cr1901What if the bug is just masked b/c the PRNG state changed?16:40
cr1901There _was_ a bug in the packer I fixed in July16:40
mwkretry with lots of seeds, then16:41
mwkget some idea of how likely the bug is to occur16:41
* cr1901 nods16:41
cr1901I'll do that now16:41
cr1901>(12:38:33 PM) mwk: ie. disable flow features until it stops breaking16:44
cr1901(Oh... duh... I could've added other features and then disabled them. Although that wouldn't help here, that's a shitty excuse for not adding more DFF types)16:44
mwk*shrug* you had your priorities16:45
*** lambda <[email protected]> has quit IRC (Quit: WeeChat 3.2)16:58
*** lambda <[email protected]> has joined #yosys16:58
*** dlobato <[email protected]> has quit IRC (Ping timeout: 268 seconds)17:00
cr1901With seeds 0-10 on the bad nextpnr, only 2 of them work properly. I just realized I could automate this too17:02
* cr1901 tries the good nextpnr next17:03
cr1901And with the good nextpnr, all seeds 0-10 work17:07
cr1901Guess the bug was fixed... I'll need to test more than seed 0 (or whatever the default is) when making changes17:08
mwkthis resolves the original issue, right?17:24
cr1901Yes, but I'd like to understand why for future-me. Up until this point, I've done bugfixes for assertion failures. And earlier I isolated the commit where seed "0" stopped breaking and thought to myself "that can't be right"17:25
cr1901https://github.com/YosysHQ/nextpnr/commit/b1f25d4b33a40666a2f483ee3875074c65c2ac68 Commit that supposedly fixes it, and I don't remember why I needed this commit (Feb 22, ignore date)17:26
mwkhmm17:27
mwkwell you can test before/after with more seeds, right?17:27
mwktiming changes leading to corectness changes are not impossible17:28
mwkdon't know that much about how router works, but presumably if pips are 0-cost, there's no need to optimize the length of the path at all17:28
cr1901Sure, I could even automate the testing. This particular commit did not make it into my initial PR. So I found out it was needed as part of a bug fix17:28
cr1901(Unless gatecat asked me to make this change, which is possible- I'll have to look at logs)17:29
mwk(and the real fun part is when you get hold time violations and cannot even see them because you have no timing data!)17:29
cr1901Yes indeed. My assumption throughout this is: It's a f***ing UART, you have bigger problems if you have a timing violation at 12MHz17:30
mwkhmm, how fast is the Mach-XO2 fabric anyway?17:30
mwkalso: do you have dedicated clock routing in nextpnr already?17:31
mwkbecause if not... it's really easy to fuck up and get a hold violation17:31
cr1901It's in the database, it's not routed17:31
mwkuhoh.17:31
mwkyeah, non-dedicated clock routes without good timing analysis == you will die by hold time violation17:32
mwkand those don't care about clock frequencies17:32
mwkI've been there...17:32
cr1901Well, I'm satisfied w/ that explanation, tbh17:33
cr1901mwk: the "bad" nextpnr I'm testing is one commit away from the commit I linked, plus another commit that fixed a txt cfg generation problem17:35
cr1901in other words, they're effectively one commit away from each other, so if 10 seeds work on the linked commit, and they didn't work just before that commit, I'm confident that the linked commit actually did fix the problem17:35
mwkmhm17:36
mwk*whispers* it's timiiiiing17:36
cr1901(I would be very worried if fixing a txt cfg bug affected pnr)17:36
* cr1901 nods17:36
cr1901All of this crap happened by chance T_T. I accidentally checked out an old branch w/o realizing how old it was for a demo.17:37
mwkoops17:37
cr1901Built the UART demo, got an assert failure. That was txt cfg bug.17:38
cr1901That's a legitimate bug that's not patched in HEAD yet.17:38
cr1901Ironically probably only found b/c seed 0 generated _just_ the correct routing w/ the _very_ bad timing info17:38
cr1901Then I fix the txt cfg bug, and I can't get any of my bitstreams to work T_T17:39
cr1901I figured "well I already found one legit bug using this old commit, what if I find another?!"17:39
cr1901And I wasted half this weekend. The end!17:39
cr1901Thanks for the help, I probably would've wasted my whole weekend and then some w/o your help17:40
*** vidbina <[email protected]> has joined #yosys17:44
*** vidbina <[email protected]> has quit IRC (Ping timeout: 260 seconds)19:00
*** dlobato <[email protected]> has joined #yosys20:08
*** dlobato <[email protected]> has quit IRC (Ping timeout: 260 seconds)20:23
*** vidbina <[email protected]> has joined #yosys20:44
*** vidbina <[email protected]> has quit IRC (Ping timeout: 260 seconds)21:39

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