Wednesday, 2022-05-11

excited-mango[m]Hey, sorry I didn't see the invite earlier. That sounds awesome! I'm looking forward to it next week!03:45
lkclexcited-mango[m], email me, there's a reminder sent out each week, 24hr before.04:30
programmerjakewhat fun, a compiler segfault: https://salsa.debian.org/Kazan-team/mirrors/ieee754fpu/-/jobs/2752048#L556509:52
lkclyep had one in /usr/bin/python3.7 as well last year10:15
programmerjakeah, that one in cpython i think is a overflowed recursion limit...i saw a similar error when trying to leave out setup() in cldivrem's new fsm10:18
programmerjakebasically setup in the base class sees stage is set, so calls stage.setup, but never bothers to check if stage is self, so recurses infinitely10:20
programmerjakeif you have a sec, you could fix that.10:23
programmerjakehttps://git.libre-soc.org/?p=nmutil.git;a=blob;f=src/nmutil/stageapi.py;hb=1ad8942d98f70aa237f2f2f86dbb0caa720ddf0c#l19810:23
ghostmansdOK, I surrendered and decided to post a message about this field to binutils mailing list :-)10:25
ghostmansdBecause, well, I know how to address it, but it means either re-implementing some parsing/emitting chunks of binutils all over again...10:25
ghostmansd...or heavily re-factoring what we have there for now.10:26
ghostmansdI added Alan Modra, it looks like he's maintainer of PPC, plus, he replied to my first email10:29
programmerjakehttps://sourceware.org/pipermail/binutils/2022-May/120775.html10:32
lkclprogrammerjake, no, it was an actual core-dump of the actual /usr/bin/python3.7 binary, not a "python exception as interpreted and caught and then displayed on-screen and the binary named /usr/bin/python3.7 exits normally". infinite recursion is something that should be caught by the python interpreter.11:12
lkclok will take a look, should be easy to sort11:13
programmerjakeinfinite recursion can be not caught by cpython if it runs out of stack space first...that ends up as a segfault11:13
programmerjakee.g. it called some c extension that used a bunch of stack space and called back into python11:15
lkcltrue.11:15
lkclahh i know why11:16
lkcli raised the recursion limit to be able to deal with massive yield usage in nmigen Simualtions11:16
lkclthat's why11:16
programmerjakeah11:16
lkclghostmansd, oh? the one you sent a while back?11:30
programmerjakehe sent the email today, i linked to it11:32
programmerjakeor did you mean the first email?11:33
lkcli meant alan modra11:33
lkcli think ghostmansd means the message we planned a few months ago11:33
lkclprogrammerjake, done, added "if self.stage is not self" which is an actual-memory-object-based-compare not a call to __eq__.11:37
programmerjakeah, process() has the same flaw, as well as checking `if self.stage` rather than `if self.stage is not None`11:40
lkclmumble mumble ok :)11:40
ghostmansd[m]Yeah, few months ago Alan shared his vision on fields when I asked about it11:45
lkclghostmansd[m], can you remember where it was?11:47
lkclso i can cross-reference it.  we should have kept a record here https://bugs.libre-soc.org/show_bug.cgi?id=55011:48
ghostmansd[m]Yeah I posted it to task11:52
lkclahh magic, thx. interested to hear what alain had to say11:57
lkcloh. er. i could only find this. https://sourceware.org/pipermail/binutils/2022-February/119633.html12:00
ghostmansd[m]Yeah, that's basically all :-)12:23
ghostmansd[m]But this actually was all we needed12:24
lkclah :)14:12
ghostmansd[m]Good news14:15
ghostmansd[m]https://sourceware.org/pipermail/binutils/2022-May/120778.html14:15
lkclah brilliant14:16
ghostmansd[m]Yeah14:16
ghostmansd[m]I frankly hoped for exactly this answer14:16
ghostmansd[m]But decided to ask first, who knows what might happen if I touch this part14:17
ghostmansd[m]Hic sunt dracones14:17
lkcli think, really, Power ISA v3.1 has kicked things close to the limit, especially with the really new instructions, Matrix-Multiply-Assist etc14:17
lkclhic sunt gloria mundae14:17
ghostmansd[m]Yeah 241 already14:17
ghostmansd[m]lol14:17
lkclremind me why we're doing quotes in latin?14:17
ghostmansd[m]Let's hope it won't "transit"14:17
ghostmansd[m]Well I've been learning it for 5 years14:18
* lkcl feels a need to break out into song with the "Pater Noster"14:18
ghostmansd[m]Makes sense for me lmao14:18
lkclwhich i can still remember, 42 years after having had to sing it every week for 5 years14:18
lkclpater noster qui es in coelis, santficicetum nostrum tuum14:18
lkcl:)14:18
* lkcl thinks14:19
ghostmansd[m]I even know it's Greek origins14:19
lkclwould it be worthwhile to... good god :)14:19
ghostmansd[m]Hell I'm not even programmer officially, you know?14:19
ghostmansd[m]I'm a Latin teacher14:19
ghostmansd[m]Not kidding at all14:19
lkclwould it be worthwhile to bring binutils up-to-date with mainline and submit a single one-off patch for that ppc_fix_extra?14:20
ghostmansd[m]Yes, I think so14:20
lkclor, perhaps, rather than do that, have it as a single patch that's cherry-picked?14:20
ghostmansd[m]That's why it's a standalone patch in my branch14:20
ghostmansd[m]Yeah14:20
lkclahh14:20
lkclnice14:20
ghostmansd[m]But it needs a bit of tuning yet14:20
ghostmansd[m]Mask and the field itself14:20
ghostmansd[m]But yeah, there's the patch which I will use14:21
lkclghostmansd[m], can you push that standalone branch to the repo?14:26
ghostmansd[m]The branch is the same, it's the patch that is different14:26
ghostmansd[m]But sure I can branch off the binutils14:26
ghostmansd[m]Will do it today later14:27
lkclmainline, yes please. then alain (et al) can review it14:29
lkcli can then reply to alan/binutils saying "there's a branch, here it is"14:30
octaviuslkcl, in the psuedo code in bug #462 c#18, the line "GPIO_num = adr*len(sel)+i"16:20
octaviusWhat would be the size of the signal?16:20
octaviusI just remembered, this "GPIO[GPIO_num]" wouldn't work16:26
octaviusI tried a similar thing when I fixing the block16:26
octaviusGPIO is an Array(), and is indexed by integers16:27
octaviusAll of my code generates the indeces beforehand, thus they are hard-coded and can't be changed during operation16:28
lkclArray() is dynamically indexable, by a Signal(), that's the whole point16:29
lkclso you would interpret that as:16:29
lkclGPIO_num = Signal(width=whatever)16:29
lkclcomb += GPIO_num.eq(adr*len(sel)+i)16:30
octaviusFor example when adr[0] is equal 1 (in my current code), the index is GPIO[byte+offset]16:30
lkclright, ok, yes, this is a misunderstanding on your part as to how Array() works16:30
lkclArray *can* be indexed by a Signal, that is in fact its entire purpose16:31
lkclit may be better to use a Memory() but let's not go down that route right now16:31
lkclso16:31
lkclGPIO_num = Signal(width=whatever)16:31
lkclcomb += GPIO_num.eq(adr*len(sel)+i)16:32
lkclthen sync += GPIO[GPIO_num] will work16:32
lkclif you're not doing it like that then it's a bug16:32
lkclor16:32
lkclyou should not be using Array because it's pointless16:33
lkclyou *could* do this:16:33
lkclfor i in range(len(GPIO)):16:33
lkcl    with m.If(index == i):16:33
lkcl            sync += GPIO[i].eq(value)16:33
lkclbut then you have quite literally implemented Array()16:33
lkclas in, that entire function that you wrote can - and should - be wholly and 100% replaced with:16:34
lkcl      sync += GPIO[index].eq(value)16:34
lkclthe core of this code is much simpler than you think it ought to be.16:35
octaviusok, I'll try the Array() indexing16:42
Veera[m]Hi16:43
lkclnice to see you back Veera[m], apologies, do write, i'll be back in about 2hrs16:51
lkcloctavius, https://gitlab.com/nmigen/nmigen/-/blob/master/examples/basic/gpio.py16:52
lkclwhich is an extremely weird example that enumerates the *bits* of pins=Signal(8)16:53
lkcland consequently allows *bit*-level addressing (!)16:53
octaviushorrific XD16:54
lkclbut functional and illustrative :)16:54
octaviusImagine all the logic required16:54
lkclmake pins a list,16:54
lkclexpand r_data and w_data to 8-bit16:54
lkcland you have near-identical to exactly what is needed16:55
octavius"make pins a list", what's in the list? Each "pin" requires 8-bits of configuration, no?16:55
lkcll = []16:55
lkclfor i in range(num_gpios):16:56
lkcl    l.append(Signal(8))16:56
lkclGPIO = Array(l)16:56
octaviusAnd not use Layouts at all?16:57
Veera[m]lkcl: One personal query: did you worked somewhere in and around India. I saw a linkedin page with some data?16:57
lkcli leave it to you to include Layouts16:57
lkcli visited IIT Madras and helped out the Shakti Group.  i did not work *for* them, that would require a different Visa.16:58
Veera[m]O, that I know.16:58
Veera[m]I saw a page in linkedin with some luke leighton who did some oceanography (Around India) work. So thought it may be you!!17:00
lkclnope :)17:00
lkcldefinitely not done oceanography :)17:00
Veera[m]O O Oh. Doubt cleared.17:00
lkclthis is me https://www.linkedin.com/in/lkclnet/?lipi=urn%3Ali%3Apage%3Ad_flagship3_feed%3BsDMzBA0AQgCPQeQKVsvpzA%3D%3D17:00
lkclsigh17:00
lkclhttps://www.linkedin.com/in/lkclnet/17:00
Veera[m]Anyway, did you completed that NGI POINTER work for fpga ls2 linux demo, or still stuck at making RAM/Hyperram work?17:02
lkclVeera[m], hyperram works great.  DRAM not so much18:40
lkclbut there's a stability problem with using nextpnr-xilinx18:41
lkclghostmansd, you can ssh into talos1.libre-soc.org and run explicit unit tests there18:42
Veera[m]nextpnr-xilinx is not a complete project yet!!!18:42
lkclit's actually pretty functional18:43
Veera[m]so did NGI POINTER approved the project with Hyperram demo18:43
lkclthe 2nd milestone, yes18:44
Veera[m]good18:55
ghostmansdhttps://sourceware.org/pipermail/binutils/2022-May/120783.html19:00
ghostmansdheck, that's the second time I send git patches over email, it seems I should've done it via reply :-(19:01
ghostmansdthe stuff is pretty annoying with gmail I must admit19:01
ghostmansdthey'll drop the support for `git send-email`/`git send-imap` by the end of this month19:01
ghostmansd[m]should I re-format it so that it is a mail and two replies to it?19:03
ghostmansdI'll re-check for tests now, though I did it some time ago, before I hit fx_pcrel_adjust limit, and stuff worked by then19:05
programmerjakei got it to work with app passwords (actually as part of postfix rather than git, but it'll likely work with git too, if not you could install postfix and tell git to send via your local mail server): https://support.google.com/accounts/answer/185833?hl=en19:06
ghostmansd[m]programmerjake, thank you!19:07
programmerjakeiirc i followed https://www.linode.com/docs/guides/configure-postfix-to-send-mail-using-gmail-and-google-workspace-on-debian-or-ubuntu/19:12
programmerjakeor something very similar19:12
programmerjakeapp passwords apparently do work with gmail and git send-email: https://stackoverflow.com/questions/68238912/how-to-configure-and-use-git-send-email-to-work-with-gmail-to-email-patches-to19:17
ghostmansd[m]programmerjake, do you know how to send all but the first mails as replies?19:30
ghostmansd[m]Because that's exactly where I lost :-(19:30
ghostmansd[m]And, from archives, I see that's not the stuff anyone expects19:31
ghostmansd[m]FWIW, I used send-imap, not send-email19:31
excited-mango[m]So when do people communicate here versus using the mailing list?19:38
programmerjakeaccording to: https://git-scm.com/docs/git-send-email you want `--thread --no-chain-reply-to`19:38
programmerjakepeople generally use the mailing list for stuff that's important enough that everyone should see it, and/or people can reply asynchronously.19:40
programmerjakeirc is generally used for stuff that doesn't matter as much and/or realtime communication19:40
excited-mango[m]programmerjake: Okay, thanks for clarifying19:43
lkclexcited-mango[m], like programmerjake said, irc is real-time20:25
lkclmailing list is - as always - general topics that need discussion or communication that is beyond 250 chars in length20:26
lkclbut which don't - yet - have clear goals20:26
lkclonce there's a clear goal / issue / need that needs action, it goes in the bugtracker20:26
lkcland if it's instructions, crucial information or important notes, it goes in the wiki20:27
lkclwith cross-referencing between all of them, including in the source code, because a project of this magnitude simply can't be achieved without proper cross-referencing20:28
lkclnot at 100,000 lines and climbing20:28
lkcland when some things take well over a year to get right20:28

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