Sunday, 2023-09-10

*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC01:18
*** sauce <sauce!~sauce@free.and.open.sauce.icu> has quit IRC02:36
*** sauce <sauce!~sauce@free.and.open.sauce.icu> has joined #libre-soc02:36
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC07:11
*** hl <hl!~hl@user/hl> has quit IRC08:30
*** hl <hl!~hl@user/hl> has joined #libre-soc08:30
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc10:22
*** psydroid2 <psydroid2!~psydroid@user/psydroid> has joined #libre-soc12:10
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@37.204.162.147> has quit IRC12:18
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.40.212> has joined #libre-soc12:18
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.40.212> has quit IRC12:42
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.53.21> has joined #libre-soc12:44
*** markos_ <markos_!~markos_@static062038151250.dsl.hol.gr> has joined #libre-soc12:56
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc12:56
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@176.59.53.21> has quit IRC12:56
*** ghostmansd[m] <ghostmansd[m]!~ghostmans@37.204.162.147> has joined #libre-soc12:57
*** octavius <octavius!~octavius@92.40.169.107.threembb.co.uk> has joined #libre-soc16:01
octavius<sadoon[m]1> "Anyways I've exhausted every relevant GCC and Verilator switch there is to try to squeeze more performance..." Thanks for doing this. We may need to revisit verilator flags (since most of them were taken straight from original microwatt repo). Also, have you looked if the flags changed between our snapshot of microwatt, and the current microwatt (anton's github)? May be interesting to see if they added any flags.16:11
octavius<sadoon[m]1> "Are there any relevant bugs..." Yes. If you create a new bug (say "Verilator compile flag testing" or something like that),16:11
octaviusThen add #1073, #1086, and #1143 as 'See Also' bugs (microwatt, ls2 verilator, and optimization of verilator respectively).16:11
octaviusNo milestone or budget (just a bug for keeping track of your work). Please also link the IRC chat timestamps.16:11
octaviusghostmansd[m], the MoU for cavatools (bug #939) was signed, so you can submit16:15
octaviusLooks like Luke already submitted RFP earlier today for #979 too16:15
openpowerbot[irc] <sadoon[m]1> <openpowerbot> "[irc] <octavius> No milestone or..." <- Alright will do16:18
openpowerbot[irc] <sadoon[m]1> Finally settled in my new job, woohoo16:18
octaviusCongrats!16:18
openpowerbot[irc] <sadoon[m]1> Thanks!16:18
openpowerbot[irc] <sadoon[m]1> I updated my availability on the wiki to reflect that, not much has changed but I've allocated more hours during Fridays, Tuesdays and Wednesdays16:19
openpowerbot[irc] <sadoon[m]1> Because I don't expect to have free time like I used to16:20
openpowerbot[irc] <sadoon[m]1> It's a good thing overall because it means these are extended hours that I can use to focus on one thing and get it done16:20
openpowerbot[irc] <sadoon[m]1> But there will be times like today when I do have free time of course16:21
*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC16:28
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc16:30
openpowerbot[irc] <sadoon[m]1> https://bugs.libre-soc.org/show_bug.cgi?id=115617:09
openpowerbot[irc] <sadoon[m]1> Now to work on poly1305.. let's go!17:09
openpowerbot[irc] <sadoon[m]1> Still having email issues for some reason, won't bother with it now, need to stay focused argh17:24
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC17:27
openpowerbot[irc] <sadoon[m]1> poly1305 bugs, comment 0 to be updated17:28
openpowerbot[irc] <sadoon[m]1> https://bugs.libre-soc.org/show_bug.cgi?id=115717:28
openpowerbot[irc] <sadoon[m]1> https://bugs.libre-soc.org/show_bug.cgi?id=115617:28
openpowerbot[irc] <sadoon[m]1> https://bugs.libre-soc.org/show_bug.cgi?id=115817:28
openpowerbot[irc] <sadoon[m]1> https://bugs.libre-soc.org/show_bug.cgi?id=115917:28
openpowerbot[irc] <sadoon[m]1> Sorry 1156 is not correct for this one.17:28
octavius"show_bug.cgi?id=1156", nice17:36
*** markos_ <markos_!~markos_@2a02:85f:9aaa:7834:a7b3:3dec:157b:fab4> has joined #libre-soc17:39
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc17:39
*** markos_ <markos_!~markos_@user/markos/x-1838887> has quit IRC17:50
openpowerbot[irc] <sadoon[m]1> silly me put markdown format though, as usual :)17:50
openpowerbot[irc] <sadoon[m]1> I'm gonna keep it that way because it looks nicer anyways, sort of the point of markdown am I right?17:51
openpowerbot[irc] <sadoon[m]1> I also added the chatlog from October where you recommended 3 threads, thanks for testing that also17:54
openpowerbot[irc] <sadoon[m]1> Damnit I still say October because it sounds like the 8th month, I meant August17:55
*** tplaten <tplaten!~tplaten@195.52.187.211> has joined #libre-soc18:01
*** markos_ <markos_!~markos_@static062038151250.dsl.hol.gr> has joined #libre-soc18:05
*** markos_ <markos_!~markos_@user/markos/x-1838887> has joined #libre-soc18:05
openpowerbot[irc] <sadoon[m]1> We're gonna need to mirror this because it's on GitHub, but this is the correct and efficient way of doing it if we have 64-bit mathematics https://github.com/floodyberry/poly1305-donna/blob/master/poly1305-donna-64.h18:37
openpowerbot[irc] <sadoon[m]1> Given that we have facilities to do higher than 64-bits (from what I understand) this is even better18:38
openpowerbot[irc] <sadoon[m]1> The main cryptography is in poly1305_blocks()18:38
openpowerbot[irc] <sadoon[m]1> I'll add these comments to the bugreport once we have this repo mirrored18:39
openpowerbot[irc] <sadoon[m]1> There are many unnecessary steps there simply because they are limited by 64-bits, we're not :)18:40
openpowerbot[irc] <sadoon[m]1> If all we did was optimize this function, you'd see an exponential boost in performance because this is the main part of the poly1305 loop18:40
openpowerbot[irc] <sadoon[m]1> The rest is only run once18:41
openpowerbot[irc] <sadoon[m]1> So I think this is where I should start, inline asm this function and the leave the rest in C for later optimization18:41
openpowerbot[irc] <sadoon[m]1> the 0x3ffff.....fff is the poly1305 constant, 2^130-518:43
openpowerbot[irc] <sadoon[m]1> Actually without the -5 in this case18:43
markos_you can't use inline asm18:44
markos_gcc doesn't know about svp64 asm instructions18:44
openpowerbot[irc] <sadoon[m]1> Ah right, it's gonna be in python?18:44
markos_assuming you're going to develop on x86 and run through the python simulator18:44
markos_you have to follow basically what I did in chacha2018:44
openpowerbot[irc] <sadoon[m]1> openpowerbot: I'll have to look at that next yes18:45
markos_compile the testing code using plain gcc18:45
markos_(x86)18:45
openpowerbot[irc] <sadoon[m]1> In this case finding a python implementation would be good enough of a start, one with unit tests18:45
markos_run our binutils cross-as on the svp64 assembly18:45
markos_and implement a wrapper function in C that loads and calls the binary output of the assembler which will marshal/demarshal the input and output of the assembly function so that it can be passed to the simulator18:46
markos_no, the example code that is there is fine to start18:47
openpowerbot[irc] <sadoon[m]1> Ah I see18:47
markos_example-poly1305.c18:47
markos_this will call the wrapper function18:47
markos_which is plain C18:47
markos_it will use the CPython API to call the simulator18:47
markos_this is what I'm also doing for ed2551918:48
openpowerbot[irc] <sadoon[m]1> That has to be done in blocks though if that's what we're optimizing correct? the rest can be plain C18:48
openpowerbot[irc] <sadoon[m]1> So blocks would transform to a wrapper function that called the simulator passing the values and getting them back18:49
markos_exactly, what I've done is I'm commenting out parts of the original function and I'm comparing as I'm implementing the same part in svp64 assembly18:49
openpowerbot[irc] <sadoon[m]1> Perfect, sounds reasonable18:49
openpowerbot[irc] <sadoon[m]1> I'll attach this chat to the bugreport as well18:49
markos_wait, what blocks do you mean?18:49
openpowerbot[irc] <sadoon[m]1> the function poly1305_blocks18:49
openpowerbot[irc] <sadoon[m]1> <sadoon[m]1> "We're gonna need to mirror..." <- here specifically18:50
markos_ah the blocks function yes18:50
markos_poly1305_blocks is the function that is really important to convert to svp6418:50
markos_and not even the whole of that18:50
markos_just the loop18:50
openpowerbot[irc] <sadoon[m]1> Yup18:50
openpowerbot[irc] <sadoon[m]1> The rest is variable assignment18:51
markos_exactly18:51
openpowerbot[irc] <sadoon[m]1> It's not inefficiently because it's limited to 64-bits18:51
openpowerbot[irc] <sadoon[m]1> That's good enough research for today, time for some rest :)18:52
openpowerbot[irc] <sadoon[m]1> That's good enough research for today, time for some rest :)18:52
openpowerbot[irc] <sadoon[m]1> sadoon[m]1: ./s/not/done18:52
markos_#define poly1305_block_size 1618:53
markos_so it's done in blocks of 16 bytes18:53
openpowerbot[irc] <sadoon[m]1> That's a limitation of the algorithm18:53
openpowerbot[irc] <sadoon[m]1> It has to be done this way18:53
markos_yes, you don't need/have to change that18:53
openpowerbot[irc] <sadoon[m]1> Ah I misunderstood18:54
markos_it's just how the calculations are organized, you could do it using a different block size, but you'd have to re-do the math for that block sizee18:55
octaviusmarkos_, I fixed the chacha20 Makefile and the pypowersim wrapper path. The test should now run on fresh chroot setup without modifications19:00
octaviushttps://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=903fbd83d116be419230711870fec7e52b60a63219:00
markos_octavius, thanks and apologies for this stupid mistake :)19:00
octaviusNot sure if that was the best way to get the $HOME path, but it works19:00
octaviusno worries19:00
markos_if it works it works :)19:01
markos_btw, I found another fpga board I have, connected it and it works, a tiny spartan6 lx9 (xc6slx9) which seems to be supported19:02
markos_unfortunately it seems way too small to hold anything serious19:02
octaviusyeah, I have a small-ish board too (DE0 nano, cyclone 4, altera/intel)19:02
octaviusHaven't used it in a while19:02
octaviussadly most of these boards haven't been targeted for open toolchains (although not sure about spartan 6)19:03
markos_it seems to be supported in nmigen-boards and in openfpgaloader19:04
octaviussadoon, I suggest you pull openpower-isa and try running the chacha20 example, that'll show you how markos_ called the simulator from c19:04
octaviusinteresting19:04
octaviussadoon[m]1, I created a temporary page for pypowersim tutorial (there's already one from before, which I will eventually merge into), this should help you run the chacha20 example:19:14
octaviussadoon[m]119:14
octaviusoops19:14
octaviushttps://libre-soc.org/docs/pypowersim_tut/19:14
octaviusIt's barren, but will be updated as I document the process (since most of us will need to start using the simulator)19:17
*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has quit IRC19:27
*** tplaten <tplaten!~tplaten@195.52.187.211> has quit IRC20:00
*** openpowerbot <openpowerbot!~openpower@94-226-187-44.access.telenet.be> has joined #libre-soc20:46
*** octavius <octavius!~octavius@92.40.169.107.threembb.co.uk> has quit IRC21:11
*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC22:01
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC23:12
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc23:16
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC23:30
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc23:38
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC23:40
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc23:56
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC23:57
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc23:57

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