*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 00:25 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 00:25 | |
*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC | 01:00 | |
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc | 01:02 | |
*** yambo <yambo!~yambo@184-167-135-012.res.spectrum.com> has quit IRC | 01:19 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 02:37 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 02:37 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 03:03 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 03:04 | |
*** yambo <yambo!~yambo@184-167-135-012.res.spectrum.com> has joined #libre-soc | 03:32 | |
*** psydroid <psydroid!~psydroid@user/psydroid> has quit IRC | 04:38 | |
*** sauce <sauce!~sauce@free.and.open.sauce.icu> has quit IRC | 05:53 | |
*** sauce <sauce!~sauce@free.and.open.sauce.icu> has joined #libre-soc | 06:07 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 09:51 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 09:52 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has quit IRC | 11:07 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has joined #libre-soc | 11:17 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has quit IRC | 11:22 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has joined #libre-soc | 11:30 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has quit IRC | 11:37 | |
*** Lucretia <Lucretia!~laguest@user/lucretia> has joined #libre-soc | 12:09 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 12:15 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 12:15 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 12:25 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 12:25 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 12:35 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 12:35 | |
*** psydroid <psydroid!~psydroid@user/psydroid> has joined #libre-soc | 12:40 | |
markos_ | any ideas what's the deal with the mou? are there any changes needed yet? has it been sent and we are just waiting for nlnet? | 12:43 |
---|---|---|
markos_ | s/any ideas/any updates on/ | 12:44 |
openpowerbot | [irc] <sadoon[m]1> alright catching up today, vroom vroom poly1305 | 13:02 |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 13:41 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 13:41 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 15:39 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 15:40 | |
openpowerbot | [irc] <sadoon[m]1> Toying around with power asm (inline in C) just to get a grasp on things, haven't dealt with assembly since 2018 heh | 15:59 |
openpowerbot | [irc] <sadoon[m]1> Also ran the chacha20 tests, will look into the code now | 15:59 |
openpowerbot | [irc] <sadoon[m]1> It looks.. intuitive enough I can say | 16:02 |
jn | one of the weird quirks of POWER asm is that it doesn't seem to (natively) distinguish between register numbers and numbers which are meant as numbers themselves, so if you use a register in place of a number or vice versa, bad luck, it will be misinterpreted rather than throwing an error | 16:11 |
jn | (unlike, say, arm32, where you have a clear distinction between r5 (register) and #5 (immediate number)) | 16:13 |
openpowerbot | [irc] <programmerjake> but that also means you can do arithmetic on register numbers | 16:13 |
jn | i guess that can be useful sometimes | 16:13 |
openpowerbot | [irc] <sadoon[m]1> was about to ask what setvl does, the wiki sure is great :D https://libre-soc.org/openpower/sv/setvl/ | 16:31 |
markos_ | jn, mind you there is also -mregnames to the assembler, though they're just aliases | 16:32 |
openpowerbot | [irc] <sadoon[m]1> markos_ IIUC, quarterround_const basically sets all the constants used for chacha20 correct? | 16:35 |
markos_ | these are actually the constants used in the SVSHAPE instructions | 16:37 |
markos_ | read the wiki for chacha20 | 16:37 |
markos_ | https://libre-soc.org/openpower/sv/cookbook/chacha20/ | 16:37 |
openpowerbot | [irc] <sadoon[m]1> awesome, that's a good start thanks | 16:37 |
openpowerbot | [irc] <sadoon[m]1> Time to pull out the eink tablet | 16:38 |
openpowerbot | [irc] <sadoon[m]1> Just finished reading it... WOW. | 17:17 |
openpowerbot | [irc] <sadoon[m]1> I knew svp64 was awesome but it felt like an enigma for so long | 17:18 |
markos_ | it is beyond awesome | 17:18 |
markos_ | try doing that in any other SIMD architecture | 17:18 |
openpowerbot | [irc] <sadoon[m]1> Helped me appreciate what it is | 17:19 |
openpowerbot | [irc] <sadoon[m]1> Yeah | 17:19 |
markos_ | it is not easy to understand | 17:19 |
openpowerbot | [irc] <sadoon[m]1> No but the wiki helps a lot, thanks for writing it btw | 17:20 |
markos_ | not at first at least, because we all are too accustomed to thinking with packed vectors | 17:20 |
markos_ | it also helped me understand it better | 17:20 |
openpowerbot | [irc] <sadoon[m]1> Well | 17:20 |
markos_ | I hope to write more stuff like that in the future | 17:20 |
openpowerbot | [irc] <sadoon[m]1> I'm fresh to vectors to start so I'm not delearning anything which helps | 17:20 |
openpowerbot | [irc] <sadoon[m]1> :D | 17:20 |
markos_ | indeed it helps | 17:21 |
markos_ | I had to unlearn many things after programming in SIMD for ~19 years (since 2004) | 17:21 |
openpowerbot | [irc] <sadoon[m]1> Wow yeah | 17:26 |
openpowerbot | [irc] <sadoon[m]1> I'll sum up my notes here and attach them to the bugreport as well: | 17:26 |
openpowerbot | [irc] <sadoon[m]1> We have a max element size of 64-bit which is absolutely perfect because a- the poly1305-donna implementation supports 8,16,32, and 64 bits, and b- my HDL project specifically targetted 64-bits (could have gone up to 128 or even 256 in some cases but was short on time) | 17:28 |
openpowerbot | [irc] <sadoon[m]1> poly1305 is also a bit simpler on the mathematical side, only adds and muls, some shift-rights and shift-lefts | 17:31 |
openpowerbot | [irc] <sadoon[m]1> if we had bigger element sizes some things can be shortcut, but it's really not necessary | 17:32 |
openpowerbot | [irc] <programmerjake> well, with the bigint instructions and some hw optimizations, we can get effectively 256-bit integer add/sub/and/or/xor and 256x64->320-bit integer mul | 17:34 |
openpowerbot | [irc] <sadoon[m]1> Is bigint already implemented? | 17:34 |
openpowerbot | [irc] <sadoon[m]1> That would be sick | 17:34 |
openpowerbot | [irc] <programmerjake> yes, the instructions are, in the simulator. | 17:34 |
openpowerbot | [irc] <sadoon[m]1> fucking amazing | 17:35 |
openpowerbot | [irc] <sadoon[m]1> mind my French | 17:35 |
openpowerbot | [irc] <sadoon[m]1> for example we have h = h*r, where h is 3 64-bit variables and MANY instructions are needed to get it right | 17:35 |
openpowerbot | [irc] <sadoon[m]1> It's basically grade 3 maths of mul and add just to get it right | 17:35 |
openpowerbot | [irc] <sadoon[m]1> With bigint 256-bit size, it's literally one instruction | 17:36 |
openpowerbot | [irc] <sadoon[m]1> MUL(d0, h0, r0); MUL(d, h1, s2); ADD(d0, d); MUL(d, h2, s1); ADD(d0, d); | 17:36 |
openpowerbot | [irc] <sadoon[m]1> MUL(d1, h0, r1); MUL(d, h1, r0); ADD(d1, d); MUL(d, h2, s2); ADD(d1, d); | 17:37 |
openpowerbot | [irc] <sadoon[m]1> MUL(d2, h0, r2); MUL(d, h1, r1); ADD(d2, d); MUL(d, h2, r0); ADD(d2, d); | 17:37 |
openpowerbot | [irc] <sadoon[m]1> This is the most computationally expensive part of the loop | 17:37 |
markos_ | programmerjake, mind listing the 256-bit arithmetic instructions as I'm going to need them as well, or the wiki page listing them if there is one | 17:37 |
openpowerbot | [irc] <sadoon[m]1> Also | 17:37 |
openpowerbot | [irc] <sadoon[m]1> h0 += (( t0 ) & 0xfffffffffff); | 17:38 |
openpowerbot | [irc] <sadoon[m]1> h1 += (((t0 >> 44) | (t1 << 20)) & 0xfffffffffff); | 17:38 |
openpowerbot | [irc] <sadoon[m]1> h2 += (((t1 >> 24) ) & 0x3ffffffffff) | hibit; | 17:38 |
openpowerbot | [irc] <sadoon[m]1> This one I already did in hardware in one FSM state | 17:38 |
openpowerbot | [irc] <sadoon[m]1> Also doable the same way in bigint | 17:38 |
openpowerbot | [irc] <sadoon[m]1> Because h is now one 256-bit unsigned int | 17:38 |
openpowerbot | [irc] <programmerjake> bigint isn't quite 256-bit, but instead a sv loop chains a sequence of 64-bit ops together to get a N*64-bit add or a 64 by N*64-bit mul | 17:38 |
openpowerbot | [irc] <programmerjake> https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/bigint/bigint_cases.py;h=38ad4e084682dc342c9dbc1c412c415cef3eda33;hb=ca22d9687c91e764bb463ee776fb2f6efbf6eae9#l236 | 17:39 |
openpowerbot | [irc] <sadoon[m]1> Still means we don't have to do carry rollover our selves | 17:39 |
openpowerbot | [irc] <programmerjake> a 256x256->512-bit mul: https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/bigint/powmod.py;h=fa43ede5bbb2639431dfa2092ac702988e5b5e7b;hb=ca22d9687c91e764bb463ee776fb2f6efbf6eae9#l20 | 17:39 |
markos_ | yeah, I meant those, thanks | 17:40 |
openpowerbot | [irc] <programmerjake> for the full list of new bigint insns, see: https://libre-soc.org/openpower/sv/rfc/ls003.bignum/ | 17:42 |
openpowerbot | [irc] <programmerjake> some bigint ops don't need new insns, e.g. add is just sv.adde | 17:42 |
openpowerbot | [irc] <sadoon[m]1> sadoon[m]1: Oh now I remember, this is just masking off some bits, so I did it in HW by truncating the register, fun | 17:42 |
*** choozy <choozy!~choozy@80-62-174-82.ftth.glasoperator.nl> has joined #libre-soc | 17:45 | |
markos_ | perfect thanks | 17:45 |
openpowerbot | [irc] <sadoon[m]1> For fun, here is my poly1305 hw implementation from almost two years ago | 17:49 |
openpowerbot | [irc] <sadoon[m]1> https://albader.co/poly1305.sv | 17:49 |
openpowerbot | [irc] <sadoon[m]1> You can tell it was done in a hurry but hopefully it's slightly more readable than the C implementation | 17:50 |
openpowerbot | [irc] <sadoon[m]1> The data bits are hardcoded of course | 17:51 |
openpowerbot | [irc] <sadoon[m]1> (the message to authenticate) | 17:51 |
markos_ | looks like C | 17:52 |
openpowerbot | [irc] <sadoon[m]1> Line 246 (S_BLOCKS_2) is where the multiplication happens, here reduced to one state again | 17:52 |
markos_ | but not quite | 17:52 |
markos_ | what is it, HDL? | 17:52 |
openpowerbot | [irc] <sadoon[m]1> Yep, that's verilog/systemverilog | 17:52 |
openpowerbot | [irc] <sadoon[m]1> Yep | 17:52 |
markos_ | ah | 17:52 |
markos_ | the tabs are funny, vim has messed up | 17:53 |
openpowerbot | [irc] <sadoon[m]1> heheh would you beleive I used vim to write this | 17:53 |
markos_ | of course I would why would you use something else? :D | 17:53 |
openpowerbot | [irc] <sadoon[m]1> Agree | 17:54 |
openpowerbot | [irc] <sadoon[m]1> :) | 17:54 |
openpowerbot | [irc] <sadoon[m]1> The reason I'm mentioning this implementation is because the real bummer was having to use 4 states just to put the numbers back together (BLOCKS_5-8), this is entirely gone with bigint | 17:54 |
openpowerbot | [irc] <sadoon[m]1> If anyone wants the testbench simulation of this I can also send it for your enjoyment, keep in mind I used modelsim back then but as long as you use sv2v and iverilog/verilator it can work fine I think | 17:55 |
markos_ | too much of a newbie in this stuff yet | 17:56 |
openpowerbot | [irc] <programmerjake> i had to pipe through expand -t2 ... | 17:56 |
openpowerbot | [irc] <sadoon[m]1> Yeah.. my silly uni days formatting | 17:56 |
openpowerbot | [irc] <sadoon[m]1> The FPGA did manage to run at 90MHz with these though, and 75MHz with 7 of them running in parallel | 17:57 |
openpowerbot | [irc] <programmerjake> reminds me of when i was learning C and the book i had recommended everyone come up with their own formatting style, now i think it best to just use an autoformatter and use a comm9n | 17:58 |
openpowerbot | [irc] <programmerjake> common style | 17:58 |
openpowerbot | [irc] <sadoon[m]1> Needless to say got an A on that project :D | 17:58 |
openpowerbot | [irc] <sadoon[m]1> programmerjake: Couldn't agree more, it just gets in the way when you use your own style | 17:58 |
markos_ | don't forget this was back at the time where formatting was absolutely required in eg Fortran, this was considered a big FU to the Fortran coders' strict formatting rules :) | 18:00 |
markos_ | so being able to have relaxed and personalized formatting was such a big relief | 18:01 |
openpowerbot | [irc] <programmerjake> yeah, though in hind sight having stricter formatting would have been nice, much easier to read any C code if everything is formatted the same | 18:02 |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 18:02 | |
markos_ | agreed there | 18:02 |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 18:02 | |
openpowerbot | [irc] <programmerjake> though, if you haven't seen it yet, you should see the bourne shell's source, it's C with enough macros to make it a wannabe ALGOL | 18:03 |
openpowerbot | [irc] <programmerjake> 🤮 | 18:03 |
openpowerbot | [irc] <programmerjake> e.g. https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh/args.c | 18:06 |
openpowerbot | [irc] <programmerjake> all the macros: https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/src/cmd/sh/mac.h | 18:06 |
openpowerbot | [irc] <sadoon[m]1> That's nuts | 18:13 |
openpowerbot | [irc] <sadoon[m]1> Wow they literally macro'd curly braces and logical ops | 18:14 |
openpowerbot | [irc] <sadoon[m]1> Cursed | 18:14 |
openpowerbot | [irc] <sadoon[m]1> Cursed and *bourne* again eh? ;P | 18:15 |
Lucretia | that's called, realising the language you're using is shit. | 18:16 |
Lucretia | ...and is going to cause you problems. | 18:16 |
openpowerbot | [irc] <sadoon[m]1> I mean C's syntax isn't its worst point all things considered | 18:18 |
openpowerbot | [irc] <programmerjake> ALGOL was just popular at that time... | 18:18 |
openpowerbot | [irc] <sadoon[m]1> I remember a professor talking about a competition of the most ambiguous C code | 18:19 |
openpowerbot | [irc] <sadoon[m]1> It's hilarious | 18:19 |
openpowerbot | [irc] <sadoon[m]1> You basically #define everything to have no discernable meaning | 18:19 |
openpowerbot | [irc] <sadoon[m]1> And typedef etc | 18:19 |
openpowerbot | [irc] <sadoon[m]1> Let's see if I can find the video | 18:20 |
openpowerbot | [irc] <programmerjake> https://www.ioccc.org/2012/endoh2/endoh2.c | 18:24 |
openpowerbot | [irc] <programmerjake> https://www.ioccc.org/2012/endoh2/hint.html | 18:24 |
openpowerbot | [irc] <programmerjake> program that reformats itself in the shape of the digits of pi/e | 18:24 |
openpowerbot | [irc] <programmerjake> c compiler for i386 that can compile itself: https://www.ioccc.org/2001/bellard.hint | 18:30 |
openpowerbot | [irc] <programmerjake> https://www.ioccc.org/2001/bellard.c | 18:30 |
openpowerbot | [irc] <programmerjake> more on that https://bellard.org/otcc/ | 18:31 |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 19:19 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 19:19 | |
*** gnucode <gnucode!~gnucode@user/jab> has quit IRC | 19:58 | |
*** gnucode <gnucode!~gnucode@user/jab> has joined #libre-soc | 19:58 | |
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has quit IRC | 20:47 | |
*** lxo <lxo!~lxo@gateway/tor-sasl/lxo> has joined #libre-soc | 21:01 | |
*** choozy <choozy!~choozy@80-62-174-82.ftth.glasoperator.nl> has quit IRC | 22:30 | |
openpowerbot | [irc] <programmerjake> I fixed the scalar EXTRA2 encoding (bug #1161), if someone can double-check my changes to the reference algorithms on the wiki, that'd be greatly appreciated! https://git.libre-soc.org/?p=libreriscv.git;a=commitdiff;h=24576f370d5b0b0282b821062c66e1ff39ab8019 | 22:57 |
openpowerbot | [irc] <programmerjake> I did check insndb and afaict it's correct | 22:58 |
openpowerbot | [irc] <programmerjake> for whoever is double-checking, please leave a comment on the bug and close it if you think it's fine: https://bugs.libre-soc.org/show_bug.cgi?id=1161 | 23:00 |
openpowerbot | [irc] <programmerjake> maybe ghostmansd or lkcl can check it? since you've both worked on the EXTRA2/3 encodings before... | 23:01 |
*** Gooberpatrol66 <Gooberpatrol66!~Gooberpat@user/gooberpatrol66> has quit IRC | 23:15 | |
*** Gooberpatrol66 <Gooberpatrol66!~Gooberpat@user/gooberpatrol66> has joined #libre-soc | 23:24 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!